mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-25 23:35:04 -04:00
Play (2 NON_MATCHINGS) (#1109)
* Bring over progress from another branch
Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
* cleanup, fake match Play_Init
* small fixes
* Some small cleanup
* Match func_80165460 (from debug)
* Match func_80165658
* Match func_80165DB8, func_80165DCC, func_80165DF0, func_80165E04
* Match func_80167DE4 (from debug)
* Match func_80167F0C
* Match func_80168DAC
* Matched func_80169100
* Matched func_801691F0
* import D_801DFA18
* match Play_Main thanks to debug
* cleanup
* synray does it again
* add docs from debug
* fix func_801656A4
* more docs and cleanup
* Match func_80166B30 and diff fake match in Init
* import transition docs from OoT
* Play Update, sort of
* cleanup Play_Update
* more cleanup
* slightly more docs
* small docs
* Play_Draw WIP Thanks @petrie911
* progress?
* two more matches
* format
* misc play docs
* transitions cleanup
* Motion Blur
* Transitions
* Fog
* Bombers notebook + small cleanup
* bss
* Camera Functions
* Picto functions
* Init
* MotionBlur Clean up
* Floor Surface
* Pictographs some more
* regs
* fix circular dependency problem
* Cleanup PR commits outside play
* namefixer
* PR picto
* PR audio
* PR small clean ups
* debug strings
* Picto defines
* bss
* enums
* remove void
* typedefs
* Hireso -> BombersNotebook
* bss comments
* bss and I8/I5 functions
* Smaller PR comments
* Transitions
* Combine enums
* Revert "Combine enums"
This reverts commit 0da1ebcaed.
* Fix Transition defines
* RGBA16 macros
* Unname
* worldCoverAlpha
* Rename Update and Draw
* PR review, plus annotate bug
* Clean up nonmatchings with a closer DrawGame
* Format
* New macros
* UpdateMain and DrawMain
* Fix merge
* Small cleanups from PR
* zFar
* Intensity macros
* Format
* Remove bss comments
* Compression/decompression
* Small cleanup
* Format
* More PR cleanup
* Cleanup picto stuff
* format
* Fix compression comments
* Play processes state enums DONE -> READY
* cutscene comment
* fix bss
Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
+5
-5
@@ -50,7 +50,7 @@ void Graph_SetNextGfxPool(GraphicsContext* gfxCtx) {
|
||||
gfxCtx->workBuffer = pool->workBuffer;
|
||||
gfxCtx->debugBuffer = pool->debugBuffer;
|
||||
|
||||
gfxCtx->curFrameBuffer = (u16*)SysCfb_GetFbPtr(gfxCtx->framebufferIdx % 2);
|
||||
gfxCtx->curFrameBuffer = SysCfb_GetFbPtr(gfxCtx->framebufferIndex % 2);
|
||||
gSegments[0x0F] = gfxCtx->curFrameBuffer;
|
||||
|
||||
gfxCtx->zbuffer = SysCfb_GetZBuffer();
|
||||
@@ -116,7 +116,7 @@ void* Graph_FaultAddrConvFunc(void* address, void* param) {
|
||||
void Graph_Init(GraphicsContext* gfxCtx) {
|
||||
bzero(gfxCtx, sizeof(GraphicsContext));
|
||||
gfxCtx->gfxPoolIdx = 0;
|
||||
gfxCtx->framebufferIdx = 0;
|
||||
gfxCtx->framebufferIndex = 0;
|
||||
gfxCtx->viMode = NULL;
|
||||
gfxCtx->viConfigFeatures = gViConfigFeatures;
|
||||
gfxCtx->xScale = gViConfigXScale;
|
||||
@@ -165,7 +165,7 @@ retry:
|
||||
|
||||
gfxCtx->masterList = gGfxMasterDL;
|
||||
if (gfxCtx->callback != NULL) {
|
||||
gfxCtx->callback(gfxCtx, gfxCtx->callbackParam);
|
||||
gfxCtx->callback(gfxCtx, gfxCtx->callbackArg);
|
||||
}
|
||||
|
||||
task->type = M_GFXTASK;
|
||||
@@ -191,7 +191,7 @@ retry:
|
||||
if (SREG(33) & 1) {
|
||||
SREG(33) &= ~1;
|
||||
scTask->flags &= ~OS_SC_SWAPBUFFER;
|
||||
gfxCtx->framebufferIdx--;
|
||||
gfxCtx->framebufferIndex--;
|
||||
}
|
||||
|
||||
scTask->msgQ = &gfxCtx->queue;
|
||||
@@ -305,7 +305,7 @@ void Graph_ExecuteAndDraw(GraphicsContext* gfxCtx, GameState* gameState) {
|
||||
if (!problem) {
|
||||
Graph_TaskSet00(gfxCtx, gameState);
|
||||
gfxCtx->gfxPoolIdx++;
|
||||
gfxCtx->framebufferIdx++;
|
||||
gfxCtx->framebufferIndex++;
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
+7
-7
@@ -224,7 +224,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* mapper, PlayState* play) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(floorHeight); i++, spB8 >>= 1) {
|
||||
feetPosPtr->y += 50.0f;
|
||||
*floorHeightPtr = func_80169100(play, &sp13C, &spF8, &bgId, feetPosPtr);
|
||||
*floorHeightPtr = Play_GetFloorSurfaceImpl(play, &sp13C, &spF8, &bgId, feetPosPtr);
|
||||
feetPosPtr->y -= 50.0f;
|
||||
|
||||
distToFloor = feetPosPtr->y - *floorHeightPtr;
|
||||
@@ -2442,7 +2442,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||
params.player = player;
|
||||
params.play = play;
|
||||
|
||||
if (play->unk_18844 != 0) {
|
||||
if (play->unk_18844) {
|
||||
params.unk_18 = ACTOR_FLAG_200000;
|
||||
} else {
|
||||
params.unk_18 = ACTOR_FLAG_200000 | ACTOR_FLAG_40 | ACTOR_FLAG_10;
|
||||
@@ -2698,7 +2698,7 @@ void Actor_DrawLensActors(PlayState* play, s32 numInvisibleActors, Actor** invis
|
||||
|
||||
spAC = tmp;
|
||||
Actor_DrawLensOverlay(&spAC, play->actorCtx.lensMaskSize);
|
||||
tmp = func_801660B8(play, spAC);
|
||||
tmp = Play_SetFog(play, spAC);
|
||||
|
||||
for (spB4 = 0, invisibleActor = invisibleActors; spB4 < numInvisibleActors; spB4++, invisibleActor++) {
|
||||
POLY_XLU_DISP = tmp;
|
||||
@@ -2779,9 +2779,9 @@ s32 func_800BA2FC(PlayState* play, Actor* actor, Vec3f* projectedPos, f32 projec
|
||||
f32 phi_f16;
|
||||
|
||||
if (play->view.fovy != 60.0f) {
|
||||
phi_f12 = actor->uncullZoneScale * play->unk_187F0.x * 0.76980036f; // sqrt(16/27)
|
||||
phi_f12 = actor->uncullZoneScale * play->projectionMtxFDiagonal.x * 0.76980036f; // sqrt(16/27)
|
||||
|
||||
phi_f14 = play->unk_187F0.y * 0.57735026f; // 1 / sqrt(3)
|
||||
phi_f14 = play->projectionMtxFDiagonal.y * 0.57735026f; // 1 / sqrt(3)
|
||||
phi_f16 = actor->uncullZoneScale * phi_f14;
|
||||
phi_f14 *= actor->uncullZoneDownward;
|
||||
} else {
|
||||
@@ -2809,7 +2809,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
s32 actorFlags;
|
||||
s32 i;
|
||||
|
||||
if (play->unk_18844 != 0) {
|
||||
if (play->unk_18844) {
|
||||
actorFlags = ACTOR_FLAG_200000;
|
||||
} else {
|
||||
actorFlags = ACTOR_FLAG_200000 | ACTOR_FLAG_40 | ACTOR_FLAG_20;
|
||||
@@ -2880,7 +2880,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
|
||||
gSPBranchList(ref2, &tmp2[1]);
|
||||
POLY_XLU_DISP = &tmp2[1];
|
||||
|
||||
if (play->unk_18844 == 0) {
|
||||
if (!play->unk_18844) {
|
||||
Lights_DrawGlow(play);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
|
||||
void func_801AAAA0(PlayState* play) {
|
||||
// Remnant from OoT
|
||||
void Regs_InitData(PlayState* play) {
|
||||
}
|
||||
|
||||
+25
-25
@@ -161,8 +161,8 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
|
||||
}
|
||||
break;
|
||||
case 0x3:
|
||||
if (play->envCtx.lightSettings.fogFar < 12800) {
|
||||
play->envCtx.lightSettings.fogFar += 35;
|
||||
if (play->envCtx.lightSettings.zFar < 12800) {
|
||||
play->envCtx.lightSettings.zFar += 35;
|
||||
}
|
||||
break;
|
||||
case 0x4:
|
||||
@@ -206,16 +206,16 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
|
||||
}
|
||||
break;
|
||||
case 0xA:
|
||||
D_801F6D30.r = 255;
|
||||
D_801F6D30.g = 255;
|
||||
D_801F6D30.b = 255;
|
||||
D_801F6D30.a = 255 * progress;
|
||||
gVisMonoColor.r = 255;
|
||||
gVisMonoColor.g = 255;
|
||||
gVisMonoColor.b = 255;
|
||||
gVisMonoColor.a = 255 * progress;
|
||||
break;
|
||||
case 0xB:
|
||||
D_801F6D30.r = 255;
|
||||
D_801F6D30.g = 180;
|
||||
D_801F6D30.b = 100;
|
||||
D_801F6D30.a = 255 * progress;
|
||||
gVisMonoColor.r = 255;
|
||||
gVisMonoColor.g = 180;
|
||||
gVisMonoColor.b = 100;
|
||||
gVisMonoColor.a = 255 * progress;
|
||||
break;
|
||||
case 0xC:
|
||||
play->roomCtx.curRoom.segment = NULL;
|
||||
@@ -236,10 +236,10 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
|
||||
}
|
||||
break;
|
||||
case 0xE:
|
||||
play->unk_18845 = 1;
|
||||
play->haltAllActors = true;
|
||||
break;
|
||||
case 0xF:
|
||||
play->unk_18845 = 0;
|
||||
play->haltAllActors = false;
|
||||
break;
|
||||
case 0x10:
|
||||
if (isStartFrame) {
|
||||
@@ -295,7 +295,7 @@ void Cutscene_Command_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdBase* c
|
||||
play->nextEntrance = ENTRANCE(CUTSCENE, 0);
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF8;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
break;
|
||||
case 0x1C:
|
||||
@@ -555,7 +555,7 @@ void Cutscene_Command_SetTime(PlayState* play, CutsceneContext* csCtx, CsCmdDayT
|
||||
|
||||
void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
csCtx->state = CS_STATE_4;
|
||||
func_80165690();
|
||||
Play_DisableMotionBlur();
|
||||
Audio_SetCutsceneFlag(false);
|
||||
gSaveContext.cutsceneTransitionControl = 1;
|
||||
|
||||
@@ -575,7 +575,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase*
|
||||
if (D_801BB12C >= 2) {
|
||||
D_801BB12C = 0;
|
||||
}
|
||||
play->transitionType = TRANS_TYPE_04;
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
}
|
||||
|
||||
if ((play->nextEntrance & 0xF) > 0) {
|
||||
@@ -594,19 +594,19 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
}
|
||||
} else if (cmd->base == 2) {
|
||||
if (csCtx->frames == cmd->startFrame) {
|
||||
func_80165690();
|
||||
Play_DisableMotionBlur();
|
||||
|
||||
switch (D_801F4DE2) {
|
||||
case 0x1F:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
|
||||
play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
} else {
|
||||
play->nextEntrance = ENTRANCE(WOODFALL, 0);
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -614,12 +614,12 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80)) {
|
||||
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
} else {
|
||||
play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0);
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -628,7 +628,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
play->nextEntrance = ENTRANCE(ZORA_CAPE, 8);
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
|
||||
case 0x36:
|
||||
@@ -636,7 +636,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
||||
play->nextEntrance = ENTRANCE(IKANA_CANYON, 0);
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -764,16 +764,16 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt
|
||||
void Cutscene_Command_MotionBlur(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
if ((csCtx->frames >= cmd->startFrame) && (cmd->endFrame >= csCtx->frames)) {
|
||||
if ((csCtx->frames == cmd->startFrame) && (cmd->base == 1)) {
|
||||
func_8016566C(180);
|
||||
Play_EnableMotionBlur(180);
|
||||
}
|
||||
|
||||
if (cmd->base == 2) {
|
||||
f32 progress = Environment_LerpWeight(cmd->endFrame, cmd->startFrame, csCtx->frames);
|
||||
|
||||
if (progress >= 0.9f) {
|
||||
func_80165690();
|
||||
Play_DisableMotionBlur();
|
||||
} else {
|
||||
func_80165658((1.0f - progress) * 180.0f);
|
||||
Play_SetMotionBlurAlpha((1.0f - progress) * 180.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -837,7 +837,7 @@ void GetItem_DrawRemains(PlayState* play, s16 drawId) {
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDrawItemTable[drawId].drawResources[0]);
|
||||
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void func_800AE5A0(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void func_800AE8EC(PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
POLY_XLU_DISP = func_801660B8(play, POLY_XLU_DISP);
|
||||
POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -819,7 +819,7 @@ void EnItem00_DrawSprite(EnItem00* this, PlayState* play) {
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
|
||||
if (this->actor.params == ITEM00_NUTS_10) {
|
||||
texIndex = 6;
|
||||
|
||||
+3
-3
@@ -5,13 +5,13 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016418C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016424C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Destroy.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_801642D8.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Init.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164438.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_8016454C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/TransitionUnk_Draw.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_fbdemo/func_80164678.s")
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ void GameOver_Update(PlayState* play) {
|
||||
if (gSaveContext.respawnFlag != -7) {
|
||||
gSaveContext.respawnFlag = -6;
|
||||
}
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_02;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
gSaveContext.save.playerData.health = 0x30;
|
||||
gameOverCtx->state++;
|
||||
if (INV_CONTENT(ITEM_MASK_DEKU) == ITEM_MASK_DEKU) {
|
||||
|
||||
@@ -50,7 +50,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
|
||||
} else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) ||
|
||||
(pauseCtx->state == PAUSE_STATE_OWLWARP_1)) {
|
||||
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_DONE) {
|
||||
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
|
||||
pauseCtx->state++;
|
||||
}
|
||||
} else if (pauseCtx->state != PAUSE_STATE_OFF) {
|
||||
@@ -77,7 +77,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
|
||||
void KaleidoScopeCall_Draw(PlayState* play) {
|
||||
KaleidoMgrOverlay* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
|
||||
|
||||
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_DONE) {
|
||||
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
|
||||
if (((play->pauseCtx.state >= PAUSE_STATE_OPENING_3) && (play->pauseCtx.state <= PAUSE_STATE_SAVEPROMPT)) ||
|
||||
((play->pauseCtx.state >= PAUSE_STATE_GAMEOVER_3) && (play->pauseCtx.state <= PAUSE_STATE_UNPAUSE_SETUP))) {
|
||||
if (gKaleidoMgrCurOvl == kaleidoScopeOvl) {
|
||||
|
||||
+8
-8
@@ -4,7 +4,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F50D4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Kankyo_Init.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_Init.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5954.s")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5B10.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F5CD0.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_UpdateSkybox.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F6834.s")
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8A9C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8CD4.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_Update.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F8D84.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F9728.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawSunLensFlare.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800F9824.s")
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FA3C4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FA9FC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawRain.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FAAB4.s")
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FB9B4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FBCBC.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawCustomLensFlare.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Kankyo_InitGameOverLights.s")
|
||||
|
||||
@@ -82,9 +82,9 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC3DC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC444.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_FillScreen.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FC64C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/Environment_DrawSandstorm.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_800FD2B4.s")
|
||||
|
||||
|
||||
+7
-7
@@ -251,7 +251,7 @@ void Lights_FreeNode(LightNode* light) {
|
||||
void LightContext_Init(PlayState* play, LightContext* lightCtx) {
|
||||
LightContext_InitList(play, lightCtx);
|
||||
LightContext_SetAmbientColor(lightCtx, 80, 80, 80);
|
||||
func_80102544(lightCtx, 0, 0, 0, 0x3E4, 0x3200);
|
||||
LightContext_SetFog(lightCtx, 0, 0, 0, 996, 12800);
|
||||
bzero(&sLightsBuffer, sizeof(LightsBuffer));
|
||||
}
|
||||
|
||||
@@ -261,12 +261,12 @@ void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b) {
|
||||
lightCtx->ambient.b = b;
|
||||
}
|
||||
|
||||
void func_80102544(LightContext* lightCtx, u8 a1, u8 a2, u8 a3, s16 numLights, s16 sp16) {
|
||||
lightCtx->unk7 = a1;
|
||||
lightCtx->unk8 = a2;
|
||||
lightCtx->unk9 = a3;
|
||||
lightCtx->unkA = numLights;
|
||||
lightCtx->unkC = sp16;
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 r, u8 g, u8 b, s16 near, s16 far) {
|
||||
lightCtx->fogColor.r = r;
|
||||
lightCtx->fogColor.g = g;
|
||||
lightCtx->fogColor.b = b;
|
||||
lightCtx->fogNear = near;
|
||||
lightCtx->zFar = far;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -531,7 +531,7 @@ void func_80153E7C(PlayState* play, void* arg1) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_801541D4.s")
|
||||
|
||||
void func_80156758(PlayState* play) {
|
||||
void Message_Draw(PlayState* play) {
|
||||
Gfx* nextDisplayList;
|
||||
Gfx* polyOpa;
|
||||
GraphicsContext* gfxCtx = play->state.gfxCtx;
|
||||
@@ -551,7 +551,7 @@ void func_80156758(PlayState* play) {
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8015680C.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/Message_Update.s")
|
||||
|
||||
void func_801586A4(PlayState* play) {
|
||||
play->msgCtx.messageEntryTableNes = D_801C6B98;
|
||||
|
||||
@@ -4333,7 +4333,7 @@ void Interface_StartMoonCrash(PlayState* play) {
|
||||
play->nextEntrance = ENTRANCE(TERMINA_FIELD, 12);
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_03;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE;
|
||||
}
|
||||
|
||||
void Interface_GetTimerDigits(u64 timer, s16* timerArr) {
|
||||
|
||||
+1819
-44
File diff suppressed because it is too large
Load Diff
@@ -16,12 +16,12 @@
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016EA90.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F1A8.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Draw.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F4EC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016F5A8.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Update.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016FC78.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Init.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/func_8016FC98.s")
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_play_hireso/BombersNotebook_Destroy.s")
|
||||
|
||||
@@ -141,7 +141,7 @@ void func_801229A0(PlayState* play, Player* player) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if ((gSaveContext.jinxTimer != 0) || (player->invincibilityTimer > 0)) {
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
||||
+3
-3
@@ -668,7 +668,7 @@ void Distortion_Update(void) {
|
||||
zScaleFactor = 1.0f;
|
||||
xyScaleFactor = 1.0f;
|
||||
speedScaleFactor = 1.0f;
|
||||
} else if (sDistortionRequest.type & DISTORTION_TYPE_4) {
|
||||
} else if (sDistortionRequest.type & DISTORTION_TYPE_UNDERWATER_ENTRY) {
|
||||
if (sDistortionRequest.state == DISTORTION_SETUP) {
|
||||
countdownMax = sDistortionRequest.countdown;
|
||||
depthPhase = 0x760;
|
||||
@@ -690,7 +690,7 @@ void Distortion_Update(void) {
|
||||
countdownRatio = sDistortionRequest.countdown / (f32)countdownMax;
|
||||
zScaleFactor = xyScaleFactor = countdownRatio;
|
||||
speedScaleFactor = 1.0f;
|
||||
} else if (sDistortionRequest.type & DISTORTION_TYPE_3) {
|
||||
} else if (sDistortionRequest.type & DISTORTION_TYPE_ZORA_SWIMMING) {
|
||||
depthPhase = 0x3F0;
|
||||
screenPlanePhase = 0x156;
|
||||
|
||||
@@ -745,7 +745,7 @@ void Distortion_Update(void) {
|
||||
}
|
||||
zScaleFactor = -xyScaleFactor;
|
||||
speedScaleFactor = 1.0f;
|
||||
} else if (sDistortionRequest.type & DISTORTION_TYPE_2) {
|
||||
} else if (sDistortionRequest.type & DISTORTION_TYPE_NON_ZORA_SWIMMING) {
|
||||
depthPhase = 0x3F0;
|
||||
screenPlanePhase = 0x156;
|
||||
|
||||
|
||||
+6
-6
@@ -778,19 +778,19 @@ Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) {
|
||||
|
||||
if (n >= 997) {
|
||||
if (n >= 1000) {
|
||||
gSPFogFactor(gfx + 1, 0, 0); // gSPFogPosition(gfx++, ?, ?)
|
||||
gSPFogFactor(&gfx[1], 0, 0); // gSPFogPosition(gfx++, ?, ?)
|
||||
} else {
|
||||
gSPFogFactor(gfx + 1, 0x7FFF, 0x8100); // gSPFogPosition(gfx++, ?, ?)
|
||||
gSPFogFactor(&gfx[1], 0x7FFF, 0x8100); // gSPFogPosition(gfx++, ?, ?)
|
||||
}
|
||||
} else {
|
||||
if (n < 0) {
|
||||
gSPFogFactor(gfx + 1, 0, 255); // gSPFogPosition(gfx++, ?, ?)
|
||||
gSPFogFactor(&gfx[1], 0, 255); // gSPFogPosition(gfx++, ?, ?)
|
||||
} else {
|
||||
gSPFogPosition(gfx + 1, n, f);
|
||||
gSPFogPosition(&gfx[1], n, f);
|
||||
}
|
||||
}
|
||||
|
||||
return gfx + 2;
|
||||
return &gfx[2];
|
||||
}
|
||||
|
||||
Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f) {
|
||||
@@ -1299,7 +1299,7 @@ void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g
|
||||
}
|
||||
|
||||
void func_8012D374(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b) {
|
||||
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (D_801F6D10 < 2)) {
|
||||
if ((R_PAUSE_BG_PRERENDER_STATE <= PAUSE_BG_PRERENDER_SETUP) && (gTrnsnUnkState < 2)) {
|
||||
func_8012CF0C(gfxCtx, true, true, r, g, b);
|
||||
} else {
|
||||
func_8012CF0C(gfxCtx, false, false, r, g, b);
|
||||
|
||||
+3
-3
@@ -149,7 +149,7 @@ void Scene_HeaderCmdSpawnList(PlayState* play, SceneCmd* cmd) {
|
||||
play->linkActorEntry =
|
||||
(ActorEntry*)Lib_SegmentedToVirtual(cmd->spawnList.segment) + play->setupEntranceList[play->curSpawn].spawn;
|
||||
if ((PLAYER_GET_INITMODE(play->linkActorEntry) == PLAYER_INITMODE_TELESCOPE) ||
|
||||
((gSaveContext.respawnFlag == 0x02) &&
|
||||
((gSaveContext.respawnFlag == 2) &&
|
||||
(gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == PLAYER_PARAMS(0xFF, PLAYER_INITMODE_TELESCOPE)))) {
|
||||
// Skull Kid Object
|
||||
Object_Spawn(&play->objectCtx, OBJECT_STK);
|
||||
@@ -231,7 +231,7 @@ void Scene_HeaderCmdSpecialFiles(PlayState* play, SceneCmd* cmd) {
|
||||
}
|
||||
|
||||
if (cmd->specialFiles.naviQuestHintFileId != NAVI_QUEST_HINTS_NONE) {
|
||||
play->naviQuestHints = Play_LoadScene(play, &naviQuestHintFiles[cmd->specialFiles.naviQuestHintFileId - 1]);
|
||||
play->naviQuestHints = Play_LoadFile(play, &naviQuestHintFiles[cmd->specialFiles.naviQuestHintFileId - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -603,5 +603,5 @@ u16 Entrance_Create(s32 scene, s32 spawn, s32 layer) {
|
||||
* Creates an layer 0 entranace from the current entrance and the given spawn.
|
||||
*/
|
||||
u16 Entrance_CreateFromSpawn(s32 spawn) {
|
||||
return Entrance_Create(gSaveContext.save.entrance >> 9, spawn, 0);
|
||||
return Entrance_Create((u32)gSaveContext.save.entrance >> 9, spawn, 0);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ static Gfx sSceneDrawDefaultDL[] = {
|
||||
/**
|
||||
* Executes the current scene draw config handler.
|
||||
*/
|
||||
void Scene_ExecuteDrawConfig(PlayState* play) {
|
||||
void Scene_Draw(PlayState* play) {
|
||||
static void (*sceneDrawConfigHandlers[])(PlayState*) = {
|
||||
Scene_DrawConfigDefault,
|
||||
Scene_DrawConfigMatAnim,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "global.h"
|
||||
|
||||
#define SCENE_ENTRY(name, textId, config) \
|
||||
{ { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name) }, textId, 0, config, 0 }
|
||||
{ { SEGMENT_ROM_START(name), SEGMENT_ROM_END(name) }, textId, 0, config, 0, 0 }
|
||||
|
||||
#define SCENE_ENTRY_NONE() \
|
||||
{ { 0, 0 }, 0, 0, 0, 0 }
|
||||
{ { 0, 0 }, 0, 0, 0, 0, 0 }
|
||||
|
||||
SceneTableEntry gSceneTable[] = {
|
||||
/* 0x00 */ SCENE_ENTRY(Z2_20SICHITAI2, 0x0116, SCENE_DRAW_CFG_MAT_ANIM),
|
||||
|
||||
+14
-14
@@ -22,7 +22,7 @@ s32 Snap_RecordPictographedActors(PlayState* play) {
|
||||
gSaveContext.save.pictoFlags1 = 0;
|
||||
|
||||
if (play->sceneId == SCENE_20SICHITAI) {
|
||||
Snap_SetFlag(PICTOGRAPH_IN_SWAMP);
|
||||
Snap_SetFlag(PICTO_VALID_IN_SWAMP);
|
||||
}
|
||||
|
||||
for (; category < ACTORCAT_MAX; category++) {
|
||||
@@ -155,43 +155,43 @@ s32 Snap_ValidatePictograph(PlayState* play, Actor* actor, s32 flag, Vec3f* pos,
|
||||
// Check distance
|
||||
distance = OLib_Vec3fDist(pos, &camera->eye);
|
||||
if ((distance < distanceMin) || (distanceMax < distance)) {
|
||||
Snap_SetFlag(PICTOGRAPH_BAD_DISTANCE);
|
||||
ret = PICTOGRAPH_BAD_DISTANCE;
|
||||
Snap_SetFlag(PICTO_VALID_BAD_DISTANCE);
|
||||
ret = PICTO_VALID_BAD_DISTANCE;
|
||||
}
|
||||
|
||||
// Check rot is facing camera?
|
||||
x = Snap_AbsS(Camera_GetCamDirPitch(camera) + rot->x);
|
||||
y = Snap_AbsS(Camera_GetCamDirYaw(camera) - BINANG_SUB(rot->y, 0x7FFF));
|
||||
if ((0 < angleRange) && ((angleRange < x) || (angleRange < y))) {
|
||||
Snap_SetFlag(PICTOGRAPH_BAD_ANGLE);
|
||||
ret |= PICTOGRAPH_BAD_ANGLE;
|
||||
Snap_SetFlag(PICTO_VALID_BAD_ANGLE);
|
||||
ret |= PICTO_VALID_BAD_ANGLE;
|
||||
}
|
||||
|
||||
// Check in capture region
|
||||
Actor_GetProjectedPos(play, pos, &projectedPos, &distance);
|
||||
// Convert to projected position to device coordinates, shift to be relative to the capture region's top-left corner
|
||||
x = (s16)PROJECTED_TO_SCREEN_X(projectedPos, distance) - PICTO_CAPTURE_REGION_TOPLEFT_X;
|
||||
y = (s16)PROJECTED_TO_SCREEN_Y(projectedPos, distance) - PICTO_CAPTURE_REGION_TOPLEFT_Y;
|
||||
x = (s16)PROJECTED_TO_SCREEN_X(projectedPos, distance) - PICTO_VALID_TOPLEFT_X;
|
||||
y = (s16)PROJECTED_TO_SCREEN_Y(projectedPos, distance) - PICTO_VALID_TOPLEFT_Y;
|
||||
|
||||
// checks if the coordinates are within the capture region
|
||||
if ((x < 0) || (x > PICTO_RESOLUTION_HORIZONTAL) || (y < 0) || (y > PICTO_RESOLUTION_VERTICAL)) {
|
||||
Snap_SetFlag(PICTOGRAPH_NOT_IN_VIEW);
|
||||
ret |= PICTOGRAPH_NOT_IN_VIEW;
|
||||
if ((x < 0) || (x > PICTO_VALID_WIDTH) || (y < 0) || (y > PICTO_VALID_HEIGHT)) {
|
||||
Snap_SetFlag(PICTO_VALID_NOT_IN_VIEW);
|
||||
ret |= PICTO_VALID_NOT_IN_VIEW;
|
||||
}
|
||||
|
||||
// Check not obscured by bg collision
|
||||
if (BgCheck_ProjectileLineTest(&play->colCtx, pos, &camera->eye, &projectedPos, &poly, true, true, true, true,
|
||||
&bgId)) {
|
||||
Snap_SetFlag(PICTOGRAPH_BEHIND_BG);
|
||||
ret |= PICTOGRAPH_BEHIND_BG;
|
||||
Snap_SetFlag(PICTO_VALID_BEHIND_BG);
|
||||
ret |= PICTO_VALID_BEHIND_BG;
|
||||
}
|
||||
|
||||
// Check not obscured by actor collision
|
||||
actors[0] = actor;
|
||||
actors[1] = &GET_PLAYER(play)->actor;
|
||||
if (CollisionCheck_LineOCCheck(play, &play->colChkCtx, pos, &camera->eye, actors, 2)) {
|
||||
Snap_SetFlag(PICTOGRAPH_BEHIND_COLLISION);
|
||||
ret |= PICTOGRAPH_BEHIND_COLLISION;
|
||||
Snap_SetFlag(PICTO_VALID_BEHIND_COLLISION);
|
||||
ret |= PICTO_VALID_BEHIND_COLLISION;
|
||||
}
|
||||
|
||||
// If all of the above checks pass, set the flag
|
||||
|
||||
+2
-2
@@ -220,7 +220,7 @@ void Skybox_Setup(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId)
|
||||
|
||||
// Inverted Stone Tower Temple and Inverted Stone Tower
|
||||
if ((play->sceneId == SCENE_F41) || (play->sceneId == SCENE_INISIE_R)) {
|
||||
skyboxCtx->rotZ = 3.15000009537f;
|
||||
skyboxCtx->rotZ = 3.15f;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -288,7 +288,7 @@ void func_80143324(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
|
||||
}
|
||||
|
||||
void Skybox_Init(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId) {
|
||||
skyboxCtx->skyboxShouldDraw = 0;
|
||||
skyboxCtx->skyboxShouldDraw = false;
|
||||
skyboxCtx->rotX = skyboxCtx->rotY = skyboxCtx->rotZ = 0.0f;
|
||||
|
||||
Skybox_Setup(gameState, skyboxCtx, skyboxId);
|
||||
|
||||
@@ -63,5 +63,5 @@ void SkyboxDraw_Draw(SkyboxContext* skyboxCtx, GraphicsContext* gfxCtx, s16 skyb
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
||||
void SkyboxDraw_Noop(SkyboxContext* skyboxCtx) {
|
||||
void SkyboxDraw_Update(SkyboxContext* skyboxCtx) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user