Run Radio Message box calculations to their draw function
Some checks are pending
GenerateBuilds / build-linux (push) Blocked by required conditions
GenerateBuilds / generate-port-otr (push) Waiting to run
GenerateBuilds / build-windows (push) Blocked by required conditions
GenerateBuilds / build-macos (push) Blocked by required conditions

This commit is contained in:
Kiloku 2025-01-12 22:53:02 -03:00 committed by Lywx
parent 8bedb8f30d
commit fae975e483
2 changed files with 9 additions and 4 deletions

View File

@ -64,6 +64,7 @@ typedef enum RadioCharacterId {
} RadioCharacterId;
void Radio_PlayMessage(u16*, RadioCharacterId);
void Radio_CalculatePositions();
void func_radio_800BB388(void);
void Radio_Draw(void);

View File

@ -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;