From f72e3a6c5955ee0edd481ed231bd830c9e979920 Mon Sep 17 00:00:00 2001 From: Rainchus Date: Sun, 21 Jan 2024 16:27:04 -0600 Subject: [PATCH] fix fast casts in w03 --- src/REL/w03Dll/mg_item.c | 5 ++--- src/REL/w03Dll/statue.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/REL/w03Dll/mg_item.c b/src/REL/w03Dll/mg_item.c index 99b745fe..066ee2b0 100644 --- a/src/REL/w03Dll/mg_item.c +++ b/src/REL/w03Dll/mg_item.c @@ -7,7 +7,7 @@ #include "game/board/space.h" #include "game/object.h" #include "game/board/player.h" -// #include "math.h" +#include "math.h" #include "board_unsplit.h" #include "game/hsfman.h" #include "dolphin/os/OSFastCast.h" @@ -789,8 +789,7 @@ void fn_1_B748(omObjData* arg0, someBits2* arg1) { } if (arg1->unk1 < 90) { - f32 temp; - temp_f0 = __OSu8tof32((u8*)&arg1->unk1); + OSu8tof32((u8*)&arg1->unk1, &temp_f0); BoardModelPosGet(temp_r29, &sp8); sp8.y += arg0->trans.y; BoardModelPosSetV(temp_r29, &sp8); diff --git a/src/REL/w03Dll/statue.c b/src/REL/w03Dll/statue.c index 511a4913..60737d12 100644 --- a/src/REL/w03Dll/statue.c +++ b/src/REL/w03Dll/statue.c @@ -607,7 +607,7 @@ void fn_1_2B44(void) { f32 temp_f27 = 0.0f; f32 temp_f29 = 480.0f; - sp18.a = __OSf32tou8(lbl_1_bss_30); + OSf32tou8(&lbl_1_bss_30, &sp18.a); GXInvalidateTexAll(); GXLoadTexObj(&lbl_1_bss_48, GX_TEXMAP0); C_MTXOrtho(sp50, temp_f27, temp_f29, temp_f28, temp_f30, 0.0f, 10.0f);