Updated for new blit routines.

This commit is contained in:
Scott Duensing 2019-10-08 20:00:41 -05:00
parent 4f3f7b55c2
commit 2c244d9f1d

View file

@ -41,6 +41,8 @@ __attribute__((__format__ (__printf__, 4, 0)))
void printAt(jlStaT *font, jint16 cx, jint16 cy, const char *what, ...) {
jint16 x;
jint16 y;
jint16 tx;
jint16 ty;
jint16 counter;
char msg[40]; // Very short messages (screen width). Be careful!
va_list va;
@ -49,10 +51,14 @@ void printAt(jlStaT *font, jint16 cx, jint16 cy, const char *what, ...) {
vsprintf(msg, what, va);
va_end(va);
tx = cx * 8;
ty = cy * 8;
for (counter=0; counter<(int)strlen(msg); counter++) {
x = msg[counter] % 40;
y = msg[counter] / 40;
jlDrawBlit8x8(jlStaSurfaceGet(font), x, y, counter + cx, cy);
jlDrawBlit8x8(jlStaSurfaceGet(font), x, y, tx, ty);
tx += 8;
}
}