cs state cleanup (#1229)

This commit is contained in:
engineer124 2023-04-22 05:54:47 +10:00 committed by GitHub
parent 40846f3d3a
commit 24454b2277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 63 additions and 61 deletions

View File

@ -85,7 +85,7 @@ s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRo
actor->focus.pos = actor->world.pos;
actor->focus.pos.y += focusHeight;
if (!((play->csCtx.state != 0) || gDbgCamEnabled)) {
if (!((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled)) {
yaw = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
if (yaw >= 0x4300) {
Actor_TrackNone(headRot, torsoRot);
@ -93,7 +93,7 @@ s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRo
}
}
if ((play->csCtx.state != 0) || gDbgCamEnabled) {
if ((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
target = play->view.eye;
} else {
target = player->actor.focus.pos;
@ -127,7 +127,7 @@ s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* tors
actor->focus.pos = focusPos;
if (!((play->csCtx.state != 0) || gDbgCamEnabled)) {
if (!((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled)) {
yaw = ABS_ALT(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
if (yaw >= 0x4300) {
Actor_TrackNone(headRot, torsoRot);
@ -135,7 +135,7 @@ s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* tors
}
}
if ((play->csCtx.state != 0) || gDbgCamEnabled) {
if ((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
target = play->view.eye;
} else {
target = player->actor.focus.pos;

View File

@ -4003,7 +4003,7 @@ void Interface_DrawItemButtons(PlayState* play) {
}
if (interfaceCtx->tatlCalling && (play->pauseCtx.state == PAUSE_STATE_OFF) &&
(play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) && (play->csCtx.state == 0) &&
(play->pauseCtx.debugEditor == DEBUG_EDITOR_NONE) && (play->csCtx.state == CS_STATE_IDLE) &&
(sPictoState == PICTO_BOX_STATE_OFF)) {
if (sCUpInvisible == 0) {
// C-Up Button Texture, Color & Label (Tatl Text)

View File

@ -131,7 +131,7 @@ void BgIknvObj_UpdateWaterwheel(BgIknvObj* this, PlayState* play) {
func_800B9010(&this->dyna.actor, NA_SE_EV_WOOD_WATER_WHEEL - SFX_FLAG);
}
if ((play->csCtx.state != 0) && (gSaveContext.sceneLayer == 1) && (play->csCtx.scriptIndex == 4) &&
if ((play->csCtx.state != CS_STATE_IDLE) && (gSaveContext.sceneLayer == 1) && (play->csCtx.scriptIndex == 4) &&
(play->csCtx.curFrame == 1495)) {
func_8019F128(NA_SE_EV_DOOR_UNLOCK);
}

View File

@ -127,7 +127,7 @@ void func_80C1D7FC(DmAh* this, PlayState* play) {
u16 cueId;
s32 cueChannel;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (!this->unk_29C) {
this->cueId = 255;
this->unk_29C = true;

View File

@ -51,7 +51,7 @@ void func_80C1BDD8(DmAl* this, PlayState* play) {
u16 cueId;
s32 cueChannel;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (!this->unk_45C) {
this->cueId = 255;
this->unk_45C = true;

View File

@ -198,7 +198,7 @@ void func_80C1CAB0(DmAn* this, PlayState* play) {
u16 cueId;
s32 cueChannel;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (this->unk_2D0 == 0) {
this->cueId = 255;
this->unk_2D0 = 1;

View File

@ -448,7 +448,7 @@ void func_80AA5E2C(DmChar00* this, PlayState* play) {
}
void func_80AA5EBC(DmChar00* this, PlayState* play) {
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
switch (play->sceneId) {
case SCENE_LOST_WOODS:
if (gSaveContext.sceneLayer == 1) {
@ -853,7 +853,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) {
void func_80AA67F8(DmChar00* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((play->csCtx.state == 0) && (gSaveContext.sceneLayer == 0) && (play->csCtx.scriptIndex == 1)) {
if ((play->csCtx.state == CS_STATE_IDLE) && (gSaveContext.sceneLayer == 0) && (play->csCtx.scriptIndex == 1)) {
if (this->unk_261 != 42) {
this->unk_261 = 42;
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
@ -914,7 +914,7 @@ void DmChar00_Draw(Actor* thisx, PlayState* play2) {
s32 pad;
Gfx* gfx = GRAPH_ALLOC(play->state.gfxCtx, 4 * sizeof(Gfx));
if ((play->csCtx.state == 0) &&
if ((play->csCtx.state == CS_STATE_IDLE) &&
((play->sceneId != SCENE_OPENINGDAN) || (gSaveContext.sceneLayer != 0) || (play->roomCtx.curRoom.num != 0) ||
(play->csCtx.scriptIndex != 1) || (DMCHAR00_GET(&this->actor) != DMCHAR00_0))) {
return;

View File

@ -75,7 +75,7 @@ void DmChar02_PlaySfxForDroppingOcarinaCutscene(DmChar02* this, PlayState* play)
}
void DmChar02_PlaySfxForCutscenes(DmChar02* this, PlayState* play) {
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_OKUJOU) && (play->csCtx.scriptIndex == 1)) {
if ((play->csCtx.state != CS_STATE_IDLE) && (play->sceneId == SCENE_OKUJOU) && (play->csCtx.scriptIndex == 1)) {
DmChar02_PlaySfxForDroppingOcarinaCutscene(this, play);
}
}
@ -172,7 +172,7 @@ void DmChar02_Draw(Actor* thisx, PlayState* play) {
DmChar02* this = THIS;
s32 shouldDraw = false;
if ((play->csCtx.state == 0) && (this->actor.world.pos.y < 100.0f)) {
if ((play->csCtx.state == CS_STATE_IDLE) && (this->actor.world.pos.y < 100.0f)) {
shouldDraw = true;
} else if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_107)) {
switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_107)]->id) {

View File

@ -341,13 +341,13 @@ void func_80AAFA18(DmChar08* this, PlayState* play) {
}
void func_80AAFAC4(DmChar08* this, PlayState* play) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
this->actionFunc = func_80AAF8F4;
}
}
void func_80AAFAE4(DmChar08* this, PlayState* play) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
this->actionFunc = func_80AAFB04;
}
}
@ -893,7 +893,7 @@ void func_80AB032C(DmChar08* this, PlayState* play) {
}
void func_80AB096C(DmChar08* this, PlayState* play) {
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_31MISAKI) && (gSaveContext.sceneLayer == 0) &&
if ((play->csCtx.state != CS_STATE_IDLE) && (play->sceneId == SCENE_31MISAKI) && (gSaveContext.sceneLayer == 0) &&
(play->csCtx.scriptIndex == 0)) {
if ((play->csCtx.curFrame >= 890) && (play->csCtx.curFrame < 922)) {
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_EARTHQUAKE_LAST2 - SFX_FLAG);
@ -1002,7 +1002,7 @@ void DmChar08_Update(Actor* thisx, PlayState* play) {
}
s32 DmChar08_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
if ((play->csCtx.state == 0) && (play->sceneId == SCENE_31MISAKI) &&
if ((play->csCtx.state == CS_STATE_IDLE) && (play->sceneId == SCENE_31MISAKI) &&
(limbIndex == TURTLE_LIMB_FRONT_RIGHT_UPPER_FLIPPER)) {
rot->z = -0x5E24;
}

View File

@ -202,7 +202,7 @@ void DmChar09_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
func_80AB2268(this, play);
func_80AB24BC(this, play);
if ((play->csCtx.state != 0) && this->unk_22E && DMCHAR09_GET_100(thisx)) {
if ((play->csCtx.state != CS_STATE_IDLE) && this->unk_22E && DMCHAR09_GET_100(thisx)) {
Actor_PlaySfx(&this->actor, NA_SE_EV_POSTMAN_WALK + SFX_FLAG);
}
}
@ -217,7 +217,7 @@ s32 DmChar09_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f
void DmChar09_Draw(Actor* thisx, PlayState* play) {
DmChar09* this = THIS;
if ((play->csCtx.state != 0) && this->unk_22E) {
if ((play->csCtx.state != CS_STATE_IDLE) && this->unk_22E) {
func_8012C28C(play->state.gfxCtx);
func_8012C2DC(play->state.gfxCtx);
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, DmChar09_OverrideLimbDraw, NULL,

View File

@ -198,7 +198,7 @@ void func_80C24A00(DmGm* this, PlayState* play) {
u16 cueId;
s32 cueChannel;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (this->unk_2D0 == 0) {
this->cueId = 255;
this->unk_2D0 = 1;

View File

@ -46,7 +46,7 @@ void func_80C1DF18(DmNb* this, PlayState* play) {
u16 cueId;
s32 cueChannel;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (this->unk1F8 == 0) {
this->cueId = 255;
this->unk1F8 = 1;

View File

@ -916,7 +916,7 @@ void DmStk_PlaySfxForMoonWarpCutsceneVersion2(DmStk* this, PlayState* play) {
* Handles sound effects for all cutscenes.
*/
void DmStk_PlaySfxForCutscenes(DmStk* this, PlayState* play) {
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
switch (play->sceneId) {
case SCENE_LOST_WOODS:
if (gSaveContext.sceneLayer == 1) {
@ -1198,7 +1198,7 @@ void DmStk_ClockTower_StartIntroCutsceneVersion1(DmStk* this, PlayState* play) {
}
void DmStk_ClockTower_WaitForIntroCutsceneVersion1ToEnd(DmStk* this, PlayState* play) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
this->animIndex = SK_ANIM_CALL_DOWN_MOON_LOOP;
this->handType = SK_HAND_TYPE_HOLDING_OCARINA;
DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0);
@ -1216,7 +1216,7 @@ void DmStk_ClockTower_StartIntroCutsceneVersion2(DmStk* this, PlayState* play) {
}
void DmStk_ClockTower_WaitForIntroCutsceneVersion2ToEnd(DmStk* this, PlayState* play) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED;
DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0);
this->actionFunc = DmStk_ClockTower_Idle;
@ -1238,7 +1238,7 @@ void DmStk_ClockTower_StartDropOcarinaCutscene(DmStk* this, PlayState* play) {
}
void DmStk_ClockTower_WaitForDropOcarinaCutsceneToEnd(DmStk* this, PlayState* play) {
if ((play->csCtx.state != 0) && (play->csCtx.curFrame > 20)) {
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.curFrame > 20)) {
this->actionFunc = DmStk_ClockTower_Idle;
}
}
@ -1714,7 +1714,7 @@ void DmStk_UpdateCollision(DmStk* this, PlayState* play) {
void DmStk_ClockTower_IdleWithOcarina(DmStk* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
DmStk_ClockTower_AdjustHeightAndRotation(this, play);
this->actor.flags |= ACTOR_FLAG_1;
this->tatlMessageTimer++;
@ -1739,7 +1739,7 @@ void DmStk_ClockTower_IdleWithOcarina(DmStk* this, PlayState* play) {
* If he is hit in this state, he will just deflect the attack.
*/
void DmStk_ClockTower_Idle(DmStk* this, PlayState* play) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
DmStk_ClockTower_AdjustHeightAndRotation(this, play);
this->actor.flags |= ACTOR_FLAG_1;
@ -1804,7 +1804,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) {
break;
case SK_DEKU_PIPES_CS_STATE_START:
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
this->dekuPipesCutsceneState = SK_DEKU_PIPES_CS_STATE_END;
}
break;
@ -1815,7 +1815,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) {
if ((play->actorCtx.flags & ACTORCTX_FLAG_1) && (play->msgCtx.msgMode != 0) &&
(play->msgCtx.currentTextId == 0x5E6) && !FrameAdvance_IsEnabled(&play->state) &&
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) &&
(play->csCtx.state == 0)) {
(play->csCtx.state == CS_STATE_IDLE)) {
gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED;
if (R_TIME_SPEED != 0) {
gSaveContext.save.time =

View File

@ -447,7 +447,7 @@ void func_80A52074(EnDnk* this, PlayState* play) {
}
void func_80A52134(EnDnk* this, PlayState* play) {
if ((play->csCtx.state != 0) && (ENDNK_GET_3C(&this->actor) == 4) && (play->sceneId == SCENE_SPOT00) &&
if ((play->csCtx.state != CS_STATE_IDLE) && (ENDNK_GET_3C(&this->actor) == 4) && (play->sceneId == SCENE_SPOT00) &&
(gSaveContext.sceneLayer == 2)) {
func_80A52074(this, play);
}

View File

@ -265,7 +265,7 @@ s32 func_80B3CF60(EnDnp* this, PlayState* play) {
s32 func_80B3D044(EnDnp* this, PlayState* play) {
s32 ret = false;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (!(this->unk_322 & 0x200)) {
this->unk_322 |= (0x200 | 0x10);
this->actor.flags &= ~ACTOR_FLAG_1;

View File

@ -121,7 +121,7 @@ void func_80A52604(EnDnq* this, PlayState* play) {
s32 func_80A52648(EnDnq* this, PlayState* play) {
s32 ret = false;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (!(this->unk_37C & 0x20)) {
this->picto.actor.flags &= ~ACTOR_FLAG_1;
this->cueId = 255;

View File

@ -249,7 +249,7 @@ s32 func_8092CAD0(EnDns* this, PlayState* play) {
s32 func_8092CB98(EnDns* this, PlayState* play) {
s32 phi_v1 = 0;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (!(this->unk_2C6 & 0x80)) {
this->cueType = EnDns_GetCueType(this);
this->actor.flags &= ~ACTOR_FLAG_1;

View File

@ -1105,7 +1105,7 @@ void func_8088F214(EnElf* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 pad;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_201)) {
switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_201)]->id) {
case 4:
@ -1526,7 +1526,7 @@ void func_8089010C(Actor* thisx, PlayState* play) {
this->unk_269--;
}
if (!this->unk_269 && (play->csCtx.state != 0)) {
if (!this->unk_269 && (play->csCtx.state != CS_STATE_IDLE)) {
this->unk_269 = 1;
}
}

View File

@ -318,7 +318,7 @@ void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) {
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 1) && (play->csCtx.scriptIndex == 0)) {
switch (sGiantsCutsceneState) {
case 0:
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
sGiantsCutsceneState += 2;
}
break;
@ -452,7 +452,7 @@ void EnFall_StoppedClosedMouthMoon_PerformCutsceneActions(EnFall* this, PlayStat
}
void EnFall_ClockTowerOrTitleScreenMoon_PerformCutsceneActions(EnFall* this, PlayState* play) {
if (play->csCtx.state != 0 && play->sceneId == SCENE_OKUJOU) {
if ((play->csCtx.state != CS_STATE_IDLE) && (play->sceneId == SCENE_OKUJOU)) {
func_800B9010(&this->actor, NA_SE_EV_MOON_FALL - SFX_FLAG);
}
}

View File

@ -226,7 +226,7 @@ void func_80B352A4(EnGg* this, PlayState* play) {
}
void func_80B35450(EnGg* this, PlayState* play) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_91_10) && (play->csCtx.state == 0)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_91_10) && (play->csCtx.state == CS_STATE_IDLE)) {
func_80B359DC(this, play);
}
@ -692,14 +692,14 @@ void EnGg_Update(Actor* thisx, PlayState* play) {
}
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_19_80)) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
this->actor.flags |= ACTOR_FLAG_1;
} else {
this->actor.flags &= ~ACTOR_FLAG_1;
}
}
if ((play->csCtx.state == 0) &&
if ((play->csCtx.state == CS_STATE_IDLE) &&
((this->unk_2DA != 14) && (this->unk_2DA != 11) && (this->unk_2DA != 12) && (this->unk_2DA != 13))) {
func_80B364D4(&this->unk_344, play);
}
@ -723,7 +723,7 @@ void EnGg_Update(Actor* thisx, PlayState* play) {
Actor_MoveWithoutGravity(&this->actor);
SkelAnime_Update(&this->skelAnime);
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
func_80B3584C(this);
} else {
this->unk_2E8 = 0;

View File

@ -842,7 +842,7 @@ void func_80B51FD0(EnGk* this, PlayState* play) {
void func_80B5202C(EnGk* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
func_80B51410(this, play);
}
@ -860,7 +860,8 @@ void func_80B5202C(EnGk* this, PlayState* play) {
}
if (this->unk_1E4 & 2) {
if ((play->msgCtx.ocarinaMode != 1) && (play->msgCtx.ocarinaMode != 3) && (play->csCtx.state == 0)) {
if ((play->msgCtx.ocarinaMode != 1) && (play->msgCtx.ocarinaMode != 3) &&
(play->csCtx.state == CS_STATE_IDLE)) {
func_801A4748(&this->actor.projectedPos, NA_SE_EN_GOLON_KID_CRY - SFX_FLAG);
}
} else {

View File

@ -761,7 +761,7 @@ s32 func_8094EE84(EnGm* this, PlayState* play) {
s32 func_8094EFC4(EnGm* this, PlayState* play) {
s32 ret = false;
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
if (this->unk_3F8 == 0) {
if ((play->sceneId == SCENE_MILK_BAR) && (gSaveContext.sceneLayer == 2)) {
func_8094E054(this, play, 0);

View File

@ -710,7 +710,7 @@ s32 func_80A12868(EnGo* this, PlayState* play) {
}
s32 func_80A12954(EnGo* this, PlayState* play) {
if ((ENGO_GET_F(&this->actor) == ENGO_F_4) && (play->csCtx.state != 0) && (this->actor.draw != NULL) &&
if ((ENGO_GET_F(&this->actor) == ENGO_F_4) && (play->csCtx.state != CS_STATE_IDLE) && (this->actor.draw != NULL) &&
(play->sceneId == SCENE_10YUKIYAMANOMURA2) && (gSaveContext.sceneLayer == 1) &&
(play->csCtx.scriptIndex == 0)) {
if (this->unk_3F0 == 0) {
@ -756,7 +756,7 @@ s32 func_80A12A64(EnGo* this, PlayState* play) {
}
s32 func_80A12B78(EnGo* this, PlayState* play) {
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
if (this->unk_3DC == 4) {
if (Animation_OnFrame(&this->skelAnime, 2.0f)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CIRCLE);

View File

@ -365,7 +365,7 @@ void EnHg_HandleCsAction(EnHg* this, PlayState* play) {
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
return;
} else if (play->csCtx.state == 0) {
} else if (play->csCtx.state == CS_STATE_IDLE) {
EnHg_SetupWait(this);
}

View File

@ -220,7 +220,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) {
void EnHoll_TransparentIdle(EnHoll* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 useViewEye = gDbgCamEnabled || play->csCtx.state != 0;
s32 useViewEye = gDbgCamEnabled || (play->csCtx.state != CS_STATE_IDLE);
Vec3f transformedPlayerPos;
f32 enHollTop;
f32 playerDistFromCentralPlane;

View File

@ -386,7 +386,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain[sp34]);
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1000.0f;
}

View File

@ -366,7 +366,7 @@ void EnKusa_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1000.0f;
}
EnKusa_InitCollider(&this->actor, play);

View File

@ -372,7 +372,7 @@ void func_80959C94(EnMk* this, PlayState* play) {
void func_80959D28(EnMk* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
if ((play->csCtx.state == 0) && (this->actor.csId == CS_ID_NONE)) {
if ((play->csCtx.state == CS_STATE_IDLE) && (this->actor.csId == CS_ID_NONE)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_40)) {
this->unk_27A &= ~1;
this->actionFunc = func_80959774;

View File

@ -732,7 +732,7 @@ s32 func_80BD9CB8(EnPamera* this, PlayState* play) {
this->setupFunc(this, play);
return 1;
}
if ((play->csCtx.state == 0) && CHECK_WEEKEVENTREG(WEEKEVENTREG_75_20)) {
if ((play->csCtx.state == CS_STATE_IDLE) && CHECK_WEEKEVENTREG(WEEKEVENTREG_75_20)) {
if ((this->actionFunc != func_80BD994C) && (this->actionFunc != EnPamera_HandleDialogue)) {
this->actor.shape.rot.y = this->actor.world.rot.y;
func_80BD9904(this);

View File

@ -1019,7 +1019,7 @@ s32 func_80AF86F0(EnPm* this, PlayState* play) {
s32 func_80AF87C4(EnPm* this, PlayState* play) {
s32 ret = false;
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 9) &&
if ((play->csCtx.state != CS_STATE_IDLE) && (play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 9) &&
(play->curSpawn == 1)) {
if (!this->unk_380) {
func_80AF7E98(this, 0);

View File

@ -283,7 +283,7 @@ void func_80BF3FF8(EnRg* this) {
}
s32 func_80BF4024(EnRg* this, PlayState* play) {
if ((play->csCtx.state == 0) && (this->unk_334 == 1)) {
if ((play->csCtx.state == CS_STATE_IDLE) && (this->unk_334 == 1)) {
if (Animation_OnFrame(&this->skelAnime, 2.0f)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_CIRCLE);
}

View File

@ -485,7 +485,7 @@ void EnWeatherTag_Update(Actor* thisx, PlayState* play) {
if ((play->actorCtx.flags & ACTORCTX_FLAG_1) && (play->msgCtx.msgMode != 0) &&
(play->msgCtx.currentTextId == 0x5E6) && !FrameAdvance_IsEnabled(&play->state) &&
(play->transitionTrigger == TRANS_TRIGGER_OFF) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) &&
(play->csCtx.state == 0)) {
(play->csCtx.state == CS_STATE_IDLE)) {
gSaveContext.save.time = ((void)0, gSaveContext.save.time) + (u16)R_TIME_SPEED;
if (R_TIME_SPEED != 0) {

View File

@ -165,7 +165,7 @@ void ObjHamishi_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1000.0f;
}

View File

@ -689,7 +689,7 @@ void ObjTokeidai_TowerClock_Idle(ObjTokeidai* this, PlayState* play) {
return;
}
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
this->actor.home.rot.x = 1;
this->clockTime += 3;
this->actor.draw = ObjTokeidai_Clock_Draw;
@ -722,7 +722,7 @@ void ObjTokeidai_ExteriorGear_Idle(ObjTokeidai* this, PlayState* play) {
if (ObjTokeidai_IsPostFirstCycleFinalHours(this, play)) {
this->actor.draw = ObjTokeidai_ExteriorGear_Draw;
} else {
if (play->csCtx.state != 0) {
if (play->csCtx.state != CS_STATE_IDLE) {
this->actor.home.rot.x = 1;
this->clockTime += 3;
this->actor.draw = ObjTokeidai_ExteriorGear_Draw;

View File

@ -1402,7 +1402,7 @@ void func_80B7A860(ObjUm* this, PlayState* play) {
func_80B78DF0(this, play);
}
if (play->csCtx.state == 0) {
if (play->csCtx.state == CS_STATE_IDLE) {
CutsceneManager_Stop(this->dyna.actor.csId);
ObjUm_SetupAction(this, func_80B7A7AC);
}

View File

@ -80,7 +80,7 @@ void OceffWipe5_Draw(Actor* thisx, PlayState* play) {
if ((((OCEFF_WIPE5_GET_SONG_TYPE(thisx) == 2) && (play->sceneId == SCENE_LABO)) &&
((play->csCtx.scriptIndex == 0) || (play->csCtx.scriptIndex == 1))) &&
(play->csCtx.state != 0)) {
(play->csCtx.state != CS_STATE_IDLE)) {
phi_fv1 = 1150.0f;
}

View File

@ -1027,6 +1027,7 @@ wordReplace = {
"COLPOLY_SURFACE_GROUND": "SURFACE_MATERIAL_DIRT",
"COLPOLY_SURFACE_SAND": "SURFACE_MATERIAL_SAND",
"COLPOLY_SURFACE_SNOW": "SURFACE_MATERIAL_SNOW",
"CS_STATE_0": "CS_STATE_IDLE",
# Example of custom behaviour:
# "PLAYER": ("GET_PLAYER(play)", {"ignore": (-1, '"PLAYER"')}), # ignore "PLAYER" in sSoundBankNames