1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 23:14:37 +00:00

Change linker script so gGameOverTimer can be in z_game_over.c (#1939)

* Change linker script so gGameOverTimer can be in z_game_over.c

* gGameOverTimer -> sGameOverTimer

* include_data_only_with_rodata -> include_data_only_within_rodata
This commit is contained in:
cadmic 2024-06-10 07:07:51 -07:00 committed by GitHub
parent e88084fe65
commit eb660765b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 64 additions and 86 deletions

View file

@ -13,8 +13,7 @@ void GameOver_FadeInLights(PlayState* play) {
}
}
// This variable cannot be moved into this file as all of z_message_PAL rodata is in the way
extern s16 gGameOverTimer;
s16 sGameOverTimer = 0;
void GameOver_Update(PlayState* play) {
GameOverContext* gameOverCtx = &play->gameOverCtx;
@ -74,7 +73,7 @@ void GameOver_Update(PlayState* play) {
gSaveContext.hudVisibilityModeTimer = 0; // false, HUD_VISIBILITY_NO_CHANGE
Environment_InitGameOverLights(play);
gGameOverTimer = 20;
sGameOverTimer = 20;
if (1) {}
rumbleStrength = R_GAME_OVER_RUMBLE_STRENGTH;
@ -92,9 +91,9 @@ void GameOver_Update(PlayState* play) {
break;
case GAMEOVER_DEATH_DELAY_MENU:
gGameOverTimer--;
sGameOverTimer--;
if (gGameOverTimer == 0) {
if (sGameOverTimer == 0) {
play->pauseCtx.state = PAUSE_STATE_8;
gameOverCtx->state++;
Rumble_Reset();
@ -103,13 +102,13 @@ void GameOver_Update(PlayState* play) {
case GAMEOVER_REVIVE_START:
gameOverCtx->state++;
gGameOverTimer = 0;
sGameOverTimer = 0;
Environment_InitGameOverLights(play);
Letterbox_SetSizeTarget(32);
return;
case GAMEOVER_REVIVE_RUMBLE:
gGameOverTimer = 50;
sGameOverTimer = 50;
gameOverCtx->state++;
if (1) {}
@ -123,28 +122,28 @@ void GameOver_Update(PlayState* play) {
break;
case GAMEOVER_REVIVE_WAIT_GROUND:
gGameOverTimer--;
sGameOverTimer--;
if (gGameOverTimer == 0) {
gGameOverTimer = 64;
if (sGameOverTimer == 0) {
sGameOverTimer = 64;
gameOverCtx->state++;
}
break;
case GAMEOVER_REVIVE_WAIT_FAIRY:
gGameOverTimer--;
sGameOverTimer--;
if (gGameOverTimer == 0) {
gGameOverTimer = 50;
if (sGameOverTimer == 0) {
sGameOverTimer = 50;
gameOverCtx->state++;
}
break;
case GAMEOVER_REVIVE_FADE_OUT:
Environment_FadeOutGameOverLights(play);
gGameOverTimer--;
sGameOverTimer--;
if (gGameOverTimer == 0) {
if (sGameOverTimer == 0) {
gameOverCtx->state = GAMEOVER_INACTIVE;
}
break;

View file

@ -3358,12 +3358,3 @@ void Message_SetTables(void) {
sFraMessageEntryTablePtr = sFraMessageEntryTable;
sStaffMessageEntryTablePtr = sStaffMessageEntryTable;
}
#if OOT_DEBUG
// Appears to be file padding
UNK_TYPE D_80153D7C = 0x00000000;
#endif
// This should be part of z_game_over.c, but cannot be moved there as the entire
// late_rodata section of this file is in the way
s16 gGameOverTimer = 0;