cleanup
This commit is contained in:
1 parent
a11d88c2a7
commit
8f7a3b6f0b
2 files changed
+9
-2
No files matched your search
@@ -27,7 +27,8 @@ extern Gfx *gdl_head;
|
||||
#define s2d_timer gGlobalTimer
|
||||
|
||||
// The equivalent vsprintf in your game (defaults to libultra _Printf)
|
||||
#define vsprintf _Printf
|
||||
#define vsprintf(dst, str, fmt, args) _Printf(proutSprintf, dst, fmt, args)
|
||||
extern char *proutSprintf(char *dst, const char *src, size_t count);
|
||||
|
||||
|
||||
// texture glyph width and height
|
||||
|
||||
+7
-1
@@ -108,9 +108,15 @@ void s2d_type_print(int x, int y, const char *str, uObjMtx *buf, int *pos) {
|
||||
}
|
||||
|
||||
void s2d_vsprint(int x, int y, uObjMtx *buf, const char *str, ...) {
|
||||
int last_chr;
|
||||
va_list args;
|
||||
char *dst = alloc(s2d_strlen(str) * 2);
|
||||
va_start(args, str);
|
||||
// vsprintf(str, )
|
||||
last_chr = vsprintf(dst, str, str, args);
|
||||
if (last_chr >= 0) {
|
||||
dst[last_chr] = '\0';
|
||||
}
|
||||
s2d_print(x, y, dst, buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user