mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 05:25:01 +03:00
Run Radio Message box calculations to their draw function
Some checks are pending
Some checks are pending
This commit is contained in:
parent
8bedb8f30d
commit
fae975e483
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
@ -454,6 +456,8 @@ void func_radio_800BB388(void) {
|
||||
u16* palette;
|
||||
f32 sp30;
|
||||
|
||||
Radio_CalculatePositions();
|
||||
|
||||
if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) {
|
||||
temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f;
|
||||
if ((gRadioTextBoxPosY + 16.0f) <= (temp_fa0 + gRadioTextBoxPosY)) {
|
||||
|
Loading…
Reference in New Issue
Block a user