Updated for new blit routines.

This commit is contained in:
Scott Duensing 2019-10-08 20:06:25 -05:00
parent bd66747d89
commit be75c40812
8 changed files with 12 additions and 63 deletions

View file

@ -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++;
}
}

View file

@ -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

View file

@ -1,3 +1,3 @@
IF Engine Test Game
output.z8
data/output.z8
thin.sta

View file

@ -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);
}

2
main.c
View file

@ -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);

Binary file not shown.

View file

@ -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

BIN
thin.sta

Binary file not shown.