diff --git a/include/z64.h b/include/z64.h index 5599d6c4de..289641a522 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1129,7 +1129,7 @@ typedef struct PlayState { /* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct PlayState* play); /* 0x11D48 */ s32 (*startPlayerFishing)(struct PlayState* play); /* 0x11D4C */ s32 (*grabPlayer)(struct PlayState* play, Player* player); - /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 mode); + /* 0x11D50 */ s32 (*startPlayerCutscene)(struct PlayState* play, Actor* actor, s32 csMode); /* 0x11D54 */ void (*func_11D54)(Player* player, struct PlayState* play); /* 0x11D58 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage); /* 0x11D5C */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor); diff --git a/include/z64player.h b/include/z64player.h index 056722eb7e..cd3730baed 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -352,6 +352,113 @@ typedef enum { #define LIMB_BUF_COUNT(limbCount) ((ALIGN16((limbCount) * sizeof(Vec3s)) + sizeof(Vec3s) - 1) / sizeof(Vec3s)) #define PLAYER_LIMB_BUF_COUNT LIMB_BUF_COUNT(PLAYER_LIMB_MAX) +typedef enum { + /* 0x00 */ PLAYER_CSMODE_NONE, + /* 0x01 */ PLAYER_CSMODE_1, + /* 0x02 */ PLAYER_CSMODE_2, + /* 0x03 */ PLAYER_CSMODE_3, + /* 0x04 */ PLAYER_CSMODE_4, + /* 0x05 */ PLAYER_CSMODE_5, + /* 0x06 */ PLAYER_CSMODE_6, + /* 0x07 */ PLAYER_CSMODE_7, + /* 0x08 */ PLAYER_CSMODE_8, + /* 0x09 */ PLAYER_CSMODE_9, + /* 0x0A */ PLAYER_CSMODE_10, + /* 0x0B */ PLAYER_CSMODE_11, + /* 0x0C */ PLAYER_CSMODE_12, + /* 0x0D */ PLAYER_CSMODE_13, + /* 0x0E */ PLAYER_CSMODE_14, + /* 0x0F */ PLAYER_CSMODE_15, + /* 0x10 */ PLAYER_CSMODE_16, + /* 0x11 */ PLAYER_CSMODE_17, + /* 0x12 */ PLAYER_CSMODE_18, + /* 0x13 */ PLAYER_CSMODE_19, + /* 0x14 */ PLAYER_CSMODE_20, + /* 0x15 */ PLAYER_CSMODE_21, + /* 0x16 */ PLAYER_CSMODE_22, + /* 0x17 */ PLAYER_CSMODE_23, + /* 0x18 */ PLAYER_CSMODE_24, + /* 0x19 */ PLAYER_CSMODE_25, + /* 0x1A */ PLAYER_CSMODE_26, + /* 0x1B */ PLAYER_CSMODE_27, + /* 0x1C */ PLAYER_CSMODE_28, + /* 0x1D */ PLAYER_CSMODE_29, + /* 0x1E */ PLAYER_CSMODE_30, + /* 0x1F */ PLAYER_CSMODE_31, + /* 0x20 */ PLAYER_CSMODE_32, + /* 0x21 */ PLAYER_CSMODE_33, + /* 0x22 */ PLAYER_CSMODE_34, + /* 0x23 */ PLAYER_CSMODE_35, + /* 0x24 */ PLAYER_CSMODE_36, + /* 0x25 */ PLAYER_CSMODE_37, + /* 0x26 */ PLAYER_CSMODE_38, + /* 0x27 */ PLAYER_CSMODE_39, + /* 0x28 */ PLAYER_CSMODE_40, + /* 0x29 */ PLAYER_CSMODE_41, + /* 0x2A */ PLAYER_CSMODE_42, + /* 0x2B */ PLAYER_CSMODE_43, + /* 0x2C */ PLAYER_CSMODE_44, + /* 0x2D */ PLAYER_CSMODE_45, + /* 0x2E */ PLAYER_CSMODE_46, + /* 0x2F */ PLAYER_CSMODE_47, + /* 0x30 */ PLAYER_CSMODE_48, + /* 0x31 */ PLAYER_CSMODE_49, + /* 0x32 */ PLAYER_CSMODE_50, + /* 0x33 */ PLAYER_CSMODE_51, + /* 0x34 */ PLAYER_CSMODE_52, + /* 0x35 */ PLAYER_CSMODE_53, + /* 0x36 */ PLAYER_CSMODE_54, + /* 0x37 */ PLAYER_CSMODE_55, + /* 0x38 */ PLAYER_CSMODE_56, + /* 0x39 */ PLAYER_CSMODE_57, + /* 0x3A */ PLAYER_CSMODE_58, + /* 0x3B */ PLAYER_CSMODE_59, + /* 0x3C */ PLAYER_CSMODE_60, + /* 0x3D */ PLAYER_CSMODE_61, + /* 0x3E */ PLAYER_CSMODE_62, + /* 0x3F */ PLAYER_CSMODE_63, + /* 0x40 */ PLAYER_CSMODE_64, + /* 0x41 */ PLAYER_CSMODE_65, + /* 0x42 */ PLAYER_CSMODE_66, + /* 0x43 */ PLAYER_CSMODE_67, + /* 0x44 */ PLAYER_CSMODE_68, + /* 0x45 */ PLAYER_CSMODE_69, + /* 0x46 */ PLAYER_CSMODE_70, + /* 0x47 */ PLAYER_CSMODE_71, + /* 0x48 */ PLAYER_CSMODE_72, + /* 0x49 */ PLAYER_CSMODE_73, + /* 0x4A */ PLAYER_CSMODE_74, + /* 0x4B */ PLAYER_CSMODE_75, + /* 0x4C */ PLAYER_CSMODE_76, + /* 0x4D */ PLAYER_CSMODE_77, + /* 0x4E */ PLAYER_CSMODE_78, + /* 0x4F */ PLAYER_CSMODE_79, + /* 0x50 */ PLAYER_CSMODE_80, + /* 0x51 */ PLAYER_CSMODE_81, + /* 0x52 */ PLAYER_CSMODE_82, + /* 0x53 */ PLAYER_CSMODE_83, + /* 0x54 */ PLAYER_CSMODE_84, + /* 0x55 */ PLAYER_CSMODE_85, + /* 0x56 */ PLAYER_CSMODE_86, + /* 0x57 */ PLAYER_CSMODE_87, + /* 0x58 */ PLAYER_CSMODE_88, + /* 0x59 */ PLAYER_CSMODE_89, + /* 0x5A */ PLAYER_CSMODE_90, + /* 0x5B */ PLAYER_CSMODE_91, + /* 0x5C */ PLAYER_CSMODE_92, + /* 0x5D */ PLAYER_CSMODE_93, + /* 0x5E */ PLAYER_CSMODE_94, + /* 0x5F */ PLAYER_CSMODE_95, + /* 0x60 */ PLAYER_CSMODE_96, + /* 0x61 */ PLAYER_CSMODE_97, + /* 0x62 */ PLAYER_CSMODE_98, + /* 0x63 */ PLAYER_CSMODE_99, + /* 0x64 */ PLAYER_CSMODE_100, + /* 0x65 */ PLAYER_CSMODE_101, + /* 0x66 */ PLAYER_CSMODE_102, + /* 0x67 */ PLAYER_CSMODE_MAX +} PlayerCutsceneMode; + typedef struct { /* 0x00 */ f32 unk_00; /* 0x04 */ f32 unk_04; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 6f6bd29729..efc057dfd5 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1025,7 +1025,7 @@ void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) { } s32 func_8002DEEC(Player* player) { - return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != 0); + return (player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (player->csMode != PLAYER_CSMODE_NONE); } void func_8002DF18(PlayState* play, Player* player) { diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 541138729d..dcd9c2c399 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -5260,7 +5260,7 @@ s32 Camera_Unique9(Camera* camera) { CAM_INTERFACE_FIELD(CAM_LETTERBOX_IGNORE, CAM_HUD_VISIBILITY(rwData->curKeyFrame->unk_01), 0)); } else if (camera->player->stateFlags1 & PLAYER_STATE1_27 && player->currentBoots != PLAYER_BOOTS_IRON) { - func_8002DF38(camera->play, camera->target, 8); + func_8002DF38(camera->play, camera->target, PLAYER_CSMODE_8); osSyncPrintf("camera: demo: player demo set WAIT\n"); } else { osSyncPrintf("camera: demo: player demo set %d\n", rwData->curKeyFrame->unk_01); @@ -6227,14 +6227,14 @@ s32 Camera_Demo5(Camera* camera) { framesDiff = camera->play->state.frames - sDemo5PrevAction12Frame; if (player->stateFlags1 & PLAYER_STATE1_11) { // holding object over head. - func_8002DF54(camera->play, camera->target, 8); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_8); } else if (ABS(framesDiff) > 3000) { - func_8002DF54(camera->play, camera->target, 12); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_12); } else { - func_8002DF54(camera->play, camera->target, 69); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_69); } } else { - func_8002DF54(camera->play, camera->target, 1); + func_8002DF54(camera->play, camera->target, PLAYER_CSMODE_1); } } @@ -6294,7 +6294,7 @@ s32 Camera_Demo6(Camera* camera) { FALLTHROUGH; case 1: if (stateTimers[camera->animState] < rwData->animTimer) { - func_8002DF54(camera->play, &camera->player->actor, 8); + func_8002DF54(camera->play, &camera->player->actor, PLAYER_CSMODE_8); Actor_GetWorld(&focusPosRot, camFocus); rwData->atTarget.x = focusPosRot.pos.x; rwData->atTarget.y = focusPosRot.pos.y - 20.0f; @@ -7822,8 +7822,8 @@ void Camera_Finish(Camera* camera) { player->actor.freezeTimer = 0; player->stateFlags1 &= ~PLAYER_STATE1_29; - if (player->csMode != 0) { - func_8002DF54(camera->play, &player->actor, 7); + if (player->csMode != PLAYER_CSMODE_NONE) { + func_8002DF54(camera->play, &player->actor, PLAYER_CSMODE_7); osSyncPrintf("camera: player demo end!!\n"); } diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index 0ff0a25ab0..957c2897c4 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -264,7 +264,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 2290: { Actor* rideActor = player->rideActor; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (rideActor != NULL) { rideActor->freezeTimer = 180; } @@ -275,7 +275,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act func_800C0808(play, subCamId, player, CAM_SET_CS_C); } break; case 5120: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_80121314; csInfo->keyFrameCnt = 1; @@ -285,7 +285,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act case 4510: D_8012133C[0].eyeTargetInit = actor->world.pos; D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_8012133C; csInfo->keyFrameCnt = 3; @@ -303,7 +303,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0); Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2); Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); subCam->roll = 0; subCam->fov = 50.0f; if (subCam->childCamId != CAM_ID_MAIN) { @@ -317,7 +317,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act if (Rand_ZeroOne() < 0.0f) { D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x; } - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_801213B4; csInfo->keyFrameCnt = 5; @@ -361,10 +361,10 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 6; subCam->fov = 75.0f; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3040: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_8012151C[0].timerInit = timer - 1; csInfo->keyFrames = D_8012151C; @@ -388,7 +388,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 2; func_800C0808(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3010: D_801215BC[0].timerInit = timer; @@ -416,7 +416,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3090: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_80121814; csInfo->keyFrameCnt = 4; @@ -432,14 +432,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 70.0f; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3380: case 3065: csInfo->keyFrames = D_801218B4; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -451,12 +451,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121904; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3050: Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, &player->actor, 5); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_5); OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C); func_80078884(NA_SE_SY_CORRECT_CHIME); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos); @@ -485,14 +485,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->stateFlags |= CAM_STATE_1; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3130: csInfo->keyFrames = D_80121A44; csInfo->keyFrameCnt = 12; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); subCam->stateFlags |= CAM_STATE_1; break; @@ -517,7 +517,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x50; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; case 3170: Actor_GetWorld(&spA0, actor); @@ -533,7 +533,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CopyCamera(play, CAM_ID_MAIN, subCamId); subCam->roll = -1; subCam->fov = 55.0f; - func_8002DF38(play, actor, 1); + func_8002DF38(play, actor, PLAYER_CSMODE_1); break; case 3160: Actor_GetWorld(&spA0, actor); @@ -546,7 +546,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 55.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; case 3180: Actor_GetWorldPosShapeRot(&spA0, actor); @@ -560,12 +560,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 60.0f; - func_8002DF38(play, actor, 1); + func_8002DF38(play, actor, PLAYER_CSMODE_1); break; case 3190: Play_CameraChangeSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); - func_8002DF38(play, actor, 0xC); + func_8002DF38(play, actor, PLAYER_CSMODE_12); break; case 3230: spC0.x = 120.0f; @@ -578,7 +578,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0x1E; subCam->fov = 75.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Actor_GetWorldPosShapeRot(&spA0, actor); Actor_GetFocus(&sp8C, &player->actor); spC0.x = sp8C.pos.x; @@ -607,7 +607,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act Play_CameraSetAtEye(play, subCamId, &spC0, &spB4); subCam->roll = 0; subCam->fov = 45.0f; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); break; case 3220: Actor_GetFocus(&spA0, actor); @@ -623,7 +623,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act subCam->roll = 0; subCam->fov = 75.0f; player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 3240: D_80121D3C[2].timerInit = timer - 5; @@ -631,12 +631,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121D3C; csInfo->keyFrameCnt = 3; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 6001: Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Actor_GetWorld(&spA0, actor); if (spA0.pos.z > -750.0f) { OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820); @@ -651,7 +651,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act break; case 3400: Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3); - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4); OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos); OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos); @@ -667,12 +667,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121DB4; csInfo->keyFrameCnt = 9; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3310: Play_CameraChangeSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Play_CopyCamera(play, subCamId, CAM_ID_MAIN); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -705,7 +705,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80121FBC; csInfo->keyFrameCnt = 4; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_3); @@ -717,7 +717,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012205C; csInfo->keyFrameCnt = 3; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3350: @@ -732,7 +732,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act D_801220D4[1].eyeTargetInit.y = 80.0f; D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x; } - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); csInfo->keyFrames = D_801220D4; csInfo->keyFrameCnt = 5; @@ -743,14 +743,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012219C; csInfo->keyFrameCnt = 7; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3410: csInfo->keyFrames = D_801222B4; csInfo->keyFrameCnt = 5; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -762,7 +762,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012237C; csInfo->keyFrameCnt = 2; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -774,7 +774,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801223CC; csInfo->keyFrameCnt = 6; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); player->stateFlags1 |= PLAYER_STATE1_29; player->actor.freezeTimer = 90; @@ -788,7 +788,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801224BC; csInfo->keyFrameCnt = 7; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); i = Quake_Request(subCam, QUAKE_TYPE_1); @@ -802,17 +802,17 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC; func_800C0808(play, subCamId, player, CAM_SET_CS_C); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); break; case 4110: csInfo->keyFrames = D_8012269C; csInfo->keyFrameCnt = 3; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 4120: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122714[1].timerInit = 80; csInfo->keyFrames = D_80122714; csInfo->keyFrameCnt = 4; @@ -830,7 +830,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_801228A4; csInfo->keyFrameCnt = 5; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -838,7 +838,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_8012296C; csInfo->keyFrameCnt = 4; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -846,7 +846,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A0C; csInfo->keyFrameCnt = 2; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -854,7 +854,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122A5C; csInfo->keyFrameCnt = 8; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -862,7 +862,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122B9C; csInfo->keyFrameCnt = 3; - func_8002DF38(play, &player->actor, 8); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_8); Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; @@ -884,7 +884,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrameCnt = 1; func_800C0808(play, subCamId, player, CAM_SET_CS_C); - func_8002DF38(play, &player->actor, 1); + func_8002DF38(play, &player->actor, PLAYER_CSMODE_1); i = Quake_Request(subCam, QUAKE_TYPE_3); Quake_SetSpeed(i, 12000); @@ -895,11 +895,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act csInfo->keyFrames = D_80122C8C; csInfo->keyFrameCnt = 1; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3260: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122CB4[1].timerInit = timer - 5; csInfo->keyFrames = D_80122CB4; @@ -908,7 +908,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act func_800C0808(play, subCamId, player, CAM_SET_CS_C); break; case 3261: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); D_80122D04[1].timerInit = timer - 10; csInfo->keyFrames = D_80122D04; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 6b9ae2b526..b63702ec35 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -3799,7 +3799,7 @@ void Interface_Draw(PlayState* play) { gSaveContext.subTimerState = SUBTIMER_STATE_RESPAWN; gSaveContext.cutsceneIndex = 0; Message_StartTextbox(play, 0x71B0, NULL); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); } else { sSubTimerStateTimer = 40; gSaveContext.subTimerState = SUBTIMER_STATE_STOP; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 3c6e24650b..b7fac803d2 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -488,7 +488,7 @@ void Player_SetBootData(PlayState* play, Player* this) { } s32 Player_InBlockingCsMode(PlayState* play, Player* this) { - return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) || + return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != PLAYER_CSMODE_NONE) || (play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) || (this->stateFlags3 & PLAYER_STATE3_7) || ((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0)); @@ -577,7 +577,7 @@ void func_8008EC70(Player* this) { } void Player_SetEquipmentData(PlayState* play, Player* this) { - if (this->csMode != 0x56) { + if (this->csMode != PLAYER_CSMODE_86) { this->currentShield = SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD)); this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)); this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS)); diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 6bec48f641..a22b8f477b 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -254,7 +254,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) { gSaveContext.cutsceneTrigger = 1; Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, NULL, 0x31); + func_8002DF54(play, NULL, PLAYER_CSMODE_49); } if (this->dyna.actor.params < 0) { diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index 6b8021595d..fe08ed53ba 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -191,7 +191,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { return; } } - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = BgDyYoseizo_ChooseType; } } @@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_ChooseType(BgDyYoseizo* this, PlayState* play) { s32 givingReward; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); // "Mode" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ もうど ☆☆☆☆☆ %d\n" VT_RST, play->msgCtx.ocarinaMode); givingReward = false; @@ -315,12 +315,12 @@ void BgDyYoseizo_SetupSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } Audio_PlayActorSfx2(&this->actor, NA_SE_VO_FR_LAUGH_0); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = BgDyYoseizo_SpinGrow_NoReward; } void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Math_ApproachF(&this->actor.world.pos.y, this->grownHeight, this->heightFraction, 100.0f); Math_ApproachF(&this->scale, 0.035f, this->scaleFraction, 0.005f); Math_ApproachF(&this->heightFraction, 0.8f, 0.1f, 0.02f); @@ -346,7 +346,7 @@ void BgDyYoseizo_SpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { f32 curFrame = this->skelAnime.curFrame; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if ((this->frameCount * 1273.0f) <= this->bobTimer) { this->bobTimer = 0.0f; @@ -360,7 +360,7 @@ void BgDyYoseizo_CompleteSpinGrow_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { this->frameCount = Animation_GetLastFrame(&gGreatFairySittingAnim); @@ -380,7 +380,7 @@ void BgDyYoseizo_SetupGreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { } void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->bobTimer = this->skelAnime.curFrame * 1273.0f; if ((this->frameCount * 1273.0f) <= this->bobTimer) { @@ -547,7 +547,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, PlayState* play) { Actor* findOcarinaSpot; if (this->vanishTimer == 0) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); play->envCtx.lightSettingOverride = 0; findOcarinaSpot = play->actorCtx.actorLists[ACTORCAT_PROP].head; @@ -569,7 +569,7 @@ void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, PlayState* play) { if (play->csCtx.state != CS_STATE_IDLE) { if ((play->csCtx.npcActions[0] != NULL) && (play->csCtx.npcActions[0]->action == 2)) { this->actor.draw = BgDyYoseizo_Draw; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->finishedSpinGrow = false; if (play->sceneId == SCENE_GREAT_FAIRYS_FOUNTAIN_MAGIC) { diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index 7a71233dcc..6daea830f3 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -239,7 +239,7 @@ void BgGndIceblock_Idle(BgGndIceblock* this, PlayState* play) { if (this->dyna.unk_150 > 0.0f) { BgGndIceblock_SetNextPosition(this); if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->targetPos) > 1.0f) { - func_8002DF54(play, &this->dyna.actor, 8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); this->actionFunc = BgGndIceblock_Slide; } } @@ -280,7 +280,7 @@ void BgGndIceblock_Fall(BgGndIceblock* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 100.0f; thisx->world.pos.z = thisx->home.pos.z; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); } this->actionFunc = BgGndIceblock_Reset; } @@ -293,7 +293,7 @@ void BgGndIceblock_Hole(BgGndIceblock* this, PlayState* play) { if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y - 100.0f, thisx->velocity.y)) { thisx->velocity.y = 0.0f; if (Player_InCsMode(play)) { - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); } this->actionFunc = BgGndIceblock_Idle; } @@ -317,7 +317,7 @@ void BgGndIceblock_Slide(BgGndIceblock* this, PlayState* play) { switch (BgGndIceblock_NextAction(this)) { case GNDICE_IDLE: this->actionFunc = BgGndIceblock_Idle; - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); break; case GNDICE_FALL: this->actionFunc = BgGndIceblock_Fall; diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index 19e98e15fd..de12b2676b 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -367,7 +367,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) { this->timer++; - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); // if parent is NULL, link threw it if (Actor_HasNoParent(&this->dyna.actor, play)) { diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index b6842d4d44..56dc0aaa7f 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -138,7 +138,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) { this->dyna.actor.world.pos.x += 32.5f * Math_SinS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); - func_8002DF54(play, &this->dyna.actor, 8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); this->dyna.actor.flags |= ACTOR_FLAG_4; this->actionFunc = BgHidanDalm_Shrink; this->dyna.actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH; @@ -159,7 +159,7 @@ void BgHidanDalm_Shrink(BgHidanDalm* this, PlayState* play) { Vec3f pos; if (Math_StepToF(&this->dyna.actor.scale.x, 0.0f, 0.004f)) { - func_8002DF54(play, &this->dyna.actor, 7); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_7); Actor_Kill(&this->dyna.actor); } diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index f63b253abf..f2e0c15166 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -125,7 +125,7 @@ void BgIceObjects_CheckPits(BgIceObjects* this, PlayState* play) { thisx->world.pos.y = thisx->home.pos.y - 60.0f; thisx->world.pos.z = thisx->home.pos.z; if (thisx->params != 0) { - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); } this->actionFunc = BgIceObjects_Reset; } @@ -142,7 +142,7 @@ void BgIceObjects_Idle(BgIceObjects* this, PlayState* play) { BgIceObjects_SetNextTarget(this, play); if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { thisx->flags |= ACTOR_FLAG_4; - func_8002DF54(play, thisx, 8); + func_8002DF54(play, thisx, PLAYER_CSMODE_8); thisx->params = 1; this->actionFunc = BgIceObjects_Slide; } @@ -172,7 +172,7 @@ void BgIceObjects_Slide(BgIceObjects* this, PlayState* play) { thisx->flags &= ~ACTOR_FLAG_4; } thisx->params = 0; - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); Audio_PlayActorSfx2(thisx, NA_SE_EV_BLOCK_BOUND); if ((fabsf(thisx->world.pos.x + 1387.0f) < 1.0f) && (fabsf(thisx->world.pos.z + 260.0f) < 1.0f)) { this->actionFunc = BgIceObjects_Stuck; diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index 54f9a870c3..66cfebf00f 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -164,7 +164,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) { BgMoriBigst_SetupLanding(this, play); Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_STONE_BOUND); OnePointCutscene_Init(play, 1020, 8, &this->dyna.actor, CAM_ID_MAIN); - func_8002DF38(play, NULL, 0x3C); + func_8002DF38(play, NULL, PLAYER_CSMODE_60); } } diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 377d7ebf10..ca504c1b57 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -95,7 +95,7 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, PlayState* play) { this->timer++; if ((this->timer > 28) && !Player_InCsMode(play)) { BgMoriKaitenkabe_SetupRotate(this); - func_8002DF54(play, &this->dyna.actor, 8); + func_8002DF54(play, &this->dyna.actor, PLAYER_CSMODE_8); Math_Vec3f_Copy(&this->lockedPlayerPos, &player->actor.world.pos); push.x = Math_SinS(this->dyna.unk_158); push.y = 0.0f; @@ -129,7 +129,7 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, PlayState* play) { Math_StepToF(&this->rotSpeed, 0.6f, 0.02f); if (Math_StepToF(&this->rotYdeg, this->rotDirection * 45.0f, this->rotSpeed)) { BgMoriKaitenkabe_SetupWait(this); - func_8002DF54(play, thisx, 7); + func_8002DF54(play, thisx, PLAYER_CSMODE_7); if (this->rotDirection > 0.0f) { thisx->home.rot.y += 0x2000; } else { diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index 4ac1b7dcf9..c1a5825db4 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -320,7 +320,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, PlayState* play) { if (firstFall == 0) { firstFall = 1; } else { - func_8002DF54(play, &GET_PLAYER(play)->actor, 7); + func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSMODE_7); } } this->direction = 0; @@ -356,7 +356,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) { if (sPuzzleState == 0x10) { sPuzzleState = 0x40; Audio_PlayActorSfx2(&this->dyna.actor, NA_SE_EV_BLOCK_RISING); - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); } } else if (this->dyna.unk_150 != 0.0f) { if (this->direction == 0) { diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index 448bb09362..aa4992f5f1 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -218,7 +218,7 @@ void BgSpot00Hanebasi_Update(Actor* thisx, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_80); Flags_SetEventChkInf(EVENTCHKINF_82); this->actionFunc = BgSpot00Hanebasi_DoNothing; - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index c76a6211d8..26f1a3b698 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -269,7 +269,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { break; case 1: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Play_ClearAllSubCameras(play); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -297,11 +297,11 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { } if (this->unk_198 == 110) { - func_8002DF54(play, &this->actor, 9); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_9); } if (this->unk_198 == 5) { - func_8002DF54(play, &this->actor, 12); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_12); } if (this->unk_198 < 6) { @@ -417,7 +417,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); BossDodongo_SetupWalk(this); this->unk_1DA = 50; this->unk_1BC = 0; @@ -950,7 +950,7 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) { magmaScale = ((s16)(Rand_ZeroOne() * 50)) - 50; } - if (player2->csMode >= 10) { + if (player2->csMode >= PLAYER_CSMODE_10) { phi_s0_3 = -1; } @@ -1305,7 +1305,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { case 0: this->csState = 5; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1615,7 +1615,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { this->csState = 100; Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD); this->skelAnime.playSpeed = 0.0f; diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index a2f81cfceb..3426570b92 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -312,7 +312,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->introState = BFD_CS_START; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -389,7 +389,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Math_ApproachF(&this->subCamShake, 2.0f, 1.0f, 0.8 * 0.01f); } if (this->timers[0] == 40) { - func_8002DF54(play, &this->actor, 0x13); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_19); } if (this->timers[0] == 0) { this->introState = BFD_CS_LOOK_GROUND; @@ -418,7 +418,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { this->timers[0] = 170; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.0f; - func_8002DF54(play, &this->actor, 0x14); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_20); } break; case BFD_CS_COLLAPSE: @@ -468,7 +468,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { if (this->timers[3] == 190) { this->subCamAtMaxVelFrac.x = this->subCamAtMaxVelFrac.y = this->subCamAtMaxVelFrac.z = 0.05f; this->platformSignal = VBSIMA_KILL; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } if (this->actor.world.pos.y > 120.0f) { this->subCamAtNext = this->actor.world.pos; @@ -538,7 +538,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { // BFD_CS_NONE / BOSSFD_FLY_MAIN / SUB_CAM_ID_DONE this->introState = this->introFlyState = this->subCamId = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionFunc = BossFd_Wait; this->handoffSignal = FD2_SIGNAL_GROUND; SET_EVENTCHKINF(EVENTCHKINF_73); @@ -847,7 +847,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EN_VALVAISA_LAND2, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); for (i1 = 0; i1 < 15; i1++) { Vec3f sp144 = { 0.0f, 0.0f, 0.0f }; Vec3f sp138 = { 0.0f, 0.0f, 0.0f }; diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 793f120449..44b80d9b35 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -653,7 +653,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { case DEATH_START: this->deathState = DEATH_RETREAT; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -747,7 +747,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { this->work[FD2_ACTION_STATE]++; this->subCamVelFactor = 0.0f; this->subCamAccel = 0.02f; - func_8002DF54(play, &bossFd->actor, 1); + func_8002DF54(play, &bossFd->actor, PLAYER_CSMODE_1); } } if ((bossFd->work[BFD_ACTION_STATE] == BOSSFD_BONES_FALL) && (bossFd->timers[0] == 5)) { @@ -781,7 +781,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); Flags_SetClear(play, play->roomCtx.curRoom.num); diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 1899ab8cda..2b9dae7c28 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -558,7 +558,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->actor.shape.rot.y = 0; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -600,7 +600,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { BossGanon_SetIntroCsCamera(this, 1); if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); } if (this->csTimer == 13) { @@ -633,7 +633,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { break; } - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csState = 4; BossGanon_SetIntroCsCamera(this, 2); this->csTimer = 0; @@ -665,7 +665,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 10) { - func_8002DF54(play, &this->actor, 0x4B); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_75); } if (this->csTimer == 70) { @@ -731,7 +731,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { this->csState = 9; this->csTimer = 0; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); sZelda->unk_3C8 = 0; this->triforceType = GDF_TRIFORCE_ZELDA; this->fwork[GDF_TRIFORCE_SCALE] = 10.0f; @@ -785,7 +785,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { player->actor.world.pos.z = 20.0f; if (this->csTimer == 20) { - func_8002DF54(play, &this->actor, 0x17); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_23); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS); } @@ -1005,7 +1005,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 30) { - func_8002DF54(play, &this->actor, 0x4A); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_74); } if (this->csTimer <= 50) { @@ -1128,7 +1128,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { func_800C08AC(play, this->csCamIndex, 0); this->csState = this->csCamIndex = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); BossGanon_SetupWait(this, play); } @@ -1234,7 +1234,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { switch (this->csState) { case 0: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1469,7 +1469,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GANON_BODY_SPARK - SFX_FLAG); if (this->csTimer == 2) { - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); } if (this->csTimer > 50) { @@ -1505,7 +1505,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { case 100: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->csCamIndex = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE); @@ -1594,11 +1594,11 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csCamAt.z = -135.0f; if (this->csTimer == 5) { - func_8002DF54(play, &this->actor, 0x4C); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_76); } if (this->csTimer == 70) { - func_8002DF54(play, &this->actor, 0x4D); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_77); } if (this->csTimer == 90) { @@ -1683,7 +1683,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { if (this->csTimer == 20) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); } if (this->csTimer == 40) { @@ -1750,7 +1750,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 107; this->csTimer = 0; Message_StartTextbox(play, 0x70D2, NULL); - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); } break; @@ -1792,7 +1792,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) { this->csState = 109; this->csCamIndex = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Flags_SetSwitch(play, 0x37); } break; diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 14c85004ec..04841a4785 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -196,7 +196,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { objectIdx = Object_GetIndex(&play->objectCtx, OBJECT_GANON_ANIME3); if (Object_IsLoaded(&play->objectCtx, objectIdx)) { func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -267,11 +267,11 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 40) { sZelda->unk_3C8 = 1; - func_8002DF54(play, &this->actor, 0x4E); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_78); } if (this->unk_398 == 85) { sZelda->unk_3C8 = 2; - func_8002DF54(play, &this->actor, 0x4F); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_79); } this->subCamEye.x = 930.0f; this->subCamEye.y = 1129.0f; @@ -300,14 +300,14 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 20) { sZelda->unk_3C8 = 3; - func_8002DF54(play, &this->actor, 0x50); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_80); } if (this->unk_398 == 55) { this->unk_39C = 4; this->unk_398 = 0; this->unk_410.x = 0.0f; sZelda->unk_3C8 = 4; - func_8002DF54(play, &this->actor, 0x50); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_80); } break; case 4: @@ -324,7 +324,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 5; this->unk_398 = 0; } @@ -371,7 +371,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { } if (this->unk_398 == 30) { sZelda->unk_3C8 = 5; - func_8002DF54(play, &this->actor, 0x51); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_81); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -402,7 +402,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_80078884(NA_SE_EV_STONE_BOUND); } if (this->unk_398 == 30) { - func_8002DF54(play, &this->actor, 0x52); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_82); } if (this->unk_398 == 50) { this->unk_398 = 0; @@ -469,7 +469,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.y = player->actor.world.pos.y; this->subCamAt.z = player->actor.world.pos.z - 200.0f; if (this->unk_398 == 20) { - func_8002DF54(play, &this->actor, 0x1E); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_30); } if (this->unk_398 == 60) { this->subCamEye.x = (this->actor.world.pos.x + 200.0f) - 154.0f; @@ -558,7 +558,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { SkelAnime_Free(&this->skelAnime, play); SkelAnime_InitFlex(play, &this->skelAnime, &gGanonSkel, NULL, NULL, NULL, 0); BossGanon2_SetObjectSegment(this, play, OBJECT_GANON_ANIME3, false); - func_8002DF54(play, &this->actor, 0x54); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_84); this->unk_314 = 3; } // fake, tricks the compiler into using stack the way we need it to @@ -614,7 +614,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->actor.world.pos.x += 250; this->actor.world.pos.y = 1886.0f; this->unk_394 = 0.0f; - func_8002DF54(play, &this->actor, 0x53); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_83); this->unk_30C = 5.0f; this->unk_228 = 1.0f; } @@ -699,7 +699,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { if (this->unk_398 == 215) { this->unk_39C = 23; this->unk_224 = 0.0f; - func_8002DF54(play, &this->actor, 0x55); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_85); } break; case 23: @@ -719,7 +719,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { this->subCamAt.z = player->actor.world.pos.z; if (this->unk_398 == 228) { func_80078884(NA_SE_IT_SHIELD_REFLECT_SW); - func_8002DF54(play, &this->actor, 0x56); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_86); Rumble_Override(0.0f, 255, 10, 50); } if (this->unk_398 >= 229) { @@ -756,7 +756,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_80078884(NA_SE_IT_SWORD_SWING); } if (this->unk_398 == 25) { - func_8002DF54(play, &this->actor, 0x57); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_87); this->unk_39C = 25; this->unk_398 = 0; } @@ -804,7 +804,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { case 27: this->subCamUp.z = 0.0f; if (this->unk_398 == 4) { - func_8002DF54(play, &this->actor, 0x58); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_88); } this->subCamEye.x = player->actor.world.pos.x - 20.0f; this->subCamEye.y = player->actor.world.pos.y + 50.0f; @@ -877,7 +877,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 0; this->unk_337 = 1; func_808FFDB0(this, play); @@ -1299,7 +1299,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->unk_39C = 1; this->subCamEye = mainCam1->eye; this->subCamAt = mainCam1->at; @@ -1348,7 +1348,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 3; } break; @@ -1359,7 +1359,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); this->unk_39C = 11; this->unk_334 = 1; - func_8002DF54(play, &this->actor, 0x60); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_96); this->unk_398 = 0; FALLTHROUGH; case 11: @@ -1381,7 +1381,7 @@ void func_80900890(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } break; } @@ -1485,7 +1485,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->unk_39C = 1; this->unk_398 = 0; sZelda->unk_3C8 = 9; @@ -1522,7 +1522,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->skelAnime.playSpeed = 3.0f; } if (this->unk_398 == 120) { - func_8002DF54(play, &this->actor, 0x63); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_99); } this->actor.world.rot.y = 0x4000; this->actor.world.pos.x = this->actor.world.pos.z = 0.0f; @@ -1590,7 +1590,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_39C = 5; this->unk_398 = 40; this->skelAnime.playSpeed = 1.0f; - func_8002DF54(play, &this->actor, 0x64); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_100); } break; case 5: @@ -1604,10 +1604,10 @@ void func_8090120C(BossGanon2* this, PlayState* play) { Math_ApproachZeroF(&this->unk_38C, 1.0f, 8.0f); } if (this->unk_398 == 70) { - func_8002DF54(play, &this->actor, 0x65); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_101); } if (this->unk_398 == 150) { - func_8002DF54(play, &this->actor, 0x66); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_102); } this->unk_30C = 10.0f; player->actor.world.pos.x = 250.0f; @@ -1626,7 +1626,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_39C = 6; } break; @@ -1645,7 +1645,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { this->unk_398 = 0; Animation_MorphToPlayOnce(&this->skelAnime, &gGanonFinalBlowAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonFinalBlowAnim); - play->startPlayerCutscene(play, &this->actor, 0x61); + play->startPlayerCutscene(play, &this->actor, PLAYER_CSMODE_97); } else { break; } @@ -1712,7 +1712,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { if (this->unk_398 == 55) { Animation_MorphToPlayOnce(&this->skelAnime, &gGanonDeadStartAnim, 0.0f); this->unk_194 = Animation_GetLastFrame(&gGanonDeadStartAnim); - func_8002DF54(play, &this->actor, 0x62); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_98); this->unk_39C = 8; this->unk_398 = 1000; } diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index 1ab566705e..8d53423ecb 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -956,7 +956,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { switch (this->deathState) { case DEATH_START: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); osSyncPrintf("7\n"); @@ -1118,7 +1118,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y, GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0); this->actor.child = &horse->actor; diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 3bb39d3b84..50bcd153ed 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -629,7 +629,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, PlayState* play) { this->actionState = 4; this->actor.flags |= ACTOR_FLAG_0; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -686,7 +686,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f, 397.68002f, 0, -0x705C, 0, 0x180); } else { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->actionState = 1; } } @@ -757,7 +757,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { } if (this->frameCount == 190) { - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); } if (this->frameCount >= 228) { @@ -768,7 +768,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionState = 3; } break; @@ -964,7 +964,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) { this->disableGameplayLogic = false; this->patienceTimer = 200; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } break; } @@ -1053,7 +1053,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { case 0: this->actionState = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1181,7 +1181,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 3ed0182655..e677e11c5f 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -835,7 +835,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (&this->actor == player->actor.parent) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; if (this->timers[0] == 0) { func_8002F6D4(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000, 10.0f, 0); } @@ -865,7 +865,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { if (&this->actor == player->actor.parent) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; } Math_ApproachF(&this->tentRippleSize, 0.15f, 0.5f, 0.01); if (this->meltIndex < 41) { @@ -1225,7 +1225,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { (fabsf(player->actor.world.pos.x - -180.0f) < 40.0f))) { // checks if Link is on one of the four platforms func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1333,11 +1333,11 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { Math_ApproachF(&this->actor.speedXZ, sp80, 1.0f, sp78); Math_ApproachF(&this->subCamYawRate, sp7C, 1.0f, 128.0f); if (this->work[MO_TENT_MOVE_TIMER] == 525) { - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); } if (this->work[MO_TENT_MOVE_TIMER] > 540) { this->csState = MO_INTRO_REVEAL; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); sMorphaTent1->drawActor = true; player->actor.world.pos.x = 180.0f; player->actor.world.pos.z = -210.0f; @@ -1446,7 +1446,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) { // MO_BATTLE / SUB_CAM_ID_DONE this->csState = this->subCamId = 0; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } break; } @@ -1511,7 +1511,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { switch (this->csState) { case MO_DEATH_START: func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1681,7 +1681,7 @@ void BossMo_DeathCs(BossMo* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sMorphaTent1->actor.world.pos.y = -1000.0f; } } else { @@ -1786,7 +1786,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { if (player->actor.parent != NULL) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; } } else { this->actor.colChkInfo.health = 1; @@ -1805,7 +1805,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { if (player->actor.parent == &sMorphaTent1->actor) { player->unk_850 = 0x65; player->actor.parent = NULL; - player->csMode = 0; + player->csMode = PLAYER_CSMODE_NONE; } } this->work[MO_TENT_ACTION_STATE] = MO_CORE_STUNNED; diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 2289828c82..907c5c4b14 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -371,7 +371,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) { player->stateFlags1 |= PLAYER_STATE1_5; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); @@ -404,7 +404,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { sHands[LEFT]->actor.flags |= ACTOR_FLAG_0; player->stateFlags1 &= ~PLAYER_STATE1_5; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sSubCamAt.y += 30.0f; sSubCamAt.z += 300.0f; Play_CameraSetAtEye(play, sSubCamId, &sSubCamAt, &sSubCamEye); @@ -1024,7 +1024,7 @@ void BossSst_HeadSetupDeath(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); Play_CopyCamera(play, sSubCamId, CAM_ID_MAIN); - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); func_80064520(play, &play->csCtx); Math_Vec3f_Copy(&sSubCamEye, &GET_ACTIVE_CAM(play)->eye); this->actionFunc = BossSst_HeadDeath; @@ -1187,7 +1187,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) { Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Play_ClearCamera(play, sSubCamId); - func_8002DF54(play, &GET_PLAYER(play)->actor, 7); + func_8002DF54(play, &GET_PLAYER(play)->actor, PLAYER_CSMODE_7); func_80064534(play, &play->csCtx); Actor_Kill(&this->actor); Actor_Kill(&sHands[LEFT]->actor); diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 5ca4737e3a..5a8b9d38d7 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -1499,7 +1499,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -1639,7 +1639,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gTwinrovaIntroAnim, 0.0f); this->workf[ANIM_SW_TGT] = Animation_GetLastFrame(&gTwinrovaIntroAnim); this->timers[0] = 50; - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_TRANSFORM); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1682,7 +1682,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { } if (this->timers[3] == 19) { - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); } if (this->timers[3] == 16) { @@ -1715,7 +1715,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->work[TW_PLLR_IDX] = 0; this->targetPos = sTwinrovaPillarPos[0]; BossTw_TwinrovaSetupFly(this, play); @@ -1795,7 +1795,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { player->actor.world.pos.x = player->actor.world.pos.z = .0f; this->csState2 = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 0x39); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_57); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2278,7 +2278,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->csState2 = this->subCamId; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); BossTw_SetupWait(this, play); } break; @@ -2682,7 +2682,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { case 0: this->csState2 = 1; func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -2721,7 +2721,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { sKoumePtr->actor.world.pos.z = sKotakePtr->actor.world.pos.z; sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x = sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0; - func_8002DF54(play, &sKoumePtr->actor, 1); + func_8002DF54(play, &sKoumePtr->actor, PLAYER_CSMODE_1); sKoumePtr->actor.flags |= ACTOR_FLAG_0; } break; @@ -2810,7 +2810,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) { this->csState2 = 4; this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS_CLEAR); Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0, 0, 0, WARP_DUNGEON_ADULT); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index ab7f05be40..e68c2cee6e 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -640,7 +640,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) { if (GET_EVENTCHKINF(EVENTCHKINF_76)) { sCsState = INTRO_CALL_BARI; sDoorState = 100; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); play->envCtx.screenFillColor[0] = 0xDC; play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; @@ -781,7 +781,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { play->envCtx.screenFillColor[1] = 0xDC; play->envCtx.screenFillColor[2] = 0xBE; play->envCtx.screenFillColor[3] = 0xD2; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); player->actor.world.rot.y = player->actor.shape.rot.y = 0x7FFF; sCsState++; break; @@ -809,7 +809,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { case INTRO_CLOSE_DOOR: this->timer--; if (this->timer == 0) { - func_8002DF54(play, &this->actor, 2); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_2); sCsState++; this->timer = 30; } @@ -824,7 +824,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { } break; case INTRO_CRACKLE: - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); sCsState++; break; case INTRO_SPAWN_BARI: @@ -955,7 +955,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamAtMaxVelFrac = sSubCamEyeMaxVelFrac; if (this->timer >= 45000) { play->envCtx.lightSettingOverride = 1; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); } else if (this->timer >= 35000) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS); } @@ -1012,7 +1012,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) { sSubCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sCsState++; SET_EVENTCHKINF(EVENTCHKINF_76); player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; @@ -1530,7 +1530,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { switch (sCsState) { case DEATH_START: - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); func_80064520(play, &play->csCtx); sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); @@ -1592,7 +1592,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_BALINADE_DEAD, 1, 1, 0x28); this->onCeiling = 2; // Not used by body BossVa_SetDeathEnv(play); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); } break; case DEATH_CORE_BURST: @@ -1633,7 +1633,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) { mainCam->at = sSubCamAt; - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); sCsState++; Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x, this->actor.world.pos.y, @@ -2417,7 +2417,7 @@ void BossVa_BariIntro(BossVa* this, PlayState* play) { switch (sCsState) { case INTRO_LOOK_BARI: if (this->actor.params == BOSSVA_BARI_UPPER_1) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if (Math_SmoothStepToF(&this->actor.world.pos.y, 60.0f, 0.3f, 1.0f, 0.15f) == 0.0f) { this->timer--; if (this->timer == 0) { 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 1caa9a4cd0..5db7bc0a55 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -868,7 +868,7 @@ void func_80986B2C(PlayState* play) { play->nextEntranceIndex = ENTR_HYRULE_FIELD_0; play->transitionType = TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST); play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &player->actor, 8); + func_8002DF54(play, &player->actor, PLAYER_CSMODE_8); } } diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index a1466e91c1..152f92f38a 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -750,7 +750,7 @@ void func_80997220(DoorShutter* this, PlayState* play) { this->dyna.actor.velocity.y = 0.0f; if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_11)) { DoorShutter_SetupAction(this, func_80997568); - func_8002DF54(play, NULL, 2); + func_8002DF54(play, NULL, PLAYER_CSMODE_2); } } @@ -784,7 +784,7 @@ void DoorShutter_JabuDoorClose(DoorShutter* this, PlayState* play) { void func_80997568(DoorShutter* this, PlayState* play) { if (this->unk_16F++ > 30) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); DoorShutter_SetupDoor(this, play); } } diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 45fb1714e3..bccd19edd4 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -466,7 +466,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); OnePointCutscene_Init(play, 0x25E7, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, 10); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; @@ -542,7 +542,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) { if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) { this->rutoWarpState = WARP_BLUE_RUTO_STATE_ENTERED; - func_8002DF54(play, &this->actor, 10); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); this->unk_1B2 = 1; DoorWarp1_SetupAction(this, func_80999EE0); } @@ -650,7 +650,7 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) { player = GET_PLAYER(play); OnePointCutscene_Init(play, 0x25E8, 999, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, 10); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_10); player->unk_450.x = this->actor.world.pos.x; player->unk_450.z = this->actor.world.pos.z; this->unk_1B2 = 20; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 9f0ebddbd9..f565058caa 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -262,7 +262,7 @@ void EnBomBowMan_RunGame(EnBomBowlMan* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); if (this->gameResult == 2) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); } this->actionFunc = EnBomBowlMan_HandlePlayChoice; } else { @@ -307,7 +307,7 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } } else { @@ -343,11 +343,11 @@ void func_809C41FC(EnBomBowlMan* this, PlayState* play) { Message_ContinueTextbox(play, this->actor.textId); this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_Init(play, 8010, -99, NULL, CAM_ID_MAIN); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnBomBowMan_SetupChooseShowPrize; } else { if (this->gameResult == 2) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); } this->actionFunc = EnBomBowMan_SetupRunGame; } @@ -459,7 +459,7 @@ void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, PlayState* play) { // "Wow" osSyncPrintf(VT_FGCOL(YELLOW) "☆ わー ☆ %d\n" VT_RST, play->bombchuBowlingStatus); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = EnBomBowMan_SetupRunGame; } } diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index f18ca60829..c664c49094 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -67,7 +67,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { if (((fabsf(chuPosDiff.x) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.y) < 40.0f) || (BREG(2))) && ((fabsf(chuPosDiff.z) < 40.0f) || (BREG(2)))) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); chu->timer = 1; this->subCamId = Play_CreateSubCamera(play); @@ -106,7 +106,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_154 = TEXT_STATE_EVENT; func_80078884(NA_SE_EV_HIT_SOUND); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->status = 1; this->actionFunc = EnBomBowlPit_CameraDollyIn; break; @@ -169,7 +169,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { Play_ClearCamera(play, this->subCamId); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnBomBowlPit_GivePrize; } } @@ -177,7 +177,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, PlayState* play) { void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) { Player* player = GET_PLAYER(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->getItemId = sGetItemIds[this->prizeIndex]; if ((this->getItemId == GI_BOMB_BAG_30) && (CUR_CAPACITY(UPG_BOMB_BAG) == 30)) { diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index b8a59bb512..bcf61281ea 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -469,7 +469,7 @@ void EnDaiku_InitSubCamera(EnDaiku* this, PlayState* play) { Play_CameraSetAtEye(play, this->subCamId, &this->subCamAt, &this->subCamEye); Play_CameraSetFov(play, this->subCamId, play->mainCamera.fov); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } void EnDaiku_UpdateSubCamera(EnDaiku* this, PlayState* play) { @@ -505,7 +505,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, PlayState* play) { Actor_Kill(&this->actor); } } else { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } } diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index fd1c73cebd..0ad921fc20 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -134,7 +134,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->unk_292 = TEXT_STATE_EVENT; this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_809EE048; return true; } else { @@ -159,7 +159,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { this->unk_292 = TEXT_STATE_EVENT; func_800F5B58(); Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (!GET_EVENTCHKINF(EVENTCHKINF_38)) { this->actionFunc = func_809EE96C; } else { @@ -187,7 +187,7 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) { if (this->unk_292 != TEXT_STATE_DONE) { switch (this->state) { case ENDIVINGGAME_STATE_NOTPLAYING: - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnDivingGame_HandlePlayChoice; break; case ENDIVINGGAME_STATE_AWARDPRIZE: @@ -254,7 +254,7 @@ void EnDivingGame_HandlePlayChoice(EnDivingGame* this, PlayState* play) { this->actionFunc = func_809EE048; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_809EE0FC; } } @@ -266,11 +266,11 @@ void func_809EE048(EnDivingGame* this, PlayState* play) { if (this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->phase == ENDIVINGGAME_PHASE_ENDED) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_809EDCB0; } else { play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_809EE0FC; } } @@ -423,7 +423,7 @@ void func_809EE800(EnDivingGame* this, PlayState* play) { Interface_SetTimer(50 + BREG(2)); } func_800F5ACC(NA_BGM_TIMED_MINI_GAME); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.textId = 0x405B; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_PLAYING; @@ -446,7 +446,7 @@ void func_809EE96C(EnDivingGame* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) { Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.textId = 0x4056; this->unk_292 = TEXT_STATE_EVENT; this->state = ENDIVINGGAME_STATE_AWARDPRIZE; diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index dc96c2300f..d5fa20ccc5 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -119,7 +119,7 @@ void EnDntJiji_Wait(EnDntJiji* this, PlayState* play) { !(player->stateFlags1 & PLAYER_STATE1_11)) { OnePointCutscene_Init(play, 2230, -99, &this->actor, CAM_ID_MAIN); this->timer = 0; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnDntJiji_SetupUnburrow; } } @@ -253,7 +253,7 @@ void EnDntJiji_Talk(EnDntJiji* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { func_8005B1A4(GET_ACTIVE_CAM(play)); Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.parent = NULL; Actor_OfferGetItem(&this->actor, play, this->getItemId, 400.0f, 200.0f); this->actionFunc = EnDntJiji_SetupGivePrize; diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index 6c0dc8f1b3..2cacc5d19b 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -250,7 +250,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) { this->hitCounter++; if (this->hitCounter >= 3) { OnePointCutscene_Init(play, 4140, -99, &this->actor, CAM_ID_MAIN); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->timer4 = 50; this->actionFunc = EnDntNomal_SetupTargetUnburrow; } @@ -339,7 +339,7 @@ void EnDntNomal_TargetTalk(EnDntNomal* this, PlayState* play) { Message_CloseTextbox(play); func_8005B1A4(GET_ACTIVE_CAM(play)); GET_ACTIVE_CAM(play)->csId = 0; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = EnDntNomal_SetupTargetGivePrize; } } @@ -361,7 +361,7 @@ void EnDntNomal_TargetGivePrize(EnDntNomal* this, PlayState* play) { if (Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_EX_ITEM, itemX, itemY, itemZ, 0, 0, 0, EXITEM_BULLET_BAG) == NULL) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); Actor_Kill(&this->actor); } this->spawnedItem = true; diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index cc0c96fa1c..b0a68f2c80 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -328,7 +328,7 @@ void func_809FE3C0(EnDu* this, PlayState* play) { return; } if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->interactInfo.talkState = NPC_TALK_STATE_IDLE; } if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) { @@ -423,7 +423,7 @@ void func_809FE890(EnDu* this, PlayState* play) { CsCmdActorAction* csAction; if (play->csCtx.state == CS_STATE_IDLE) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); EnDu_SetupAction(this, func_809FEB08); return; } @@ -490,7 +490,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { this->unk_1EE = 0; if (this->unk_1E8 == 1) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDU_ANIM_1); EnDu_SetupAction(this, func_809FE3C0); return; @@ -509,7 +509,7 @@ void func_809FEB08(EnDu* this, PlayState* play) { void func_809FEC14(EnDu* this, PlayState* play) { if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); EnDu_SetupAction(this, func_809FEC70); func_809FEC70(this, play); } diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index f934b8838b..d376158508 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -386,7 +386,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) { s32 getItemId; this->actor.draw = NULL; - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actor.parent = NULL; if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) { getItemId = GI_BULLET_BAG_40; diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 1c17860b83..487bae48bf 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -242,7 +242,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) { void EnGe1_SpotPlayer(EnGe1* this, PlayState* play) { this->cutsceneTimer = 30; this->actionFunc = EnGe1_KickPlayer; - func_8002DF54(play, &this->actor, 0x5F); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_95); func_80078884(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } @@ -586,7 +586,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, PlayState* play) { SET_EVENTCHKINF(EVENTCHKINF_68); if (!(player->stateFlags1 & PLAYER_STATE1_23)) { - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } else { horse = Actor_FindNearby(play, &player->actor, ACTOR_EN_HORSE, ACTORCAT_BG, 1200.0f); player->actor.freezeTimer = 1200; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index a685b42ae5..00a82a3fc6 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -480,7 +480,7 @@ void EnGe2_SetupCapturePlayer(EnGe2* this, PlayState* play) { this->stateFlags |= GE2_STATE_CAPTURING; this->actor.speedXZ = 0.0f; EnGe2_ChangeAction(this, GE2_ACTION_CAPTURETURN); - func_8002DF54(play, &this->actor, 95); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_95); func_80078884(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x6000, &this->actor); } diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index ca7d13e4c6..7bf34f737e 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -159,7 +159,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { this->actionFunc = EnGe3_GiveCard; } else { if (!(this->unk_30C & 4)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->unk_30C |= 4; } this->actor.textId = 0x6004; diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index ead941860a..173661baaa 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -919,7 +919,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) { if (&player->actor == this->swordCollider.base.at) { func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f); this->spinAttackState = 2; - func_8002DF54(play, &this->actor, 0x18); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_24); Message_StartTextbox(play, 0x6003, &this->actor); this->timer = 30; this->actor.speedXZ = 0.0f; diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index a1f1ff8526..0839c03346 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -1924,7 +1924,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { (f32)((Math_SinS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.x); player->actor.world.pos.z = (f32)((Math_CosS(this->actor.world.rot.y) * -30.0f) + this->actor.world.pos.z); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); Audio_PlayFanfare(NA_BGM_APPEAR); } break; @@ -1961,7 +1961,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) { case 4: // Finalize walking away Message_CloseTextbox(play); EnGo2_GoronFireClearCamera(this, play); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Actor_Kill(&this->actor); break; case 1: diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 263aacad2b..853788952d 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -372,7 +372,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); func_80078884(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = EnHeishi1_SetupKick; } } @@ -456,7 +456,7 @@ void EnHeishi1_Update(Actor* thisx, PlayState* play) { func_80078884(NA_SE_SY_FOUND); // "Discovered!" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); sPlayerIsCaught = true; this->actionFunc = EnHeishi1_SetupMoveToLink; } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 6869234d22..80e505a5a6 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -111,7 +111,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) { this->actor.world.pos.z += 90.0f; this->actor.shape.rot.y = this->actor.world.rot.y; Collider_DestroyCylinder(play, &this->collider); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80A544AC; } @@ -262,7 +262,7 @@ void func_80A5344C(EnHeishi2* this, PlayState* play) { void func_80A53538(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_300 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A535BC; } @@ -334,7 +334,7 @@ void func_80A53850(EnHeishi2* this, PlayState* play) { Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE); Message_CloseTextbox(play); this->unk_30C = 1; - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A531E4; } } @@ -423,7 +423,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) { void func_80A53C0C(EnHeishi2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if ((this->unk_300 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); play->msgCtx.msgMode = MSGMODE_PAUSED; this->actionFunc = func_80A53C90; } @@ -507,7 +507,7 @@ void func_80A53F30(EnHeishi2* this, PlayState* play) { this->actionFunc = func_80A54038; } else { Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A53908; } } else { @@ -525,7 +525,7 @@ void func_80A54038(EnHeishi2* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { SET_INFTABLE(INFTABLE_76); Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A53908; } } @@ -650,7 +650,7 @@ void func_80A5455C(EnHeishi2* this, PlayState* play) { EnBom* bomb; if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); Message_CloseTextbox(play); pos.x = Rand_CenteredFloat(20.0f) + this->unk_274.x; diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 12a8468b0c..8d0c213b98 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -133,7 +133,7 @@ void EnHeishi3_StandSentinelInGrounds(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); func_80078884(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = EnHeishi3_CatchStart; } } @@ -161,7 +161,7 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, PlayState* play) { Message_StartTextbox(play, 0x702D, &this->actor); func_80078884(NA_SE_SY_FOUND); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発見! ☆☆☆☆☆ \n" VT_RST); // "Discovered!" - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); this->actionFunc = EnHeishi3_CatchStart; } } diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index e9ca883195..f05de5b6e0 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -266,7 +266,7 @@ void func_80A56994(EnHeishi4* this, PlayState* play) { if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) { Message_CloseTextbox(play); SET_INFTABLE(INFTABLE_6C); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A56A50; } } @@ -284,7 +284,7 @@ void func_80A56ACC(EnHeishi4* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->unk_288 <= currentFrame) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A5673C; } } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 3127948e73..15951f54bc 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -432,7 +432,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) { } play->transitionType = transitionType; play->transitionTrigger = TRANS_TRIGGER_START; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING); if (index == 0) { AREG(6) = 0; @@ -856,7 +856,7 @@ void func_80A7ABD4(EnIn* this, PlayState* play) { void func_80A7AE84(EnIn* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actionFunc = func_80A7AEF0; } diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 5d7e339b5e..39de45a37b 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -259,7 +259,7 @@ void func_80A8F8D0(EnKakasi* this, PlayState* play) { void func_80A8F9C8(EnKakasi* this, PlayState* play) { func_80A8F28C(this); SkelAnime_Update(&this->skelanime); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { @@ -268,7 +268,7 @@ void func_80A8F9C8(EnKakasi* this, PlayState* play) { } this->subCamId = OnePointCutscene_Init(play, 2270, -99, &this->actor, CAM_ID_MAIN); play->msgCtx.msgMode = MSGMODE_PAUSED; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); func_8010BD58(play, OCARINA_ACTION_SCARECROW_LONG_PLAYBACK); this->actionFunc = func_80A8FAA4; } @@ -307,7 +307,7 @@ void func_80A8FBB8(EnKakasi* this, PlayState* play) { if (this->unk_196 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { func_8005B1A4(play->cameraPtrs[this->subCamId]); Message_CloseTextbox(play); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A8F660; } } diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index e9dc39b28c..b3cc66a81d 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -295,7 +295,7 @@ void func_80A91620(EnKakasi3* this, PlayState* play) { if (play->msgCtx.ocarinaMode == OCARINA_MODE_03 && play->msgCtx.msgMode == MSGMODE_NONE) { this->dialogState = TEXT_STATE_EVENT; Message_StartTextbox(play, 0x40A5, NULL); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A91A90; return; } @@ -353,7 +353,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->dialogState = TEXT_STATE_EVENT; OnePointCutscene_EndCutscene(play, this->subCamId); this->subCamId = CAM_ID_NONE; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A91A90; return; } @@ -368,7 +368,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { this->unk_195 = true; Message_StartTextbox(play, 0x40A7, NULL); this->dialogState = TEXT_STATE_EVENT; - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actionFunc = func_80A91A90; return; } @@ -382,7 +382,7 @@ void func_80A918E4(EnKakasi3* this, PlayState* play) { void func_80A91A90(EnKakasi3* this, PlayState* play) { func_80A90E28(this); SkelAnime_Update(&this->skelAnime); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); if (this->dialogState == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play)) { if (this->unk_195) { @@ -398,7 +398,7 @@ void func_80A91A90(EnKakasi3* this, PlayState* play) { } Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->actionFunc = func_80A911F0; } } diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 234207e196..2b42264f38 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -376,7 +376,7 @@ void EnKz_SetupMweep(EnKz* this, PlayState* play) { subCamEye.y += -100.0f; subCamEye.z += 260.0f; Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->actor.speedXZ = 0.1f; this->actionFunc = EnKz_Mweep; } @@ -408,7 +408,7 @@ void EnKz_Mweep(EnKz* this, PlayState* play) { void EnKz_StopMweep(EnKz* this, PlayState* play) { Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE); Play_ClearCamera(play, this->subCamId); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionFunc = EnKz_Wait; } 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 c63e5c5662..0d3efe9792 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -337,7 +337,7 @@ void func_80ACA71C(EnOwl* this) { } void func_80ACA76C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -347,7 +347,7 @@ void func_80ACA76C(EnOwl* this, PlayState* play) { } void func_80ACA7E0(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); @@ -547,7 +547,7 @@ void EnOwl_WaitLakeHylia(EnOwl* this, PlayState* play) { } void func_80ACB03C(EnOwl* this, PlayState* play) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); if (Actor_TextboxIsClosing(&this->actor, play)) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 1286eeef67..8bcc7261d7 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -1074,7 +1074,7 @@ void EnSkj_SetupMaskTrade(EnSkj* this) { void EnSkj_StartMaskTrade(EnSkj* this, PlayState* play) { u8 sp1F = Message_GetState(&play->msgCtx); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); if ((sp1F == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { EnSkj_JumpFromStump(this); } @@ -1172,7 +1172,7 @@ void EnSkj_SetupWaitForMaskTextClear(EnSkj* this) { void EnSkj_WaitForMaskTextClear(EnSkj* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->backflipFlag = 1; EnSkj_Backflip(this); } diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index 8b0ea6e0df..5fdafd34e4 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -757,7 +757,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { case 1: // Last cucco found, end the game gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Message_StartTextbox(play, 0x2084, &this->actor); this->actionFunc = EnTa_TalkCuccoGameEnd; @@ -805,7 +805,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { this->stateFlags &= ~TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; func_80078884(NA_SE_SY_FOUND); gSaveContext.timerState = TIMER_STATE_OFF; - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); // Time's up text Message_StartTextbox(play, 0x2081, &this->actor); @@ -868,7 +868,7 @@ void EnTa_ThrowSuperCuccos(EnTa* this, PlayState* play) { Animation_Change(&this->skelAnime, &gTalonSitWakeUpAnim, 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim) - 1.0f, Animation_GetLastFrame(&gTalonSitWakeUpAnim), ANIMMODE_ONCE, 10.0f); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); } } @@ -885,7 +885,7 @@ void EnTa_StartingCuccoGame3(EnTa* this, PlayState* play) { func_800F5ACC(NA_BGM_TIMED_MINI_GAME); this->stateFlags |= TALON_STATE_FLAG_RESTORE_BGM_ON_DESTROY; Message_CloseTextbox(play); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) { diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 5822795723..db79e6f9dd 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -562,7 +562,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { // Handles Dark Link being damaged if ((this->actor.colChkInfo.health == 0) && sDeathFlag) { - this->csMode = 0x18; + this->csMode = PLAYER_CSMODE_24; this->unk_448 = &player->actor; this->doorBgCamIndex = 1; sDeathFlag = false; diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 8feba5a8fd..b0957999c7 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -259,7 +259,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->yTarget = this->actor.yDistToPlayer; - func_8002DF38(play, &this->actor, 0x25); + func_8002DF38(play, &this->actor, PLAYER_CSMODE_37); OnePointCutscene_Init(play, 9500, 9999, &this->actor, CAM_ID_MAIN); } diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index afa35073d8..96eaa97d20 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -194,7 +194,7 @@ void func_80B3A3D4(EnWonderTalk2* this, PlayState* play) { this->unk_15A = true; } this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->unk_156 = true; this->actionFunc = func_80B3A4F8; break; @@ -253,7 +253,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) { this->unk_158 = 0; if (!this->unk_156) { Message_StartTextbox(play, this->actor.textId, NULL); - func_8002DF54(play, NULL, 8); + func_8002DF54(play, NULL, PLAYER_CSMODE_8); this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80B3A3D4; } diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 46e750b420..3dbfb8de7d 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -422,7 +422,7 @@ void func_80B4BBC4(EnZl1* this, PlayState* play) { Player* player = GET_PLAYER(play); Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); func_8002F7DC(&player->actor, NA_SE_VO_LI_SURPRISE_KID); this->actor.textId = 0x7039; Message_StartTextbox(play, this->actor.textId, NULL); @@ -555,7 +555,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { break; case 6: if (Actor_TextboxIsClosing(&this->actor, play)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); this->actor.flags &= ~ACTOR_FLAG_8; this->unk_1E2 = 4; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 44c2a0dbbc..d8a95940ef 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -320,7 +320,7 @@ s32 EnZl4_SetupFromLegendCs(EnZl4* this, PlayState* play) { Actor* playerx = &GET_PLAYER(play)->actor; s16 rotY; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); playerx->world.pos = this->actor.world.pos; rotY = this->actor.shape.rot.y; playerx->world.pos.x += 56.0f * Math_SinS(rotY); @@ -912,7 +912,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardGanonCs); gSaveContext.cutsceneTrigger = 1; this->talkState++; - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); } break; case 2: @@ -922,7 +922,7 @@ s32 EnZl4_CsLookWindow(EnZl4* this, PlayState* play) { } } else { Rumble_Request(0.0f, 160, 10, 40); - func_8002DF54(play, &this->actor, 1); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_1); Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_30); EnZl4_SetActiveCamDir(play, 11); Message_StartTextbox(play, 0x7039, NULL); @@ -1193,7 +1193,7 @@ void EnZl4_Cutscene(EnZl4* this, PlayState* play) { break; case ZL4_CS_PLAN: if (EnZl4_CsMakePlan(this, play)) { - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL; SET_EVENTCHKINF(EVENTCHKINF_40); this->actionFunc = EnZl4_Idle; diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 8d2864c381..f6b42d2156 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -151,7 +151,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { break; } func_80064520(play, &play->csCtx); - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); this->subCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->subCamId, CAM_STAT_ACTIVE); @@ -192,7 +192,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EV_GANON_HORSE_GROAN); } if (this->timers[0] == 20) { - func_8002DF54(play, &this->actor, 9); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_9); } if (this->timers[0] == 1) { SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_OPENING_GANON); @@ -354,7 +354,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { this->bossGndSignal = FHG_FINISH; } if (this->timers[0] == 170) { - func_8002DF54(play, &this->actor, 8); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_8); Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FANTOM_MASIC2); } Math_ApproachF(&this->subCamEye.z, this->subCamPanZ + (GND_BOSSROOM_CENTER_Z + 100.0f), 0.1f, @@ -400,7 +400,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) { func_800C08AC(play, this->subCamId, 0); this->subCamId = SUB_CAM_ID_DONE; func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); this->actionFunc = EnfHG_Retreat; } break; diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 987a69241d..3a6e830a73 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -5361,7 +5361,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5387,7 +5387,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; func_800C08AC(play, sSubCamId, 0); func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); D_80B7A6CC = 0; sSubCamId = SUB_CAM_ID_DONE; D_80B7A6D0 = 30; @@ -5403,7 +5403,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { sSubCamId = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE); - func_8002DF54(play, &this->actor, 5); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_5); mainCam = Play_GetCamera(play, CAM_ID_MAIN); sSubCamEye.x = mainCam->eye.x; sSubCamEye.y = mainCam->eye.y; @@ -5422,7 +5422,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { if ((D_80B7A6D0 == 0) && Message_ShouldAdvance(play)) { D_80B7A6CC = 22; D_80B7A6D0 = 40; - func_8002DF54(play, &this->actor, 0x1C); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_28); D_80B7FEE4 = 0.0f; } break; @@ -5491,7 +5491,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) { mainCam->at = sSubCamAt; func_800C08AC(play, sSubCamId, 0); func_80064534(play, &play->csCtx); - func_8002DF54(play, &this->actor, 7); + func_8002DF54(play, &this->actor, PLAYER_CSMODE_7); D_80B7A6CC = 0; sSubCamId = SUB_CAM_ID_DONE; player->unk_860 = -5; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 9d153a8b6a..e631135f03 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -2410,7 +2410,7 @@ void func_808340DC(Player* this, PlayState* play) { void func_80834298(Player* this, PlayState* play) { if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_8) && ((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) && - (gSaveContext.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (this->csMode == 0) && + (gSaveContext.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (this->csMode == PLAYER_CSMODE_NONE) && (play->shootingGalleryStatus == 0) && (play->activeCamId == CAM_ID_MAIN) && (play->transitionTrigger != TRANS_TRIGGER_START) && (gSaveContext.timerState != TIMER_STATE_STOP)) { func_80833DF8(this, play); @@ -3391,7 +3391,7 @@ void func_80836BEC(Player* this, PlayState* play) { this->stateFlags1 &= ~PLAYER_STATE1_30; } - if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0) || + if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE) || (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->stateFlags3 & PLAYER_STATE3_7)) { this->unk_66C = 0; } else if (zTrigPressed || (this->stateFlags2 & PLAYER_STATE2_13) || (this->unk_684 != NULL)) { @@ -4145,7 +4145,7 @@ s32 func_808382DC(Player* this, PlayState* play) { } if ((this->unk_A87 != 0) || (this->invincibilityTimer > 0) || (this->stateFlags1 & PLAYER_STATE1_26) || - (this->csMode != 0) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || + (this->csMode != PLAYER_CSMODE_NONE) || (this->meleeWeaponQuads[0].base.atFlags & AT_HIT) || (this->meleeWeaponQuads[1].base.atFlags & AT_HIT)) { return 0; } @@ -4415,7 +4415,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) exitIndex = 0; if (!(this->stateFlags1 & PLAYER_STATE1_7) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && - (this->csMode == 0) && !(this->stateFlags1 & PLAYER_STATE1_0) && + (this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags1 & PLAYER_STATE1_0) && (((poly != NULL) && (exitIndex = SurfaceType_GetExitIndex(&play->colCtx, poly, bgId), exitIndex != 0)) || (func_8083816C(D_808535E4) && (this->unk_A7A == FLOOR_PROPERTY_12)))) { @@ -10226,7 +10226,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { if (this->actor.category == ACTORCAT_PLAYER) { seqMode = SEQ_MODE_DEFAULT; - if (this->csMode != 0) { + if (this->csMode != PLAYER_CSMODE_NONE) { Camera_ChangeMode(Play_GetCamera(play, CAM_ID_MAIN), CAM_MODE_NORMAL); } else if (!(this->stateFlags1 & PLAYER_STATE1_20)) { if ((this->actor.parent != NULL) && (this->stateFlags3 & PLAYER_STATE3_7)) { @@ -10446,9 +10446,19 @@ void func_80848EF8(Player* this) { } static s8 D_808547C4[] = { - 0, 3, 3, 5, 4, 8, 9, 13, 14, 15, 16, 17, 18, -22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, -35, - 30, 36, 38, -39, -40, -41, 42, 43, 45, 46, 0, 0, 0, 67, 48, 47, -50, 51, -52, -53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, -65, -66, 68, 11, 69, 70, 71, 8, 8, 72, 73, 78, 79, 80, 89, 90, 91, 92, 77, 19, 94, + PLAYER_CSMODE_NONE, PLAYER_CSMODE_3, PLAYER_CSMODE_3, PLAYER_CSMODE_5, PLAYER_CSMODE_4, PLAYER_CSMODE_8, + PLAYER_CSMODE_9, PLAYER_CSMODE_13, PLAYER_CSMODE_14, PLAYER_CSMODE_15, PLAYER_CSMODE_16, PLAYER_CSMODE_17, + PLAYER_CSMODE_18, -PLAYER_CSMODE_22, PLAYER_CSMODE_23, PLAYER_CSMODE_24, PLAYER_CSMODE_25, PLAYER_CSMODE_26, + PLAYER_CSMODE_27, PLAYER_CSMODE_28, PLAYER_CSMODE_29, PLAYER_CSMODE_31, PLAYER_CSMODE_32, PLAYER_CSMODE_33, + PLAYER_CSMODE_34, -PLAYER_CSMODE_35, PLAYER_CSMODE_30, PLAYER_CSMODE_36, PLAYER_CSMODE_38, -PLAYER_CSMODE_39, + -PLAYER_CSMODE_40, -PLAYER_CSMODE_41, PLAYER_CSMODE_42, PLAYER_CSMODE_43, PLAYER_CSMODE_45, PLAYER_CSMODE_46, + PLAYER_CSMODE_NONE, PLAYER_CSMODE_NONE, PLAYER_CSMODE_NONE, PLAYER_CSMODE_67, PLAYER_CSMODE_48, PLAYER_CSMODE_47, + -PLAYER_CSMODE_50, PLAYER_CSMODE_51, -PLAYER_CSMODE_52, -PLAYER_CSMODE_53, PLAYER_CSMODE_54, PLAYER_CSMODE_55, + PLAYER_CSMODE_56, PLAYER_CSMODE_57, PLAYER_CSMODE_58, PLAYER_CSMODE_59, PLAYER_CSMODE_60, PLAYER_CSMODE_61, + PLAYER_CSMODE_62, PLAYER_CSMODE_63, PLAYER_CSMODE_64, -PLAYER_CSMODE_65, -PLAYER_CSMODE_66, PLAYER_CSMODE_68, + PLAYER_CSMODE_11, PLAYER_CSMODE_69, PLAYER_CSMODE_70, PLAYER_CSMODE_71, PLAYER_CSMODE_8, PLAYER_CSMODE_8, + PLAYER_CSMODE_72, PLAYER_CSMODE_73, PLAYER_CSMODE_78, PLAYER_CSMODE_79, PLAYER_CSMODE_80, PLAYER_CSMODE_89, + PLAYER_CSMODE_90, PLAYER_CSMODE_91, PLAYER_CSMODE_92, PLAYER_CSMODE_77, PLAYER_CSMODE_19, PLAYER_CSMODE_94, }; static Vec3f D_80854814 = { 0.0f, 0.0f, 200.0f }; @@ -10712,29 +10722,30 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } } - if ((play->csCtx.state != CS_STATE_IDLE) && (this->csMode != 6) && !(this->stateFlags1 & PLAYER_STATE1_23) && - !(this->stateFlags2 & PLAYER_STATE2_7) && (this->actor.category == ACTORCAT_PLAYER)) { + if ((play->csCtx.state != CS_STATE_IDLE) && (this->csMode != PLAYER_CSMODE_6) && + !(this->stateFlags1 & PLAYER_STATE1_23) && !(this->stateFlags2 & PLAYER_STATE2_7) && + (this->actor.category == ACTORCAT_PLAYER)) { CsCmdActorAction* linkActionCsCmd = play->csCtx.linkAction; - if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != 0)) { - func_8002DF54(play, NULL, 6); + if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != PLAYER_CSMODE_NONE)) { + func_8002DF54(play, NULL, PLAYER_CSMODE_6); func_80832210(this); - } else if ((this->csMode == 0) && !(this->stateFlags2 & PLAYER_STATE2_10) && + } else if ((this->csMode == PLAYER_CSMODE_NONE) && !(this->stateFlags2 & PLAYER_STATE2_10) && (play->csCtx.state != CS_STATE_UNSKIPPABLE_INIT)) { - func_8002DF54(play, NULL, 0x31); + func_8002DF54(play, NULL, PLAYER_CSMODE_49); func_80832210(this); } } - if (this->csMode != 0) { - if ((this->csMode != 7) || + if (this->csMode != PLAYER_CSMODE_NONE) { + if ((this->csMode != PLAYER_CSMODE_7) || !(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21 | PLAYER_STATE1_26))) { this->unk_6AD = 3; } else if (func_80852E14 != this->func_674) { func_80852944(play, this, NULL); } } else { - this->prevCsMode = 0; + this->prevCsMode = PLAYER_CSMODE_NONE; } func_8083D6EC(play, this); @@ -11014,7 +11025,8 @@ void Player_Draw(Actor* thisx, PlayState* play2) { s32 lod; s32 pad; - if ((this->csMode != 0) || (func_8008E9C4(this) && 0) || (this->actor.projectedPos.z < 160.0f)) { + if ((this->csMode != PLAYER_CSMODE_NONE) || (func_8008E9C4(this) && 0) || + (this->actor.projectedPos.z < 160.0f)) { lod = 0; } else { lod = 1; @@ -11247,7 +11259,7 @@ void func_8084B1D8(Player* this, PlayState* play) { func_80836670(this, play); } - if ((this->csMode != 0) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || func_80833B54(this) || + if ((this->csMode != PLAYER_CSMODE_NONE) || (this->unk_6AD == 0) || (this->unk_6AD >= 4) || func_80833B54(this) || (this->unk_664 != NULL) || !func_8083AD4C(play, this) || (((this->unk_6AD == 2) && (CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B | BTN_R) || func_80833B2C(this) || (!func_8002DD78(this) && !func_808334B4(this)))) || @@ -12026,9 +12038,9 @@ void func_8084CC98(Player* this, PlayState* play) { AnimationContext_SetCopyAll(play, this->skelAnime.limbCount, this->skelAnime.morphTable, this->skelAnime.jointTable); - if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0)) { - if (this->csMode == 7) { - this->csMode = 0; + if ((play->csCtx.state != CS_STATE_IDLE) || (this->csMode != PLAYER_CSMODE_NONE)) { + if (this->csMode == PLAYER_CSMODE_7) { + this->csMode = PLAYER_CSMODE_NONE; } this->unk_6AD = 0; this->unk_84F = 0; @@ -12045,7 +12057,7 @@ void func_8084CC98(Player* this, PlayState* play) { this->currentYaw = this->actor.shape.rot.y = rideActor->actor.shape.rot.y; - if ((this->csMode != 0) || + if ((this->csMode != PLAYER_CSMODE_NONE) || (!func_8083224C(play) && ((rideActor->actor.speedXZ != 0.0f) || !func_8083B644(this, play)) && !func_8083C1DC(this, play))) { if (D_808535E0 == 0) { @@ -12103,7 +12115,7 @@ void func_8084CC98(Player* this, PlayState* play) { return; } - if ((this->csMode != 0) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { + if ((this->csMode != PLAYER_CSMODE_NONE) || (!func_8084C9BC(this, play) && !func_8083B040(this, play))) { if (this->unk_664 != NULL) { if (func_8002DD78(this) != 0) { this->unk_6BE = func_8083DB98(this, 1) - this->actor.shape.rot.y; @@ -12449,7 +12461,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) { gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionType = TRANS_TYPE_SANDSTORM_END; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, 8); + func_80852FFC(play, NULL, PLAYER_CSMODE_8); } this->getItemId = GI_NONE; } @@ -12546,10 +12558,10 @@ void func_8084E3C4(Player* this, PlayState* play) { gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams = 0x5FF; gSaveContext.respawn[RESPAWN_MODE_RETURN].data = play->msgCtx.lastPlayedSong; - this->csMode = 0; + this->csMode = PLAYER_CSMODE_NONE; this->stateFlags1 &= ~PLAYER_STATE1_29; - func_80852FFC(play, NULL, 8); + func_80852FFC(play, NULL, PLAYER_CSMODE_8); play->mainCamera.stateFlags &= ~CAM_STATE_3; this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29; @@ -13644,216 +13656,216 @@ static struct_80832924 D_80854B14[] = { { 0, -0x300A }, }; -static struct_80854B18 D_80854B18[] = { - { 0, NULL }, - { -1, func_808515A4 }, - { 2, &gPlayerAnim_link_demo_goma_furimuki }, - { 0, NULL }, - { 0, NULL }, - { 3, &gPlayerAnim_link_demo_bikkuri }, - { 0, NULL }, - { 0, NULL }, - { -1, func_808515A4 }, - { 2, &gPlayerAnim_link_demo_furimuki }, - { -1, func_80851788 }, - { 3, &gPlayerAnim_link_demo_warp }, - { -1, func_808518DC }, - { 7, &gPlayerAnim_clink_demo_get1 }, - { 5, &gPlayerAnim_clink_demo_get2 }, - { 5, &gPlayerAnim_clink_demo_get3 }, - { 5, &gPlayerAnim_clink_demo_standup }, - { 7, &gPlayerAnim_clink_demo_standup_wait }, - { -1, func_808519EC }, - { 2, &gPlayerAnim_link_demo_baru_op1 }, - { 2, &gPlayerAnim_link_demo_baru_op3 }, - { 0, NULL }, - { -1, func_80851B90 }, - { 3, &gPlayerAnim_link_demo_jibunmiru }, - { 9, &gPlayerAnim_link_normal_back_downA }, - { 2, &gPlayerAnim_link_normal_back_down_wake }, - { -1, func_80851D2C }, - { 2, &gPlayerAnim_link_normal_okarina_end }, - { 3, &gPlayerAnim_link_demo_get_itemA }, - { -1, func_808515A4 }, - { 2, &gPlayerAnim_link_normal_normal2fighter_free }, - { 0, NULL }, - { 0, NULL }, - { 5, &gPlayerAnim_clink_demo_atozusari }, - { -1, func_80851368 }, - { -1, func_80851E64 }, - { 5, &gPlayerAnim_clink_demo_bashi }, - { 16, &gPlayerAnim_link_normal_hang_up_down }, - { -1, func_80851F84 }, - { -1, func_80851E90 }, - { 6, &gPlayerAnim_clink_op3_okiagari }, - { 6, &gPlayerAnim_clink_op3_tatiagari }, - { -1, func_80852080 }, - { 5, &gPlayerAnim_clink_demo_miokuri }, - { -1, func_808521F4 }, - { -1, func_8085225C }, - { -1, func_80852280 }, - { 5, &gPlayerAnim_clink_demo_nozoki }, - { 5, &gPlayerAnim_clink_demo_koutai }, - { -1, func_808515A4 }, - { 5, &gPlayerAnim_clink_demo_koutai_kennuki }, - { 5, &gPlayerAnim_link_demo_kakeyori }, - { 5, &gPlayerAnim_link_demo_kakeyori_mimawasi }, - { 5, &gPlayerAnim_link_demo_kakeyori_miokuri }, - { 3, &gPlayerAnim_link_demo_furimuki2 }, - { 3, &gPlayerAnim_link_demo_kaoage }, - { 4, &gPlayerAnim_link_demo_kaoage_wait }, - { 3, &gPlayerAnim_clink_demo_mimawasi }, - { 3, &gPlayerAnim_link_demo_nozokikomi }, - { 6, &gPlayerAnim_kolink_odoroki_demo }, - { 6, &gPlayerAnim_link_shagamu_demo }, - { 14, &gPlayerAnim_link_okiru_demo }, - { 3, &gPlayerAnim_link_okiru_demo }, - { 5, &gPlayerAnim_link_fighter_power_kiru_start }, - { 16, &gPlayerAnim_demo_link_nwait }, - { 15, &gPlayerAnim_demo_link_tewatashi }, - { 15, &gPlayerAnim_demo_link_orosuu }, - { 3, &gPlayerAnim_d_link_orooro }, - { 3, &gPlayerAnim_d_link_imanodare }, - { 3, &gPlayerAnim_link_hatto_demo }, - { 6, &gPlayerAnim_o_get_mae }, - { 6, &gPlayerAnim_o_get_ato }, - { 6, &gPlayerAnim_om_get_mae }, - { 6, &gPlayerAnim_nw_modoru }, - { 3, &gPlayerAnim_link_demo_gurad }, - { 3, &gPlayerAnim_link_demo_look_hand }, - { 4, &gPlayerAnim_link_demo_sita_wait }, - { 3, &gPlayerAnim_link_demo_ue }, - { 3, &gPlayerAnim_Link_muku }, - { 3, &gPlayerAnim_Link_miageru }, - { 6, &gPlayerAnim_Link_ha }, - { 3, &gPlayerAnim_L_1kyoro }, - { 3, &gPlayerAnim_L_2kyoro }, - { 3, &gPlayerAnim_L_sagaru }, - { 3, &gPlayerAnim_L_bouzen }, - { 3, &gPlayerAnim_L_kamaeru }, - { 3, &gPlayerAnim_L_hajikareru }, - { 3, &gPlayerAnim_L_ken_miru }, - { 3, &gPlayerAnim_L_mukinaoru }, - { -1, func_808524B0 }, - { 3, &gPlayerAnim_link_wait_itemD1_20f }, - { -1, func_80852544 }, - { -1, func_80852564 }, - { 3, &gPlayerAnim_link_normal_wait_typeB_20f }, - { -1, func_80852608 }, - { 3, &gPlayerAnim_link_demo_kousan }, - { 3, &gPlayerAnim_link_demo_return_to_past }, - { 3, &gPlayerAnim_link_last_hit_motion1 }, - { 3, &gPlayerAnim_link_last_hit_motion2 }, - { 3, &gPlayerAnim_link_demo_zeldamiru }, - { 3, &gPlayerAnim_link_demo_kenmiru1 }, - { 3, &gPlayerAnim_link_demo_kenmiru2 }, - { 3, &gPlayerAnim_link_demo_kenmiru2_modori }, +static struct_80854B18 D_80854B18[PLAYER_CSMODE_MAX] = { + { 0, NULL }, // PLAYER_CSMODE_NONE + { -1, func_808515A4 }, // PLAYER_CSMODE_1 + { 2, &gPlayerAnim_link_demo_goma_furimuki }, // PLAYER_CSMODE_2 + { 0, NULL }, // PLAYER_CSMODE_3 + { 0, NULL }, // PLAYER_CSMODE_4 + { 3, &gPlayerAnim_link_demo_bikkuri }, // PLAYER_CSMODE_5 + { 0, NULL }, // PLAYER_CSMODE_6 + { 0, NULL }, // PLAYER_CSMODE_7 + { -1, func_808515A4 }, // PLAYER_CSMODE_8 + { 2, &gPlayerAnim_link_demo_furimuki }, // PLAYER_CSMODE_9 + { -1, func_80851788 }, // PLAYER_CSMODE_10 + { 3, &gPlayerAnim_link_demo_warp }, // PLAYER_CSMODE_11 + { -1, func_808518DC }, // PLAYER_CSMODE_12 + { 7, &gPlayerAnim_clink_demo_get1 }, // PLAYER_CSMODE_13 + { 5, &gPlayerAnim_clink_demo_get2 }, // PLAYER_CSMODE_14 + { 5, &gPlayerAnim_clink_demo_get3 }, // PLAYER_CSMODE_15 + { 5, &gPlayerAnim_clink_demo_standup }, // PLAYER_CSMODE_16 + { 7, &gPlayerAnim_clink_demo_standup_wait }, // PLAYER_CSMODE_17 + { -1, func_808519EC }, // PLAYER_CSMODE_18 + { 2, &gPlayerAnim_link_demo_baru_op1 }, // PLAYER_CSMODE_19 + { 2, &gPlayerAnim_link_demo_baru_op3 }, // PLAYER_CSMODE_20 + { 0, NULL }, // PLAYER_CSMODE_21 + { -1, func_80851B90 }, // PLAYER_CSMODE_22 + { 3, &gPlayerAnim_link_demo_jibunmiru }, // PLAYER_CSMODE_23 + { 9, &gPlayerAnim_link_normal_back_downA }, // PLAYER_CSMODE_24 + { 2, &gPlayerAnim_link_normal_back_down_wake }, // PLAYER_CSMODE_25 + { -1, func_80851D2C }, // PLAYER_CSMODE_26 + { 2, &gPlayerAnim_link_normal_okarina_end }, // PLAYER_CSMODE_27 + { 3, &gPlayerAnim_link_demo_get_itemA }, // PLAYER_CSMODE_28 + { -1, func_808515A4 }, // PLAYER_CSMODE_29 + { 2, &gPlayerAnim_link_normal_normal2fighter_free }, // PLAYER_CSMODE_30 + { 0, NULL }, // PLAYER_CSMODE_31 + { 0, NULL }, // PLAYER_CSMODE_32 + { 5, &gPlayerAnim_clink_demo_atozusari }, // PLAYER_CSMODE_33 + { -1, func_80851368 }, // PLAYER_CSMODE_34 + { -1, func_80851E64 }, // PLAYER_CSMODE_35 + { 5, &gPlayerAnim_clink_demo_bashi }, // PLAYER_CSMODE_36 + { 16, &gPlayerAnim_link_normal_hang_up_down }, // PLAYER_CSMODE_37 + { -1, func_80851F84 }, // PLAYER_CSMODE_38 + { -1, func_80851E90 }, // PLAYER_CSMODE_39 + { 6, &gPlayerAnim_clink_op3_okiagari }, // PLAYER_CSMODE_40 + { 6, &gPlayerAnim_clink_op3_tatiagari }, // PLAYER_CSMODE_41 + { -1, func_80852080 }, // PLAYER_CSMODE_42 + { 5, &gPlayerAnim_clink_demo_miokuri }, // PLAYER_CSMODE_43 + { -1, func_808521F4 }, // PLAYER_CSMODE_44 + { -1, func_8085225C }, // PLAYER_CSMODE_45 + { -1, func_80852280 }, // PLAYER_CSMODE_46 + { 5, &gPlayerAnim_clink_demo_nozoki }, // PLAYER_CSMODE_47 + { 5, &gPlayerAnim_clink_demo_koutai }, // PLAYER_CSMODE_48 + { -1, func_808515A4 }, // PLAYER_CSMODE_49 + { 5, &gPlayerAnim_clink_demo_koutai_kennuki }, // PLAYER_CSMODE_50 + { 5, &gPlayerAnim_link_demo_kakeyori }, // PLAYER_CSMODE_51 + { 5, &gPlayerAnim_link_demo_kakeyori_mimawasi }, // PLAYER_CSMODE_52 + { 5, &gPlayerAnim_link_demo_kakeyori_miokuri }, // PLAYER_CSMODE_53 + { 3, &gPlayerAnim_link_demo_furimuki2 }, // PLAYER_CSMODE_54 + { 3, &gPlayerAnim_link_demo_kaoage }, // PLAYER_CSMODE_55 + { 4, &gPlayerAnim_link_demo_kaoage_wait }, // PLAYER_CSMODE_56 + { 3, &gPlayerAnim_clink_demo_mimawasi }, // PLAYER_CSMODE_57 + { 3, &gPlayerAnim_link_demo_nozokikomi }, // PLAYER_CSMODE_58 + { 6, &gPlayerAnim_kolink_odoroki_demo }, // PLAYER_CSMODE_59 + { 6, &gPlayerAnim_link_shagamu_demo }, // PLAYER_CSMODE_60 + { 14, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSMODE_61 + { 3, &gPlayerAnim_link_okiru_demo }, // PLAYER_CSMODE_62 + { 5, &gPlayerAnim_link_fighter_power_kiru_start }, // PLAYER_CSMODE_63 + { 16, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_64 + { 15, &gPlayerAnim_demo_link_tewatashi }, // PLAYER_CSMODE_65 + { 15, &gPlayerAnim_demo_link_orosuu }, // PLAYER_CSMODE_66 + { 3, &gPlayerAnim_d_link_orooro }, // PLAYER_CSMODE_67 + { 3, &gPlayerAnim_d_link_imanodare }, // PLAYER_CSMODE_68 + { 3, &gPlayerAnim_link_hatto_demo }, // PLAYER_CSMODE_69 + { 6, &gPlayerAnim_o_get_mae }, // PLAYER_CSMODE_70 + { 6, &gPlayerAnim_o_get_ato }, // PLAYER_CSMODE_71 + { 6, &gPlayerAnim_om_get_mae }, // PLAYER_CSMODE_72 + { 6, &gPlayerAnim_nw_modoru }, // PLAYER_CSMODE_73 + { 3, &gPlayerAnim_link_demo_gurad }, // PLAYER_CSMODE_74 + { 3, &gPlayerAnim_link_demo_look_hand }, // PLAYER_CSMODE_75 + { 4, &gPlayerAnim_link_demo_sita_wait }, // PLAYER_CSMODE_76 + { 3, &gPlayerAnim_link_demo_ue }, // PLAYER_CSMODE_77 + { 3, &gPlayerAnim_Link_muku }, // PLAYER_CSMODE_78 + { 3, &gPlayerAnim_Link_miageru }, // PLAYER_CSMODE_79 + { 6, &gPlayerAnim_Link_ha }, // PLAYER_CSMODE_80 + { 3, &gPlayerAnim_L_1kyoro }, // PLAYER_CSMODE_81 + { 3, &gPlayerAnim_L_2kyoro }, // PLAYER_CSMODE_82 + { 3, &gPlayerAnim_L_sagaru }, // PLAYER_CSMODE_83 + { 3, &gPlayerAnim_L_bouzen }, // PLAYER_CSMODE_84 + { 3, &gPlayerAnim_L_kamaeru }, // PLAYER_CSMODE_85 + { 3, &gPlayerAnim_L_hajikareru }, // PLAYER_CSMODE_86 + { 3, &gPlayerAnim_L_ken_miru }, // PLAYER_CSMODE_87 + { 3, &gPlayerAnim_L_mukinaoru }, // PLAYER_CSMODE_88 + { -1, func_808524B0 }, // PLAYER_CSMODE_89 + { 3, &gPlayerAnim_link_wait_itemD1_20f }, // PLAYER_CSMODE_90 + { -1, func_80852544 }, // PLAYER_CSMODE_91 + { -1, func_80852564 }, // PLAYER_CSMODE_92 + { 3, &gPlayerAnim_link_normal_wait_typeB_20f }, // PLAYER_CSMODE_93 + { -1, func_80852608 }, // PLAYER_CSMODE_94 + { 3, &gPlayerAnim_link_demo_kousan }, // PLAYER_CSMODE_95 + { 3, &gPlayerAnim_link_demo_return_to_past }, // PLAYER_CSMODE_96 + { 3, &gPlayerAnim_link_last_hit_motion1 }, // PLAYER_CSMODE_97 + { 3, &gPlayerAnim_link_last_hit_motion2 }, // PLAYER_CSMODE_98 + { 3, &gPlayerAnim_link_demo_zeldamiru }, // PLAYER_CSMODE_99 + { 3, &gPlayerAnim_link_demo_kenmiru1 }, // PLAYER_CSMODE_100 + { 3, &gPlayerAnim_link_demo_kenmiru2 }, // PLAYER_CSMODE_101 + { 3, &gPlayerAnim_link_demo_kenmiru2_modori }, // PLAYER_CSMODE_102 }; -static struct_80854B18 D_80854E50[] = { - { 0, NULL }, - { -1, func_808514C0 }, - { -1, func_8085157C }, - { -1, func_80851998 }, - { -1, func_808519C0 }, - { 11, NULL }, - { -1, func_80852C50 }, - { -1, func_80852944 }, - { -1, func_80851688 }, - { -1, func_80851750 }, - { -1, func_80851828 }, - { -1, func_808521B8 }, - { -1, func_8085190C }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 18, D_80854AF0 }, - { 11, NULL }, - { -1, func_80851A50 }, - { 12, &gPlayerAnim_link_demo_baru_op2 }, - { 11, NULL }, - { 0, NULL }, - { -1, func_80851BE8 }, - { 11, NULL }, - { -1, func_80851CA4 }, - { 11, NULL }, - { 17, &gPlayerAnim_link_normal_okarina_swing }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80851D80 }, - { -1, func_80851DEC }, - { -1, func_80851E28 }, - { 18, D_80854B00 }, - { -1, func_808513BC }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80851ECC }, - { -1, func_80851FB0 }, - { -1, func_80852048 }, - { -1, func_80852174 }, - { 13, &gPlayerAnim_clink_demo_miokuri_wait }, - { -1, func_80852234 }, - { 0, NULL }, - { 0, NULL }, - { 11, NULL }, - { -1, func_80852450 }, - { -1, func_80851688 }, - { -1, func_80852298 }, - { 13, &gPlayerAnim_link_demo_kakeyori_wait }, - { -1, func_80852480 }, - { 13, &gPlayerAnim_link_demo_kakeyori_miokuri_wait }, - { -1, func_80852328 }, - { 11, NULL }, - { 11, NULL }, - { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, - { -1, func_80852358 }, - { 11, NULL }, - { 18, D_80854B14 }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80852388 }, - { 17, &gPlayerAnim_demo_link_nwait }, - { 12, &gPlayerAnim_d_link_orowait }, - { 12, &gPlayerAnim_demo_link_nwait }, - { 11, NULL }, - { -1, func_808526EC }, - { 17, &gPlayerAnim_sude_nwait }, - { -1, func_808526EC }, - { 17, &gPlayerAnim_sude_nwait }, - { 12, &gPlayerAnim_link_demo_gurad_wait }, - { 12, &gPlayerAnim_link_demo_look_hand_wait }, - { 11, NULL }, - { 12, &gPlayerAnim_link_demo_ue_wait }, - { 12, &gPlayerAnim_Link_m_wait }, - { 13, &gPlayerAnim_Link_ue_wait }, - { 12, &gPlayerAnim_Link_otituku_w }, - { 12, &gPlayerAnim_L_kw }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_80852648 }, - { 11, NULL }, - { 12, &gPlayerAnim_L_kennasi_w }, - { -1, func_808524D0 }, - { -1, func_80852514 }, - { -1, func_80852554 }, - { -1, func_808525C0 }, - { 11, NULL }, - { 11, NULL }, - { 11, NULL }, - { -1, func_8085283C }, - { -1, func_808528C8 }, - { -1, func_808528C8 }, - { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, - { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, - { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, - { 12, &gPlayerAnim_demo_link_nwait }, +static struct_80854B18 D_80854E50[PLAYER_CSMODE_MAX] = { + { 0, NULL }, // PLAYER_CSMODE_NONE + { -1, func_808514C0 }, // PLAYER_CSMODE_1 + { -1, func_8085157C }, // PLAYER_CSMODE_2 + { -1, func_80851998 }, // PLAYER_CSMODE_3 + { -1, func_808519C0 }, // PLAYER_CSMODE_4 + { 11, NULL }, // PLAYER_CSMODE_5 + { -1, func_80852C50 }, // PLAYER_CSMODE_6 + { -1, func_80852944 }, // PLAYER_CSMODE_7 + { -1, func_80851688 }, // PLAYER_CSMODE_8 + { -1, func_80851750 }, // PLAYER_CSMODE_9 + { -1, func_80851828 }, // PLAYER_CSMODE_10 + { -1, func_808521B8 }, // PLAYER_CSMODE_11 + { -1, func_8085190C }, // PLAYER_CSMODE_12 + { 11, NULL }, // PLAYER_CSMODE_13 + { 11, NULL }, // PLAYER_CSMODE_14 + { 11, NULL }, // PLAYER_CSMODE_15 + { 18, D_80854AF0 }, // PLAYER_CSMODE_16 + { 11, NULL }, // PLAYER_CSMODE_17 + { -1, func_80851A50 }, // PLAYER_CSMODE_18 + { 12, &gPlayerAnim_link_demo_baru_op2 }, // PLAYER_CSMODE_19 + { 11, NULL }, // PLAYER_CSMODE_20 + { 0, NULL }, // PLAYER_CSMODE_21 + { -1, func_80851BE8 }, // PLAYER_CSMODE_22 + { 11, NULL }, // PLAYER_CSMODE_23 + { -1, func_80851CA4 }, // PLAYER_CSMODE_24 + { 11, NULL }, // PLAYER_CSMODE_25 + { 17, &gPlayerAnim_link_normal_okarina_swing }, // PLAYER_CSMODE_26 + { 11, NULL }, // PLAYER_CSMODE_27 + { 11, NULL }, // PLAYER_CSMODE_28 + { 11, NULL }, // PLAYER_CSMODE_29 + { -1, func_80851D80 }, // PLAYER_CSMODE_30 + { -1, func_80851DEC }, // PLAYER_CSMODE_31 + { -1, func_80851E28 }, // PLAYER_CSMODE_32 + { 18, D_80854B00 }, // PLAYER_CSMODE_33 + { -1, func_808513BC }, // PLAYER_CSMODE_34 + { 11, NULL }, // PLAYER_CSMODE_35 + { 11, NULL }, // PLAYER_CSMODE_36 + { 11, NULL }, // PLAYER_CSMODE_37 + { 11, NULL }, // PLAYER_CSMODE_38 + { -1, func_80851ECC }, // PLAYER_CSMODE_39 + { -1, func_80851FB0 }, // PLAYER_CSMODE_40 + { -1, func_80852048 }, // PLAYER_CSMODE_41 + { -1, func_80852174 }, // PLAYER_CSMODE_42 + { 13, &gPlayerAnim_clink_demo_miokuri_wait }, // PLAYER_CSMODE_43 + { -1, func_80852234 }, // PLAYER_CSMODE_44 + { 0, NULL }, // PLAYER_CSMODE_45 + { 0, NULL }, // PLAYER_CSMODE_46 + { 11, NULL }, // PLAYER_CSMODE_47 + { -1, func_80852450 }, // PLAYER_CSMODE_48 + { -1, func_80851688 }, // PLAYER_CSMODE_49 + { -1, func_80852298 }, // PLAYER_CSMODE_50 + { 13, &gPlayerAnim_link_demo_kakeyori_wait }, // PLAYER_CSMODE_51 + { -1, func_80852480 }, // PLAYER_CSMODE_52 + { 13, &gPlayerAnim_link_demo_kakeyori_miokuri_wait }, // PLAYER_CSMODE_53 + { -1, func_80852328 }, // PLAYER_CSMODE_54 + { 11, NULL }, // PLAYER_CSMODE_55 + { 11, NULL }, // PLAYER_CSMODE_56 + { 12, &gPlayerAnim_clink_demo_mimawasi_wait }, // PLAYER_CSMODE_57 + { -1, func_80852358 }, // PLAYER_CSMODE_58 + { 11, NULL }, // PLAYER_CSMODE_59 + { 18, D_80854B14 }, // PLAYER_CSMODE_60 + { 11, NULL }, // PLAYER_CSMODE_61 + { 11, NULL }, // PLAYER_CSMODE_62 + { 11, NULL }, // PLAYER_CSMODE_63 + { 11, NULL }, // PLAYER_CSMODE_64 + { -1, func_80852388 }, // PLAYER_CSMODE_65 + { 17, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_66 + { 12, &gPlayerAnim_d_link_orowait }, // PLAYER_CSMODE_67 + { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_68 + { 11, NULL }, // PLAYER_CSMODE_69 + { -1, func_808526EC }, // PLAYER_CSMODE_70 + { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSMODE_71 + { -1, func_808526EC }, // PLAYER_CSMODE_72 + { 17, &gPlayerAnim_sude_nwait }, // PLAYER_CSMODE_73 + { 12, &gPlayerAnim_link_demo_gurad_wait }, // PLAYER_CSMODE_74 + { 12, &gPlayerAnim_link_demo_look_hand_wait }, // PLAYER_CSMODE_75 + { 11, NULL }, // PLAYER_CSMODE_76 + { 12, &gPlayerAnim_link_demo_ue_wait }, // PLAYER_CSMODE_77 + { 12, &gPlayerAnim_Link_m_wait }, // PLAYER_CSMODE_78 + { 13, &gPlayerAnim_Link_ue_wait }, // PLAYER_CSMODE_79 + { 12, &gPlayerAnim_Link_otituku_w }, // PLAYER_CSMODE_80 + { 12, &gPlayerAnim_L_kw }, // PLAYER_CSMODE_81 + { 11, NULL }, // PLAYER_CSMODE_82 + { 11, NULL }, // PLAYER_CSMODE_83 + { 11, NULL }, // PLAYER_CSMODE_84 + { 11, NULL }, // PLAYER_CSMODE_85 + { -1, func_80852648 }, // PLAYER_CSMODE_86 + { 11, NULL }, // PLAYER_CSMODE_87 + { 12, &gPlayerAnim_L_kennasi_w }, // PLAYER_CSMODE_88 + { -1, func_808524D0 }, // PLAYER_CSMODE_89 + { -1, func_80852514 }, // PLAYER_CSMODE_90 + { -1, func_80852554 }, // PLAYER_CSMODE_91 + { -1, func_808525C0 }, // PLAYER_CSMODE_92 + { 11, NULL }, // PLAYER_CSMODE_93 + { 11, NULL }, // PLAYER_CSMODE_94 + { 11, NULL }, // PLAYER_CSMODE_95 + { -1, func_8085283C }, // PLAYER_CSMODE_96 + { -1, func_808528C8 }, // PLAYER_CSMODE_97 + { -1, func_808528C8 }, // PLAYER_CSMODE_98 + { 12, &gPlayerAnim_link_demo_zeldamiru_wait }, // PLAYER_CSMODE_99 + { 12, &gPlayerAnim_link_demo_kenmiru1_wait }, // PLAYER_CSMODE_100 + { 12, &gPlayerAnim_link_demo_kenmiru2_wait }, // PLAYER_CSMODE_101 + { 12, &gPlayerAnim_demo_link_nwait }, // PLAYER_CSMODE_102 }; void func_80850ED8(PlayState* play, Player* this, LinkAnimationHeader* anim) { @@ -14052,8 +14064,8 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorAction* arg2) { void func_80851688(PlayState* play, Player* this, CsCmdActorAction* arg2) { if (func_8084B3CC(play, this) == 0) { - if ((this->csMode == 0x31) && (play->csCtx.state == CS_STATE_IDLE)) { - func_8002DF54(play, NULL, 7); + if ((this->csMode == PLAYER_CSMODE_49) && (play->csCtx.state == CS_STATE_IDLE)) { + func_8002DF54(play, NULL, PLAYER_CSMODE_7); return; } @@ -14112,7 +14124,7 @@ void func_80851828(PlayState* play, Player* this, CsCmdActorAction* arg2) { this->unk_850++; if (this->unk_850 > 20) { - this->csMode = 0xB; + this->csMode = PLAYER_CSMODE_11; } } @@ -14570,7 +14582,7 @@ void func_80852944(PlayState* play, Player* this, CsCmdActorAction* arg2) { } } - this->csMode = 0; + this->csMode = PLAYER_CSMODE_NONE; this->unk_6AD = 0; } @@ -14613,7 +14625,8 @@ void func_80852B4C(PlayState* play, Player* this, CsCmdActorAction* arg2, struct } void func_80852C0C(PlayState* play, Player* this, s32 csMode) { - if ((csMode != 1) && (csMode != 8) && (csMode != 0x31) && (csMode != 7)) { + if ((csMode != PLAYER_CSMODE_1) && (csMode != PLAYER_CSMODE_8) && (csMode != PLAYER_CSMODE_49) && + (csMode != PLAYER_CSMODE_7)) { func_808323B4(play, this); } } @@ -14621,10 +14634,10 @@ void func_80852C0C(PlayState* play, Player* this, s32 csMode) { void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { CsCmdActorAction* linkCsAction = play->csCtx.linkAction; s32 pad; - s32 sp24; + s32 csMode; if (play->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) { - func_8002DF54(play, NULL, 7); + func_8002DF54(play, NULL, PLAYER_CSMODE_7); this->unk_446 = 0; func_80832210(this); return; @@ -14636,9 +14649,9 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { } if (this->unk_446 != linkCsAction->action) { - sp24 = D_808547C4[linkCsAction->action]; - if (sp24 >= 0) { - if ((sp24 == 3) || (sp24 == 4)) { + csMode = D_808547C4[linkCsAction->action]; + if (csMode >= 0) { + if ((csMode == PLAYER_CSMODE_3) || (csMode == PLAYER_CSMODE_4)) { func_80852A54(play, this, linkCsAction); } else { func_808529D0(play, this, linkCsAction); @@ -14648,17 +14661,17 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { D_80858AA0 = this->skelAnime.moveFlags; func_80832DBC(this); - osSyncPrintf("TOOL MODE=%d\n", sp24); - func_80852C0C(play, this, ABS(sp24)); - func_80852B4C(play, this, linkCsAction, &D_80854B18[ABS(sp24)]); + osSyncPrintf("TOOL MODE=%d\n", csMode); + func_80852C0C(play, this, ABS(csMode)); + func_80852B4C(play, this, linkCsAction, &D_80854B18[ABS(csMode)]); this->unk_850 = 0; this->unk_84F = 0; this->unk_446 = linkCsAction->action; } - sp24 = D_808547C4[this->unk_446]; - func_80852B4C(play, this, linkCsAction, &D_80854E50[ABS(sp24)]); + csMode = D_808547C4[this->unk_446]; + func_80852B4C(play, this, linkCsAction, &D_80854E50[ABS(csMode)]); } void func_80852E14(Player* this, PlayState* play) { @@ -14751,7 +14764,7 @@ void func_80853148(PlayState* play, Actor* actor) { this->exchangeItemId = EXCH_ITEM_NONE; if (actor->textId == 0xFFFF) { - func_8002DF54(play, actor, 1); + func_8002DF54(play, actor, PLAYER_CSMODE_1); actor->flags |= ACTOR_FLAG_8; func_80832528(play, this); } else {