Fixed jlDrawPixelSet() on the IIgs.

This commit is contained in:
Scott Duensing 2020-07-07 17:20:55 -05:00
parent d3fa3874a1
commit 9ac1b105e2
2 changed files with 17 additions and 2 deletions

View file

@ -881,6 +881,7 @@ asmGetPoint start
temp1 equ 1
jsubroutine (4:surface,2:Xp,2:Yp),2
using GlobalData
lda Yp ; Load accumulator with Y location
asl a ; Shift accumulator left (multiply by 2) for word offset into table

View file

@ -23,6 +23,7 @@
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <assert.h>
#define JOEY_MAIN
@ -155,7 +156,19 @@ void blitTest(void) {
}
void grid() {
void exerciseAPI(void) {
jlDrawColorSet(0);
jlDrawClear();
jlDrawColorSet(15);
jlDrawPixelSet(10, 10);
assert(jlDrawPixelGet(10, 10) == 15);
}
void grid(void) {
int i;
jlDrawColorSet(0);
@ -283,7 +296,8 @@ int main(void) {
jlUtilStartup("JoeyLib Test");
//blitTest();
grid();
exerciseAPI();
//grid();
//lineTest();
jlUtilShutdown();