Update the truncate number function to use decimal point (#333)

* Fixed to truncate as "1.234M" instead of "1234K"

* Optimized by switching to strings to avoid divisions

* Changed FP constants to strings

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
MeirGavish
2025-12-23 07:52:30 +02:00
committed by GitHub
co-authored by Copilot
parent f76c25614c
commit 6575fc7f94
8 changed files with 304 additions and 84 deletions
+5 -1
View File
@@ -3,6 +3,7 @@
#include "card.h"
#include "font.h"
#include "game.h"
#include "gbalatro_sys8.h"
#include "graphic_utils.h"
#include "joker.h"
#include "sprite.h"
@@ -33,7 +34,10 @@ void init()
CLR_WHITE,
TTE_BIT_UNPACK_OFFSET,
&gbalatro_sys8Font,
NULL
// Explicitly use 8x8 tile text drawing function to improve performance
// See https://gbadev.net/tonc/tte.html#ssec-map-reg
se_drawg_w8h8
);
tte_erase_screen();
tte_init_con();