mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-12 09:50:50 +00:00
Update Room Documentation (#2015)
* Update Room Documentation * Write more complete documentation, implement suggestions. * Function name changes; minor comment tweaks * nit * Resolve Dragorn fixes * Resolve Fig suggestions, fix comment wording * fix bss, fig suggestion * bss
This commit is contained in:
parent
dbb059c6a7
commit
acb5c7f20c
27 changed files with 243 additions and 195 deletions
|
@ -121,7 +121,7 @@ void BgDodoago_Init(Actor* thisx, PlayState* play) {
|
|||
if (Flags_GetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6))) {
|
||||
BgDodoago_SetupAction(this, BgDodoago_DoNothing);
|
||||
this->dyna.actor.shape.rot.x = 0x1333;
|
||||
play->roomCtx.unk_74[BGDODOAGO_EYE_LEFT] = play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] = 255;
|
||||
play->roomCtx.drawParams[BGDODOAGO_EYE_LEFT] = play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] = 255;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -154,15 +154,15 @@ void BgDodoago_WaitExplosives(BgDodoago* this, PlayState* play) {
|
|||
? BGDODOAGO_EYE_RIGHT
|
||||
: BGDODOAGO_EYE_LEFT;
|
||||
|
||||
if (((play->roomCtx.unk_74[BGDODOAGO_EYE_LEFT] == 255) && (this->state == BGDODOAGO_EYE_RIGHT)) ||
|
||||
((play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] == 255) && (this->state == BGDODOAGO_EYE_LEFT))) {
|
||||
if (((play->roomCtx.drawParams[BGDODOAGO_EYE_LEFT] == 255) && (this->state == BGDODOAGO_EYE_RIGHT)) ||
|
||||
((play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] == 255) && (this->state == BGDODOAGO_EYE_LEFT))) {
|
||||
Flags_SetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6));
|
||||
this->state = 0;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
BgDodoago_SetupAction(this, BgDodoago_OpenJaw);
|
||||
OnePointCutscene_Init(play, 3380, 160, &this->dyna.actor, CAM_ID_MAIN);
|
||||
} else if (play->roomCtx.unk_74[this->state] == 0) {
|
||||
} else if (play->roomCtx.drawParams[this->state] == 0) {
|
||||
OnePointCutscene_Init(play, 3065, 40, &this->dyna.actor, CAM_ID_MAIN);
|
||||
BgDodoago_SetupAction(this, BgDodoago_LightOneEye);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
@ -212,14 +212,14 @@ void BgDodoago_OpenJaw(BgDodoago* this, PlayState* play) {
|
|||
s32 i;
|
||||
|
||||
// make both eyes red (one already is)
|
||||
if (play->roomCtx.unk_74[BGDODOAGO_EYE_LEFT] < 255) {
|
||||
play->roomCtx.unk_74[BGDODOAGO_EYE_LEFT] += 5;
|
||||
if (play->roomCtx.drawParams[BGDODOAGO_EYE_LEFT] < 255) {
|
||||
play->roomCtx.drawParams[BGDODOAGO_EYE_LEFT] += 5;
|
||||
}
|
||||
if (play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] < 255) {
|
||||
play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] += 5;
|
||||
if (play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] < 255) {
|
||||
play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] += 5;
|
||||
}
|
||||
|
||||
if (play->roomCtx.unk_74[BGDODOAGO_EYE_LEFT] != 255 || play->roomCtx.unk_74[BGDODOAGO_EYE_RIGHT] != 255) {
|
||||
if (play->roomCtx.drawParams[BGDODOAGO_EYE_LEFT] != 255 || play->roomCtx.drawParams[BGDODOAGO_EYE_RIGHT] != 255) {
|
||||
sTimer--;
|
||||
return;
|
||||
}
|
||||
|
@ -260,9 +260,9 @@ void BgDodoago_DoNothing(BgDodoago* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void BgDodoago_LightOneEye(BgDodoago* this, PlayState* play) {
|
||||
play->roomCtx.unk_74[this->state] += 5;
|
||||
play->roomCtx.drawParams[this->state] += 5;
|
||||
|
||||
if (play->roomCtx.unk_74[this->state] == 255) {
|
||||
if (play->roomCtx.drawParams[this->state] == 255) {
|
||||
BgDodoago_SetupAction(this, BgDodoago_WaitExplosives);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 5.0f)) {
|
||||
play->roomCtx.unk_74[0] = 0;
|
||||
play->roomCtx.drawParams[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, PlayState* play) {
|
|||
this->targetY = this->baseY;
|
||||
}
|
||||
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
|
||||
play->roomCtx.unk_74[0] = 0;
|
||||
play->roomCtx.drawParams[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
waterBoxes[6].ySurface = this->actor.world.pos.y;
|
||||
|
@ -265,7 +265,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, PlayState* play) {
|
|||
this->targetY = this->baseY;
|
||||
}
|
||||
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
|
||||
play->roomCtx.unk_74[0] = 0;
|
||||
play->roomCtx.drawParams[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
waterBoxes[8].ySurface = this->actor.world.pos.y;
|
||||
|
@ -277,7 +277,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, PlayState* play) {
|
|||
this->targetY = this->baseY;
|
||||
}
|
||||
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
|
||||
play->roomCtx.unk_74[0] = 0;
|
||||
play->roomCtx.drawParams[0] = 0;
|
||||
this->actionFunc = BgMizuWater_WaitForAction;
|
||||
}
|
||||
waterBoxes[16].ySurface = this->actor.world.pos.y;
|
||||
|
@ -323,7 +323,7 @@ void BgMizuWater_Update(Actor* thisx, PlayState* play) {
|
|||
unk1 = 255 - (s32)((posY - WATER_TEMPLE_WATER_F2_Y) / (WATER_TEMPLE_WATER_F3_Y - WATER_TEMPLE_WATER_F2_Y) *
|
||||
(255 - 160));
|
||||
}
|
||||
play->roomCtx.unk_74[1] = ((u8)unk0 << 8) | (unk1 & 0xFF);
|
||||
play->roomCtx.drawParams[1] = ((u8)unk0 << 8) | (unk1 & 0xFF);
|
||||
}
|
||||
|
||||
this->actionFunc(this, play);
|
||||
|
|
|
@ -105,7 +105,7 @@ void func_808BA018(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808BA204(BgTokiHikari* this, PlayState* play) {
|
||||
if (play->roomCtx.unk_74[1] != 0) {
|
||||
if (play->roomCtx.drawParams[1] != 0) {
|
||||
this->actionFunc = func_808BA22C;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (gSaveContext.sceneLayer == 5) {
|
||||
play->roomCtx.unk_74[0] = 0xFF;
|
||||
play->roomCtx.drawParams[0] = 0xFF;
|
||||
}
|
||||
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
|
@ -119,10 +119,10 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if (gSaveContext.sceneLayer == 5) {
|
||||
if (play->roomCtx.unk_74[0] > 0) {
|
||||
play->roomCtx.unk_74[0]--;
|
||||
if (play->roomCtx.drawParams[0] > 0) {
|
||||
play->roomCtx.drawParams[0]--;
|
||||
} else {
|
||||
play->roomCtx.unk_74[0] = 0;
|
||||
play->roomCtx.drawParams[0] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ void func_808BB0AC(BgTokiSwd* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_808BB128(BgTokiSwd* this, PlayState* play) {
|
||||
if (CutsceneFlags_Get(play, 1) && (play->roomCtx.unk_74[0] < 0xFF)) {
|
||||
play->roomCtx.unk_74[0] += 5;
|
||||
if (CutsceneFlags_Get(play, 1) && (play->roomCtx.drawParams[0] < 0xFF)) {
|
||||
play->roomCtx.drawParams[0] += 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ void BgTreemouth_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (gSaveContext.sceneLayer == 6) {
|
||||
alpha = (play->roomCtx.unk_74[0] + 0x1F4);
|
||||
alpha = (play->roomCtx.drawParams[0] + 0x1F4);
|
||||
}
|
||||
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, alpha * 0.1f);
|
||||
|
|
|
@ -337,7 +337,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
|
|||
Flags_SetSwitch(play, 0x14);
|
||||
sMorphaCore = this;
|
||||
MO_WATER_LEVEL(play) = this->waterLevel = MO_WATER_LEVEL(play);
|
||||
play->roomCtx.unk_74[0] = 0xA0;
|
||||
play->roomCtx.drawParams[0] = 0xA0;
|
||||
play->specialEffects = sEffects;
|
||||
for (i = 0; i < BOSS_MO_EFFECT_COUNT; i++) {
|
||||
sEffects[i].type = MO_FX_NONE;
|
||||
|
@ -357,7 +357,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
|
|||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0, 0, 0,
|
||||
WARP_DUNGEON_ADULT);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0);
|
||||
play->roomCtx.unk_74[0] = 0xFF;
|
||||
play->roomCtx.drawParams[0] = 0xFF;
|
||||
MO_WATER_LEVEL(play) = -500;
|
||||
return;
|
||||
}
|
||||
|
@ -1711,9 +1711,9 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if (sMorphaCore->waterLevel < -200.0f) {
|
||||
play->roomCtx.unk_74[0]++;
|
||||
if (play->roomCtx.unk_74[0] >= 0xFF) {
|
||||
play->roomCtx.unk_74[0] = 0xFF;
|
||||
play->roomCtx.drawParams[0]++;
|
||||
if (play->roomCtx.drawParams[0] >= 0xFF) {
|
||||
play->roomCtx.drawParams[0] = 0xFF;
|
||||
}
|
||||
}
|
||||
if (sMorphaCore->waterLevel < -250.0f) {
|
||||
|
|
|
@ -236,7 +236,7 @@ void DemoKankyo_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_TOKI, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0x0000);
|
||||
} else {
|
||||
play->roomCtx.unk_74[1] = 0xFF;
|
||||
play->roomCtx.drawParams[1] = 0xFF;
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -350,7 +350,7 @@ void DoorShutter_SetupAction(DoorShutter* this, DoorShutterActionFunc actionFunc
|
|||
* @return true if the door is barred
|
||||
*/
|
||||
s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) {
|
||||
TransitionActorEntry* transitionEntry = &play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor)];
|
||||
TransitionActorEntry* transitionEntry = &play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor)];
|
||||
s8 frontRoom = transitionEntry->sides[0].room;
|
||||
s32 doorType = this->doorType;
|
||||
DoorShutterStyleInfo* styleInfo = &sStyleInfo[this->styleType];
|
||||
|
@ -462,7 +462,7 @@ void DoorShutter_Destroy(Actor* thisx, PlayState* play) {
|
|||
if (this->dyna.actor.room >= 0) {
|
||||
s32 transitionActorId = GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor);
|
||||
|
||||
play->transiActorCtx.list[transitionActorId].id *= -1;
|
||||
play->transitionActors.list[transitionActorId].id *= -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -801,7 +801,7 @@ void DoorShutter_SetupClosed(DoorShutter* this, PlayState* play) {
|
|||
Vec3f relPlayerPos;
|
||||
|
||||
Actor_WorldToActorCoords(&this->dyna.actor, &relPlayerPos, &player->actor.world.pos);
|
||||
this->dyna.actor.room = play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor)]
|
||||
this->dyna.actor.room = play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor)]
|
||||
.sides[(relPlayerPos.z < 0.0f) ? 0 : 1]
|
||||
.room;
|
||||
if (room != this->dyna.actor.room) {
|
||||
|
@ -809,9 +809,9 @@ void DoorShutter_SetupClosed(DoorShutter* this, PlayState* play) {
|
|||
|
||||
play->roomCtx.curRoom = play->roomCtx.prevRoom;
|
||||
play->roomCtx.prevRoom = tempRoom;
|
||||
play->roomCtx.unk_30 ^= 1;
|
||||
play->roomCtx.activeBufPage ^= 1;
|
||||
}
|
||||
func_80097534(play, &play->roomCtx);
|
||||
Room_FinishRoomChange(play, &play->roomCtx);
|
||||
Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN, 0x0EFF);
|
||||
}
|
||||
this->isActive = false;
|
||||
|
@ -1012,7 +1012,7 @@ void DoorShutter_Draw(Actor* thisx, PlayState* play) {
|
|||
} else {
|
||||
if (gfxInfo->barsDL != NULL) {
|
||||
TransitionActorEntry* transitionEntry =
|
||||
&play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor)];
|
||||
&play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(&this->dyna.actor)];
|
||||
|
||||
if (play->roomCtx.prevRoom.num >= 0 ||
|
||||
transitionEntry->sides[0].room == transitionEntry->sides[1].room) {
|
||||
|
|
|
@ -166,7 +166,7 @@ void EnDoor_Destroy(Actor* thisx, PlayState* play) {
|
|||
TransitionActorEntry* transitionEntry;
|
||||
EnDoor* this = (EnDoor*)thisx;
|
||||
|
||||
transitionEntry = &play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&this->actor)];
|
||||
transitionEntry = &play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(&this->actor)];
|
||||
if (transitionEntry->id < 0) {
|
||||
transitionEntry->id = -transitionEntry->id;
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ s32 EnDoor_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
TransitionActorEntry* transitionEntry;
|
||||
Gfx** doorDLists = sDoorDLists[this->dListIndex];
|
||||
|
||||
transitionEntry = &play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&this->actor)];
|
||||
transitionEntry = &play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(&this->actor)];
|
||||
rot->z += this->actor.world.rot.y;
|
||||
if ((play->roomCtx.prevRoom.num >= 0) || (transitionEntry->sides[0].room == transitionEntry->sides[1].room)) {
|
||||
// Draw the side of the door that is visible to the camera
|
||||
|
|
|
@ -133,7 +133,7 @@ void EnHoll_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
void EnHoll_Destroy(Actor* thisx, PlayState* play) {
|
||||
s32 transitionActorIndex = GET_TRANSITION_ACTOR_INDEX(thisx);
|
||||
TransitionActorEntry* transitionEntry = &play->transiActorCtx.list[transitionActorIndex];
|
||||
TransitionActorEntry* transitionEntry = &play->transitionActors.list[transitionActorIndex];
|
||||
|
||||
transitionEntry->id = -transitionEntry->id;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ void EnHoll_SwapRooms(PlayState* play) {
|
|||
tempRoom = roomCtx->curRoom;
|
||||
roomCtx->curRoom = roomCtx->prevRoom;
|
||||
roomCtx->prevRoom = tempRoom;
|
||||
play->roomCtx.unk_30 ^= 1;
|
||||
play->roomCtx.activeBufPage ^= 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -196,14 +196,14 @@ void EnHoll_HorizontalVisibleNarrow(EnHoll* this, PlayState* play) {
|
|||
transitionActorIndex = GET_TRANSITION_ACTOR_INDEX(&this->actor);
|
||||
if (orthogonalDistToPlayer > sHorizontalVisibleNarrowTriggerDists[triggerDistsIndex][1]) {
|
||||
if (play->roomCtx.prevRoom.num >= 0 && play->roomCtx.status == 0) {
|
||||
this->actor.room = play->transiActorCtx.list[transitionActorIndex].sides[this->side].room;
|
||||
this->actor.room = play->transitionActors.list[transitionActorIndex].sides[this->side].room;
|
||||
EnHoll_SwapRooms(play);
|
||||
func_80097534(play, &play->roomCtx);
|
||||
Room_FinishRoomChange(play, &play->roomCtx);
|
||||
}
|
||||
} else {
|
||||
this->actor.room = play->transiActorCtx.list[transitionActorIndex].sides[this->side ^ 1].room;
|
||||
this->actor.room = play->transitionActors.list[transitionActorIndex].sides[this->side ^ 1].room;
|
||||
if (play->roomCtx.prevRoom.num < 0) {
|
||||
func_8009728C(play, &play->roomCtx, this->actor.room);
|
||||
Room_RequestNewRoom(play, &play->roomCtx, this->actor.room);
|
||||
} else {
|
||||
this->planeAlpha =
|
||||
(255.0f / (sHorizontalVisibleNarrowTriggerDists[triggerDistsIndex][2] -
|
||||
|
@ -239,14 +239,14 @@ void EnHoll_HorizontalInvisible(EnHoll* this, PlayState* play) {
|
|||
orthogonalDistToSubject > ENHOLL_H_INVISIBLE_LOAD_DEPTH_MIN))) {
|
||||
s32 transitionActorIndex = GET_TRANSITION_ACTOR_INDEX(&this->actor);
|
||||
s32 side = (relSubjectPos.z < 0.0f) ? 0 : 1;
|
||||
TransitionActorEntry* transitionEntry = &play->transiActorCtx.list[transitionActorIndex];
|
||||
TransitionActorEntry* transitionEntry = &play->transitionActors.list[transitionActorIndex];
|
||||
s32 room = transitionEntry->sides[side].room;
|
||||
|
||||
this->actor.room = room;
|
||||
if (isKokiriLayer8) {}
|
||||
if (this->actor.room != play->roomCtx.curRoom.num) {
|
||||
if (room) {}
|
||||
if (func_8009728C(play, &play->roomCtx, this->actor.room)) {
|
||||
if (Room_RequestNewRoom(play, &play->roomCtx, this->actor.room)) {
|
||||
EnHoll_SetupAction(this, EnHoll_WaitRoomLoaded);
|
||||
}
|
||||
}
|
||||
|
@ -273,11 +273,11 @@ void EnHoll_VerticalDownBgCoverLarge(EnHoll* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (absYDistToPlayer < ENHOLL_V_DOWN_LOAD_YDIST) {
|
||||
this->actor.room = play->transiActorCtx.list[transitionActorIndex].sides[1].room;
|
||||
this->actor.room = play->transitionActors.list[transitionActorIndex].sides[1].room;
|
||||
Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 1.0f, 50.0f, 10.0f);
|
||||
Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 1.0f, 50.0f, 10.0f);
|
||||
if (this->actor.room != play->roomCtx.curRoom.num &&
|
||||
func_8009728C(play, &play->roomCtx, this->actor.room)) {
|
||||
Room_RequestNewRoom(play, &play->roomCtx, this->actor.room)) {
|
||||
EnHoll_SetupAction(this, EnHoll_WaitRoomLoaded);
|
||||
this->resetBgCoverAlpha = true;
|
||||
player->actor.speed = 0.0f;
|
||||
|
@ -308,9 +308,9 @@ void EnHoll_VerticalBgCover(EnHoll* this, PlayState* play) {
|
|||
s32 transitionActorIndex = GET_TRANSITION_ACTOR_INDEX(&this->actor);
|
||||
s32 side = (this->actor.yDistToPlayer > 0.0f) ? 0 : 1;
|
||||
|
||||
this->actor.room = play->transiActorCtx.list[transitionActorIndex].sides[side].room;
|
||||
this->actor.room = play->transitionActors.list[transitionActorIndex].sides[side].room;
|
||||
if (this->actor.room != play->roomCtx.curRoom.num &&
|
||||
func_8009728C(play, &play->roomCtx, this->actor.room)) {
|
||||
Room_RequestNewRoom(play, &play->roomCtx, this->actor.room)) {
|
||||
EnHoll_SetupAction(this, EnHoll_WaitRoomLoaded);
|
||||
this->resetBgCoverAlpha = true;
|
||||
}
|
||||
|
@ -334,9 +334,9 @@ void EnHoll_VerticalInvisible(EnHoll* this, PlayState* play) {
|
|||
absYDistToPlayer > ENHOLL_V_INVISIBLE_LOAD_YDIST_MIN) {
|
||||
transitionActorIndex = GET_TRANSITION_ACTOR_INDEX(&this->actor);
|
||||
side = (this->actor.yDistToPlayer > 0.0f) ? 0 : 1;
|
||||
this->actor.room = play->transiActorCtx.list[transitionActorIndex].sides[side].room;
|
||||
this->actor.room = play->transitionActors.list[transitionActorIndex].sides[side].room;
|
||||
if (this->actor.room != play->roomCtx.curRoom.num &&
|
||||
func_8009728C(play, &play->roomCtx, this->actor.room)) {
|
||||
Room_RequestNewRoom(play, &play->roomCtx, this->actor.room)) {
|
||||
EnHoll_SetupAction(this, EnHoll_WaitRoomLoaded);
|
||||
}
|
||||
}
|
||||
|
@ -375,9 +375,9 @@ void EnHoll_HorizontalBgCoverSwitchFlag(EnHoll* this, PlayState* play) {
|
|||
if (orthogonalDistToPlayer < ENHOLL_H_SWITCHFLAG_LOAD_DEPTH) {
|
||||
s32 side = (relPlayerPos.z < 0.0f) ? 0 : 1;
|
||||
|
||||
this->actor.room = play->transiActorCtx.list[transitionActorIndex].sides[side].room;
|
||||
this->actor.room = play->transitionActors.list[transitionActorIndex].sides[side].room;
|
||||
if (this->actor.room != play->roomCtx.curRoom.num &&
|
||||
func_8009728C(play, &play->roomCtx, this->actor.room)) {
|
||||
Room_RequestNewRoom(play, &play->roomCtx, this->actor.room)) {
|
||||
EnHoll_SetupAction(this, EnHoll_WaitRoomLoaded);
|
||||
}
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void EnHoll_HorizontalBgCoverSwitchFlag(EnHoll* this, PlayState* play) {
|
|||
|
||||
void EnHoll_WaitRoomLoaded(EnHoll* this, PlayState* play) {
|
||||
if (!EnHoll_IsKokiriLayer8() && play->roomCtx.status == 0) {
|
||||
func_80097534(play, &play->roomCtx);
|
||||
Room_FinishRoomChange(play, &play->roomCtx);
|
||||
if (play->bgCoverAlpha == 0) {
|
||||
this->resetBgCoverAlpha = false;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:162 gc-jp-ce:162 gc-jp-mq:162 gc-us:162 gc-us-mq:162"
|
||||
#pragma increment_block_number "gc-eu:157 gc-eu-mq:157 gc-jp:159 gc-jp-ce:159 gc-jp-mq:159 gc-us:159 gc-us-mq:159"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
@ -920,10 +920,10 @@ void Fishing_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
sFishGameNumber = (HIGH_SCORE(HS_FISHING) & (HS_FISH_PLAYED * 255)) >> 0x10;
|
||||
if ((sFishGameNumber & 7) == 7) {
|
||||
play->roomCtx.unk_74[0] = 90;
|
||||
play->roomCtx.drawParams[0] = 90;
|
||||
sFishingFoggy = 1;
|
||||
} else {
|
||||
play->roomCtx.unk_74[0] = 40;
|
||||
play->roomCtx.drawParams[0] = 40;
|
||||
sFishingFoggy = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -5008,7 +5008,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
|
|||
|
||||
if (slidingDoor->dyna.actor.category == ACTORCAT_DOOR) {
|
||||
this->cv.slidingDoorBgCamIndex =
|
||||
play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(&slidingDoor->dyna.actor)]
|
||||
play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(&slidingDoor->dyna.actor)]
|
||||
.sides[(doorDirection > 0) ? 0 : 1]
|
||||
.bgCamIndex;
|
||||
|
||||
|
@ -5091,7 +5091,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
|
|||
}
|
||||
} else {
|
||||
Camera_ChangeDoorCam(Play_GetCamera(play, CAM_ID_MAIN), doorActor,
|
||||
play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(doorActor)]
|
||||
play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(doorActor)]
|
||||
.sides[(doorDirection > 0) ? 0 : 1]
|
||||
.bgCamIndex,
|
||||
0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
|
||||
|
@ -5100,12 +5100,12 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((this->doorType != PLAYER_DOORTYPE_FAKE) && (doorActor->category == ACTORCAT_DOOR)) {
|
||||
frontRoom = play->transiActorCtx.list[GET_TRANSITION_ACTOR_INDEX(doorActor)]
|
||||
frontRoom = play->transitionActors.list[GET_TRANSITION_ACTOR_INDEX(doorActor)]
|
||||
.sides[(doorDirection > 0) ? 0 : 1]
|
||||
.room;
|
||||
|
||||
if ((frontRoom >= 0) && (frontRoom != play->roomCtx.curRoom.num)) {
|
||||
func_8009728C(play, &play->roomCtx, frontRoom);
|
||||
Room_RequestNewRoom(play, &play->roomCtx, frontRoom);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9703,7 +9703,7 @@ void Player_Action_80845EF8(Player* this, PlayState* play) {
|
|||
} else {
|
||||
func_8083C0E8(this, play);
|
||||
if (play->roomCtx.prevRoom.num >= 0) {
|
||||
func_80097534(play, &play->roomCtx);
|
||||
Room_FinishRoomChange(play, &play->roomCtx);
|
||||
}
|
||||
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
|
||||
Play_SetupRespawnPoint(play, RESPAWN_MODE_DOWN, 0xDFF);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue