Truncate Scores (#269)

* Fixed score truncation erasure, and centering for chips, mult, score and "temp score

* Added centering for money

* Added tests for truncate_uint_to_suffixed_str()

* Fixed u32 bug with get_digits

* Fixed score flames for large numbers

* Small change to update documentation

* Added 1 pixel on to score rect on the left to make room for full character tile + reset_top_left_panel_bottom_row() refactor

* Replaced directional defines with enums

* Updated ante_lut comment

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
MeirGavish
2025-12-02 08:28:36 +02:00
committed by GitHub
co-authored by Copilot
parent 07cab81ba1
commit 43d837571e
14 changed files with 411 additions and 148 deletions
+5 -4
View File
@@ -8,9 +8,10 @@
#include <tonc.h>
// +1 is added because we'll actually be indexing at 1, but if something causes you to go to ante 0, there will still be
// a value there.
static const int ante_lut[MAX_ANTE + 1] = {100, 300, 800, 2000, 5000, 11000, 20000, 35000, 50000};
// Maps the ante number to the base blind requirement for that ante.
// The game starts at ante 1 which is at index 1 for base requirement 300.
// Ante 0 is also there in case it is ever reached.
static const u32 ante_lut[] = {100, 300, 800, 2000, 5000, 11000, 20000, 35000, 50000};
// Palettes for the blinds (Transparency, Text Color, Shadow, Highlight, Main Color) Use this:
// http://www.budmelvin.com/dev/15bitconverter.html
@@ -69,7 +70,7 @@ void blind_init()
return;
}
int blind_get_requirement(enum BlindType type, int ante)
u32 blind_get_requirement(enum BlindType type, int ante)
{
// Ensure ante is within valid range
if (ante < 0 || ante > MAX_ANTE)