added newlines

This commit is contained in:
farisawan-2000
2020-12-15 23:06:09 -05:00
parent 9f367cea26
commit 80672dafb7
2 changed files with 17 additions and 2 deletions

View File

@@ -15,7 +15,10 @@
#define gdl_head gDisplayListHead
extern Gfx *gdl_head;
// Other games: change this to the appropriate alloc function
// Other games/Homebrew users: change these values
// an allocator function of the format void *alloc(size_t bytes)
#define alloc alloc_display_list
// The frame timer that is used to time s2d_type_print
@@ -24,4 +27,10 @@ extern Gfx *gdl_head;
// The equivalent vsprintf in your game (defaults to libultra _Printf)
#define vsprintf _Printf
// texture glyph width and height
#define TEX_WIDTH 16
#define TEX_HEIGHT 16
#endif

View File

@@ -19,6 +19,8 @@ void s2d_snprint(int x, int y, char *str, uObjMtx *buf, int len) {
char *p = str;
int tx = 0, ty = 0;
int tmp_len = 0;
int orig_x = x;
int orig_y = y;
// int r = 0, g = 0, b = 0, a = 0;
if (*p == '\0') return;
do {
@@ -59,6 +61,10 @@ void s2d_snprint(int x, int y, char *str, uObjMtx *buf, int len) {
s2d_alpha = s2d_atoi(p, &p);
break;
case '\n':
x = orig_x;
y += TEX_HEIGHT;
break;
default:
// if (s2d_colorFrames > 2) {
// s2d_colorFrames = 0;
@@ -102,7 +108,7 @@ void s2d_type_print(int x, int y, char *str, uObjMtx *buf, int *pos) {
void s2d_vsprint(int x, int y, uObjMtx *buf, char *str, ...) {
va_list args;
va_start(args, str);
vsprintf(str, )
// vsprintf(str, )
}