Very stupid question. This is working well:
Code: Select all
u16 var_a = 65000;
char my_string[32];
sprintf(my_string, "%u", var_a);
VDP_drawText(my_string, x, y); //x,y position in tiles
Also works with s16 with i.e. a = 32000 (as we need space for negative numbers).
Why this is not working:
Code: Select all
s32 var_a = 70000;
char my_string[32];
sprintf(my_string, "%ld", var_a);
VDP_drawText(my_string, x, y); //x,y position in tiles
Of course var_a is 70000 internally, just not sure if sprintf() or VDP_drawText() breaks something.
Why I can play with 16bit numbers but not with 32bit numbers with sprintf() or VDP_drawText()??