From c44165920aab659fd2d857ea7a2a59579d3f033c Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Fri, 13 Oct 2023 06:39:08 -0300 Subject: [PATCH] func_8008BCBC --- src/main/hud.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/hud.c b/src/main/hud.c index 1f688717..70a3d714 100644 --- a/src/main/hud.c +++ b/src/main/hud.c @@ -129,7 +129,23 @@ void func_8008BC80(void) { } } -#pragma GLOBAL_ASM("asm/us/nonmatchings/main/hud/func_8008BCBC.s") +s32 func_8008BCBC(s32 arg0) { + s32 temp = 10; + s32 ret; + + if (arg0 < 0) { + arg0 = (s64) -arg0; + } + + ret = 1; + + while (arg0 >= temp) { + ret++; + temp *= 10; + } + + return ret; +} #pragma GLOBAL_ASM("asm/us/nonmatchings/main/hud/func_8008BD00.s")