mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-27 14:51:03 +00:00
cs state cleanup (#1229)
This commit is contained in:
parent
40846f3d3a
commit
24454b2277
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 =
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user