diff options
| author | Kiloku <mateus.sateles@protonmail.com> | 2025-01-12 22:53:02 -0300 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2025-01-12 20:00:48 -0600 |
| commit | fae975e483877c9336f1d8752e90bab5d1654a05 (patch) | |
| tree | 1b86819432cc12fa568693d1a00134252ff2704e /src | |
| parent | 8bedb8f30d467bc5517f35b1f861c3cd8555583b (diff) | |
Run Radio Message box calculations to their draw function
Diffstat (limited to 'src')
| -rw-r--r-- | src/engine/fox_radio.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 754d5e9d..87ee7f7d 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -123,7 +123,12 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { gRadioMsg = msg; gRadioState = 100; - switch (gGameState) { + gRadioMsgId = Message_IdFromPtr(msg); + Audio_PlayVoice(gRadioMsgId); +} + +void Radio_CalculatePositions(){ + switch (gGameState) { case GSTATE_TITLE: gRadioPrintPosY = 176; gRadioPrintPosX = OTRGetRectDimensionFromLeftEdgeOverride(85.0f); @@ -154,9 +159,6 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { gRadioPortraitPosY = 178.0f; break; } - - gRadioMsgId = Message_IdFromPtr(msg); - Audio_PlayVoice(gRadioMsgId); } s32 sRadioUseRedBox; @@ -453,6 +455,8 @@ void func_radio_800BB388(void) { u8* texture; u16* palette; f32 sp30; + + Radio_CalculatePositions(); if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) { temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f; |
