diff --git a/include/z64.h b/include/z64.h index 32d1a91d1ee..b0199887c26 100644 --- a/include/z64.h +++ b/include/z64.h @@ -448,9 +448,9 @@ typedef struct { } KaleidoMgrOverlay; // size = 0x1C typedef enum { - /* 0x00 */ KALEIDO_OVL_KALEIDO_SCOPE, - /* 0x01 */ KALEIDO_OVL_PLAYER_ACTOR, - /* 0x02 */ KALEIDO_OVL_MAX + /* 0 */ KALEIDO_OVL_KALEIDO_SCOPE, + /* 1 */ KALEIDO_OVL_PLAYER_ACTOR, + /* 2 */ KALEIDO_OVL_MAX } KaleidoOverlayType; typedef enum { @@ -791,7 +791,7 @@ typedef struct { typedef struct { /* 0x00 */ u8 numActors; /* 0x04 */ TransitionActorEntry* list; -} TransitionActorContext; +} TransitionActorContext; // size = 0x8 typedef enum { /* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing. @@ -1086,8 +1086,8 @@ typedef struct DebugDispObject { } DebugDispObject; // size = 0x2C typedef enum { - MTXMODE_NEW, // generates a new matrix - MTXMODE_APPLY // applies transformation to the current matrix + /* 0 */ MTXMODE_NEW, // generates a new matrix + /* 1 */ MTXMODE_APPLY // applies transformation to the current matrix } MatrixMode; typedef struct StackEntry { @@ -1101,9 +1101,9 @@ typedef struct StackEntry { } StackEntry; typedef enum { - STACK_STATUS_OK = 0, - STACK_STATUS_WARNING = 1, - STACK_STATUS_OVERFLOW = 2 + /* 0 */ STACK_STATUS_OK, + /* 1 */ STACK_STATUS_WARNING, + /* 2 */ STACK_STATUS_OVERFLOW } StackStatus; typedef struct { @@ -1328,22 +1328,22 @@ typedef enum { } ViModeEditState; typedef struct { - /* 0x0000 */ OSViMode customViMode; - /* 0x0050 */ s32 viHeight; - /* 0x0054 */ s32 viWidth; - /* 0x0058 */ s32 rightAdjust; - /* 0x005C */ s32 leftAdjust; - /* 0x0060 */ s32 lowerAdjust; - /* 0x0064 */ s32 upperAdjust; - /* 0x0068 */ s32 editState; - /* 0x006C */ s32 tvType; - /* 0x0070 */ u32 loRes; - /* 0x0074 */ u32 antialiasOff; - /* 0x0078 */ u32 modeN; // Controls interlacing, the meaning of this mode is different based on choice of resolution - /* 0x007C */ u32 fb16Bit; - /* 0x0080 */ u32 viFeatures; - /* 0x0084 */ u32 unk_84; -} ViMode; + /* 0x00 */ OSViMode customViMode; + /* 0x50 */ s32 viHeight; + /* 0x54 */ s32 viWidth; + /* 0x58 */ s32 rightAdjust; + /* 0x5C */ s32 leftAdjust; + /* 0x60 */ s32 lowerAdjust; + /* 0x64 */ s32 upperAdjust; + /* 0x68 */ s32 editState; + /* 0x6C */ s32 tvType; + /* 0x70 */ u32 loRes; + /* 0x74 */ u32 antialiasOff; + /* 0x78 */ u32 modeN; // Controls interlacing, the meaning of this mode is different based on choice of resolution + /* 0x7C */ u32 fb16Bit; + /* 0x80 */ u32 viFeatures; + /* 0x84 */ u32 unk_84; +} ViMode; // size = 0x88 // Vis... typedef struct { diff --git a/include/z64save.h b/include/z64save.h index f019d12b814..00b6431c070 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -292,12 +292,12 @@ typedef enum { } ButtonStatus; typedef enum { - /* 0x00 */ CHAMBER_CS_FOREST, - /* 0x01 */ CHAMBER_CS_FIRE, - /* 0x02 */ CHAMBER_CS_WATER, - /* 0x03 */ CHAMBER_CS_SPIRIT, - /* 0x04 */ CHAMBER_CS_SHADOW, - /* 0x05 */ CHAMBER_CS_LIGHT + /* 0 */ CHAMBER_CS_FOREST, + /* 1 */ CHAMBER_CS_FIRE, + /* 2 */ CHAMBER_CS_WATER, + /* 3 */ CHAMBER_CS_SPIRIT, + /* 4 */ CHAMBER_CS_SHADOW, + /* 5 */ CHAMBER_CS_LIGHT } ChamberCutsceneNum; typedef enum { diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index f3575870e32..621ced77aa3 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -2880,21 +2880,25 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3 if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) && (BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) { s32 pi; + for (pi = *polyStartIndex; pi < *polyStartIndex + pbgdata->numPolygons; pi++) { CollisionPoly* poly = &dyna->polyList[pi]; s16 normalY = poly->normal.y; if (normalY > COLPOLY_SNORMAL(0.5f)) { s16 polyIndex = pi; + DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.floor, &polyIndex); } else if (normalY < COLPOLY_SNORMAL(-0.8f)) { if (!(dyna->bgActorFlags[bgId] & BGACTOR_CEILING_COLLISION_DISABLED)) { s16 polyIndex = pi; + DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.ceiling, &polyIndex); } } else { s16 polyIndex = pi; + DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.wall, &polyIndex); } } @@ -2914,6 +2918,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3 for (i = 0; i < pbgdata->numVertices; i++) { Vec3f vtx; Vec3f vtxT; // Vtx after mtx transform + Math_Vec3s_ToVec3f(&vtx, &pbgdata->vtxList[i]); SkinMatrix_Vec3fMtxFMultXYZ(&mtx, &vtx, &vtxT); BgCheck_Vec3fToVec3s(&dyna->vtxList[*vtxStartIndex + i], &vtxT); @@ -2936,7 +2941,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3 sphere->center.x = newCenterPoint.x; sphere->center.y = newCenterPoint.y; sphere->center.z = newCenterPoint.z; - newRadiusSq = -100.0f; + newRadiusSq = -SQ(10.0f); for (i = 0; i < pbgdata->numVertices; i++) { f32 radiusSq; @@ -2989,12 +2994,15 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3 newPoly->dist = -DOTXYZ(newNormal, dVtxList[(u32)COLPOLY_VTX_INDEX(newPoly->flags_vIA)]); if (newNormal.y > 0.5f) { s16 polyId = *polyStartIndex + i; + DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.floor, &polyId); } else if (newNormal.y < -0.8f) { s16 polyId = *polyStartIndex + i; + DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.ceiling, &polyId); } else { s16 polyId = *polyStartIndex + i; + DynaSSNodeList_SetSSListHead(&dyna->polyNodes, &dyna->bgActors[bgId].dynaLookup.wall, &polyId); } } @@ -3013,7 +3021,7 @@ void DynaPoly_UnsetAllInteractFlags(PlayState* play, DynaCollisionContext* dyna, dynaActor = DynaPoly_GetActor(&play->colCtx, i); if (dynaActor != NULL && &dynaActor->actor == actor) { DynaPolyActor_UnsetAllInteractFlags((DynaPolyActor*)actor); - return; + break; } } } diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index dd039f8a287..94d8b7a3f8b 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -14,7 +14,7 @@ void SaveContext_Init(void) { gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX; gSaveContext.nextCutsceneIndex = 0xFFEF; gSaveContext.cutsceneTrigger = 0; - gSaveContext.chamberCutsceneNum = 0; + gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST; gSaveContext.nextDayTime = NEXT_TIME_NONE; gSaveContext.skyboxTime = 0; gSaveContext.dogIsLost = true; diff --git a/src/code/z_demo.c b/src/code/z_demo.c index e30c088ac2b..c505f333cae 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -790,7 +790,7 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti case CS_DEST_CHAMBER_OF_SAGES_FOREST_MEDALLION: play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0; play->transitionTrigger = TRANS_TRIGGER_START; - gSaveContext.chamberCutsceneNum = 0; + gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST; play->transitionType = TRANS_TYPE_FADE_WHITE; break; @@ -799,14 +799,14 @@ void CutsceneCmd_Destination(PlayState* play, CutsceneContext* csCtx, CsCmdDesti play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_FADE_WHITE; Item_Give(play, ITEM_MEDALLION_FIRE); - gSaveContext.chamberCutsceneNum = 1; + gSaveContext.chamberCutsceneNum = CHAMBER_CS_FIRE; break; case CS_DEST_CHAMBER_OF_SAGES_WATER_MEDALLION: play->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_FADE_WHITE; - gSaveContext.chamberCutsceneNum = 2; + gSaveContext.chamberCutsceneNum = CHAMBER_CS_WATER; break; case CS_DEST_HYRULE_FIELD_FLASHBACK: diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index e560f7eb524..266e9108f49 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1378,7 +1378,7 @@ void Environment_DrawSunAndMoon(PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 2266); - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { Math_SmoothStepToF(&play->envCtx.sunPos.x, -(Math_SinS(((void)0, gSaveContext.dayTime) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f, 1.0f, 0.8f, 0.8f); diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index 8cc8a710579..b3037374676 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -127,7 +127,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) { static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; Vec3f pos; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.actorCues[3] != NULL && play->csCtx.actorCues[3]->id == 2) { Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION); SET_EVENTCHKINF(EVENTCHKINF_1D); @@ -199,7 +199,7 @@ void BgSpot02Objects_Draw(Actor* thisx, PlayState* play) { } void func_808ACC34(BgSpot02Objects* this, PlayState* play) { - if (play->csCtx.state != 0 && play->csCtx.actorCues[0] != NULL && play->csCtx.actorCues[0]->id == 2) { + if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[0] != NULL && play->csCtx.actorCues[0]->id == 2) { this->unk_16A++; if (this->unk_16A >= 12) { @@ -225,7 +225,7 @@ void func_808ACCB8(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot02_objects.c", 600); - if (play->csCtx.state != 0 && play->csCtx.actorCues[0] != NULL && play->csCtx.actorCues[0]->id == 2) { + if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[0] != NULL && play->csCtx.actorCues[0]->id == 2) { if (this->unk_16A < 5) { rate = (this->unk_16A / 5.0f); redPrim = greenPrim = bluePrim = 255; @@ -265,7 +265,7 @@ void func_808ACCB8(Actor* thisx, PlayState* play) { } void func_808AD3D4(BgSpot02Objects* this, PlayState* play) { - if (play->csCtx.state != 0 && play->csCtx.actorCues[2] != NULL && play->csCtx.actorCues[2]->id == 2) { + if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[2] != NULL && play->csCtx.actorCues[2]->id == 2) { if (this->timer == 2) { Actor_PlaySfx(&this->dyna.actor, NA_SE_IT_EXPLOSION_ICE); } @@ -285,7 +285,7 @@ void func_808AD450(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_bg_spot02_objects.c", 736); - if (play->csCtx.state != 0 && play->csCtx.actorCues[2] != NULL) { + if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[2] != NULL) { u16 temp_v1 = CAM_BINANG_TO_DEG(play->csCtx.actorCues[2]->rot.z); if (this->unk_170 != temp_v1) { diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c index 0c03001fecc..a796f9aebae 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -194,7 +194,7 @@ void func_80969FB4(DemoDu* this, PlayState* play) { void DemoDu_CsFireMedallion_AdvanceTo01(DemoDu* this, PlayState* play) { s32 pad[2]; - if ((gSaveContext.chamberCutsceneNum == 1) && !IS_CUTSCENE_LAYER) { + if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_FIRE) && !IS_CUTSCENE_LAYER) { Player* player = GET_PLAYER(play); this->updateIndex = CS_FIREMEDALLION_SUBSCENE(1); diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index 573fbe6270a..da65153be00 100644 --- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -786,7 +786,7 @@ void func_8097FCE4(DemoGt* this, PlayState* play) { Vec3f vec; u16 csCurFrame = play->csCtx.curFrame; - if (csCurFrame == 0x1F7 || kREG(1) == 4) { + if (csCurFrame == 503 || kREG(1) == 4) { vec.x = this->dyna.actor.world.pos.x + 300.0f; vec.y = this->dyna.actor.world.pos.y + 560.0f; vec.z = this->dyna.actor.world.pos.z - 377.0f; diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 41b42de04eb..39a95aac419 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -326,7 +326,7 @@ void func_80985430(DemoIm* this, PlayState* play) { void func_8098544C(DemoIm* this, PlayState* play) { s32 pad[2]; - if ((gSaveContext.chamberCutsceneNum == 4) && !IS_CUTSCENE_LAYER) { + if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_SHADOW) && !IS_CUTSCENE_LAYER) { Player* player = GET_PLAYER(play); this->action = 1; diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index d9ecd198117..20770c0ff0f 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -253,7 +253,7 @@ void func_8098E960(DemoSa* this, PlayState* play) { s32 pad[2]; Player* player; - if ((gSaveContext.chamberCutsceneNum == 0) && !IS_CUTSCENE_LAYER) { + if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_FOREST) && !IS_CUTSCENE_LAYER) { player = GET_PLAYER(play); this->action = 1; play->csCtx.script = D_8099010C; diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index c4c19eff69a..6d53836aa1d 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -50,7 +50,7 @@ void EfcErupc_UpdateAction(EfcErupc* this, PlayState* play) { Vec3f accel; s32 i; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.actorCues[1] != NULL) { if (play->csCtx.actorCues[1]->id == 2) { if (this->unk_150 == 30) { @@ -73,7 +73,7 @@ void EfcErupc_UpdateAction(EfcErupc* this, PlayState* play) { } } } - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.actorCues[2] != NULL) { switch (play->csCtx.actorCues[2]->id) { case 2: @@ -135,7 +135,7 @@ void EfcErupc_Draw(Actor* thisx, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_efc_erupc.c", 321), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { if ((play->csCtx.actorCues[1] != NULL) && (play->csCtx.actorCues[1]->id == 2)) { gSPDisplayList(POLY_XLU_DISP++, object_efc_erupc_DL_002570); } @@ -144,7 +144,7 @@ void EfcErupc_Draw(Actor* thisx, PlayState* play) { Matrix_Scale(3.4f, 3.4f, 3.4f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_efc_erupc.c", 333), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { CsCmdActorCue* cue = play->csCtx.actorCues[2]; if (cue != NULL) { diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 52f27d2f36c..e4728a0bfa2 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -742,7 +742,7 @@ void EnFish_RespawningUpdate(EnFish* this, PlayState* play) { void EnFish_Update(Actor* thisx, PlayState* play) { EnFish* this = (EnFish*)thisx; - if ((D_80A17010 == NULL) && (this->actor.params == FISH_DROPPED) && (play->csCtx.state != 0) && + if ((D_80A17010 == NULL) && (this->actor.params == FISH_DROPPED) && (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[1] != NULL)) { EnFish_SetCutsceneData(this); } diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 689dc6670f3..c8bcfc8d466 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -427,7 +427,7 @@ s32 EnGo_IsCameraModified(EnGo* this, PlayState* play) { return 0; } - xyzDistSq = (this->actor.scale.x / 0.01f) * 10000.0f; + xyzDistSq = (this->actor.scale.x / 0.01f) * SQ(100.0f); if ((this->actor.params & 0xF0) == 0x90) { Camera_ChangeSetting(mainCam, CAM_SET_DIRECTED_YAW); xyzDistSq *= 4.8f; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 63be1fc35dd..860a74af953 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -148,10 +148,10 @@ static ColliderJntSphInit sJntSphInit = { static CollisionCheckInfoInit D_80A65F38 = { 10, 35, 100, MASS_HEAVY }; typedef struct { - s16 sceneId; - Vec3s pos; - s16 angle; -} EnHorseSpawnpoint; + /* 0x0 */ s16 sceneId; + /* 0x2 */ Vec3s pos; + /* 0x8 */ s16 angle; +} EnHorseSpawnpoint; // size = 0xA static EnHorseSpawnpoint sHorseSpawns[] = { { SCENE_HYRULE_FIELD, 16, 0, 1341, 0 }, @@ -330,18 +330,15 @@ static EnHorseSpawnpoint sHorseSpawns[] = { }; typedef struct { - s16 zMin; - s16 zMax; - - s16 xMin; - s16 xMax; - s16 xOffset; - - s16 angle; - s16 angleRange; - - Vec3s pos; -} BridgeJumpPoint; + /* 0x00 */ s16 zMin; + /* 0x02 */ s16 zMax; + /* 0x04 */ s16 xMin; + /* 0x06 */ s16 xMax; + /* 0x08 */ s16 xOffset; + /* 0x0A */ s16 angle; + /* 0x0C */ s16 angleRange; + /* 0x0E */ Vec3s pos; +} BridgeJumpPoint; // size = 0x14 static BridgeJumpPoint sBridgeJumps[] = { { -195, -40, 225, 120, 360, -0x4000, 0x7D0, -270, -52, -117 }, @@ -349,17 +346,17 @@ static BridgeJumpPoint sBridgeJumps[] = { }; typedef struct { - s16 x; - s16 y; - s16 z; - s16 speedXZ; - s16 angle; -} RaceWaypoint; + /* 0x0 */ s16 x; + /* 0x2 */ s16 y; + /* 0x4 */ s16 z; + /* 0x6 */ s16 speedXZ; + /* 0x8 */ s16 angle; +} RaceWaypoint; // size = 0xA typedef struct { - s32 numWaypoints; - RaceWaypoint* waypoints; -} RaceInfo; + /* 0x0 */ s32 numWaypoints; + /* 0x4 */ RaceWaypoint* waypoints; +} RaceInfo; // size = 0x8 static RaceWaypoint sIngoRaceWaypoints[] = { { 1056, 1, -1540, 11, 0x2A8D }, { 1593, 1, -985, 10, 0xFC27 }, { 1645, 1, -221, 11, 0xE891 }, @@ -407,9 +404,9 @@ static EnHorseCsFunc sCutsceneActionFuncs[] = { }; typedef struct { - s32 cueId; - s32 csFuncIdx; -} CsActionEntry; + /* 0x0 */ s32 cueId; + /* 0x4 */ s32 csFuncIdx; +} CsActionEntry; // size = 0x8 static CsActionEntry sCsActionTable[] = { { 36, 1 }, { 37, 2 }, { 38, 3 }, { 64, 4 }, { 65, 5 }, @@ -420,29 +417,29 @@ static RaceWaypoint sHbaWaypoints[] = { { 3600, 1413, -4100, 11, 0x0000 }, { 3600, 1413, 360, 11, 0x0000 }, }; -static RaceInfo sHbaInfo = { 5, sHbaWaypoints }; +static RaceInfo sHbaInfo = { ARRAY_COUNT(sHbaWaypoints), sHbaWaypoints }; static EnHorseActionFunc sActionFuncs[] = { - EnHorse_Frozen, - EnHorse_Inactive, - EnHorse_Idle, - EnHorse_FollowPlayer, - EnHorse_UpdateIngoRace, - EnHorse_MountedIdle, - EnHorse_MountedIdleWhinneying, - EnHorse_MountedTurn, - EnHorse_MountedWalk, - EnHorse_MountedTrot, - EnHorse_MountedGallop, - EnHorse_MountedRearing, - EnHorse_Stopping, - EnHorse_Reverse, - EnHorse_LowJump, - EnHorse_HighJump, - EnHorse_BridgeJump, - EnHorse_CutsceneUpdate, - EnHorse_UpdateHorsebackArchery, - EnHorse_FleePlayer, + EnHorse_Frozen, // ENHORSE_ACT_FROZEN + EnHorse_Inactive, // ENHORSE_ACT_INACTIVE + EnHorse_Idle, // ENHORSE_ACT_IDLE + EnHorse_FollowPlayer, // ENHORSE_ACT_FOLLOW_PLAYER + EnHorse_UpdateIngoRace, // ENHORSE_ACT_INGO_RACE + EnHorse_MountedIdle, // ENHORSE_ACT_MOUNTED_IDLE + EnHorse_MountedIdleWhinneying, // ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING + EnHorse_MountedTurn, // ENHORSE_ACT_MOUNTED_TURN + EnHorse_MountedWalk, // ENHORSE_ACT_MOUNTED_WALK + EnHorse_MountedTrot, // ENHORSE_ACT_MOUNTED_TROT + EnHorse_MountedGallop, // ENHORSE_ACT_MOUNTED_GALLOP + EnHorse_MountedRearing, // ENHORSE_ACT_MOUNTED_REARING + EnHorse_Stopping, // ENHORSE_ACT_STOPPING + EnHorse_Reverse, // ENHORSE_ACT_REVERSE + EnHorse_LowJump, // ENHORSE_ACT_LOW_JUMP + EnHorse_HighJump, // ENHORSE_ACT_HIGH_JUMP + EnHorse_BridgeJump, // ENHORSE_ACT_BRIDGE_JUMP + EnHorse_CutsceneUpdate, // ENHORSE_ACT_CS_UPDATE + EnHorse_UpdateHorsebackArchery, // ENHORSE_ACT_HBA + EnHorse_FleePlayer, // ENHORSE_ACT_FLEE_PLAYER }; s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, PlayState* play) { @@ -460,7 +457,7 @@ s32 EnHorse_BgCheckBridgeJumpPoint(EnHorse* this, PlayState* play) { return false; } - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_COUNT(sBridgeJumps); i++) { xMin = sBridgeJumps[i].xMin; xMax = (xMin + sBridgeJumps[i].xMax) + sBridgeJumps[i].xOffset; if (xMax < xMin) { @@ -492,7 +489,7 @@ s32 EnHorse_CheckBridgeJumps(EnHorse* this, PlayState* play) { return false; } - for (i = 0; i != 2; i++) { + for (i = 0; i < ARRAY_COUNT(sBridgeJumps); i++) { xMin = sBridgeJumps[i].xMin; xMax = sBridgeJumps[i].xMax + xMin; @@ -518,10 +515,10 @@ s32 EnHorse_CheckBridgeJumps(EnHorse* this, PlayState* play) { return false; } -void EnHorse_RaceWaypointPos(RaceWaypoint* waypoints, s32 idx, Vec3f* pos) { - pos->x = waypoints[idx].x; - pos->y = waypoints[idx].y; - pos->z = waypoints[idx].z; +void EnHorse_RaceWaypointPos(RaceWaypoint* waypoints, s32 index, Vec3f* pos) { + pos->x = waypoints[index].x; + pos->y = waypoints[index].y; + pos->z = waypoints[index].z; } void EnHorse_RotateToPoint(EnHorse* this, PlayState* play, Vec3f* pos, s16 turnAmount) { @@ -672,7 +669,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) { Player* player; Vec3f spawnPos; - for (i = 0; i < 169; i++) { + for (i = 0; i < ARRAY_COUNT(sHorseSpawns); i++) { if (sHorseSpawns[i].sceneId == play->sceneId) { player = GET_PLAYER(play); if (play->sceneId != SCENE_LON_LON_RANCH || @@ -690,7 +687,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) { dist = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &spawnPos); if (play->sceneId) {} - if (!(minDist < dist) && !func_80A5BBBC(play, this, &spawnPos)) { + if (!((minDist < dist) || func_80A5BBBC(play, this, &spawnPos))) { minDist = dist; this->actor.world.pos.x = sHorseSpawns[i].pos.x; this->actor.world.pos.y = sHorseSpawns[i].pos.y; @@ -723,7 +720,7 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) { if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(play)) == 1 || (player->stateFlags1 & PLAYER_STATE1_20) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) || - this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_8 || play->csCtx.state != 0) { + this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_8 || play->csCtx.state != CS_STATE_IDLE) { return false; } return true; @@ -945,7 +942,7 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) { EnHorse_StartMountedIdleResetAnim(this); } else if (this->actor.params == 9) { this->actor.params = 5; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { EnHorse_StartMountedIdle(this); } else { this->actor.speed = 8.0f; @@ -1998,17 +1995,17 @@ void EnHorse_InitIngoHorse(EnHorse* this) { } } -void EnHorse_SetIngoAnimation(s32 idx, f32 curFrame, s32 arg2, s16* animIdxOut, f32* curFrameOut) { - *animIdxOut = sIngoAnimations[idx]; +void EnHorse_SetIngoAnimation(s32 index, f32 curFrame, s32 arg2, s16* animIdxOut, f32* curFrameOut) { + *animIdxOut = sIngoAnimations[index]; *curFrameOut = curFrame; - if (idx == 3 || idx == 7 || idx == 8 || idx == 4) { + if ((index == 3) || (index == 7) || (index == 8) || (index == 4)) { *curFrameOut = 0.0f; } if (arg2 == 1) { - if (idx == 5) { + if (index == 5) { *animIdxOut = 4; *curFrameOut = curFrame; - } else if (idx == 6) { + } else if (index == 6) { *animIdxOut = 3; *curFrameOut = curFrame; } diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 83e3d6547ff..d0f6538da29 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -957,7 +957,7 @@ s32 EnKo_AdultSaved(EnKo* this, PlayState* play) { void func_80A9877C(EnKo* this, PlayState* play) { Player* player = GET_PLAYER(play); - if ((play->csCtx.state != 0) || gDebugCamEnabled) { + if ((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) { this->interactInfo.trackPos = play->view.eye; this->interactInfo.yOffset = 40.0f; if (ENKO_TYPE != ENKO_TYPE_CHILD_0) { diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index cc3aced0c9d..91bafad3ec1 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -341,7 +341,7 @@ void EnNb_SetupChamberCsImpl(EnNb* this, PlayState* play) { s32 pad[2]; Player* player; - if ((gSaveContext.chamberCutsceneNum == 3) && !IS_CUTSCENE_LAYER) { + if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_SPIRIT) && !IS_CUTSCENE_LAYER) { player = GET_PLAYER(play); this->action = NB_CHAMBER_UNDERGROUND; play->csCtx.script = D_80AB431C; diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index d53918d3a75..463b39f892c 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -753,7 +753,7 @@ void func_80ACB748(EnOwl* this, PlayState* play) { case 8: case 9: func_800F436C(&D_80ACD62C, NA_SE_EV_FLYING_AIR - SFX_FLAG, weight * 2.0f); - if ((play->csCtx.curFrame >= 420) || ((0xC1 < play->csCtx.curFrame && (play->csCtx.curFrame <= 280)))) { + if ((play->csCtx.curFrame >= 420) || ((193 < play->csCtx.curFrame && (play->csCtx.curFrame <= 280)))) { func_800F4414(&D_80ACD62C, NA_SE_EN_OWL_FLUTTER, weight * 2.0f); } if (play->csCtx.curFrame == 217) { diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 565c291d472..f1e5c4d263f 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -536,7 +536,6 @@ void EnReeba_CheckDamage(EnReeba* this, PlayState* play) { this->stunType = LEEVER_STUN_NONE; switch (this->actor.colChkInfo.damageEffect) { - case LEEVER_DMGEFF_UNUSED: case LEEVER_DMGEFF_BOOMERANG: if ((this->actor.colChkInfo.health > 1) && (this->stunType != LEEVER_STUN_OTHER)) { diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 1e9ccb60428..545bc7d0fda 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -7,6 +7,7 @@ #include "z_en_ru1.h" #include "assets/objects/object_ru1/object_ru1.h" #include "terminal.h" +#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" #define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_26) @@ -324,7 +325,7 @@ Actor* func_80AEB124(PlayState* play) { Actor* actorIt = play->actorCtx.actorLists[ACTORCAT_BOSS].head; while (actorIt != NULL) { - if ((actorIt->id == ACTOR_DEMO_EFFECT) && ((actorIt->params & 0xFF) == 0x15)) { + if ((actorIt->id == ACTOR_DEMO_EFFECT) && ((actorIt->params & 0xFF) == DEMO_EFFECT_JEWEL_ZORA)) { return actorIt; } actorIt = actorIt->next; @@ -586,7 +587,7 @@ void func_80AEBBF4(EnRu1* this) { void func_80AEBC30(PlayState* play) { Player* player; - if (play->csCtx.curFrame == 0xCD) { + if (play->csCtx.curFrame == 205) { player = GET_PLAYER(play); Audio_PlaySfxGeneral(NA_SE_EV_DIVE_INTO_WATER, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); @@ -594,7 +595,7 @@ void func_80AEBC30(PlayState* play) { } void func_80AEBC84(EnRu1* this, PlayState* play) { - if (play->csCtx.curFrame == 0x82) { + if (play->csCtx.curFrame == 130) { func_80078914(&this->actor.projectedPos, NA_SE_VO_RT_LAUGH_0); } } diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index c140b242690..d50bdd8f864 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -115,7 +115,7 @@ void func_80AF2608(EnRu2* this) { s16* unk_2A6 = &this->unk_2A6; s16* unk_2A4 = &this->unk_2A4; - if (!DECR(*unk_2A6)) { + if (DECR(*unk_2A6) == 0) { *unk_2A6 = Rand_S16Offset(0x3C, 0x3C); } @@ -263,7 +263,7 @@ void func_80AF2AB4(EnRu2* this, PlayState* play) { Player* player; s16 temp; - if ((gSaveContext.chamberCutsceneNum == 2) && !IS_CUTSCENE_LAYER) { + if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_WATER) && !IS_CUTSCENE_LAYER) { player = GET_PLAYER(play); this->action = 1; play->csCtx.script = D_80AF411C; diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index 64757c50408..b926b4087a7 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -88,7 +88,7 @@ void EnXc_SetEyePattern(EnXc* this) { s16* blinkTimer = &this->blinkTimer; s16* eyePattern = &this->eyeIdx; - if (!DECR(*blinkTimer)) { + if (DECR(*blinkTimer) == 0) { *blinkTimer = Rand_S16Offset(60, 60); } @@ -120,7 +120,7 @@ s32 EnXc_AnimIsFinished(EnXc* this) { CsCmdActorCue* EnXc_GetCue(PlayState* play, s32 cueChannel) { CsCmdActorCue* cue = NULL; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { cue = play->csCtx.actorCues[cueChannel]; } return cue; @@ -422,15 +422,15 @@ void EnXc_SetColossusAppearSFX(EnXc* this, PlayState* play) { sceneId = play->sceneId; if (sceneId == SCENE_DESERT_COLOSSUS) { CutsceneContext* csCtx = &play->csCtx; - u16 frameCount = csCtx->curFrame; + u16 csCurFrame = csCtx->curFrame; f32 wDest[2]; - if (frameCount == 119) { + if (csCurFrame == 119) { Vec3f pos = { -611.0f, 728.0f, -2.0f }; SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &pos, &sXyzDist, wDest); func_80078914(&sXyzDist, NA_SE_EV_JUMP_CONC); - } else if (frameCount == 164) { + } else if (csCurFrame == 164) { Vec3f pos = { -1069.0f, 38.0f, 0.0f }; s32 pad; @@ -462,9 +462,9 @@ void EnXc_SetColossusWindSFX(PlayState* play) { if (sceneId == SCENE_DESERT_COLOSSUS) { CutsceneContext* csCtx = &play->csCtx; - u16 frameCount = csCtx->curFrame; + u16 csCurFrame = csCtx->curFrame; - if ((frameCount >= 120) && (frameCount < 164)) { + if ((csCurFrame >= 120) && (csCurFrame < 164)) { s32 pad; Vec3f* eye = &play->view.eye; @@ -723,9 +723,8 @@ void func_80B3DAF0(EnXc* this, PlayState* play) { cueId = cue->id; if (cueId == 3 || cueId == 11 || cueId == 12 || cueId == 13 || cueId == 23) { - f32 frameCount; + f32 frameCount = Animation_GetLastFrame(&gSheikPullingOutHarpAnim); - frameCount = Animation_GetLastFrame(&gSheikPullingOutHarpAnim); Animation_Change(&this->skelAnime, &gSheikPullingOutHarpAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -4.0f); this->action = SHEIK_ACTION_7; this->drawMode = SHEIK_DRAW_PULLING_OUT_HARP; @@ -765,7 +764,7 @@ void EnXc_SetupPlayingHarpAction(EnXc* this, PlayState* play, s32 animFinished) void func_80B3DCA8(EnXc* this, PlayState* play) { f32 frameCount; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { CsCmdActorCue* cue = play->csCtx.actorCues[4]; if (cue != NULL && cue->id == 8) { @@ -814,7 +813,7 @@ void func_80B3DE78(EnXc* this, s32 animFinished) { } void EnXc_SetupReverseAccel(EnXc* this, PlayState* play) { - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { CsCmdActorCue* cue = play->csCtx.actorCues[4]; if (cue != NULL && cue->id == 4) { @@ -866,7 +865,7 @@ void func_80B3E164(EnXc* this, PlayState* play) { } void EnXc_SetupDisappear(EnXc* this, PlayState* play) { - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { CsCmdActorCue* cue = play->csCtx.actorCues[4]; if (cue != NULL && cue->id == 9) { @@ -1400,9 +1399,9 @@ void EnXc_LakeHyliaDive(PlayState* play) { void func_80B3F534(PlayState* play) { CutsceneContext* csCtx = &play->csCtx; - u16 frameCount = csCtx->curFrame; + u16 csCurFrame = csCtx->curFrame; - if (frameCount == 310) { + if (csCurFrame == 310) { Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -1044.0f, -1243.0f, 7458.0f, 0, 0, 0, WARP_DESTINATION); } } diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index 544a3422aa9..915579331ea 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -1233,9 +1233,9 @@ void func_80B5154C(EnZl2* this, PlayState* play) { EnZl2_UpdateEyes(this); } else { csCtx = &play->csCtx; - if (csCtx->curFrame < 0x5F0) { + if (csCtx->curFrame < 1520) { func_80B4EBB8(this); - } else if (csCtx->curFrame == 0x5F0) { + } else if (csCtx->curFrame == 1520) { this->unk_27C = 0.0f; } else { func_80B4EC48(this); diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 11bd9849b4a..5cc51f5abf1 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -722,7 +722,7 @@ void ObjectKankyo_DrawSnow(Actor* thisx, PlayState* play2) { } void ObjectKankyo_Lightning(ObjectKankyo* this, PlayState* play) { - if (play->csCtx.state != 0 && play->csCtx.actorCues[0] != NULL) { + if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[0] != NULL) { switch (this->effects[0].state) { case 0: this->effects[0].timer = 0; @@ -797,7 +797,7 @@ void ObjectKankyo_WaitForSunGraveSparkObject(ObjectKankyo* this, PlayState* play } void ObjectKankyo_SunGraveSpark(ObjectKankyo* this, PlayState* play) { - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.actorCues[1] != NULL && play->csCtx.actorCues[1]->id == 2) { Actor_PlaySfx(&this->actor, NA_SE_EN_BIRI_SPARK - SFX_FLAG); if ((s16)this->effects[0].alpha + 20 > 255) { @@ -818,7 +818,7 @@ void ObjectKankyo_DrawSunGraveSpark(Actor* thisx, PlayState* play2) { f32 weight; OPEN_DISPS(play->state.gfxCtx, "../z_object_kankyo.c", 1324); - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { if (play->csCtx.actorCues[1] != NULL && play->csCtx.actorCues[1]->id == 2 && this->requiredObjectLoaded) { // apparently, light waves with larger amplitudes look brighter, so the name 'amplitude' kind of works here if (this->effects[0].state == 0) { @@ -896,7 +896,7 @@ void ObjectKankyo_WaitForBeamObject(ObjectKankyo* this, PlayState* play) { void ObjectKankyo_Beams(ObjectKankyo* this, PlayState* play) { u8 i; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_IDLE) { for (i = 0; i < 6; i++) { if (play->csCtx.actorCues[i + 1] != NULL && play->csCtx.actorCues[i + 1]->id == 2) { if (this->effects[i].size == 0.1f) { diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 422c5e24b60..77715481aec 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -11922,9 +11922,9 @@ void func_8084CBF4(Player* this, f32 arg1, f32 arg2) { if ((this->unk_878 != 0.0f) && (arg2 <= this->skelAnime.curFrame)) { if (arg1 < fabsf(this->unk_878)) { if (this->unk_878 >= 0.0f) { - dir = 1; + dir = 1.0f; } else { - dir = -1; + dir = -1.0f; } temp = dir * arg1; } else { @@ -13052,7 +13052,7 @@ void func_8084F698(Player* this, PlayState* play) { void func_8084F710(Player* this, PlayState* play) { s32 pad; - if ((this->unk_84F != 0) && (play->csCtx.curFrame < 0x131)) { + if ((this->unk_84F != 0) && (play->csCtx.curFrame < 305)) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; } else if (D_80853600 < 150.0f) { diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index d38c65308f9..147df517321 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1479,7 +1479,7 @@ void FileSelect_LoadGame(GameState* thisx) { gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT; gSaveContext.nextCutsceneIndex = 0xFFEF; gSaveContext.cutsceneTrigger = 0; - gSaveContext.chamberCutsceneNum = 0; + gSaveContext.chamberCutsceneNum = CHAMBER_CS_FOREST; gSaveContext.nextDayTime = NEXT_TIME_NONE; gSaveContext.retainWeatherMode = false; diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c index b8fdbb1d7c6..29a4e8950ad 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c @@ -828,7 +828,7 @@ void FileSelect_SetupEraseConfirm2(GameState* thisx) { } /** - * Allow the player to confirm their chioce to erase or return back to erase select. + * Allow the player to confirm their choice to erase or return back to erase select. * Update function for `CM_ERASE_CONFIRM` */ void FileSelect_EraseConfirm(GameState* thisx) {