mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-10 08:50:23 +00:00
Decompile z_kankyo (#956)
* working * start color switch * progress * progress * progress on bgm func * progress * game over matched (except the rodata meme) * start update * progress * lightning docs done * progress * progress * progress * progress * progress * can compile at least * suns state, progress on kankyo_update * some new names * progress * progress * progress * new functions * cleanup * more matches * another match * now functional * format * better match * hugely improved update * cleanup/review * remove old changes * review2 * review3 * missed one * review4 * change asm filenames * update doorwarp1 * review5 * Kankyo_ -> Environment_ * format * merge master and format functions.h Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com> Co-authored-by: fig <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
parent
50095d427c
commit
e51f50f0ff
139 changed files with 3478 additions and 6277 deletions
|
@ -174,8 +174,6 @@ static s16 D_8098CF80;
|
|||
static s16 sRainScale;
|
||||
static s16 D_8098CF84;
|
||||
|
||||
extern Mtx D_01000000; // perspective mtx
|
||||
|
||||
extern Gfx D_06000080[]; // rain DL
|
||||
extern Gfx D_06000DE0[]; // rocks DL
|
||||
extern Gfx D_06007440[]; // DoT DL left
|
||||
|
@ -305,19 +303,19 @@ void DemoKankyo_SetupType(DemoKankyo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case DEMOKANKYO_WARP_OUT:
|
||||
globalCtx->envCtx.unk_E2[0] = 0xFF;
|
||||
globalCtx->envCtx.unk_E2[1] = 0xFF;
|
||||
globalCtx->envCtx.unk_E2[2] = 0xFF;
|
||||
globalCtx->envCtx.unk_E1 = 0;
|
||||
globalCtx->envCtx.screenFillColor[0] = 0xFF;
|
||||
globalCtx->envCtx.screenFillColor[1] = 0xFF;
|
||||
globalCtx->envCtx.screenFillColor[2] = 0xFF;
|
||||
globalCtx->envCtx.fillScreen = false;
|
||||
if (this->warpTimer < 21 && this->warpTimer >= 15) {
|
||||
temp = (this->warpTimer - 15.0f) / 5.0f;
|
||||
globalCtx->envCtx.unk_E1 = 1;
|
||||
globalCtx->envCtx.unk_E2[3] = 255 - 255 * temp;
|
||||
globalCtx->envCtx.fillScreen = true;
|
||||
globalCtx->envCtx.screenFillColor[3] = 255 - 255 * temp;
|
||||
}
|
||||
if (this->warpTimer < 15 && this->warpTimer >= 4) {
|
||||
temp = (this->warpTimer - 4.0f) / 10.0f;
|
||||
globalCtx->envCtx.unk_E1 = 1;
|
||||
globalCtx->envCtx.unk_E2[3] = 255 * temp;
|
||||
globalCtx->envCtx.fillScreen = true;
|
||||
globalCtx->envCtx.screenFillColor[3] = 255 * temp;
|
||||
}
|
||||
if (this->warpTimer == 15) {
|
||||
player->actor.draw = NULL;
|
||||
|
@ -390,7 +388,7 @@ void DemoKankyo_SetRockPos(DemoKankyo* this, GlobalContext* globalCtx, s32 param
|
|||
endPos.x = csAction->endPos.x;
|
||||
endPos.y = csAction->endPos.y;
|
||||
endPos.z = csAction->endPos.z;
|
||||
temp_f0 = func_8006F93C(csAction->endFrame, csAction->startFrame, globalCtx->csCtx.frames);
|
||||
temp_f0 = Environment_LerpWeight(csAction->endFrame, csAction->startFrame, globalCtx->csCtx.frames);
|
||||
this->actor.world.pos.x = ((endPos.x - startPos.x) * temp_f0) + startPos.x;
|
||||
this->actor.world.pos.y = ((endPos.y - startPos.y) * temp_f0) + startPos.y;
|
||||
this->actor.world.pos.z = ((endPos.z - startPos.z) * temp_f0) + startPos.z;
|
||||
|
@ -822,7 +820,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case 2:
|
||||
if (this->actor.params == DEMOKANKYO_WARP_OUT) {
|
||||
if (i == 0) {
|
||||
func_800776E4(globalCtx);
|
||||
Environment_WarpSongLeave(globalCtx);
|
||||
this->unk_150[i].unk_22++;
|
||||
}
|
||||
} else if (i + 1 == this->sparkleCounter && globalCtx->csCtx.state == CS_STATE_IDLE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue