diff --git a/config.h b/config.h index 15e06dfe..6629703d 100644 --- a/config.h +++ b/config.h @@ -33,6 +33,7 @@ extern Gfx *gdl_head; // texture glyph width and height #define TEX_WIDTH 16 #define TEX_HEIGHT 16 - +#define TAB_WIDTH_H TEX_WIDTH * 2 +#define TAB_WIDTH_V TEX_WIDTH / 2 #endif \ No newline at end of file diff --git a/s2d_parse.c b/s2d_parse.c index a121d076..2ccb9d3e 100644 --- a/s2d_parse.c +++ b/s2d_parse.c @@ -21,7 +21,9 @@ void s2d_snprint(int x, int y, const char *str, uObjMtx *buf, int len) { int tmp_len = 0; int orig_x = x; int orig_y = y; - // int r = 0, g = 0, b = 0, a = 0; + + s2d_red = s2d_green = s2d_blue = 255; + s2d_alpha = 255; if (*p == '\0') return; do { char r = *p; @@ -65,6 +67,13 @@ void s2d_snprint(int x, int y, const char *str, uObjMtx *buf, int len) { x = orig_x; y += TEX_HEIGHT; break; + case '\t': + x += TAB_WIDTH_H; + break; + case '\v': + x += TAB_WIDTH_V; + y += TEX_HEIGHT; + break; default: // if (s2d_colorFrames > 2) { // s2d_colorFrames = 0;