mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 12:24:39 +00:00
PlayState Rename (#1231)
* global context -> play * fix PlayState* PlayState
This commit is contained in:
parent
154f44b6da
commit
2e6279bc8e
912 changed files with 40489 additions and 41078 deletions
|
@ -1,23 +1,23 @@
|
|||
#include "global.h"
|
||||
|
||||
void GameOver_Init(GlobalContext* globalCtx) {
|
||||
globalCtx->gameOverCtx.state = GAMEOVER_INACTIVE;
|
||||
void GameOver_Init(PlayState* play) {
|
||||
play->gameOverCtx.state = GAMEOVER_INACTIVE;
|
||||
}
|
||||
|
||||
void GameOver_FadeInLights(GlobalContext* globalCtx) {
|
||||
GameOverContext* gameOverCtx = &globalCtx->gameOverCtx;
|
||||
void GameOver_FadeInLights(PlayState* play) {
|
||||
GameOverContext* gameOverCtx = &play->gameOverCtx;
|
||||
|
||||
if ((gameOverCtx->state >= GAMEOVER_DEATH_WAIT_GROUND && gameOverCtx->state < GAMEOVER_REVIVE_START) ||
|
||||
(gameOverCtx->state >= GAMEOVER_REVIVE_RUMBLE && gameOverCtx->state < GAMEOVER_REVIVE_FADE_OUT)) {
|
||||
Environment_FadeInGameOverLights(globalCtx);
|
||||
Environment_FadeInGameOverLights(play);
|
||||
}
|
||||
}
|
||||
|
||||
// This variable cannot be moved into this file as all of z_message_PAL rodata is in the way
|
||||
extern s16 gGameOverTimer;
|
||||
|
||||
void GameOver_Update(GlobalContext* globalCtx) {
|
||||
GameOverContext* gameOverCtx = &globalCtx->gameOverCtx;
|
||||
void GameOver_Update(PlayState* play) {
|
||||
GameOverContext* gameOverCtx = &play->gameOverCtx;
|
||||
s16 i;
|
||||
s16 j;
|
||||
s32 v90;
|
||||
|
@ -26,7 +26,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
|
||||
switch (gameOverCtx->state) {
|
||||
case GAMEOVER_DEATH_START:
|
||||
Message_CloseTextbox(globalCtx);
|
||||
Message_CloseTextbox(play);
|
||||
|
||||
gSaveContext.timer1State = 0;
|
||||
gSaveContext.timer2State = 0;
|
||||
|
@ -41,7 +41,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
for (j = 1; j < ARRAY_COUNT(gSaveContext.equips.buttonItems); j++) {
|
||||
if (gSaveContext.equips.buttonItems[j] == gSpoilingItems[i]) {
|
||||
gSaveContext.equips.buttonItems[j] = gSpoilingItemReverts[i];
|
||||
Interface_LoadItemIcon1(globalCtx, j);
|
||||
Interface_LoadItemIcon1(play, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
|
||||
Environment_InitGameOverLights(globalCtx);
|
||||
Environment_InitGameOverLights(play);
|
||||
gGameOverTimer = 20;
|
||||
if (1) {}
|
||||
v90 = VREG(90);
|
||||
|
@ -92,7 +92,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
gGameOverTimer--;
|
||||
|
||||
if (gGameOverTimer == 0) {
|
||||
globalCtx->pauseCtx.state = 8;
|
||||
play->pauseCtx.state = 8;
|
||||
gameOverCtx->state++;
|
||||
func_800AA15C();
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
case GAMEOVER_REVIVE_START:
|
||||
gameOverCtx->state++;
|
||||
gGameOverTimer = 0;
|
||||
Environment_InitGameOverLights(globalCtx);
|
||||
Environment_InitGameOverLights(play);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
return;
|
||||
|
||||
|
@ -137,7 +137,7 @@ void GameOver_Update(GlobalContext* globalCtx) {
|
|||
break;
|
||||
|
||||
case GAMEOVER_REVIVE_FADE_OUT:
|
||||
Environment_FadeOutGameOverLights(globalCtx);
|
||||
Environment_FadeOutGameOverLights(play);
|
||||
gGameOverTimer--;
|
||||
|
||||
if (gGameOverTimer == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue