1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 19:04:38 +00:00

Merge branch 'master' into doc_pause_menu

This commit is contained in:
Dragorn421 2022-12-26 16:29:33 +01:00
commit a49731dd06
No known key found for this signature in database
GPG key ID: 32B53D2D16FC4118
292 changed files with 8390 additions and 7913 deletions

View file

@ -2,17 +2,17 @@
#include "quake.h"
#include "terminal.h"
void* D_8012D1F0 = NULL;
void* gDebugCutsceneScript = NULL;
UNK_TYPE D_8012D1F4 = 0; // unused
Input* D_8012D1F8 = NULL;
TransitionUnk sTrnsnUnk;
s32 gTrnsnUnkState;
VisMono D_80161498;
Color_RGBA8_u32 D_801614B0;
Color_RGBA8_u32 gVisMonoColor;
FaultClient D_801614B8;
s16 sTransitionFillTimer;
u64 D_801614D0[0xA00];
u64 sDebugCutsceneScriptBuf[0xA00];
void Play_SpawnScene(PlayState* this, s32 sceneId, s32 spawn);
@ -198,7 +198,7 @@ void Play_Destroy(GameState* thisx) {
}
Letterbox_Destroy();
TransitionFade_Destroy(&this->transitionFade);
TransitionFade_Destroy(&this->transitionFadeFlash);
VisMono_Destroy(&D_80161498);
if (gSaveContext.linkAge != this->linkAgeOnLoad) {
@ -266,7 +266,7 @@ void Play_Init(GameState* thisx) {
EffectSs_InitInfo(this, 0x55);
CollisionCheck_InitContext(this, &this->colChkCtx);
AnimationContext_Reset(&this->animationCtx);
func_8006450C(this, &this->csCtx);
Cutscene_InitContext(this, &this->csCtx);
if (gSaveContext.nextCutsceneIndex != 0xFFEF) {
gSaveContext.cutsceneIndex = gSaveContext.nextCutsceneIndex;
@ -371,7 +371,7 @@ void Play_Init(GameState* thisx) {
this->transitionTrigger = TRANS_TRIGGER_END;
this->unk_11E16 = 0xFF;
this->unk_11E18 = 0;
this->unk_11DE9 = false;
this->haltAllActors = false;
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
@ -386,13 +386,13 @@ void Play_Init(GameState* thisx) {
}
Letterbox_Init();
TransitionFade_Init(&this->transitionFade);
TransitionFade_SetType(&this->transitionFade, 3);
TransitionFade_SetColor(&this->transitionFade, RGBA8(160, 160, 160, 255));
TransitionFade_Start(&this->transitionFade);
TransitionFade_Init(&this->transitionFadeFlash);
TransitionFade_SetType(&this->transitionFadeFlash, TRANS_INSTANCE_TYPE_FADE_FLASH);
TransitionFade_SetColor(&this->transitionFadeFlash, RGBA8(160, 160, 160, 255));
TransitionFade_Start(&this->transitionFadeFlash);
VisMono_Init(&D_80161498);
D_801614B0.a = 0;
Flags_UnsetAllEnv(this);
gVisMonoColor.a = 0;
CutsceneFlags_UnsetAll(this);
osSyncPrintf("ZELDA ALLOC SIZE=%x\n", THA_GetRemaining(&this->state.tha));
zAllocSize = THA_GetRemaining(&this->state.tha);
@ -436,10 +436,13 @@ void Play_Init(GameState* thisx) {
AnimationContext_Update(this, &this->animationCtx);
gSaveContext.respawnFlag = 0;
if (dREG(95) != 0) {
D_8012D1F0 = D_801614D0;
osSyncPrintf("\nkawauso_data=[%x]", D_8012D1F0);
DmaMgr_DmaRomToRam(0x03FEB000, D_8012D1F0, sizeof(D_801614D0));
if (R_USE_DEBUG_CUTSCENE) {
gDebugCutsceneScript = sDebugCutsceneScriptBuf;
osSyncPrintf("\nkawauso_data=[%x]", gDebugCutsceneScript);
// This hardcoded ROM address extends past the end of the ROM file.
// Presumably the ROM was larger at a previous point in development when this debug feature was used.
DmaMgr_DmaRomToRam(0x03FEB000, gDebugCutsceneScript, sizeof(sDebugCutsceneScriptBuf));
}
}
@ -609,9 +612,9 @@ void Play_Update(PlayState* this) {
}
if (this->transitionTrigger == TRANS_TRIGGER_END) {
this->transitionCtx.setType(&this->transitionCtx.instanceData, 1);
this->transitionCtx.setType(&this->transitionCtx.instanceData, TRANS_INSTANCE_TYPE_FILL_OUT);
} else {
this->transitionCtx.setType(&this->transitionCtx.instanceData, 2);
this->transitionCtx.setType(&this->transitionCtx.instanceData, TRANS_INSTANCE_TYPE_FILL_IN);
}
this->transitionCtx.start(&this->transitionCtx.instanceData);
@ -888,15 +891,15 @@ void Play_Update(PlayState* this) {
PLAY_LOG(3637);
if (!this->unk_11DE9) {
if (!this->haltAllActors) {
Actor_UpdateAll(this, &this->actorCtx);
}
PLAY_LOG(3643);
func_80064558(this, &this->csCtx);
Cutscene_UpdateManual(this, &this->csCtx);
PLAY_LOG(3648);
func_800645A0(this, &this->csCtx);
Cutscene_UpdateScripted(this, &this->csCtx);
PLAY_LOG(3651);
Effect_UpdateAll(this);
@ -970,7 +973,7 @@ void Play_Update(PlayState* this) {
Letterbox_Update(R_UPDATE_RATE);
PLAY_LOG(3783);
TransitionFade_Update(&this->transitionFade, R_UPDATE_RATE);
TransitionFade_Update(&this->transitionFadeFlash, R_UPDATE_RATE);
} else {
goto skip;
}
@ -1094,10 +1097,10 @@ void Play_Draw(PlayState* this) {
this->transitionCtx.draw(&this->transitionCtx.instanceData, &gfxP);
}
TransitionFade_Draw(&this->transitionFade, &gfxP);
TransitionFade_Draw(&this->transitionFadeFlash, &gfxP);
if (D_801614B0.a > 0) {
D_80161498.primColor.rgba = D_801614B0.rgba;
if (gVisMonoColor.a > 0) {
D_80161498.primColor.rgba = gVisMonoColor.rgba;
VisMono_Draw(&D_80161498, &gfxP);
}