diff --git a/ansiterm.c b/ansiterm.c index dbe6312..d21cff6 100644 --- a/ansiterm.c +++ b/ansiterm.c @@ -502,7 +502,7 @@ void termRenderCharacterAtCursor(byte c) { _screenBuffer[i].x = cx; _screenBuffer[i].y = cy; if (_cursor.y > _hiddenLines) { - jlDrawBlit8x8(_ansiFont, cx, cy, _cursor.x - 1 + _xoff, _cursor.y - 1 + _yoff); + jlDrawBlit8x8(jlStaSurfaceGet(_ansiFont), cx, cy, (_cursor.x - 1 + _xoff) * 8, (_cursor.y - 1 + _yoff) * 8); } } @@ -513,7 +513,7 @@ void termRepaint(void) { int y; for (y=_hiddenLines; y<_rows; y++) { for (x=0; x<_columns; x++) { - jlDrawBlit8x8(_ansiFont, _screenBuffer[i].x, _screenBuffer[i].y, x + _xoff, y + _yoff); + jlDrawBlit8x8(jlStaSurfaceGet(_ansiFont), _screenBuffer[i].x, _screenBuffer[i].y, (jint16)(x + _xoff) * 8, (jint16)(y + _yoff) * 8); i++; } } diff --git a/build-IIgs.sh b/build-IIgs.sh index 6e042e6..8e78780 100755 --- a/build-IIgs.sh +++ b/build-IIgs.sh @@ -1,59 +1,8 @@ #!/bin/bash -e PROJECT=ifengine -DATA=(thin.sta output.z8 gamedata.dat) +DATA=(thin.sta output.z8 gamedata.dat nowhere.vec) #SOURCE=(*.c *.h) SOURCE=() -# --- HERE BE DRAGONS --- - -TARGET=${JOEY}/sdks/iix/IIgs/out/${PROJECT} -GSTARGET=31:/out/${PROJECT} -AC=${JOEY}/sdks/iix/ac/ -IMPORT=/tmp/import.po - -if [ -d ${TARGET} ]; then - rm -rf ${TARGET} -fi -mkdir -p ${TARGET} - -rm JLSTATS || true -rm /tmp/import.po || true - -cp -f ${JOEY}/dist/joey.h . -CFILES=($(ls -1 *.c)) -OFILES="" -for F in "${CFILES[@]}"; do - O=${F%.*} - OFILES="${OFILES} ${GSTARGET}/${O}" - echo "Compiling ${F}..." - iix compile ${F} keep=${GSTARGET}/${O} -done -rm joey.h - -cp -f ${JOEY}/dist/IIgs/joeylib#b20000 ${JOEY}/sdks/iix/IIgs/Libraries/joeylib -iix chtyp -t lib ${JOEY}/sdks/iix/IIgs/Libraries/joeylib -iix -DKeepType=S16 link ${OFILES} 13:joeylib keep=${GSTARGET}/${PROJECT} - -${AC}/import.sh ${TARGET}/${PROJECT} S16 -for F in "${DATA[@]}"; do - ${AC}/import.sh ${F} BIN -done - -mkdir -p /tmp/IIgs/source -for S in "${SOURCE[@]}"; do - for F in `ls -1 ${S}`; do - tr "\n" "\r" < ${F} > /tmp/IIgs/source/${F} - ${AC}/import.sh /tmp/IIgs/source/${F} TXT - rm /tmp/IIgs/source/${F} - done -done - -if [ ! -z $1 ]; then - pushd ${JOEY}/sdks/iix/gsplus - ./gsplus -config IIgsTest.cfg || true - popd - echo "" - ${AC}/export.sh JLSTATS - cat JLSTATS -fi +. ${JOEY}/joeylib/joeylib/build-IIgs.helper.sh diff --git a/gamedata.dat b/gamedata.dat index 1d10dce..b48d5be 100644 --- a/gamedata.dat +++ b/gamedata.dat @@ -1,3 +1,3 @@ IF Engine Test Game -output.z8 +data/output.z8 thin.sta diff --git a/joeyio.c b/joeyio.c index 3c465b3..0f51977 100644 --- a/joeyio.c +++ b/joeyio.c @@ -118,7 +118,7 @@ void display_char(int c) { _displayMode = DISPLAY_MODE_GRAPHICS - 1; set_next_display_mode(); // Render the image. - jlVecDisplay(_vectorImage, x, y); + jlVecDisplay(_vectorImage, (jint16)x, (jint16)y); // Save it to the graphics page. jlStaCreate(_graphicsPage); } @@ -179,9 +179,9 @@ void initialize_screen(void) { // Also handled in main // Create initial empty graphics image. - jlDrawColor(0); + jlDrawColorSet(0); jlDrawClear(); - jlDrawColor(15); + jlDrawColorSet(15); jlDisplayPresent(); jlStaCreate(_graphicsPage); } diff --git a/main.c b/main.c index d82d4a9..1ac8cd5 100644 --- a/main.c +++ b/main.c @@ -106,7 +106,7 @@ int main(void) { char game[40]; char text[40]; - in = fopen("gamedata.dat", "rt"); + in = fopen("data/gamedata.dat", "rt"); if (in != NULL) { fgets(name, 40, in); diff --git a/nowhere.vec b/nowhere.vec index 7dc1ad3..46c46cd 100644 Binary files a/nowhere.vec and b/nowhere.vec differ diff --git a/nowhere.vec.source b/nowhere.vec.source index 55d6523..7c004ef 100644 --- a/nowhere.vec.source +++ b/nowhere.vec.source @@ -18,12 +18,12 @@ line 0 101 87 124 126 128 148 133 160 136 168 141 172 146 171 149 169 153 169 15 # Fill Sun color 12 -# fill 242 74 +fill 242 74 # Fill Beach color 14 -#fill 105 161 +fill 105 161 # Fill Ocean color 1 -#fill 194 106 +fill 194 106 diff --git a/thin.sta b/thin.sta index 331d8da..7884ce5 100644 Binary files a/thin.sta and b/thin.sta differ