mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 13:35:11 +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;
|
} RadioCharacterId;
|
||||||
|
|
||||||
void Radio_PlayMessage(u16*, RadioCharacterId);
|
void Radio_PlayMessage(u16*, RadioCharacterId);
|
||||||
|
void Radio_CalculatePositions();
|
||||||
void func_radio_800BB388(void);
|
void func_radio_800BB388(void);
|
||||||
void Radio_Draw(void);
|
void Radio_Draw(void);
|
||||||
|
|
||||||
|
@ -123,7 +123,12 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) {
|
|||||||
gRadioMsg = msg;
|
gRadioMsg = msg;
|
||||||
gRadioState = 100;
|
gRadioState = 100;
|
||||||
|
|
||||||
switch (gGameState) {
|
gRadioMsgId = Message_IdFromPtr(msg);
|
||||||
|
Audio_PlayVoice(gRadioMsgId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Radio_CalculatePositions(){
|
||||||
|
switch (gGameState) {
|
||||||
case GSTATE_TITLE:
|
case GSTATE_TITLE:
|
||||||
gRadioPrintPosY = 176;
|
gRadioPrintPosY = 176;
|
||||||
gRadioPrintPosX = OTRGetRectDimensionFromLeftEdgeOverride(85.0f);
|
gRadioPrintPosX = OTRGetRectDimensionFromLeftEdgeOverride(85.0f);
|
||||||
@ -154,9 +159,6 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) {
|
|||||||
gRadioPortraitPosY = 178.0f;
|
gRadioPortraitPosY = 178.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
gRadioMsgId = Message_IdFromPtr(msg);
|
|
||||||
Audio_PlayVoice(gRadioMsgId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 sRadioUseRedBox;
|
s32 sRadioUseRedBox;
|
||||||
@ -454,6 +456,8 @@ void func_radio_800BB388(void) {
|
|||||||
u16* palette;
|
u16* palette;
|
||||||
f32 sp30;
|
f32 sp30;
|
||||||
|
|
||||||
|
Radio_CalculatePositions();
|
||||||
|
|
||||||
if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) {
|
if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) {
|
||||||
temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f;
|
temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f;
|
||||||
if ((gRadioTextBoxPosY + 16.0f) <= (temp_fa0 + gRadioTextBoxPosY)) {
|
if ((gRadioTextBoxPosY + 16.0f) <= (temp_fa0 + gRadioTextBoxPosY)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user