mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-09 19:51:14 -04:00
Cutscene Documentation (z_eventmgr.c OK) (#1164)
* begin cutscene docs * more docs * more docs * z_eventmgr.c OK Co-authored-by: Thar0 <Thar0@users.noreply.github.com> * cutscene camera * commands WIP * more docs * merge master * csId, oof * more cleanup * more docs, csCam * more cleanup * more docs * more * cleanup functions.h * better misc cmd docs * apply discord discussions * small adjustment * more cleanup * more docs * more cleanup * more cs cam docs * small fix * cmd cleanup * small cleanup * better match, thanks anon * remove last return * PR suggestions, small cleanup * next PR review * rm internal funcs from functions.h * more PR * add comment * csCam interp typedef handler * cleanup, scene cmd * missed an enum use * ActorCutscene -> CutsceneManager, PR Suggestions * more PR Suggestions * more actorCutscene cleanup * R_USE_DEBUG_CUTSCENE * more small docs * move functions to cutscene.h * PlayerCsId * fix bss * missed some function headers * more scene cleanup * more scene cleanup * missed one * CS_SPAWN_FLAGS * wrong usage of macro * more cleanup * name last cs transition types * IsNext bool * update namefixer * fix namefixer * more cleanup * add comment * fixed enums for motion blur * consistent cutscene lists * cutscene entry func consistent * PR Suggestion * fig review * fix additionalCsId name in actor * more pr review * bss --------- Co-authored-by: Thar0 <Thar0@users.noreply.github.com> Co-authored-by: angie <angheloalf95@gmail.com>
This commit is contained in:
@@ -3357,7 +3357,7 @@ void AudioOcarina_Update(void) {
|
||||
|
||||
#define OCARINA_INSTRUMENT_OOT_MAX 7
|
||||
|
||||
void AudioOcarina_PlayLongScarecrowAfterCredits(void) {
|
||||
void AudioOcarina_PlayLongScarecrowSong(void) {
|
||||
static u8 sScarecrowAfterCreditsState = 0;
|
||||
static u8 sScarecrowAfterCreditsIntrumentId = OCARINA_INSTRUMENT_DEFAULT;
|
||||
static u16 sScarecrowAfterCreditsTimer = 1200;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "stack.h"
|
||||
#include "buffers.h"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
u8 sYaz0DataBuffer[0x400];
|
||||
|
||||
@@ -0,0 +1,380 @@
|
||||
#include "global.h"
|
||||
|
||||
extern CutsceneCamera* sCurCsCamera;
|
||||
|
||||
typedef s16 (*CsCamInterpolateCallback)(Vec3f*, f32*, s16*, CsCmdCamPoint*, CsCmdCamMisc*, CutsceneCameraInterp*);
|
||||
|
||||
// function declarations
|
||||
s16 func_80161180(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_8016237C(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_8016253C(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_80162A50(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_801623E4(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_80161C20(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_80161E4C(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_801620CC(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
s16 func_80163334(Vec3f* pos, f32* fov, s16* roll, CsCmdCamPoint* point, CsCmdCamMisc* misc,
|
||||
CutsceneCameraInterp* interp);
|
||||
f32 func_80163660(Actor* actor);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80161180.s")
|
||||
|
||||
/**
|
||||
* Initializes Cutscene Camera Info
|
||||
*/
|
||||
s32 CutsceneCamera_Init(Camera* camera, CutsceneCamera* csCamera) {
|
||||
csCamera->camera = camera;
|
||||
|
||||
csCamera->nextSplineTimer = csCamera->updateSplineTimer = 0;
|
||||
csCamera->cmdIndex = 0;
|
||||
csCamera->splineIndex = 0xFFFF;
|
||||
csCamera->splineNeedsInit = true;
|
||||
csCamera->state = CS_CAM_STATE_UPDATE_ALL;
|
||||
|
||||
sCurCsCamera = csCamera;
|
||||
|
||||
__osMemset(&csCamera->eyeInterp, 0, sizeof(CutsceneCameraInterp));
|
||||
__osMemset(&csCamera->atInterp, 0, sizeof(CutsceneCameraInterp));
|
||||
|
||||
csCamera->eyeInterp.unk_2D = csCamera->atInterp.unk_2D = 7;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
CsCamInterpolateCallback CutsceneCamera_Interpolate(u8 interpType) {
|
||||
switch (interpType) {
|
||||
case CS_CAM_INTERP_7:
|
||||
default:
|
||||
return func_80161180;
|
||||
|
||||
case CS_CAM_INTERP_0:
|
||||
return func_8016237C;
|
||||
|
||||
case CS_CAM_INTERP_5:
|
||||
return func_8016253C;
|
||||
|
||||
case CS_CAM_INTERP_4:
|
||||
return func_80162A50;
|
||||
|
||||
case CS_CAM_INTERP_1:
|
||||
return func_801623E4;
|
||||
|
||||
case CS_CAM_INTERP_2:
|
||||
return func_80161C20;
|
||||
|
||||
case CS_CAM_INTERP_3:
|
||||
return func_80161E4C;
|
||||
|
||||
case CS_CAM_INTERP_6:
|
||||
return func_801620CC;
|
||||
}
|
||||
}
|
||||
|
||||
u8 CutsceneCamera_ProcessSpline(CutsceneCamera* csCamera) {
|
||||
s32 sp5C;
|
||||
f32* fov;
|
||||
s16* roll;
|
||||
CsCamInterpolateCallback interpHandler;
|
||||
Player* player;
|
||||
Actor* target;
|
||||
s16 numPoints;
|
||||
|
||||
sp5C = true;
|
||||
if (csCamera->state == CS_CAM_STATE_DONE_SPLINE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
player = GET_PLAYER(csCamera->camera->play);
|
||||
target = csCamera->camera->target;
|
||||
|
||||
if (csCamera->eyeCmd[csCamera->atInterp.curPoint].interpType <
|
||||
csCamera->atCmd[csCamera->eyeInterp.curPoint].interpType) {
|
||||
sp5C = false;
|
||||
}
|
||||
|
||||
csCamera->eyeInterp.unk_00 = csCamera->camera->eye;
|
||||
csCamera->atInterp.unk_00 = csCamera->camera->at;
|
||||
|
||||
if (sp5C) {
|
||||
fov = NULL;
|
||||
} else {
|
||||
fov = &csCamera->camera->fov;
|
||||
}
|
||||
|
||||
if (sp5C) {
|
||||
roll = NULL;
|
||||
} else {
|
||||
roll = &csCamera->camera->roll;
|
||||
}
|
||||
|
||||
interpHandler = CutsceneCamera_Interpolate(csCamera->atCmd[csCamera->eyeInterp.curPoint].interpType);
|
||||
|
||||
switch (csCamera->atCmd[csCamera->eyeInterp.curPoint].relativeTo) {
|
||||
case CS_CAM_REL_2:
|
||||
OLib_DbCameraVec3fDiff(&player->actor.world, &csCamera->camera->at, &csCamera->camera->at, 2);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_3:
|
||||
OLib_DbCameraVec3fDiff(&player->actor.world, &csCamera->camera->at, &csCamera->camera->at, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_1:
|
||||
OLib_DbCameraVec3fDiff(&player->actor.world, &csCamera->camera->at, &csCamera->camera->at, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_4:
|
||||
OLib_DbCameraVec3fDiff(&target->world, &csCamera->camera->at, &csCamera->camera->at, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_5:
|
||||
OLib_DbCameraVec3fDiff(&target->world, &csCamera->camera->at, &csCamera->camera->at, 2);
|
||||
break;
|
||||
|
||||
default: // CS_CAM_REL_0
|
||||
break;
|
||||
}
|
||||
|
||||
numPoints = interpHandler(&csCamera->camera->at, fov, roll, &csCamera->atCmd[csCamera->eyeInterp.curPoint],
|
||||
&csCamera->miscCmd[csCamera->eyeInterp.curPoint], &csCamera->eyeInterp);
|
||||
|
||||
switch (csCamera->atCmd[csCamera->eyeInterp.curPoint].relativeTo) {
|
||||
case CS_CAM_REL_2:
|
||||
OLib_DbCameraVec3fSum(&player->actor.world, &csCamera->camera->at, &csCamera->camera->at, 2);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_3:
|
||||
OLib_DbCameraVec3fSum(&player->actor.world, &csCamera->camera->at, &csCamera->camera->at, 1);
|
||||
csCamera->camera->at.y += func_80163660(&player->actor);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_1:
|
||||
OLib_DbCameraVec3fSum(&player->actor.world, &csCamera->camera->at, &csCamera->camera->at, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_4:
|
||||
OLib_DbCameraVec3fSum(&target->world, &csCamera->camera->at, &csCamera->camera->at, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_5:
|
||||
OLib_DbCameraVec3fSum(&target->world, &csCamera->camera->at, &csCamera->camera->at, 2);
|
||||
break;
|
||||
|
||||
default: // CS_CAM_REL_0
|
||||
break;
|
||||
}
|
||||
|
||||
csCamera->eyeInterp.curPoint += numPoints;
|
||||
|
||||
if (sp5C) {
|
||||
fov = &csCamera->camera->fov;
|
||||
} else {
|
||||
fov = NULL;
|
||||
}
|
||||
|
||||
if (sp5C) {
|
||||
roll = &csCamera->camera->roll;
|
||||
} else {
|
||||
roll = NULL;
|
||||
}
|
||||
|
||||
interpHandler = CutsceneCamera_Interpolate(csCamera->eyeCmd[csCamera->atInterp.curPoint].interpType);
|
||||
|
||||
switch (csCamera->eyeCmd[csCamera->atInterp.curPoint].relativeTo) {
|
||||
case CS_CAM_REL_2:
|
||||
OLib_DbCameraVec3fDiff(&player->actor.world, &csCamera->camera->eye, &csCamera->camera->eye, 2);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_3:
|
||||
OLib_DbCameraVec3fDiff(&player->actor.world, &csCamera->camera->eye, &csCamera->camera->eye, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_1:
|
||||
OLib_DbCameraVec3fDiff(&player->actor.world, &csCamera->camera->eye, &csCamera->camera->eye, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_4:
|
||||
OLib_DbCameraVec3fDiff(&target->world, &csCamera->camera->eye, &csCamera->camera->eye, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_5:
|
||||
OLib_DbCameraVec3fDiff(&target->world, &csCamera->camera->eye, &csCamera->camera->eye, 2);
|
||||
break;
|
||||
|
||||
default: // CS_CAM_REL_0
|
||||
break;
|
||||
}
|
||||
|
||||
numPoints = interpHandler(&csCamera->camera->eye, fov, roll, &csCamera->eyeCmd[csCamera->atInterp.curPoint],
|
||||
&csCamera->miscCmd[csCamera->atInterp.curPoint], &csCamera->atInterp);
|
||||
|
||||
switch (csCamera->eyeCmd[csCamera->atInterp.curPoint].relativeTo) {
|
||||
case CS_CAM_REL_2:
|
||||
OLib_DbCameraVec3fSum(&player->actor.world, &csCamera->camera->eye, &csCamera->camera->eye, 2);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_3:
|
||||
OLib_DbCameraVec3fSum(&player->actor.world, &csCamera->camera->eye, &csCamera->camera->eye, 1);
|
||||
csCamera->camera->eye.y += func_80163660(&player->actor);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_1:
|
||||
OLib_DbCameraVec3fSum(&player->actor.world, &csCamera->camera->eye, &csCamera->camera->eye, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_4:
|
||||
OLib_DbCameraVec3fSum(&target->world, &csCamera->camera->eye, &csCamera->camera->eye, 1);
|
||||
break;
|
||||
|
||||
case CS_CAM_REL_5:
|
||||
OLib_DbCameraVec3fSum(&target->world, &csCamera->camera->eye, &csCamera->camera->eye, 2);
|
||||
break;
|
||||
|
||||
default: // CS_CAM_REL_0
|
||||
break;
|
||||
}
|
||||
|
||||
csCamera->atInterp.curPoint += numPoints;
|
||||
|
||||
if ((csCamera->eyeInterp.curPoint >= csCamera->eyeInterp.numEntries) ||
|
||||
(csCamera->atInterp.curPoint >= csCamera->atInterp.numEntries)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes camera cutscene commands
|
||||
*/
|
||||
s32 CutsceneCamera_UpdateSplines(u8* script, CutsceneCamera* csCamera) {
|
||||
CsCmdCamSpline* spline;
|
||||
|
||||
switch (csCamera->state) {
|
||||
case CS_CAM_STATE_DONE:
|
||||
return 0;
|
||||
|
||||
case CS_CAM_STATE_PAUSE:
|
||||
return csCamera->nextSplineTimer;
|
||||
|
||||
case CS_CAM_STATE_UPDATE_SPLINE:
|
||||
if (csCamera->updateSplineTimer <= csCamera->duration) {
|
||||
csCamera->updateSplineTimer++;
|
||||
if (csCamera->updateSplineTimer <= csCamera->duration) {
|
||||
// Process Spline
|
||||
if (!CutsceneCamera_ProcessSpline(csCamera)) {
|
||||
csCamera->state = CS_CAM_STATE_DONE_SPLINE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_CAM_STATE_DONE_SPLINE:
|
||||
break;
|
||||
|
||||
default: // CS_CAM_STATE_UPDATE_ALL
|
||||
if (csCamera->splineNeedsInit == true) {
|
||||
// Spline Header
|
||||
spline = (CsCmdCamSpline*)&script[csCamera->cmdIndex];
|
||||
csCamera->atInterp.numEntries = csCamera->eyeInterp.numEntries = spline->numEntries;
|
||||
csCamera->duration = spline->duration;
|
||||
csCamera->cmdIndex += sizeof(CsCmdCamSpline);
|
||||
|
||||
// At Point
|
||||
csCamera->atCmd = (CsCmdCamPoint*)&script[csCamera->cmdIndex];
|
||||
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamPoint));
|
||||
|
||||
// Misc Point
|
||||
csCamera->eyeCmd = (CsCmdCamPoint*)&script[csCamera->cmdIndex];
|
||||
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamPoint));
|
||||
|
||||
// Misc
|
||||
csCamera->miscCmd = (CsCmdCamMisc*)&script[csCamera->cmdIndex];
|
||||
csCamera->cmdIndex += (s16)(csCamera->eyeInterp.numEntries * sizeof(CsCmdCamMisc));
|
||||
|
||||
// Other Params
|
||||
csCamera->eyeInterp.curPoint = 0;
|
||||
csCamera->atInterp.curPoint = 0;
|
||||
|
||||
csCamera->splineNeedsInit = false;
|
||||
//! FAKE: csCamera->splineIndex++;
|
||||
csCamera->splineIndex = (csCamera->splineIndex & 0xFFFF) + 1;
|
||||
csCamera->state = CS_CAM_STATE_UPDATE_ALL;
|
||||
csCamera->nextSplineTimer = csCamera->updateSplineTimer = 0;
|
||||
csCamera->eyeInterp.unk_2D = csCamera->atInterp.unk_2D = 7;
|
||||
}
|
||||
|
||||
csCamera->nextSplineTimer++;
|
||||
|
||||
if (csCamera->updateSplineTimer <= csCamera->duration) {
|
||||
csCamera->updateSplineTimer++;
|
||||
if (csCamera->updateSplineTimer <= csCamera->duration) {
|
||||
// Process SubCommands
|
||||
if (!CutsceneCamera_ProcessSpline(csCamera)) {
|
||||
csCamera->state = CS_CAM_STATE_DONE_SPLINE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (csCamera->nextSplineTimer > csCamera->duration) {
|
||||
// Next Spline
|
||||
csCamera->splineNeedsInit = true;
|
||||
spline = (CsCmdCamSpline*)&script[csCamera->cmdIndex];
|
||||
if (spline->numEntries == -1) {
|
||||
csCamera->state = CS_CAM_STATE_DONE;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return csCamera->nextSplineTimer;
|
||||
}
|
||||
|
||||
// Unused
|
||||
s16 func_80161BAC(void) {
|
||||
return (sCurCsCamera->state == CS_CAM_STATE_PAUSE) || (sCurCsCamera->state == CS_CAM_STATE_UPDATE_SPLINE);
|
||||
}
|
||||
|
||||
void CutsceneCamera_SetState(s16 state) {
|
||||
if (sCurCsCamera->state == CS_CAM_STATE_UPDATE_ALL) {
|
||||
sCurCsCamera->state = state;
|
||||
}
|
||||
}
|
||||
|
||||
void CutsceneCamera_Reset(void) {
|
||||
sCurCsCamera->state = CS_CAM_STATE_UPDATE_ALL;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80161C20.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80161E4C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_801620CC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_8016237C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_801623E4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_801624EC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_8016253C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_801629BC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80162A50.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80162FF8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_801631DC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80163334.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/cutscene_camera/func_80163660.s")
|
||||
@@ -1,43 +0,0 @@
|
||||
#include "global.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161180.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_8016119C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_8016122C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_801612B8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161998.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161BAC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161BE0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161C0C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161C20.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80161E4C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_801620CC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_8016237C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_801623E4.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_801624EC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_8016253C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_801629BC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80162A50.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80162FF8.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_801631DC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80163334.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/db_camera/func_80163660.s")
|
||||
+13
-13
@@ -1371,7 +1371,7 @@ void func_800B722C(GameState* gameState, Player* player) {
|
||||
s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((player->csMode == PLAYER_CSMODE_5) || ((csMode == PLAYER_CSMODE_6) && (player->csMode == PLAYER_CSMODE_0))) {
|
||||
if ((player->csMode == PLAYER_CSMODE_5) || ((csMode == PLAYER_CSMODE_END) && (player->csMode == PLAYER_CSMODE_0))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1880,7 +1880,7 @@ s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, Player
|
||||
player->talkActorDistance = actor->xzDistToPlayer;
|
||||
player->exchangeItemId = exchangeItemId;
|
||||
|
||||
ActorCutscene_SetIntentToPlay(0x7C);
|
||||
CutsceneManager_Queue(CS_ID_GLOBAL_TALK);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2048,7 +2048,7 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, GetItemId getItemId, f32 x
|
||||
player->getItemDirection = absYawDiff;
|
||||
|
||||
if ((getItemId > GI_NONE) && (getItemId < GI_MAX)) {
|
||||
ActorCutscene_SetIntentToPlay(play->playerActorCsIds[1]);
|
||||
CutsceneManager_Queue(play->playerCsIds[PLAYER_CS_ID_ITEM_GET]);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2123,7 +2123,7 @@ s32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
|
||||
PLAYER_STATE1_40000 | PLAYER_STATE1_80000 | PLAYER_STATE1_100000 | PLAYER_STATE1_200000))) {
|
||||
player->rideActor = horse;
|
||||
player->mountSide = mountSide;
|
||||
ActorCutscene_SetIntentToPlay(0x7C);
|
||||
CutsceneManager_Queue(CS_ID_GLOBAL_TALK);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3126,8 +3126,8 @@ void Actor_FreeOverlay(ActorOverlay* entry) {
|
||||
|
||||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX,
|
||||
s16 rotY, s16 rotZ, s32 params) {
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, -1,
|
||||
HALFDAYBIT_ALL, NULL);
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params,
|
||||
CS_ID_NONE, HALFDAYBIT_ALL, NULL);
|
||||
}
|
||||
|
||||
ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
|
||||
@@ -3171,7 +3171,7 @@ ActorInit* Actor_LoadOverlay(ActorContext* actorCtx, s16 index) {
|
||||
}
|
||||
|
||||
Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s16 index, f32 x, f32 y, f32 z, s16 rotX,
|
||||
s16 rotY, s16 rotZ, s32 params, u32 cutscene, u32 halfDaysBits, Actor* parent) {
|
||||
s16 rotY, s16 rotZ, s32 params, u32 csId, u32 halfDaysBits, Actor* parent) {
|
||||
s32 pad;
|
||||
Actor* actor;
|
||||
ActorInit* actorInit;
|
||||
@@ -3237,10 +3237,10 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
actor->home.rot.y = rotY;
|
||||
actor->home.rot.z = rotZ;
|
||||
actor->params = params & 0xFFFF;
|
||||
actor->cutscene = (cutscene & 0x7F);
|
||||
actor->csId = csId & 0x7F;
|
||||
|
||||
if (actor->cutscene == 0x7F) {
|
||||
actor->cutscene = -1;
|
||||
if (actor->csId == 0x7F) {
|
||||
actor->csId = CS_ID_NONE;
|
||||
}
|
||||
|
||||
if (halfDaysBits != 0) {
|
||||
@@ -3263,8 +3263,8 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
|
||||
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY,
|
||||
f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params) {
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params, -1,
|
||||
parent->halfDaysBits, parent);
|
||||
return Actor_SpawnAsChildAndCutscene(actorCtx, play, actorId, posX, posY, posZ, rotX, rotY, rotZ, params,
|
||||
CS_ID_NONE, parent->halfDaysBits, parent);
|
||||
}
|
||||
|
||||
void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx) {
|
||||
@@ -4404,7 +4404,7 @@ s16 func_800BDB6C(Actor* actor, PlayState* play, s16 arg2, f32 arg3) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
f32 phi_f2;
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_0) || gDbgCamEnabled) {
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
|
||||
phi_f2 = Math_Vec3f_DistXYZ(&actor->world.pos, &play->view.eye) * 0.25f;
|
||||
} else {
|
||||
phi_f2 = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
|
||||
|
||||
@@ -3613,31 +3613,31 @@ CameraSetting sCameraSettings[] = {
|
||||
};
|
||||
|
||||
s16 sGlobalCamDataSettings[] = {
|
||||
/* -25 */ CAM_SET_ELEGY_SHELL,
|
||||
/* -24 */ CAM_SET_SIDED,
|
||||
/* -23 */ CAM_SET_BOAT_CRUISE,
|
||||
/* -22 */ CAM_SET_NONE,
|
||||
/* -21 */ CAM_SET_SUBJECTD,
|
||||
/* -20 */ CAM_SET_NORMALD,
|
||||
/* -19 */ CAM_SET_NONE,
|
||||
/* -18 */ CAM_SET_NONE,
|
||||
/* -17 */ CAM_SET_NONE,
|
||||
/* -16 */ CAM_SET_WARP_PAD_ENTRANCE,
|
||||
/* -15 */ CAM_SET_ATTENTION,
|
||||
/* -14 */ CAM_SET_CONNECT0,
|
||||
/* -13 */ CAM_SET_REMOTEBOMB,
|
||||
/* -12 */ CAM_SET_NONE,
|
||||
/* -11 */ CAM_SET_MASK_TRANSFORMATION,
|
||||
/* -10 */ CAM_SET_LONG_CHEST_OPENING,
|
||||
/* -9 */ CAM_SET_REBIRTH,
|
||||
/* -8 */ CAM_SET_DEATH,
|
||||
/* -7 */ CAM_SET_WARP_PAD_MOON,
|
||||
/* -6 */ CAM_SET_NAVI,
|
||||
/* -5 */ CAM_SET_ITEM3,
|
||||
/* -4 */ CAM_SET_ITEM2,
|
||||
/* -3 */ CAM_SET_ITEM1,
|
||||
/* -2 */ CAM_SET_ITEM0,
|
||||
/* -1 */ CAM_SET_STOP0,
|
||||
/* -25 */ CAM_SET_ELEGY_SHELL, // CS_CAM_ID_GLOBAL_ELEGY
|
||||
/* -24 */ CAM_SET_SIDED, // CS_CAM_ID_GLOBAL_SIDED
|
||||
/* -23 */ CAM_SET_BOAT_CRUISE, // CS_CAM_ID_GLOBAL_BOAT_CRUISE
|
||||
/* -22 */ CAM_SET_NONE, // CS_CAM_ID_GLOBAL_N16
|
||||
/* -21 */ CAM_SET_SUBJECTD, // CS_CAM_ID_GLOBAL_SUBJECTD
|
||||
/* -20 */ CAM_SET_NORMALD, // CS_CAM_ID_GLOBAL_NORMALD
|
||||
/* -19 */ CAM_SET_NONE, // CS_CAM_ID_GLOBAL_N13
|
||||
/* -18 */ CAM_SET_NONE, // CS_CAM_ID_GLOBAL_N12
|
||||
/* -17 */ CAM_SET_NONE, // CS_CAM_ID_GLOBAL_N11
|
||||
/* -16 */ CAM_SET_WARP_PAD_ENTRANCE, // CS_CAM_ID_GLOBAL_WARP_PAD_ENTRANCE
|
||||
/* -15 */ CAM_SET_ATTENTION, // CS_CAM_ID_GLOBAL_ATTENTION
|
||||
/* -14 */ CAM_SET_CONNECT0, // CS_CAM_ID_GLOBAL_CONNECT
|
||||
/* -13 */ CAM_SET_REMOTEBOMB, // CS_CAM_ID_GLOBAL_REMOTE_BOMB
|
||||
/* -12 */ CAM_SET_NONE, // CS_CAM_ID_GLOBAL_N0C
|
||||
/* -11 */ CAM_SET_MASK_TRANSFORMATION, // CS_CAM_ID_GLOBAL_MASK_TRANSFORMATION
|
||||
/* -10 */ CAM_SET_LONG_CHEST_OPENING, // CS_CAM_ID_GLOBAL_LONG_CHEST_OPENING
|
||||
/* -9 */ CAM_SET_REBIRTH, // CS_CAM_ID_GLOBAL_REVIVE
|
||||
/* -8 */ CAM_SET_DEATH, // CS_CAM_ID_GLOBAL_DEATH
|
||||
/* -7 */ CAM_SET_WARP_PAD_MOON, // CS_CAM_ID_GLOBAL_WARP_PAD_MOON
|
||||
/* -6 */ CAM_SET_NAVI, // CS_CAM_ID_GLOBAL_SONG_WARP
|
||||
/* -5 */ CAM_SET_ITEM3, // CS_CAM_ID_GLOBAL_ITEM_SHOW
|
||||
/* -4 */ CAM_SET_ITEM2, // CS_CAM_ID_GLOBAL_ITEM_BOTTLE
|
||||
/* -3 */ CAM_SET_ITEM1, // CS_CAM_ID_GLOBAL_ITEM_OCARINA
|
||||
/* -2 */ CAM_SET_ITEM0, // CS_CAM_ID_GLOBAL_ITEM_GET
|
||||
/* -1 */ CAM_SET_STOP0, // CS_CAM_ID_NONE
|
||||
/* 0 */ CAM_SET_NONE,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
|
||||
Vec3f D_801EDE00;
|
||||
|
||||
+754
-677
File diff suppressed because it is too large
Load Diff
@@ -1,33 +1,33 @@
|
||||
#include "global.h"
|
||||
|
||||
void EnvFlags_UnsetAll(PlayState* play) {
|
||||
void CutsceneFlags_UnsetAll(PlayState* play) {
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(play->envFlags); i++) {
|
||||
play->envFlags[i] = 0;
|
||||
for (i = 0; i < ARRAY_COUNT(play->cutsceneFlags); i++) {
|
||||
play->cutsceneFlags[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void EnvFlags_Set(PlayState* play, s16 flag) {
|
||||
void CutsceneFlags_Set(PlayState* play, s16 flag) {
|
||||
s16 index = flag / 16;
|
||||
s16 bit = flag % 16;
|
||||
s16 mask = 1 << bit;
|
||||
|
||||
play->envFlags[index] |= mask;
|
||||
play->cutsceneFlags[index] |= mask;
|
||||
}
|
||||
|
||||
void EnvFlags_Unset(PlayState* play, s16 flag) {
|
||||
void CutsceneFlags_Unset(PlayState* play, s16 flag) {
|
||||
s16 index = flag / 16;
|
||||
s16 bit = flag % 16;
|
||||
s16 mask = (1 << bit) ^ 0xFFFF;
|
||||
|
||||
play->envFlags[index] &= mask;
|
||||
play->cutsceneFlags[index] &= mask;
|
||||
}
|
||||
|
||||
s32 EnvFlags_Get(PlayState* play, s16 flag) {
|
||||
s32 CutsceneFlags_Get(PlayState* play, s16 flag) {
|
||||
s16 index = flag / 16;
|
||||
s16 bit = flag % 16;
|
||||
s16 mask = 1 << bit;
|
||||
|
||||
return play->envFlags[index] & mask;
|
||||
return play->cutsceneFlags[index] & mask;
|
||||
}
|
||||
|
||||
+527
-25
@@ -1,52 +1,554 @@
|
||||
/**
|
||||
* @file z_eventmgr.c
|
||||
*
|
||||
* Manages all cutscenes except for manual
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F1460.s")
|
||||
ActorCutscene sGlobalCutsceneList[] = {
|
||||
// CS_ID_GLOBAL_78
|
||||
{ -100, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_ALL_ALT, 255,
|
||||
255 },
|
||||
// CS_ID_GLOBAL_79
|
||||
{ -100, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_ALL_ALT, 255,
|
||||
255 },
|
||||
// CS_ID_GLOBAL_7A
|
||||
{ -100, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_ALL_ALT, 255,
|
||||
255 },
|
||||
// CS_ID_GLOBAL_ELEGY
|
||||
{ 2, -1, CS_CAM_ID_GLOBAL_ELEGY, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_NONE,
|
||||
CS_END_CAM_0, 32 },
|
||||
// CS_ID_GLOBAL_TALK
|
||||
{ 32765, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_ALL_ALT,
|
||||
CS_END_CAM_0, 255 },
|
||||
// CS_ID_GLOBAL_DOOR
|
||||
{ 32764, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_ALL_ALT,
|
||||
CS_END_CAM_0, 255 },
|
||||
// CS_ID_GLOBAL_RETURN_TO_CAM
|
||||
{ 32766, -2, CS_CAM_ID_GLOBAL_CONNECT, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE, 255,
|
||||
CS_HUD_VISIBILITY_ALL_ALT, CS_END_CAM_0, 32 },
|
||||
// CS_ID_GLOBAL_END
|
||||
{ 0, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE, 255, CS_HUD_VISIBILITY_ALL_ALT,
|
||||
CS_END_CAM_0, 32 },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCutsceneImpl.s")
|
||||
typedef enum {
|
||||
/* 0 */ CS_START_0,
|
||||
/* 1 */ CS_START_1,
|
||||
/* 2 */ CS_START_2,
|
||||
} ActorCutsceneStartMethod;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_Init.s")
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 csId;
|
||||
/* 0x02 */ s16 length;
|
||||
/* 0x04 */ s16 endCsId;
|
||||
/* 0x06 */ s16 subCamId;
|
||||
/* 0x08 */ Actor* targetActor;
|
||||
/* 0x0C */ s32 startMethod;
|
||||
/* 0x10 */ PlayState* play;
|
||||
/* 0x14 */ s16 retCamId;
|
||||
/* 0x16 */ s16 isCameraStored;
|
||||
} CutsceneManager; // size = 0x18
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F15D8.s")
|
||||
CutsceneManager sCutsceneMgr = {
|
||||
CS_ID_NONE, 0, CS_ID_NONE, SUB_CAM_ID_DONE, NULL, CS_START_0, NULL, CAM_ID_MAIN, false,
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_ClearWaiting.s")
|
||||
s16 CutsceneManager_SetHudVisibility(s16 csHudVisibility) {
|
||||
u16 hudVisibility;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_ClearNextCutscenes.s")
|
||||
switch (csHudVisibility) {
|
||||
case CS_HUD_VISIBILITY_NONE:
|
||||
hudVisibility = HUD_VISIBILITY_NONE_ALT;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_MarkNextCutscenes.s")
|
||||
case CS_HUD_VISIBILITY_ALL:
|
||||
hudVisibility = HUD_VISIBILITY_ALL;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_End.s")
|
||||
case CS_HUD_VISIBILITY_A_HEARTS_MAGIC:
|
||||
hudVisibility = HUD_VISIBILITY_A_HEARTS_MAGIC_WITH_OVERWRITE;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_Update.s")
|
||||
case CS_HUD_VISIBILITY_C_HEARTS_MAGIC:
|
||||
hudVisibility = HUD_VISIBILITY_HEARTS_MAGIC_C;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_SetIntentToPlay.s")
|
||||
case CS_HUD_VISIBILITY_ALL_NO_MINIMAP:
|
||||
hudVisibility = HUD_VISIBILITY_ALL_NO_MINIMAP;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCanPlayNext.s")
|
||||
case CS_HUD_VISIBILITY_A_B_C:
|
||||
hudVisibility = HUD_VISIBILITY_A_B_C;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_StartAndSetUnkLinkFields.s")
|
||||
case CS_HUD_VISIBILITY_B_MINIMAP:
|
||||
hudVisibility = HUD_VISIBILITY_B_MINIMAP;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_StartAndSetFlag.s")
|
||||
case CS_HUD_VISIBILITY_A:
|
||||
hudVisibility = HUD_VISIBILITY_A;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_Start.s")
|
||||
default:
|
||||
hudVisibility = HUD_VISIBILITY_ALL;
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_Stop.s")
|
||||
Interface_SetHudVisibility(hudVisibility);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentIndex.s")
|
||||
return hudVisibility;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCutscene.s")
|
||||
ActorCutscene* CutsceneManager_GetCutsceneEntryImpl(s16 csId) {
|
||||
if (csId < CS_ID_GLOBAL_78) {
|
||||
return &sSceneCutsceneList[csId];
|
||||
} else {
|
||||
csId -= CS_ID_GLOBAL_78;
|
||||
return &sGlobalCutsceneList[csId];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetAdditionalCutscene.s")
|
||||
void CutsceneManager_Init(PlayState* play, ActorCutscene* cutsceneList, s16 numEntries) {
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetLength.s")
|
||||
sSceneCutsceneList = cutsceneList;
|
||||
sSceneCutsceneCount = numEntries;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F2138.s")
|
||||
for (i = 0; i < ARRAY_COUNT(sWaitingCutsceneList); i++) {
|
||||
sWaitingCutsceneList[i] = 0;
|
||||
sNextCutsceneList[i] = 0;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F2178.s")
|
||||
sCutsceneMgr.endCsId = CS_ID_NONE;
|
||||
sCutsceneMgr.play = play;
|
||||
sCutsceneMgr.length = -1;
|
||||
sCutsceneMgr.targetActor = NULL;
|
||||
sCutsceneMgr.subCamId = SUB_CAM_ID_DONE;
|
||||
sCutsceneMgr.isCameraStored = false;
|
||||
sCutsceneMgr.csId = sCutsceneMgr.endCsId;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_GetCurrentSubCamId.s")
|
||||
/**
|
||||
* Store camera into subCam 2, and keep subCam 2 INACTIVE to preserve the struct.
|
||||
*/
|
||||
void CutsceneManager_StoreCamera(Camera* camera) {
|
||||
if (camera != NULL) {
|
||||
memcpy(&sCutsceneMgr.play->subCameras[2], camera, sizeof(Camera));
|
||||
sCutsceneMgr.play->subCameras[2].camId = camera->camId;
|
||||
Camera_ChangeStatus(&sCutsceneMgr.play->subCameras[2], CAM_STATUS_INACTIVE);
|
||||
sCutsceneMgr.isCameraStored = true;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F21CC.s")
|
||||
void CutsceneManager_ClearWaiting(void) {
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/func_800F22C4.s")
|
||||
for (i = 0; i < ARRAY_COUNT(sWaitingCutsceneList); i++) {
|
||||
sWaitingCutsceneList[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_eventmgr/ActorCutscene_SetReturnCamera.s")
|
||||
void CutsceneManager_ClearNextCutscenes(void) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sNextCutsceneList); i++) {
|
||||
sNextCutsceneList[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
s16 CutsceneManager_MarkNextCutscenes(void) {
|
||||
s16 bit;
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 count = 0;
|
||||
s16 csIdMax = CS_ID_NONE;
|
||||
s16 priorityMax = SHT_MAX; // lower number means higher priority
|
||||
s16 csId;
|
||||
s16 priority;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sNextCutsceneList); i++) {
|
||||
for (bit = 1, j = 0; j < 8; j++) {
|
||||
if (sWaitingCutsceneList[i] & bit) {
|
||||
csId = (i << 3) | j;
|
||||
priority = CutsceneManager_GetCutsceneEntryImpl(csId)->priority;
|
||||
|
||||
if ((priority ^ 0) == -1) {
|
||||
sNextCutsceneList[i] |= bit;
|
||||
} else if ((priority < priorityMax) && (priority > 0)) {
|
||||
csIdMax = csId;
|
||||
priorityMax = priority;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
bit <<= 1;
|
||||
}
|
||||
}
|
||||
if (csIdMax != CS_ID_NONE) {
|
||||
sNextCutsceneList[csIdMax >> 3] |= 1 << (csIdMax & 7);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
#define RET_CAM sCutsceneMgr.play->cameraPtrs[sCutsceneMgr.retCamId]
|
||||
#define CUR_CAM sCutsceneMgr.play->cameraPtrs[sCutsceneMgr.subCamId]
|
||||
|
||||
void CutsceneManager_End(void) {
|
||||
ActorCutscene* csEntry;
|
||||
s16 oldCamId;
|
||||
s16 oldStateFlags;
|
||||
|
||||
switch (sCutsceneMgr.startMethod) {
|
||||
case CS_START_2:
|
||||
sCutsceneMgr.targetActor->flags &= ~ACTOR_FLAG_100000;
|
||||
// fallthrough
|
||||
case CS_START_1:
|
||||
func_800B7298(sCutsceneMgr.play, 0, PLAYER_CSMODE_END);
|
||||
sCutsceneMgr.startMethod = CS_START_0;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
csEntry = CutsceneManager_GetCutsceneEntryImpl(sCutsceneMgr.csId);
|
||||
|
||||
switch (csEntry->endSfx) {
|
||||
case CS_END_SFX_TRE_BOX_APPEAR:
|
||||
play_sound(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
break;
|
||||
|
||||
case CS_END_SFX_CORRECT_CHIME:
|
||||
play_sound(NA_SE_SY_CORRECT_CHIME);
|
||||
break;
|
||||
|
||||
default: // CS_END_SFX_NONE
|
||||
break;
|
||||
}
|
||||
|
||||
switch (csEntry->endCam) {
|
||||
case CS_END_CAM_SMOOTH:
|
||||
Play_CopyCamera(sCutsceneMgr.play, sCutsceneMgr.retCamId, sCutsceneMgr.subCamId);
|
||||
RET_CAM->stateFlags =
|
||||
(RET_CAM->stateFlags & ~CAM_STATE_UNDERWATER) | (CUR_CAM->stateFlags & CAM_STATE_UNDERWATER);
|
||||
CutsceneManager_Queue(CS_ID_GLOBAL_RETURN_TO_CAM);
|
||||
break;
|
||||
|
||||
case CS_END_CAM_0:
|
||||
default:
|
||||
Play_CopyCamera(sCutsceneMgr.play, sCutsceneMgr.retCamId, sCutsceneMgr.subCamId);
|
||||
RET_CAM->stateFlags =
|
||||
(RET_CAM->stateFlags & ~CAM_STATE_UNDERWATER) | (CUR_CAM->stateFlags & CAM_STATE_UNDERWATER);
|
||||
break;
|
||||
|
||||
case CS_END_CAM_1:
|
||||
oldCamId = RET_CAM->camId;
|
||||
oldStateFlags = RET_CAM->stateFlags;
|
||||
|
||||
if (sCutsceneMgr.isCameraStored) {
|
||||
// Restore the camera that was stored in subCam 2
|
||||
memcpy(RET_CAM, &sCutsceneMgr.play->subCameras[2], sizeof(Camera));
|
||||
|
||||
RET_CAM->stateFlags =
|
||||
(RET_CAM->stateFlags & ~CAM_STATE_UNDERWATER) | (CUR_CAM->stateFlags & CAM_STATE_UNDERWATER);
|
||||
|
||||
RET_CAM->stateFlags = (RET_CAM->stateFlags & ~CAM_STATE_2) | (oldStateFlags & CAM_STATE_2);
|
||||
sCutsceneMgr.isCameraStored = false;
|
||||
}
|
||||
RET_CAM->camId = oldCamId;
|
||||
break;
|
||||
}
|
||||
|
||||
if (sCutsceneMgr.subCamId != SUB_CAM_ID_DONE) {
|
||||
Play_ClearCamera(sCutsceneMgr.play, sCutsceneMgr.subCamId);
|
||||
Play_ChangeCameraStatus(sCutsceneMgr.play, sCutsceneMgr.retCamId, CAM_STATUS_ACTIVE);
|
||||
}
|
||||
|
||||
sCutsceneMgr.csId = CS_ID_NONE;
|
||||
sCutsceneMgr.endCsId = CS_ID_NONE;
|
||||
sCutsceneMgr.length = -1;
|
||||
sCutsceneMgr.targetActor = NULL;
|
||||
sCutsceneMgr.subCamId = SUB_CAM_ID_DONE;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_Update(void) {
|
||||
s16 sp1E = 0;
|
||||
|
||||
if (CutsceneManager_IsNext(CS_ID_GLOBAL_RETURN_TO_CAM)) {
|
||||
CutsceneManager_StartWithPlayerCs(CS_ID_GLOBAL_RETURN_TO_CAM, &GET_PLAYER(sCutsceneMgr.play)->actor);
|
||||
}
|
||||
|
||||
if (sCutsceneMgr.endCsId == CS_ID_NONE) {
|
||||
if (sCutsceneMgr.csId != CS_ID_NONE) {
|
||||
if (sCutsceneMgr.length > 0) {
|
||||
sCutsceneMgr.length--;
|
||||
}
|
||||
sp1E = 1;
|
||||
if (sCutsceneMgr.length == 0) {
|
||||
CutsceneManager_Stop(sCutsceneMgr.csId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sCutsceneMgr.endCsId != CS_ID_NONE) {
|
||||
CutsceneManager_End();
|
||||
sp1E = 2;
|
||||
}
|
||||
|
||||
CutsceneManager_ClearNextCutscenes();
|
||||
|
||||
if (sCutsceneMgr.csId == CS_ID_NONE) {
|
||||
if ((CutsceneManager_MarkNextCutscenes() == 0) && (sp1E != 0)) {
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(0);
|
||||
} else if (sp1E == 0) {
|
||||
CutsceneManager_StoreCamera(Play_GetCamera(sCutsceneMgr.play, sCutsceneMgr.retCamId));
|
||||
}
|
||||
}
|
||||
return sp1E;
|
||||
}
|
||||
|
||||
void CutsceneManager_Queue(s16 csId) {
|
||||
if (csId >= 0) {
|
||||
sWaitingCutsceneList[csId >> 3] |= 1 << (csId & 7);
|
||||
}
|
||||
}
|
||||
|
||||
s16 CutsceneManager_IsNext(s16 csId) {
|
||||
if (csId == CS_ID_GLOBAL_END) {
|
||||
if (sCutsceneMgr.csId == CS_ID_NONE) {
|
||||
return 0x7F;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (csId <= CS_ID_NONE) {
|
||||
return -1;
|
||||
}
|
||||
return (sNextCutsceneList[csId >> 3] & (1 << (csId & 7))) ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start an actor cutscene, activate Player Cutscene Mode "Wait"
|
||||
*/
|
||||
s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) {
|
||||
s16 startCsId = CutsceneManager_Start(csId, actor);
|
||||
|
||||
if (startCsId >= 0) {
|
||||
func_800B7298(sCutsceneMgr.play, 0, PLAYER_CSMODE_WAIT);
|
||||
if (sCutsceneMgr.length == 0) {
|
||||
CutsceneManager_Stop(sCutsceneMgr.csId);
|
||||
}
|
||||
sCutsceneMgr.startMethod = CS_START_1;
|
||||
}
|
||||
return startCsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start an actor cutscene, activate Player Cutscene Mode "Wait", turn on ACTOR_FLAG_100000
|
||||
*/
|
||||
s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor) {
|
||||
s16 startCsId = CutsceneManager_Start(csId, actor);
|
||||
|
||||
if (startCsId >= 0) {
|
||||
func_800B7298(sCutsceneMgr.play, 0, PLAYER_CSMODE_WAIT);
|
||||
if (sCutsceneMgr.length == 0) {
|
||||
CutsceneManager_Stop(sCutsceneMgr.csId);
|
||||
}
|
||||
if (actor != NULL) {
|
||||
actor->flags |= ACTOR_FLAG_100000;
|
||||
sCutsceneMgr.startMethod = CS_START_2;
|
||||
} else {
|
||||
sCutsceneMgr.startMethod = CS_START_1;
|
||||
}
|
||||
}
|
||||
return startCsId;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_Start(s16 csId, Actor* actor) {
|
||||
ActorCutscene* csEntry;
|
||||
Camera* subCam;
|
||||
Camera* retCam;
|
||||
s32 csType = 0;
|
||||
|
||||
if ((csId < 0) || (sCutsceneMgr.csId != CS_ID_NONE)) {
|
||||
return csId;
|
||||
}
|
||||
|
||||
sCutsceneMgr.startMethod = CS_START_0;
|
||||
csEntry = CutsceneManager_GetCutsceneEntryImpl(csId);
|
||||
|
||||
ShrinkWindow_Letterbox_SetSizeTarget(csEntry->letterboxSize);
|
||||
CutsceneManager_SetHudVisibility(csEntry->hudVisibility);
|
||||
|
||||
if (csId == CS_ID_GLOBAL_END) {
|
||||
csType = 1;
|
||||
} else if (csEntry->scriptIndex != CS_SCRIPT_ID_NONE) {
|
||||
// scripted cutscene
|
||||
csType = 1;
|
||||
} else if ((csId != CS_ID_GLOBAL_DOOR) && (csId != CS_ID_GLOBAL_TALK)) {
|
||||
csType = 2;
|
||||
}
|
||||
|
||||
if (csType != 0) {
|
||||
sCutsceneMgr.retCamId = Play_GetActiveCamId(sCutsceneMgr.play);
|
||||
sCutsceneMgr.subCamId = Play_CreateSubCamera(sCutsceneMgr.play);
|
||||
|
||||
subCam = Play_GetCamera(sCutsceneMgr.play, sCutsceneMgr.subCamId);
|
||||
retCam = Play_GetCamera(sCutsceneMgr.play, sCutsceneMgr.retCamId);
|
||||
|
||||
if ((retCam->setting == CAM_SET_START0) || (retCam->setting == CAM_SET_START2) ||
|
||||
(retCam->setting == CAM_SET_START1)) {
|
||||
if (CutsceneManager_FindEntranceCsId() != csId) {
|
||||
func_800E0348(retCam);
|
||||
} else {
|
||||
Camera_ClearFlags(retCam, CAM_STATE_2);
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(subCam, retCam, sizeof(Camera));
|
||||
subCam->camId = sCutsceneMgr.subCamId;
|
||||
Camera_ClearFlags(subCam, CAM_STATE_6 | CAM_STATE_0);
|
||||
|
||||
Play_ChangeCameraStatus(sCutsceneMgr.play, sCutsceneMgr.retCamId, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(sCutsceneMgr.play, sCutsceneMgr.subCamId, CAM_STATUS_ACTIVE);
|
||||
|
||||
subCam->target = sCutsceneMgr.targetActor = actor;
|
||||
subCam->behaviorFlags = 0;
|
||||
|
||||
if (csType == 1) {
|
||||
Camera_ChangeSetting(subCam, CAM_SET_FREE0);
|
||||
Cutscene_StartScripted(sCutsceneMgr.play, csEntry->scriptIndex);
|
||||
sCutsceneMgr.length = csEntry->length;
|
||||
} else {
|
||||
if (csEntry->csCamId != CS_CAM_ID_NONE) {
|
||||
Camera_ChangeDataIdx(subCam, csEntry->csCamId);
|
||||
} else {
|
||||
Camera_ChangeSetting(subCam, CAM_SET_FREE0);
|
||||
}
|
||||
sCutsceneMgr.length = csEntry->length;
|
||||
}
|
||||
}
|
||||
sCutsceneMgr.csId = csId;
|
||||
|
||||
return csId;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_Stop(s16 csId) {
|
||||
ActorCutscene* csEntry;
|
||||
|
||||
if (csId < 0) {
|
||||
return csId;
|
||||
}
|
||||
|
||||
csEntry = CutsceneManager_GetCutsceneEntryImpl(sCutsceneMgr.csId);
|
||||
if ((sCutsceneMgr.length > 0) && (csEntry->scriptIndex == CS_SCRIPT_ID_NONE)) {
|
||||
return -2;
|
||||
}
|
||||
if ((csId != CS_ID_GLOBAL_END) && (csEntry->scriptIndex != CS_SCRIPT_ID_NONE)) {
|
||||
return -3;
|
||||
}
|
||||
|
||||
if (csId == CS_ID_GLOBAL_END) {
|
||||
csId = sCutsceneMgr.csId;
|
||||
}
|
||||
if (csId == sCutsceneMgr.csId) {
|
||||
sCutsceneMgr.endCsId = sCutsceneMgr.csId;
|
||||
return sCutsceneMgr.endCsId;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_GetCurrentCsId(void) {
|
||||
return sCutsceneMgr.csId;
|
||||
}
|
||||
|
||||
ActorCutscene* CutsceneManager_GetCutsceneEntry(s16 csId) {
|
||||
return CutsceneManager_GetCutsceneEntryImpl(csId);
|
||||
}
|
||||
|
||||
s16 CutsceneManager_GetAdditionalCsId(s16 csId) {
|
||||
if (csId < 0) {
|
||||
return CS_ID_NONE;
|
||||
}
|
||||
return CutsceneManager_GetCutsceneEntryImpl(csId)->additionalCsId;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_GetLength(s16 csId) {
|
||||
if (csId < 0) {
|
||||
return -1;
|
||||
}
|
||||
return CutsceneManager_GetCutsceneEntryImpl(csId)->length;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_GetCutsceneScriptIndex(s16 csId) {
|
||||
if (csId < 0) {
|
||||
return -1;
|
||||
}
|
||||
return CutsceneManager_GetCutsceneEntryImpl(csId)->scriptIndex;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_GetCutsceneCustomValue(s16 csId) {
|
||||
if (csId < 0) {
|
||||
return -1;
|
||||
}
|
||||
return CutsceneManager_GetCutsceneEntryImpl(csId)->customValue;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_GetCurrentSubCamId(s16 csId) {
|
||||
return sCutsceneMgr.subCamId;
|
||||
}
|
||||
|
||||
s16 CutsceneManager_FindEntranceCsId(void) {
|
||||
PlayState* play;
|
||||
s32 csId;
|
||||
|
||||
for (csId = 0; csId < sSceneCutsceneCount; csId++) {
|
||||
//! FAKE:
|
||||
if ((sSceneCutsceneList[csId].scriptIndex != CS_SCRIPT_ID_NONE) &&
|
||||
(sSceneCutsceneList[csId].scriptIndex < (play = sCutsceneMgr.play)->csCtx.scriptListCount) &&
|
||||
(sCutsceneMgr.play->curSpawn ==
|
||||
sCutsceneMgr.play->csCtx.scriptList[sSceneCutsceneList[csId].scriptIndex].spawn)) {
|
||||
return csId;
|
||||
}
|
||||
}
|
||||
|
||||
for (csId = 0; csId < sSceneCutsceneCount; csId++) {
|
||||
if ((sSceneCutsceneList[csId].customValue >= 100) &&
|
||||
(sSceneCutsceneList[csId].customValue == (sCutsceneMgr.play->curSpawn + 100))) {
|
||||
return csId;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 func_800F22C4(s16 csId, Actor* actor) {
|
||||
f32 dist;
|
||||
s16 screenPosX;
|
||||
s16 screenPosY;
|
||||
|
||||
if ((sCutsceneMgr.csId == CS_ID_NONE) || (csId == CS_ID_NONE)) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
Actor_GetScreenPos(sCutsceneMgr.play, actor, &screenPosX, &screenPosY);
|
||||
|
||||
dist = OLib_Vec3fDist(&actor->focus.pos, &Play_GetCamera(sCutsceneMgr.play, sCutsceneMgr.subCamId)->eye);
|
||||
|
||||
if ((screenPosX > 40) && (screenPosX < SCREEN_WIDTH - 40) && (screenPosY > 40) &&
|
||||
(screenPosY < SCREEN_HEIGHT - 40) && (dist < 700.0f)) {
|
||||
return 1;
|
||||
}
|
||||
if (sCutsceneMgr.length < 6) {
|
||||
return 2;
|
||||
}
|
||||
if (csId == sCutsceneMgr.csId) {
|
||||
return 0;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
void CutsceneManager_SetReturnCamera(s16 camId) {
|
||||
sCutsceneMgr.retCamId = camId;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
if ((pauseCtx->state == PAUSE_STATE_OFF) && (pauseCtx->debugEditor == DEBUG_EDITOR_NONE) &&
|
||||
(play->gameOverCtx.state == GAMEOVER_INACTIVE)) {
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if ((gSaveContext.save.cutscene < 0xFFF0) && (gSaveContext.nextCutsceneIndex < 0xFFF0)) {
|
||||
if ((gSaveContext.save.cutsceneIndex < 0xFFF0) && (gSaveContext.nextCutsceneIndex < 0xFFF0)) {
|
||||
if (!Play_InCsMode(play) || ((msgCtx->msgMode != 0) && (msgCtx->currentTextId == 0xFF))) {
|
||||
if ((play->unk_1887C < 2) && (gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) &&
|
||||
(gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
|
||||
@@ -1990,7 +1990,7 @@ void Interface_UpdateButtonsPart2(PlayState* play) {
|
||||
}
|
||||
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
|
||||
Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
|
||||
}
|
||||
}
|
||||
@@ -2267,7 +2267,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
s32 pad;
|
||||
s32 restoreHudVisibility = false;
|
||||
|
||||
if (gSaveContext.save.cutscene < 0xFFF0) {
|
||||
if (gSaveContext.save.cutsceneIndex < 0xFFF0) {
|
||||
gSaveContext.hudVisibilityForceButtonAlphasByStatus = false;
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_800000) || CHECK_WEEKEVENTREG(WEEKEVENTREG_08_01) ||
|
||||
(!(CHECK_EVENTINF(EVENTINF_41)) && (play->unk_1887C >= 2))) {
|
||||
@@ -2434,7 +2434,7 @@ void Interface_UpdateButtonsPart1(PlayState* play) {
|
||||
sPictoState = PICTO_BOX_STATE_OFF;
|
||||
} else if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) || (func_801A5100() == 1)) {
|
||||
if (!(CHECK_EVENTINF(EVENTINF_41)) ||
|
||||
((CHECK_EVENTINF(EVENTINF_41)) && (ActorCutscene_GetCurrentIndex() == -1))) {
|
||||
((CHECK_EVENTINF(EVENTINF_41)) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE))) {
|
||||
play_sound(NA_SE_SY_CAMERA_SHUTTER);
|
||||
SREG(89) = 1;
|
||||
play->haltAllActors = true;
|
||||
|
||||
+54
-42
@@ -567,11 +567,13 @@ void Play_UpdateTransition(PlayState* this) {
|
||||
|
||||
if ((!(Entrance_GetTransitionFlags(this->nextEntrance + sceneLayer) & 0x8000) ||
|
||||
((this->nextEntrance == ENTRANCE(PATH_TO_MOUNTAIN_VILLAGE, 1)) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80)) ||
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE)) ||
|
||||
((this->nextEntrance == ENTRANCE(ROAD_TO_SOUTHERN_SWAMP, 1)) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) ||
|
||||
((this->nextEntrance == ENTRANCE(TERMINA_FIELD, 2)) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80)) ||
|
||||
((this->nextEntrance == ENTRANCE(ROAD_TO_IKANA, 1)) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_52_20))) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) ||
|
||||
((this->nextEntrance == ENTRANCE(TERMINA_FIELD, 2)) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) ||
|
||||
((this->nextEntrance == ENTRANCE(ROAD_TO_IKANA, 1)) &&
|
||||
!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE))) &&
|
||||
(!func_800FE590(this) || (Entrance_GetSceneId(this->nextEntrance + sceneLayer) < 0) ||
|
||||
(AudioSeq_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_FINAL_HOURS))) {
|
||||
func_801A4058(20);
|
||||
@@ -983,8 +985,8 @@ void Play_UpdateMain(PlayState* this) {
|
||||
if (!this->haltAllActors) {
|
||||
Actor_UpdateAll(this, &this->actorCtx);
|
||||
}
|
||||
Cutscene_Update1(this, &this->csCtx);
|
||||
Cutscene_Update2(this, &this->csCtx);
|
||||
Cutscene_UpdateManual(this, &this->csCtx);
|
||||
Cutscene_UpdateScripted(this, &this->csCtx);
|
||||
Effect_UpdateAll(this);
|
||||
EffectSS_UpdateAllParticles(this);
|
||||
EffFootmark_Update(this);
|
||||
@@ -1502,8 +1504,8 @@ void Play_Main(GameState* thisx) {
|
||||
*CONTROLLER1(&this->state) = input;
|
||||
}
|
||||
|
||||
ActorCutscene_Update();
|
||||
ActorCutscene_ClearWaiting();
|
||||
CutsceneManager_Update();
|
||||
CutsceneManager_ClearWaiting();
|
||||
}
|
||||
|
||||
s32 Play_InCsMode(PlayState* this) {
|
||||
@@ -2016,37 +2018,47 @@ s32 Play_IsDebugCamEnabled(void) {
|
||||
return gDbgCamEnabled;
|
||||
}
|
||||
|
||||
// A mapping from playerActorCsIds to sGlobalCamDataSettings indices.
|
||||
s16 D_801D0D64[] = { -3, -2, -4, -5, -7, -11, -8, -9, -6, -16 };
|
||||
// A mapping from playerCsIds to sGlobalCamDataSettings indices.
|
||||
s16 sPlayerCsIdToCsCamId[] = {
|
||||
CS_CAM_ID_GLOBAL_ITEM_OCARINA, // PLAYER_CS_ID_ITEM_OCARINA
|
||||
CS_CAM_ID_GLOBAL_ITEM_GET, // PLAYER_CS_ID_ITEM_GET
|
||||
CS_CAM_ID_GLOBAL_ITEM_BOTTLE, // PLAYER_CS_ID_ITEM_BOTTLE
|
||||
CS_CAM_ID_GLOBAL_ITEM_SHOW, // PLAYER_CS_ID_ITEM_SHOW
|
||||
CS_CAM_ID_GLOBAL_WARP_PAD_MOON, // PLAYER_CS_ID_WARP_PAD_MOON
|
||||
CS_CAM_ID_GLOBAL_MASK_TRANSFORMATION, // PLAYER_CS_ID_MASK_TRANSFORMATION
|
||||
CS_CAM_ID_GLOBAL_DEATH, // PLAYER_CS_ID_DEATH
|
||||
CS_CAM_ID_GLOBAL_REVIVE, // PLAYER_CS_ID_REVIVE
|
||||
CS_CAM_ID_GLOBAL_SONG_WARP, // PLAYER_CS_ID_SONG_WARP
|
||||
CS_CAM_ID_GLOBAL_WARP_PAD_ENTRANCE, // PLAYER_CS_ID_WARP_PAD_ENTRANCE
|
||||
};
|
||||
|
||||
// Used by Player
|
||||
/**
|
||||
* Extract the common actor cutscene ids used by Player from the scene and set the actor cutscene ids in
|
||||
* this->playerActorCsIds. If a playerActorCsId is not present in the scene, then that particular id is set
|
||||
* to -1. Otherwise, if there is an ActorCutscene where csCamSceneDataId matches the appropriate element of D_801D0D64,
|
||||
* set the corresponding playerActorCsId (and possibly change its priority for the zeroth one)
|
||||
* Extract the common cutscene ids used by Player from the scene and set the cutscene ids in this->playerCsIds.
|
||||
* If a playerCsId is not present in the scene, then that particular id is set to CS_ID_NONE.
|
||||
* Otherwise, if there is an ActorCutscene where csCamId matches the appropriate element of sPlayerCsIdToCsCamId,
|
||||
* set the corresponding playerActorCsId (and possibly change its priority for the zeroth one).
|
||||
*/
|
||||
void Play_AssignPlayerActorCsIdsFromScene(GameState* thisx, s32 startActorCsId) {
|
||||
void Play_AssignPlayerCsIdsFromScene(GameState* thisx, s32 spawnCsId) {
|
||||
PlayState* this = (PlayState*)thisx;
|
||||
s32 i;
|
||||
s16* curPlayerActorCsId = this->playerActorCsIds;
|
||||
s16* phi_s1 = D_801D0D64;
|
||||
s16* curPlayerCsId = this->playerCsIds;
|
||||
s16* csCamId = sPlayerCsIdToCsCamId;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->playerActorCsIds); i++, curPlayerActorCsId++, phi_s1++) {
|
||||
ActorCutscene* actorCutscene;
|
||||
s32 curActorCsId;
|
||||
for (i = 0; i < ARRAY_COUNT(this->playerCsIds); i++, curPlayerCsId++, csCamId++) {
|
||||
ActorCutscene* csEntry;
|
||||
s32 curCsId;
|
||||
|
||||
*curPlayerActorCsId = -1;
|
||||
*curPlayerCsId = CS_ID_NONE;
|
||||
|
||||
for (curActorCsId = startActorCsId; curActorCsId != -1; curActorCsId = actorCutscene->additionalCutscene) {
|
||||
actorCutscene = ActorCutscene_GetCutscene(curActorCsId);
|
||||
for (curCsId = spawnCsId; curCsId != CS_ID_NONE; curCsId = csEntry->additionalCsId) {
|
||||
csEntry = CutsceneManager_GetCutsceneEntry(curCsId);
|
||||
|
||||
if (actorCutscene->csCamSceneDataId == *phi_s1) {
|
||||
if ((actorCutscene->csCamSceneDataId == -3) &&
|
||||
(actorCutscene->priority == 700)) { // override ocarina cs priority
|
||||
actorCutscene->priority = 550;
|
||||
if (csEntry->csCamId == *csCamId) {
|
||||
if ((csEntry->csCamId == CS_CAM_ID_GLOBAL_ITEM_OCARINA) && (csEntry->priority == 700)) {
|
||||
csEntry->priority = 550;
|
||||
}
|
||||
*curPlayerActorCsId = curActorCsId;
|
||||
*curPlayerCsId = curCsId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2101,7 +2113,7 @@ void Play_Init(GameState* thisx) {
|
||||
scene = ((void)0, gSaveContext.save.entrance) >> 9;
|
||||
spawn = (((void)0, gSaveContext.save.entrance) >> 4) & 0x1F;
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE)) {
|
||||
if (scene == ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER) {
|
||||
scene = ENTR_SCENE_MOUNTAIN_VILLAGE_SPRING;
|
||||
} else if (scene == ENTR_SCENE_GORON_VILLAGE_WINTER) {
|
||||
@@ -2115,7 +2127,7 @@ void Play_Init(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) {
|
||||
if (scene == ENTR_SCENE_SOUTHERN_SWAMP_POISONED) {
|
||||
scene = ENTR_SCENE_SOUTHERN_SWAMP_CLEARED;
|
||||
} else if (scene == ENTR_SCENE_WOODFALL) {
|
||||
@@ -2123,11 +2135,11 @@ void Play_Init(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_52_20) && (scene == ENTR_SCENE_IKANA_CANYON)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE) && (scene == ENTR_SCENE_IKANA_CANYON)) {
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF2;
|
||||
}
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80) &&
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE) &&
|
||||
((scene == ENTR_SCENE_GREAT_BAY_COAST) || (scene == ENTR_SCENE_ZORA_CAPE))) {
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF0;
|
||||
}
|
||||
@@ -2179,15 +2191,15 @@ void Play_Init(GameState* thisx) {
|
||||
EffectSS_Init(this, 100);
|
||||
CollisionCheck_InitContext(this, &this->colChkCtx);
|
||||
AnimationContext_Reset(&this->animationCtx);
|
||||
Cutscene_Init(this, &this->csCtx);
|
||||
Cutscene_InitContext(this, &this->csCtx);
|
||||
|
||||
if (gSaveContext.nextCutsceneIndex != 0xFFEF) {
|
||||
gSaveContext.save.cutscene = gSaveContext.nextCutsceneIndex;
|
||||
gSaveContext.save.cutsceneIndex = gSaveContext.nextCutsceneIndex;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFEF;
|
||||
}
|
||||
|
||||
if (gSaveContext.save.cutscene == 0xFFFD) {
|
||||
gSaveContext.save.cutscene = 0;
|
||||
if (gSaveContext.save.cutsceneIndex == 0xFFFD) {
|
||||
gSaveContext.save.cutsceneIndex = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.nextDayTime != 0xFFFF) {
|
||||
@@ -2204,13 +2216,13 @@ void Play_Init(GameState* thisx) {
|
||||
func_800EDDB0(this);
|
||||
|
||||
if (((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN)) ||
|
||||
(gSaveContext.save.cutscene >= 0xFFF0)) {
|
||||
(gSaveContext.save.cutsceneIndex >= 0xFFF0)) {
|
||||
gSaveContext.unk_3DC0 = 0;
|
||||
Magic_Reset(this);
|
||||
gSaveContext.sceneLayer = (gSaveContext.save.cutscene & 0xF) + 1;
|
||||
gSaveContext.sceneLayer = (gSaveContext.save.cutsceneIndex & 0xF) + 1;
|
||||
|
||||
// Set saved cutscene to 0 so it doesn't immediately play, but instead let the `CutsceneManager` handle it.
|
||||
gSaveContext.save.cutscene = 0;
|
||||
gSaveContext.save.cutsceneIndex = 0;
|
||||
} else {
|
||||
gSaveContext.sceneLayer = 0;
|
||||
}
|
||||
@@ -2296,7 +2308,7 @@ void Play_Init(GameState* thisx) {
|
||||
D_801F6D4C->envColor.g = 0;
|
||||
D_801F6D4C->envColor.b = 0;
|
||||
D_801F6D4C->envColor.a = 0;
|
||||
EnvFlags_UnsetAll(this);
|
||||
CutsceneFlags_UnsetAll(this);
|
||||
THA_GetRemaining(&this->state.heap);
|
||||
zAllocSize = THA_GetRemaining(&this->state.heap);
|
||||
zAlloc = (uintptr_t)THA_AllocTailAlign16(&this->state.heap, zAllocSize);
|
||||
@@ -2319,13 +2331,13 @@ void Play_Init(GameState* thisx) {
|
||||
Camera_ChangeDataIdx(&this->mainCamera, player->actor.params & 0xFF);
|
||||
}
|
||||
|
||||
func_800F15D8(&this->mainCamera);
|
||||
CutsceneManager_StoreCamera(&this->mainCamera);
|
||||
Interface_SetSceneRestrictions(this);
|
||||
func_800FB758(this);
|
||||
gSaveContext.seqId = this->sequenceCtx.seqId;
|
||||
gSaveContext.ambienceId = this->sequenceCtx.ambienceId;
|
||||
AnimationContext_Update(this, &this->animationCtx);
|
||||
func_800EDBE0(this);
|
||||
Cutscene_HandleEntranceTriggers(this);
|
||||
gSaveContext.respawnFlag = 0;
|
||||
sBombersNotebookOpen = false;
|
||||
BombersNotebook_Init(&sBombersNotebook);
|
||||
|
||||
@@ -359,9 +359,9 @@ void func_80122F28(Player* player) {
|
||||
PLAYER_STATE1_20000000))) &&
|
||||
(!(player->stateFlags2 & PLAYER_STATE2_1))) {
|
||||
if (player->doorType <= PLAYER_DOORTYPE_TALKING) {
|
||||
ActorCutscene_SetIntentToPlay(0x7C);
|
||||
CutsceneManager_Queue(CS_ID_GLOBAL_TALK);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(0x7D);
|
||||
CutsceneManager_Queue(CS_ID_GLOBAL_DOOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -402,7 +402,7 @@ void Scene_CommandTimeSettings(PlayState* play, SceneCmd* cmd) {
|
||||
play->envCtx.sunPos.y = (Math_CosS(((void)0, gSaveContext.save.time) - CLOCK_TIME(12, 0)) * 120.0f) * 25.0f;
|
||||
play->envCtx.sunPos.z = (Math_CosS(((void)0, gSaveContext.save.time) - CLOCK_TIME(12, 0)) * 20.0f) * 25.0f;
|
||||
|
||||
if ((play->envCtx.sceneTimeSpeed == 0) && (gSaveContext.save.cutscene < 0xFFF0)) {
|
||||
if ((play->envCtx.sceneTimeSpeed == 0) && (gSaveContext.save.cutsceneIndex < 0xFFF0)) {
|
||||
gSaveContext.skyboxTime = gSaveContext.save.time;
|
||||
|
||||
if ((gSaveContext.skyboxTime >= CLOCK_TIME(4, 0)) && (gSaveContext.skyboxTime < CLOCK_TIME(6, 30))) {
|
||||
@@ -470,15 +470,15 @@ void Scene_CommandAltHeaderList(PlayState* play, SceneCmd* cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x17: Cutscene List
|
||||
void Scene_CommandCutsceneList(PlayState* play, SceneCmd* cmd) {
|
||||
play->csCtx.sceneCsCount = cmd->cutsceneList.sceneCsCount;
|
||||
play->csCtx.sceneCsList = Lib_SegmentedToVirtual(cmd->cutsceneList.segment);
|
||||
// SceneTableEntry Header Command 0x17: Cutscene Script List
|
||||
void Scene_CommandCutsceneScriptList(PlayState* play, SceneCmd* cmd) {
|
||||
play->csCtx.scriptListCount = cmd->scriptList.scriptListCount;
|
||||
play->csCtx.scriptList = Lib_SegmentedToVirtual(cmd->scriptList.segment);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1B: Actor Cutscene List
|
||||
void Scene_CommandActorCutsceneList(PlayState* play, SceneCmd* cmd) {
|
||||
ActorCutscene_Init(play, Lib_SegmentedToVirtual(cmd->cutsceneActorList.segment), cmd->cutsceneActorList.num);
|
||||
// SceneTableEntry Header Command 0x1B: Cutscene List
|
||||
void Scene_CommandCutsceneList(PlayState* play, SceneCmd* cmd) {
|
||||
CutsceneManager_Init(play, Lib_SegmentedToVirtual(cmd->cutsceneList.segment), cmd->cutsceneList.num);
|
||||
}
|
||||
|
||||
// SceneTableEntry Header Command 0x1C: Mini Maps
|
||||
@@ -560,11 +560,11 @@ void (*sSceneCmdHandlers[])(PlayState*, SceneCmd*) = {
|
||||
NULL,
|
||||
Scene_CommandSoundSettings,
|
||||
Scene_CommandEchoSetting,
|
||||
Scene_CommandCutsceneList,
|
||||
Scene_CommandCutsceneScriptList,
|
||||
Scene_CommandAltHeaderList,
|
||||
Scene_CommandSetRegionVisitedFlag,
|
||||
Scene_CommandAnimatedMaterials,
|
||||
Scene_CommandActorCutsceneList,
|
||||
Scene_CommandCutsceneList,
|
||||
Scene_CommandMiniMap,
|
||||
Scene_Command1D,
|
||||
Scene_CommandMiniMapCompassInfo,
|
||||
@@ -601,7 +601,7 @@ u16 Entrance_Create(s32 scene, s32 spawn, s32 layer) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an layer 0 entranace from the current entrance and the given spawn.
|
||||
* Creates an layer 0 entrance from the current entrance and the given spawn.
|
||||
*/
|
||||
u16 Entrance_CreateFromSpawn(s32 spawn) {
|
||||
return Entrance_Create((u32)gSaveContext.save.entrance >> 9, spawn, 0);
|
||||
|
||||
@@ -939,10 +939,9 @@ void Sram_InitDebugSave(void) {
|
||||
Sram_GenerateRandomSaveFields();
|
||||
}
|
||||
|
||||
// Unused
|
||||
void func_80144A94(SramContext* sramCtx) {
|
||||
void Sram_ResetSaveFromMoonCrash(SramContext* sramCtx) {
|
||||
s32 i;
|
||||
s32 cutscene = gSaveContext.save.cutscene;
|
||||
s32 cutsceneIndex = gSaveContext.save.cutsceneIndex;
|
||||
|
||||
bzero(sramCtx->saveBuf, SAVE_BUFFER_SIZE);
|
||||
|
||||
@@ -957,7 +956,7 @@ void func_80144A94(SramContext* sramCtx) {
|
||||
D_801C67F0[gSaveContext.fileNum * 2 + 1]);
|
||||
Lib_MemCpy(&gSaveContext, sramCtx->saveBuf, sizeof(Save));
|
||||
}
|
||||
gSaveContext.save.cutscene = cutscene;
|
||||
gSaveContext.save.cutsceneIndex = cutsceneIndex;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gSaveContext.eventInf); i++) {
|
||||
gSaveContext.eventInf[i] = 0;
|
||||
@@ -1067,10 +1066,10 @@ void Sram_OpenSave(FileSelectState* fileSelect, SramContext* sramCtx) {
|
||||
} else {
|
||||
gSaveContext.save.entrance = D_801C6A58[(void)0, gSaveContext.save.owlSaveLocation];
|
||||
if ((gSaveContext.save.entrance == ENTRANCE(SOUTHERN_SWAMP_POISONED, 10)) &&
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) {
|
||||
gSaveContext.save.entrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 10);
|
||||
} else if ((gSaveContext.save.entrance == ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8)) &&
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80)) {
|
||||
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE)) {
|
||||
gSaveContext.save.entrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 8);
|
||||
}
|
||||
|
||||
@@ -1532,7 +1531,7 @@ void Sram_InitSave(FileSelectState* fileSelect2, SramContext* sramCtx) {
|
||||
if (gSaveContext.unk_3F3F) {
|
||||
Sram_InitNewSave();
|
||||
if (fileSelect->unk_24480 == 0) {
|
||||
gSaveContext.save.cutscene = 0xFFF0;
|
||||
gSaveContext.save.cutsceneIndex = 0xFFF0;
|
||||
}
|
||||
|
||||
for (phi_v0 = 0; phi_v0 < ARRAY_COUNT(gSaveContext.save.saveInfo.playerData.playerName); phi_v0++) {
|
||||
@@ -1634,7 +1633,7 @@ void Sram_SaveSpecialEnterClockTown(PlayState* play) {
|
||||
* Saves when beating the game, after showing the "Dawn of the New Day" message
|
||||
*/
|
||||
void Sram_SaveSpecialNewDay(PlayState* play) {
|
||||
s32 cutscene = gSaveContext.save.cutscene;
|
||||
s32 cutsceneIndex = gSaveContext.save.cutsceneIndex;
|
||||
s32 day;
|
||||
u16 time = gSaveContext.save.time;
|
||||
|
||||
@@ -1647,7 +1646,7 @@ void Sram_SaveSpecialNewDay(PlayState* play) {
|
||||
|
||||
gSaveContext.save.day = day;
|
||||
gSaveContext.save.time = time;
|
||||
gSaveContext.save.cutscene = cutscene;
|
||||
gSaveContext.save.cutsceneIndex = cutsceneIndex;
|
||||
func_80185F64(play->sramCtx.saveBuf, D_801C67C8[gSaveContext.fileNum * 2], D_801C67F0[gSaveContext.fileNum * 2]);
|
||||
}
|
||||
|
||||
|
||||
+24
-19
@@ -1386,48 +1386,53 @@ void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* a
|
||||
*curAnimIndex = nextAnimIndex;
|
||||
}
|
||||
|
||||
s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type) {
|
||||
s32 SubS_StartCutscene(Actor* actor, s16 nextCsId, s16 curCsId, s32 type) {
|
||||
s32 isStarted = false;
|
||||
|
||||
if ((curCutscene != -1) && (ActorCutscene_GetCurrentIndex() == curCutscene)) {
|
||||
ActorCutscene_Stop(curCutscene);
|
||||
ActorCutscene_SetIntentToPlay(nextCutscene);
|
||||
} else if (ActorCutscene_GetCanPlayNext(nextCutscene)) {
|
||||
if ((curCsId != CS_ID_NONE) && (CutsceneManager_GetCurrentCsId() == curCsId)) {
|
||||
CutsceneManager_Stop(curCsId);
|
||||
CutsceneManager_Queue(nextCsId);
|
||||
} else if (CutsceneManager_IsNext(nextCsId)) {
|
||||
switch (type) {
|
||||
case SUBS_CUTSCENE_SET_UNK_LINK_FIELDS:
|
||||
ActorCutscene_StartAndSetUnkLinkFields(nextCutscene, actor);
|
||||
case SUBS_CUTSCENE_WITH_PLAYER:
|
||||
CutsceneManager_StartWithPlayerCs(nextCsId, actor);
|
||||
break;
|
||||
|
||||
case SUBS_CUTSCENE_NORMAL:
|
||||
ActorCutscene_Start(nextCutscene, actor);
|
||||
CutsceneManager_Start(nextCsId, actor);
|
||||
break;
|
||||
case SUBS_CUTSCENE_SET_FLAG:
|
||||
ActorCutscene_StartAndSetFlag(nextCutscene, actor);
|
||||
|
||||
case SUBS_CUTSCENE_WITH_PLAYER_SET_FLAG:
|
||||
CutsceneManager_StartWithPlayerCsAndSetFlag(nextCsId, actor);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
isStarted = true;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(nextCutscene);
|
||||
CutsceneManager_Queue(nextCsId);
|
||||
}
|
||||
|
||||
return isStarted;
|
||||
}
|
||||
|
||||
s32 SubS_FillCutscenesList(Actor* actor, s16 cutscenes[], s16 numCutscenes) {
|
||||
s16 cs;
|
||||
s32 SubS_FillCutscenesList(Actor* actor, s16 csIdList[], s16 numCutscenes) {
|
||||
s16 csId;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < numCutscenes; i++) {
|
||||
cutscenes[i] = -1;
|
||||
csIdList[i] = CS_ID_NONE;
|
||||
}
|
||||
|
||||
cs = actor->cutscene;
|
||||
csId = actor->csId;
|
||||
i = 0;
|
||||
|
||||
while (cs != -1) {
|
||||
// Note: Infinite loop if numCutscenes is less than possible additional cutscenes
|
||||
while (csId != CS_ID_NONE) {
|
||||
// Note: Infinite loop if numCutscenes is less than possible additional csIdList
|
||||
if (i < numCutscenes) {
|
||||
cutscenes[i] = cs;
|
||||
cs = ActorCutscene_GetAdditionalCutscene(cs);
|
||||
csIdList[i] = csId;
|
||||
csId = CutsceneManager_GetAdditionalCsId(csId);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ void BgAstrBombwall_Init(Actor* thisx, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
BgAstrBombwall_InitCollider(&sTrisInit, &this->dyna.actor.world.pos, &this->dyna.actor.shape.rot, &this->collider);
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->csIdList, ARRAY_COUNT(this->csIdList));
|
||||
func_80C0A378(this);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ void func_80C0A400(BgAstrBombwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C0A418(BgAstrBombwall* this, PlayState* play) {
|
||||
if (SubS_StartActorCutscene(&this->dyna.actor, this->cutscenes[0], -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
|
||||
if (SubS_StartCutscene(&this->dyna.actor, this->csIdList[0], CS_ID_NONE, SUBS_CUTSCENE_WITH_PLAYER)) {
|
||||
func_80C0A458(this, play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,6 @@ typedef struct BgAstrBombwall {
|
||||
/* 0x15C */ BgAstrBombwallActionFunc actionFunc;
|
||||
/* 0x160 */ ColliderTris collider;
|
||||
/* 0x180 */ ColliderTrisElement colliderElements[2];
|
||||
/* 0x238 */ s16 cutscenes[1];
|
||||
/* 0x238 */ s16 csIdList[1];
|
||||
} BgAstrBombwall;
|
||||
#endif // Z_BG_ASTR_BOMBWALL_H
|
||||
|
||||
@@ -153,7 +153,7 @@ s32 func_808B7380(BgBreakwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_808B73C4(BgBreakwall* this, PlayState* play) {
|
||||
return CHECK_WEEKEVENTREG(WEEKEVENTREG_33_80) || CHECK_WEEKEVENTREG(WEEKEVENTREG_21_01);
|
||||
return CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE) || CHECK_WEEKEVENTREG(WEEKEVENTREG_21_01);
|
||||
}
|
||||
|
||||
s32 func_808B73FC(BgBreakwall* this, PlayState* play) {
|
||||
@@ -176,7 +176,7 @@ s32 func_808B7460(BgBreakwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_808B74A8(BgBreakwall* this, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -285,7 +285,7 @@ void func_808B782C(BgBreakwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808B78A4(BgBreakwall* this, PlayState* play) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ void BgCtowerGear_Update(Actor* thisx, PlayState* play) {
|
||||
void BgCtowerGear_UpdateOrgan(Actor* thisx, PlayState* play) {
|
||||
BgCtowerGear* this = THIS;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 104)) {
|
||||
switch (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 104)]->action) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_104)) {
|
||||
switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_104)]->id) {
|
||||
case 1:
|
||||
this->dyna.actor.draw = NULL;
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
@@ -88,7 +88,7 @@ void BgCtowerRot_CorridorRotate(BgCtowerRot* this, PlayState* play) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
this->dyna.actor.shape.rot.z = rotZ * 16.384f;
|
||||
|
||||
if (play->csCtx.frames == 132) {
|
||||
if (play->csCtx.curFrame == 132) {
|
||||
play_sound(NA_SE_SY_SPIRAL_DASH);
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ void BgCtowerRot_DoorClose(BgCtowerRot* this, PlayState* play) {
|
||||
if (!Math_SmoothStepToF(&this->timer, 0.0f, 0.1f, 15.0f, 0.1f)) {
|
||||
if (this->dyna.actor.params == BGCTOWERROT_STONE_DOOR_MAIN) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_STONEDOOR_STOP);
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
}
|
||||
this->actionFunc = BgCtowerRot_DoorDoNothing;
|
||||
} else if (this->dyna.actor.params == BGCTOWERROT_STONE_DOOR_MAIN) {
|
||||
@@ -119,19 +119,19 @@ void BgCtowerRot_DoorIdle(BgCtowerRot* this, PlayState* play) {
|
||||
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &offset, &player->actor.world.pos);
|
||||
if (offset.z > 30.0f) {
|
||||
this->unk160 = 0.0f;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->actionFunc = BgCtowerRot_SetupDoorClose;
|
||||
}
|
||||
}
|
||||
|
||||
void BgCtowerRot_SetupDoorClose(BgCtowerRot* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
if (this->dyna.actor.params == BGCTOWERROT_STONE_DOOR_MAIN) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
}
|
||||
this->actionFunc = BgCtowerRot_DoorClose;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -627,16 +627,16 @@ void func_80B83518(Actor* thisx, PlayState* play) {
|
||||
if (this->unk_17F == 2) {
|
||||
this->unk_17E--;
|
||||
if (this->unk_17E <= 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->unk_17F = 0;
|
||||
}
|
||||
} else if ((this->unk_17F != 0) && (this->unk_17F == 1)) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->unk_17F = 2;
|
||||
this->unk_17E = 0x50;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
this->unk_16C = this->unk_170;
|
||||
|
||||
@@ -97,7 +97,7 @@ static AnimatedMaterial* sTexAnims[] = {
|
||||
|
||||
s16 D_80A2B96C[] = { 0, 0x16C, -0x16C, 0 };
|
||||
|
||||
s16 D_80A2B974[] = { -1, -1 };
|
||||
static s16 sCsIdList[] = { CS_ID_NONE, CS_ID_NONE };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneScale, 1500, ICHAIN_CONTINUE),
|
||||
@@ -197,7 +197,7 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
||||
this->xluDList = sXluDLists[this->unk_160];
|
||||
this->texAnim = sTexAnims[this->unk_160];
|
||||
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->unk_1B6, ARRAY_COUNT(this->unk_1B6));
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->csIdList, ARRAY_COUNT(this->csIdList));
|
||||
|
||||
switch (this->unk_160) {
|
||||
case 1:
|
||||
@@ -254,8 +254,8 @@ void BgDblueMovebg_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_2F8[1] = NULL;
|
||||
this->unk_2F8[0] = NULL;
|
||||
label:
|
||||
for (i = 0; i < ARRAY_COUNT(D_80A2B974); i++) {
|
||||
D_80A2B974[i] = this->unk_1B6[i];
|
||||
for (i = 0; i < ARRAY_COUNT(sCsIdList); i++) {
|
||||
sCsIdList[i] = this->csIdList[i];
|
||||
}
|
||||
this->unk_178 = func_80A29A80(play, this->unk_1C0, this->unk_1BC);
|
||||
this->unk_1CC = D_80A2B96C[this->unk_178];
|
||||
@@ -385,8 +385,8 @@ void func_80A2A32C(BgDblueMovebg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (phi_v1) {
|
||||
this->unk_180 = func_800F2178(this->unk_1B6[0]);
|
||||
this->unk_1D2 = this->unk_1B6[0];
|
||||
this->unk_180 = CutsceneManager_GetCutsceneCustomValue(this->csIdList[0]);
|
||||
this->csId = this->csIdList[0];
|
||||
this->unk_172 |= 8;
|
||||
this->actionFunc = func_80A2A444;
|
||||
} else {
|
||||
@@ -447,7 +447,7 @@ void func_80A2A670(BgDblueMovebg* this, PlayState* play) {
|
||||
void func_80A2A688(BgDblueMovebg* this, PlayState* play) {
|
||||
this->unk_180--;
|
||||
if (this->unk_180 <= 0) {
|
||||
ActorCutscene_Stop(this->unk_1B6[0]);
|
||||
CutsceneManager_Stop(this->csIdList[0]);
|
||||
}
|
||||
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y - 60.0f, 2.0f) &&
|
||||
@@ -477,8 +477,8 @@ void func_80A2A714(BgDblueMovebg* this, PlayState* play) {
|
||||
}
|
||||
this->unk_17E = phi_v0 * phi_f0;
|
||||
|
||||
this->unk_180 = func_800F2178(this->unk_1B6[0]);
|
||||
this->unk_1D2 = this->unk_1B6[0];
|
||||
this->unk_180 = CutsceneManager_GetCutsceneCustomValue(this->csIdList[0]);
|
||||
this->csId = this->csIdList[0];
|
||||
this->unk_172 |= 8;
|
||||
this->actionFunc = func_80A2A7F8;
|
||||
}
|
||||
@@ -549,12 +549,12 @@ void func_80A2AAB8(BgDblueMovebg* this, PlayState* play) {
|
||||
s32 sp18;
|
||||
|
||||
if (this->unk_180-- <= 0) {
|
||||
ActorCutscene_Stop(this->unk_1B6[0]);
|
||||
CutsceneManager_Stop(this->csIdList[0]);
|
||||
}
|
||||
|
||||
sp18 = false;
|
||||
if ((this->unk_1D0 > 0) && ((D_80A2B974[0] >= 0) || (D_80A2B974[1] >= 0))) {
|
||||
if (ActorCutscene_GetCurrentIndex() != -1) {
|
||||
if ((this->unk_1D0 > 0) && ((sCsIdList[0] >= 0) || (sCsIdList[1] >= 0))) {
|
||||
if (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) {
|
||||
sp18 = true;
|
||||
}
|
||||
}
|
||||
@@ -642,13 +642,13 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
|
||||
switch (temp_v0_3) {
|
||||
case 1:
|
||||
case 2:
|
||||
this->unk_1D2 = this->unk_1B6[0];
|
||||
this->csId = this->csIdList[0];
|
||||
this->unk_17E = 40;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
case 3:
|
||||
this->unk_1D2 = this->unk_1B6[1];
|
||||
this->csId = this->csIdList[1];
|
||||
this->unk_17E = 15;
|
||||
break;
|
||||
}
|
||||
@@ -721,7 +721,7 @@ void BgDblueMovebg_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->unk_172 & 8) {
|
||||
if (SubS_StartActorCutscene(&this->dyna.actor, this->unk_1D2, -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
|
||||
if (SubS_StartCutscene(&this->dyna.actor, this->csId, CS_ID_NONE, SUBS_CUTSCENE_WITH_PLAYER)) {
|
||||
this->unk_172 &= ~8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ typedef struct BgDblueMovebg {
|
||||
/* 0x19C */ Vec3f unk_19C;
|
||||
/* 0x1A8 */ Vec3f unk_1A8;
|
||||
/* 0x1B4 */ UNK_TYPE1 unk1B4[2];
|
||||
/* 0x1B6 */ s16 unk_1B6[2];
|
||||
/* 0x1B6 */ s16 csIdList[2];
|
||||
/* 0x1BC */ s32 unk_1BC;
|
||||
/* 0x1C0 */ s32 unk_1C0;
|
||||
/* 0x1C4 */ s32 unk_1C4;
|
||||
@@ -45,7 +45,7 @@ typedef struct BgDblueMovebg {
|
||||
/* 0x1CC */ s16 unk_1CC;
|
||||
/* 0x1CE */ s16 unk_1CE;
|
||||
/* 0x1D0 */ s16 unk_1D0;
|
||||
/* 0x1D2 */ s16 unk_1D2;
|
||||
/* 0x1D2 */ s16 csId;
|
||||
/* 0x1D4 */ f32 unk_1D4;
|
||||
/* 0x1D8 */ s16 unk_1D8[2][8];
|
||||
/* 0x1F8 */ f32 unk_1F8[2][8];
|
||||
|
||||
@@ -423,13 +423,13 @@ void func_80B84928(BgDblueWaterfall* this, PlayState* play) {
|
||||
if (sp30 != 0) {
|
||||
func_80B83EA4(this, play);
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x800) {
|
||||
this->unk_1A4 = this->actor.cutscene;
|
||||
this->csId = this->actor.csId;
|
||||
func_80B84AD4(this, play);
|
||||
}
|
||||
} else {
|
||||
func_80B841A0(this, play);
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1000) {
|
||||
this->unk_1A4 = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
|
||||
this->csId = CutsceneManager_GetAdditionalCsId(this->actor.csId);
|
||||
func_80B84AD4(this, play);
|
||||
}
|
||||
}
|
||||
@@ -448,9 +448,9 @@ void func_80B84AEC(BgDblueWaterfall* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 sp20;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->unk_1A4)) {
|
||||
if (CutsceneManager_IsNext(this->csId)) {
|
||||
sp20 = func_80B83D04(this, play);
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_1A4, &this->actor);
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->actor);
|
||||
this->unk_1A3 = true;
|
||||
if (sp20) {
|
||||
func_80B83D94(this, play);
|
||||
@@ -460,7 +460,7 @@ void func_80B84AEC(BgDblueWaterfall* this, PlayState* play) {
|
||||
func_80B84B9C(this, play);
|
||||
}
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->unk_1A4);
|
||||
CutsceneManager_Queue(this->csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,7 +533,7 @@ void func_80B84BCC(BgDblueWaterfall* this, PlayState* play) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_ICE_FREEZE - SFX_FLAG);
|
||||
} else {
|
||||
if (this->unk_1A3) {
|
||||
ActorCutscene_Stop(this->unk_1A4);
|
||||
CutsceneManager_Stop(this->csId);
|
||||
}
|
||||
func_80B8484C(this, play);
|
||||
}
|
||||
@@ -572,7 +572,7 @@ void func_80B84F20(BgDblueWaterfall* this, PlayState* play) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_ICE_MELT_LEVEL - SFX_FLAG);
|
||||
} else {
|
||||
if (this->unk_1A3) {
|
||||
ActorCutscene_Stop(this->unk_1A4);
|
||||
CutsceneManager_Stop(this->csId);
|
||||
}
|
||||
func_80B8484C(this, play);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef struct BgDblueWaterfall {
|
||||
/* 0x1A0 */ u8 unk_1A0;
|
||||
/* 0x1A1 */ UNK_TYPE1 unk1A1[2];
|
||||
/* 0x1A3 */ s8 unk_1A3;
|
||||
/* 0x1A4 */ s16 unk_1A4;
|
||||
/* 0x1A4 */ s16 csId;
|
||||
/* 0x1A6 */ UNK_TYPE1 unk1A6[1];
|
||||
/* 0x1A7 */ s8 unk_1A7;
|
||||
/* 0x1A8 */ f32 unk_1A8;
|
||||
|
||||
@@ -146,7 +146,7 @@ void BgDkjailIvy_WaitForCut(BgDkjailIvy* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_10;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
BgDkjailIvy_SetupCutscene(this);
|
||||
} else {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
@@ -158,8 +158,8 @@ void BgDkjailIvy_SetupCutscene(BgDkjailIvy* this) {
|
||||
}
|
||||
|
||||
void BgDkjailIvy_BeginCutscene(BgDkjailIvy* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->fadeOutTimer = 50;
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
Flags_SetSwitch(play, BG_DKJAIL_GET_SWITCH(&this->dyna.actor));
|
||||
@@ -167,7 +167,7 @@ void BgDkjailIvy_BeginCutscene(BgDkjailIvy* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_GRASS_WALL_BROKEN);
|
||||
BgDkjailIvy_SetupFadeOut(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,16 +157,16 @@ s32 func_80BC3B00(BgF40Block* this) {
|
||||
}
|
||||
|
||||
s32 func_80BC3CA4(BgF40Block* this) {
|
||||
if (this->dyna.actor.cutscene == -1) {
|
||||
if (this->dyna.actor.csId == CS_ID_NONE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
return true;
|
||||
}
|
||||
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -277,13 +277,13 @@ void func_80BC4228(BgF40Block* this, PlayState* play) {
|
||||
this->unk_164 = this->unk_160 + 1;
|
||||
} else {
|
||||
this->actionFunc = func_80BC4530;
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_STOP_C);
|
||||
}
|
||||
}
|
||||
|
||||
if (func_80BC3D08(this, play, 0)) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->actionFunc = func_80BC41AC;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_STOP_F);
|
||||
return;
|
||||
@@ -337,13 +337,13 @@ void func_80BC4448(BgF40Block* this, PlayState* play) {
|
||||
this->unk_164 = this->unk_160 - 1;
|
||||
} else {
|
||||
this->actionFunc = func_80BC4380;
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_STOP_C);
|
||||
}
|
||||
}
|
||||
|
||||
if (func_80BC3D08(this, play, 0)) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->actionFunc = func_80BC43CC;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_STOP_F);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ void BgF40Switch_Press(BgF40Switch* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_IKANA_BLOCK_SWITCH);
|
||||
Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 120, 20, 10);
|
||||
if (this->isInitiator) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->isInitiator = false;
|
||||
}
|
||||
this->actionFunc = BgF40Switch_IdlePressed;
|
||||
@@ -157,19 +157,19 @@ void BgF40Switch_Press(BgF40Switch* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgF40Switch_WaitToPress(BgF40Switch* this, PlayState* play) {
|
||||
if (!this->isInitiator || this->dyna.actor.cutscene == -1) {
|
||||
if (!this->isInitiator || (this->dyna.actor.csId == CS_ID_NONE)) {
|
||||
this->actionFunc = BgF40Switch_Press;
|
||||
if (this->isInitiator) {
|
||||
Flags_SetSwitch(play, BGF40SWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
}
|
||||
} else if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
} else if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->actionFunc = BgF40Switch_Press;
|
||||
if (this->isInitiator) {
|
||||
Flags_SetSwitch(play, BGF40SWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
}
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void func_80B40080(BgGoronOyu* this) {
|
||||
|
||||
void func_80B4009C(BgGoronOyu* this) {
|
||||
this->unk_17E = 0;
|
||||
this->initialActorCutscene = this->dyna.actor.cutscene;
|
||||
this->initCsId = this->dyna.actor.csId;
|
||||
this->actionFunc = func_80B40100;
|
||||
this->unk_164 = 20.0f;
|
||||
}
|
||||
@@ -53,11 +53,11 @@ void func_80B400C8(BgGoronOyu* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80B40100(BgGoronOyu* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->initialActorCutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->initialActorCutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->initCsId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->initCsId, &this->dyna.actor);
|
||||
this->actionFunc = func_80B40160;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->initialActorCutscene);
|
||||
CutsceneManager_Queue(this->initCsId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void func_80B40160(BgGoronOyu* this, PlayState* play) {
|
||||
BgGoronOyu_UpdateWaterBoxInfo(this, play);
|
||||
|
||||
if (this->unk_164 <= 0.0f) {
|
||||
ActorCutscene_Stop(this->initialActorCutscene);
|
||||
CutsceneManager_Stop(this->initCsId);
|
||||
this->unk_164 = 0.0f;
|
||||
func_80B40080(this);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef struct BgGoronOyu {
|
||||
/* 0x168 */ Vec3f waterBoxPos;
|
||||
/* 0x174 */ f32 waterBoxXLength;
|
||||
/* 0x178 */ f32 waterBoxZLength;
|
||||
/* 0x17C */ s16 initialActorCutscene;
|
||||
/* 0x17C */ s16 initCsId;
|
||||
/* 0x17E */ u16 unk_17E;
|
||||
} BgGoronOyu; // size = 0x180
|
||||
|
||||
|
||||
@@ -191,13 +191,13 @@ void func_80BD6274(BgHakaBombwall* this, PlayState* play) {
|
||||
|
||||
void BgHakaBombwall_SetupPlayCutscene(BgHakaBombwall* this) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_10;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->actionFunc = BgHakaBombwall_PlayCutscene;
|
||||
}
|
||||
|
||||
void BgHakaBombwall_PlayCutscene(BgHakaBombwall* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
func_80BD5E6C(this, play);
|
||||
this->dyna.actor.draw = NULL;
|
||||
Flags_SetSwitch(play, BGHAKABOMBWALL_GET_7F(&this->dyna.actor));
|
||||
@@ -205,7 +205,7 @@ void BgHakaBombwall_PlayCutscene(BgHakaBombwall* this, PlayState* play) {
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
BgHakaBombwall_SetupEndCutscene(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ void BgHakaBombwall_SetupEndCutscene(BgHakaBombwall* this) {
|
||||
void BgHakaBombwall_EndCutscene(BgHakaBombwall* this, PlayState* play) {
|
||||
this->csTimer--;
|
||||
if (this->csTimer <= 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,12 +79,12 @@ void func_80B6DCEC(BgHakaCurtain* this) {
|
||||
}
|
||||
|
||||
void func_80B6DD00(BgHakaCurtain* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
func_80B6DD5C(this);
|
||||
return;
|
||||
}
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
|
||||
void func_80B6DD5C(BgHakaCurtain* this) {
|
||||
@@ -123,11 +123,11 @@ void func_80B6DEA8(BgHakaCurtain* this, PlayState* play) {
|
||||
|
||||
void BgHakaCurtain_Update(Actor* thisx, PlayState* play) {
|
||||
BgHakaCurtain* this = THIS;
|
||||
CsCmdActorAction* actorAction;
|
||||
CsCmdActorCue* cue;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 469)) {
|
||||
actorAction = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 469)];
|
||||
if (actorAction->startFrame == play->csCtx.frames && actorAction->action == 2) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_469)) {
|
||||
cue = play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_469)];
|
||||
if ((cue->startFrame == play->csCtx.curFrame) && (cue->id == 2)) {
|
||||
func_80B6DD80(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ void BgHakaTomb_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_haka_obj_Colheader_000EE8);
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->csIdList, ARRAY_COUNT(this->csIdList));
|
||||
func_80BD6624(this);
|
||||
}
|
||||
|
||||
@@ -61,15 +61,15 @@ void func_80BD6624(BgHakaTomb* this) {
|
||||
this->actionFunc = func_80BD66AC;
|
||||
}
|
||||
|
||||
s32 func_80BD6638(s16* arg0, s16* arg1, s32 arg2) {
|
||||
s32 func_80BD6638(s16* csId, s16* csIdList, s32 numCutscenes) {
|
||||
s32 pad;
|
||||
s32 retVal = false;
|
||||
s32 i;
|
||||
|
||||
*arg0 = ActorCutscene_GetCurrentIndex();
|
||||
if (*arg0 >= 0) {
|
||||
for (i = 0; i < arg2; i++) {
|
||||
if (*arg0 == arg1[i]) {
|
||||
*csId = CutsceneManager_GetCurrentCsId();
|
||||
if (*csId >= 0) {
|
||||
for (i = 0; i < numCutscenes; i++) {
|
||||
if (*csId == csIdList[i]) {
|
||||
retVal = true;
|
||||
break;
|
||||
}
|
||||
@@ -80,12 +80,13 @@ s32 func_80BD6638(s16* arg0, s16* arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
void func_80BD66AC(BgHakaTomb* this, PlayState* play) {
|
||||
s16 temp;
|
||||
s16 csId;
|
||||
|
||||
if (Flags_GetClear(play, this->dyna.actor.room)) {
|
||||
this->dyna.actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8);
|
||||
}
|
||||
if (!func_80BD6638(&temp, this->cutscenes, 1) && (temp < 0) && Flags_GetClear(play, this->dyna.actor.room)) {
|
||||
if (!func_80BD6638(&csId, this->csIdList, ARRAY_COUNT(this->csIdList)) && (csId < 0) &&
|
||||
Flags_GetClear(play, this->dyna.actor.room)) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_1;
|
||||
if (this->dyna.actor.isTargeted) {
|
||||
func_80BD6754(this);
|
||||
@@ -100,7 +101,7 @@ void func_80BD6754(BgHakaTomb* this) {
|
||||
}
|
||||
|
||||
void func_80BD6768(BgHakaTomb* this, PlayState* play) {
|
||||
if (SubS_StartActorCutscene(&this->dyna.actor, this->cutscenes[0], -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
|
||||
if (SubS_StartCutscene(&this->dyna.actor, this->csIdList[0], CS_ID_NONE, SUBS_CUTSCENE_WITH_PLAYER)) {
|
||||
BgHakaTomb_SetupDoNothing(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef void (*BgHakaTombActionFunc)(struct BgHakaTomb*, PlayState*);
|
||||
typedef struct BgHakaTomb {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ BgHakaTombActionFunc actionFunc;
|
||||
/* 0x160 */ s16 cutscenes[1];
|
||||
/* 0x160 */ s16 csIdList[1];
|
||||
} BgHakaTomb; // size = 0x164
|
||||
|
||||
#endif // Z_BG_HAKA_TOMB_H
|
||||
|
||||
@@ -382,7 +382,7 @@ void func_80ABCCE4(BgHakuginBombwall* this, PlayState* play) {
|
||||
|
||||
if (ptr->unk_20(this, play)) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_10;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->actionFunc = func_80ABCD98;
|
||||
} else {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
@@ -393,10 +393,10 @@ void func_80ABCCE4(BgHakuginBombwall* this, PlayState* play) {
|
||||
void func_80ABCD98(BgHakuginBombwall* this, PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
BgHakuginBombwallStruct* ptr = &D_80ABCFC0[BGHAKUGIN_BOMBWALL_100(&this->dyna.actor)];
|
||||
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
ptr->unk_24(this, play);
|
||||
this->dyna.actor.draw = NULL;
|
||||
this->unk_1AC = 20;
|
||||
@@ -404,7 +404,7 @@ void func_80ABCD98(BgHakuginBombwall* this, PlayState* play) {
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = func_80ABCE60;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,7 +413,7 @@ void func_80ABCE60(BgHakuginBombwall* this, PlayState* play) {
|
||||
|
||||
this->unk_1AC--;
|
||||
if (this->unk_1AC <= 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
} else if (this->unk_1AC == ptr->unk_2C) {
|
||||
ptr->unk_28(this, play);
|
||||
|
||||
@@ -104,15 +104,15 @@ void func_80ABD92C(BgHakuginElvpole* this, PlayState* play) {
|
||||
this->unk_15C = 0;
|
||||
}
|
||||
if (this->unk_160) {
|
||||
if (this->dyna.actor.cutscene == -1) {
|
||||
if (this->dyna.actor.csId == CS_ID_NONE) {
|
||||
this->unk_160 = false;
|
||||
return;
|
||||
} else if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
} else if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->unk_160 = false;
|
||||
return;
|
||||
}
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ void func_80A9CE00(BgHakuginPost* this);
|
||||
void func_80A9CE1C(BgHakuginPost* this, PlayState* play);
|
||||
void func_80A9D0A0(BgHakuginPost* this);
|
||||
void func_80A9D0B4(BgHakuginPost* this, PlayState* play);
|
||||
void func_80A9D1E0(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 arg3, s16 arg4);
|
||||
void func_80A9D1E0(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 csLength, s16 csId);
|
||||
void func_80A9D260(BgHakuginPost* this, PlayState* play);
|
||||
void func_80A9D2C4(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 arg3, s16 arg4);
|
||||
void func_80A9D2C4(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 csId, s16 additionalCsId);
|
||||
void func_80A9D360(BgHakuginPost* this, PlayState* play);
|
||||
void func_80A9D3E4(BgHakuginPost* this);
|
||||
void func_80A9D434(BgHakuginPost* this, PlayState* play);
|
||||
@@ -162,12 +162,12 @@ void func_80A9AFB4(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct*
|
||||
} else {
|
||||
unkStruct->unk_0000[i].unk_34 = 1;
|
||||
}
|
||||
unkStruct->unk_0000[i].unk_2A = this->dyna.actor.cutscene;
|
||||
unkStruct->unk_0000[i].unk_2C = ActorCutscene_GetAdditionalCutscene(unkStruct->unk_0000[i].unk_2A);
|
||||
unkStruct->unk_0000[i].csId = this->dyna.actor.csId;
|
||||
unkStruct->unk_0000[i].additionalCsId = CutsceneManager_GetAdditionalCsId(unkStruct->unk_0000[i].csId);
|
||||
} else {
|
||||
unkStruct->unk_0000[i].unk_34 = 1;
|
||||
unkStruct->unk_0000[i].unk_2A = -1;
|
||||
unkStruct->unk_0000[i].unk_2C = -1;
|
||||
unkStruct->unk_0000[i].csId = CS_ID_NONE;
|
||||
unkStruct->unk_0000[i].additionalCsId = CS_ID_NONE;
|
||||
}
|
||||
|
||||
unkStruct->unk_0000[i].unk_2F = 1;
|
||||
@@ -783,7 +783,7 @@ void func_80A9CC84(BgHakuginPost* this) {
|
||||
void func_80A9CCA0(BgHakuginPost* this, PlayState* play) {
|
||||
if (this->unk_174 != 0) {
|
||||
func_80A9D1E0(this, func_80A9CD00, (this->unk_164 - this->dyna.actor.home.pos.y) + 100.0f, 60,
|
||||
this->dyna.actor.cutscene);
|
||||
this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -823,7 +823,7 @@ void func_80A9CE1C(BgHakuginPost* this, PlayState* play) {
|
||||
|
||||
if (this->unk_170 != 0) {
|
||||
func_80A9D1E0(this, func_80A9D0A0, (this->unk_164 - this->dyna.actor.home.pos.y) + 100.0f, 0x3C,
|
||||
ActorCutscene_GetAdditionalCutscene(this->dyna.actor.cutscene));
|
||||
CutsceneManager_GetAdditionalCsId(this->dyna.actor.csId));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -843,8 +843,8 @@ void func_80A9CE1C(BgHakuginPost* this, PlayState* play) {
|
||||
func_8019F128(NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
Flags_SetSwitch(play, D_80A9E028.unk_0000[i].unk_2E);
|
||||
this->unk_178 = 20;
|
||||
func_80A9D2C4(this, func_80A9CE00, D_80A9E028.unk_0000[i].unk_14.y + 50.0f,
|
||||
D_80A9E028.unk_0000[i].unk_2A, D_80A9E028.unk_0000[i].unk_2C);
|
||||
func_80A9D2C4(this, func_80A9CE00, D_80A9E028.unk_0000[i].unk_14.y + 50.0f, D_80A9E028.unk_0000[i].csId,
|
||||
D_80A9E028.unk_0000[i].additionalCsId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -884,12 +884,12 @@ void func_80A9D0B4(BgHakuginPost* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A9D1E0(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 arg3, s16 arg4) {
|
||||
void func_80A9D1E0(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 csLength, s16 csId) {
|
||||
this->unkFunc = unkFunc;
|
||||
this->unk_184 = arg4;
|
||||
this->unk_180 = ActorCutscene_GetLength(arg4);
|
||||
if (this->unk_180 < 0) {
|
||||
this->unk_180 = arg3;
|
||||
this->csId = csId;
|
||||
this->csLength = CutsceneManager_GetLength(csId);
|
||||
if (this->csLength < 0) {
|
||||
this->csLength = csLength;
|
||||
}
|
||||
this->dyna.actor.focus.pos.x = this->dyna.actor.home.pos.x;
|
||||
this->dyna.actor.focus.pos.y = this->unk_16C + arg2;
|
||||
@@ -898,22 +898,22 @@ void func_80A9D1E0(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16
|
||||
}
|
||||
|
||||
void func_80A9D260(BgHakuginPost* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->unk_184)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_184, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->dyna.actor);
|
||||
this->unkFunc(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->unk_184);
|
||||
CutsceneManager_Queue(this->csId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A9D2C4(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 arg3, s16 arg4) {
|
||||
void func_80A9D2C4(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16 csId, s16 additionalCsId) {
|
||||
this->unkFunc = unkFunc;
|
||||
this->unk_184 = arg3;
|
||||
this->unk_186 = arg4;
|
||||
this->unk_180 = -1;
|
||||
this->unk_180 = ActorCutscene_GetLength(arg3);
|
||||
if (this->unk_180 < 0) {
|
||||
this->unk_180 = 15;
|
||||
this->csId = csId;
|
||||
this->additionalCsId = additionalCsId;
|
||||
this->csLength = -1;
|
||||
this->csLength = CutsceneManager_GetLength(csId);
|
||||
if (this->csLength < 0) {
|
||||
this->csLength = 15;
|
||||
}
|
||||
this->dyna.actor.focus.pos.x = this->dyna.actor.home.pos.x;
|
||||
this->dyna.actor.focus.pos.y = this->unk_16C + arg2;
|
||||
@@ -922,32 +922,32 @@ void func_80A9D2C4(BgHakuginPost* this, BgHakuginPostFunc unkFunc, f32 arg2, s16
|
||||
}
|
||||
|
||||
void func_80A9D360(BgHakuginPost* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->unk_184)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_184, &this->dyna.actor);
|
||||
if (this->unk_186 >= 0) {
|
||||
if (CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->dyna.actor);
|
||||
if (this->additionalCsId >= 0) {
|
||||
func_80A9D3E4(this);
|
||||
} else {
|
||||
this->unkFunc(this);
|
||||
}
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->unk_184);
|
||||
CutsceneManager_Queue(this->csId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A9D3E4(BgHakuginPost* this) {
|
||||
this->unk_182 = ActorCutscene_GetLength(this->unk_186);
|
||||
if (this->unk_182 < 0) {
|
||||
this->unk_182 = 30;
|
||||
this->additionalCsLength = CutsceneManager_GetLength(this->additionalCsId);
|
||||
if (this->additionalCsLength < 0) {
|
||||
this->additionalCsLength = 30;
|
||||
}
|
||||
this->actionFunc = func_80A9D434;
|
||||
}
|
||||
|
||||
void func_80A9D434(BgHakuginPost* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->unk_186) != 0) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_186, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->additionalCsId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->additionalCsId, &this->dyna.actor);
|
||||
this->unkFunc(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->unk_186);
|
||||
CutsceneManager_Queue(this->additionalCsId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -956,17 +956,17 @@ void BgHakuginPost_Update(Actor* thisx, PlayState* play) {
|
||||
f32 temp;
|
||||
|
||||
func_80A9B46C(this, play);
|
||||
if ((this->unk_180 >= 0) && ((this->actionFunc != func_80A9D260) || (this->actionFunc != func_80A9D360))) {
|
||||
this->unk_180--;
|
||||
if (this->unk_180 < 0) {
|
||||
ActorCutscene_Stop(this->unk_184);
|
||||
if ((this->csLength >= 0) && ((this->actionFunc != func_80A9D260) || (this->actionFunc != func_80A9D360))) {
|
||||
this->csLength--;
|
||||
if (this->csLength < 0) {
|
||||
CutsceneManager_Stop(this->csId);
|
||||
}
|
||||
}
|
||||
|
||||
if ((this->unk_182 >= 0) && (this->actionFunc != func_80A9D434)) {
|
||||
this->unk_182--;
|
||||
if (this->unk_182 < 0) {
|
||||
ActorCutscene_Stop(this->unk_186);
|
||||
if ((this->additionalCsLength >= 0) && (this->actionFunc != func_80A9D434)) {
|
||||
this->additionalCsLength--;
|
||||
if (this->additionalCsLength < 0) {
|
||||
CutsceneManager_Stop(this->additionalCsId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ typedef struct {
|
||||
/* 0x20 */ f32 unk_20;
|
||||
/* 0x24 */ f32 unk_24;
|
||||
/* 0x28 */ s16 unk_28;
|
||||
/* 0x2A */ s16 unk_2A;
|
||||
/* 0x2C */ s16 unk_2C;
|
||||
/* 0x2A */ s16 csId;
|
||||
/* 0x2C */ s16 additionalCsId;
|
||||
/* 0x2E */ u8 unk_2E;
|
||||
/* 0x2F */ u8 unk_2F;
|
||||
/* 0x30 */ s8 unk_30;
|
||||
@@ -64,10 +64,10 @@ typedef struct BgHakuginPost {
|
||||
/* 0x178 */ s8 unk_178;
|
||||
/* 0x179 */ s8 unk_179;
|
||||
/* 0x17C */ BgHakuginPostFunc unkFunc;
|
||||
/* 0x180 */ s16 unk_180;
|
||||
/* 0x182 */ s16 unk_182;
|
||||
/* 0x184 */ s16 unk_184;
|
||||
/* 0x186 */ s16 unk_186;
|
||||
/* 0x180 */ s16 csLength;
|
||||
/* 0x182 */ s16 additionalCsLength;
|
||||
/* 0x184 */ s16 csId;
|
||||
/* 0x186 */ s16 additionalCsId;
|
||||
} BgHakuginPost; // size = 0x188
|
||||
|
||||
#endif // Z_BG_HAKUGIN_POST_H
|
||||
|
||||
@@ -143,12 +143,12 @@ void BgHakuginSwitch_Init(Actor* thisx, PlayState* play) {
|
||||
this->collider.dim.yShift = 0x1D;
|
||||
|
||||
this->unk_1A8 = object_goronswitch_DL_000268;
|
||||
this->unk_1B8 = this->dyna.actor.cutscene;
|
||||
this->csId = this->dyna.actor.csId;
|
||||
|
||||
if (sp34 == 0) {
|
||||
this->unk_1BA = -1;
|
||||
this->additionalCsId = CS_ID_NONE;
|
||||
} else {
|
||||
this->unk_1BA = ActorCutscene_GetAdditionalCutscene(this->unk_1B8);
|
||||
this->additionalCsId = CutsceneManager_GetAdditionalCsId(this->csId);
|
||||
}
|
||||
|
||||
if (sp30) {
|
||||
@@ -166,8 +166,8 @@ void BgHakuginSwitch_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain2);
|
||||
|
||||
this->unk_1A8 = D_80B1688C[sp34].unk_10;
|
||||
this->unk_1B8 = this->dyna.actor.cutscene;
|
||||
this->unk_1BA = ActorCutscene_GetAdditionalCutscene(this->unk_1B8);
|
||||
this->csId = this->dyna.actor.csId;
|
||||
this->additionalCsId = CutsceneManager_GetAdditionalCsId(this->csId);
|
||||
|
||||
if (sp30 == sp28) {
|
||||
func_80B15F3C(this, play);
|
||||
@@ -186,9 +186,9 @@ void BgHakuginSwitch_Destroy(Actor* thisx, PlayState* play) {
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
void func_80B15A4C(BgHakuginSwitch* this, BgHakuginSwitchUnkFunc func, s32 arg2) {
|
||||
void func_80B15A4C(BgHakuginSwitch* this, BgHakuginSwitchUnkFunc func, s32 csId) {
|
||||
this->unk_1B4 = func;
|
||||
this->unk_1BC = arg2;
|
||||
this->curCsId = csId;
|
||||
this->actionFunc = func_80B15A68;
|
||||
}
|
||||
|
||||
@@ -197,14 +197,14 @@ void func_80B15A68(BgHakuginSwitch* this, PlayState* play) {
|
||||
BgHakuginSwitchStruct* s = &D_80B1688C[BGHAKUGINSWITCH_GET_7(&this->dyna.actor)];
|
||||
s32 sp18 = !(s->unk_14 & 0x40);
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->unk_1BC)) {
|
||||
if (CutsceneManager_IsNext(this->curCsId)) {
|
||||
if (sp18) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_1BC, &this->dyna.actor);
|
||||
CutsceneManager_StartWithPlayerCs(this->curCsId, &this->dyna.actor);
|
||||
this->unk_1BF = 40;
|
||||
}
|
||||
this->unk_1B4(this, play);
|
||||
} else if (sp18) {
|
||||
ActorCutscene_SetIntentToPlay(this->unk_1BC);
|
||||
CutsceneManager_Queue(this->curCsId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ void func_80B15B74(BgHakuginSwitch* this, PlayState* play) {
|
||||
D_80B16AF0 = play->gameplayFrames;
|
||||
|
||||
if (sp38->unk_14 & 0x10) {
|
||||
func_80B15A4C(this, func_80B15E0C, this->unk_1B8);
|
||||
func_80B15A4C(this, func_80B15E0C, this->csId);
|
||||
} else {
|
||||
func_80B15E0C(this, play);
|
||||
}
|
||||
@@ -343,7 +343,7 @@ void func_80B15F88(BgHakuginSwitch* this, PlayState* play) {
|
||||
if (phi_a0 != phi_v1) {
|
||||
if ((sp18->unk_14 & 0xFF) & 0x20) {
|
||||
if (D_80B16AF0 < play->gameplayFrames) {
|
||||
func_80B15A4C(this, func_80B1606C, this->unk_1BA);
|
||||
func_80B15A4C(this, func_80B1606C, this->additionalCsId);
|
||||
}
|
||||
} else {
|
||||
func_80B1606C(this, play);
|
||||
@@ -372,16 +372,16 @@ void func_80B160DC(BgHakuginSwitch* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_80B16180(BgHakuginSwitch* this, BgHakuginSwitchUnkFunc func, s32 arg2, s32 arg3) {
|
||||
void func_80B16180(BgHakuginSwitch* this, BgHakuginSwitchUnkFunc func, s32 arg2, s32 csId) {
|
||||
this->unk_1B4 = func;
|
||||
this->unk_1BE = arg2;
|
||||
this->unk_1BC = arg3;
|
||||
this->curCsId = csId;
|
||||
this->actionFunc = func_80B161A0;
|
||||
}
|
||||
|
||||
void func_80B161A0(BgHakuginSwitch* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->unk_1BC)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->unk_1BC, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->curCsId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->curCsId, &this->dyna.actor);
|
||||
if (this->unk_1BE != 0) {
|
||||
Flags_SetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor));
|
||||
} else {
|
||||
@@ -390,7 +390,7 @@ void func_80B161A0(BgHakuginSwitch* this, PlayState* play) {
|
||||
this->unk_1BF = 50;
|
||||
this->unk_1B4(this, play);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->unk_1BC);
|
||||
CutsceneManager_Queue(this->curCsId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ void func_80B162AC(BgHakuginSwitch* this, PlayState* play) {
|
||||
|
||||
if (sp24) {
|
||||
if (sp28) {
|
||||
func_80B16180(this, func_80B163C4, 1, this->unk_1B8);
|
||||
func_80B16180(this, func_80B163C4, 1, this->csId);
|
||||
} else {
|
||||
func_80B163C4(this, play);
|
||||
}
|
||||
@@ -466,7 +466,7 @@ void func_80B16494(BgHakuginSwitch* this, PlayState* play) {
|
||||
void func_80B16520(BgHakuginSwitch* this, PlayState* play) {
|
||||
if (!Flags_GetSwitch(play, BGHAKUGINSWITCH_GET_SWITCHFLAG(&this->dyna.actor))) {
|
||||
if (BGHAKUGINSWITCH_GET_7(&this->dyna.actor) == BGHAKUGINSWITCH_GET_7_1) {
|
||||
func_80B16180(this, func_80B165A0, 0, this->unk_1BA);
|
||||
func_80B16180(this, func_80B165A0, 0, this->additionalCsId);
|
||||
} else {
|
||||
func_80B165A0(this, play);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ void BgHakuginSwitch_Update(Actor* thisx, PlayState* play) {
|
||||
if ((this->actionFunc != func_80B15A68) && (this->actionFunc != func_80B161A0)) {
|
||||
this->unk_1BF--;
|
||||
if (this->unk_1BF == 0) {
|
||||
ActorCutscene_Stop(this->unk_1BC);
|
||||
CutsceneManager_Stop(this->curCsId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ typedef struct BgHakuginSwitch {
|
||||
/* 0x1B0 */ s16 unk_1B0;
|
||||
/* 0x1B2 */ s8 unk_1B2;
|
||||
/* 0x1B4 */ BgHakuginSwitchUnkFunc unk_1B4;
|
||||
/* 0x1B8 */ s16 unk_1B8;
|
||||
/* 0x1BA */ s16 unk_1BA;
|
||||
/* 0x1BC */ s16 unk_1BC;
|
||||
/* 0x1B8 */ s16 csId;
|
||||
/* 0x1BA */ s16 additionalCsId;
|
||||
/* 0x1BC */ s16 curCsId;
|
||||
/* 0x1BE */ s8 unk_1BE;
|
||||
/* 0x1BF */ s8 unk_1BF;
|
||||
/* 0x1C0 */ s8 unk_1C0;
|
||||
|
||||
@@ -358,13 +358,13 @@ void BgIkanaBlock_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->unk_17E != 0) {
|
||||
if (this->unk_17F > 0) {
|
||||
this->unk_17F--;
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->unk_17E = 0;
|
||||
} else if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
} else if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->unk_17F = 30;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@ void func_80BD4F9C(BgIkanaBombwall* this, PlayState* play) {
|
||||
|
||||
void func_80BD4FF8(BgIkanaBombwall* this) {
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_10;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->actionFunc = func_80BD503C;
|
||||
}
|
||||
|
||||
void func_80BD503C(BgIkanaBombwall* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
if (!BGIKANABOMBWALL_GET_100(&this->dyna.actor)) {
|
||||
func_80BD4720(this, play);
|
||||
} else {
|
||||
@@ -339,7 +339,7 @@ void func_80BD503C(BgIkanaBombwall* this, PlayState* play) {
|
||||
}
|
||||
func_80BD5118(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,11 +352,11 @@ void func_80BD5134(BgIkanaBombwall* this, PlayState* play) {
|
||||
if (!BGIKANABOMBWALL_GET_100(&this->dyna.actor)) {
|
||||
this->unk_1AC--;
|
||||
if (this->unk_1AC <= 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
} else if (this->dyna.actor.cutscene >= 0) {
|
||||
if (ActorCutscene_GetCurrentIndex() != this->dyna.actor.cutscene) {
|
||||
} else if (this->dyna.actor.csId >= 0) {
|
||||
if (CutsceneManager_GetCurrentCsId() != this->dyna.actor.csId) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -115,7 +115,7 @@ void BgIkanaDharma_Init(Actor* thisx, PlayState* play2) {
|
||||
Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_BG_IKANA_DHARMA, this->dyna.actor.world.pos.x,
|
||||
segmentY, this->dyna.actor.world.pos.z, this->dyna.actor.shape.rot.x,
|
||||
this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z,
|
||||
BGIKANADHARMA_PARAMS(0, true, 0), this->dyna.actor.cutscene,
|
||||
BGIKANADHARMA_PARAMS(0, true, 0), this->dyna.actor.csId,
|
||||
this->dyna.actor.halfDaysBits, NULL);
|
||||
}
|
||||
|
||||
@@ -173,16 +173,16 @@ void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgIkanaDharma_SetupStartCutscene(BgIkanaDharma* this) {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->actionFunc = BgIkanaDharma_StartCutscene;
|
||||
}
|
||||
|
||||
void BgIkanaDharma_StartCutscene(BgIkanaDharma* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
BgIkanaDharma_SetupWaitForCutsceneToEnd(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ void BgIkanaDharma_WaitForCutsceneToEnd(BgIkanaDharma* this, PlayState* play) {
|
||||
sFirstHitBgIkanaDharma = NULL;
|
||||
}
|
||||
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ void func_80B80440(BgIkanaRotaryroom* this, PlayState* play) {
|
||||
this->unk_204.unk_00 = Actor_SpawnAsChildAndCutscene(
|
||||
&play->actorCtx, play, ACTOR_BG_IKANA_BLOCK, sp50.x, sp50.y, sp50.z, this->dyna.actor.shape.rot.x,
|
||||
this->dyna.actor.shape.rot.y, this->dyna.actor.shape.rot.z, -1,
|
||||
ActorCutscene_GetAdditionalCutscene(this->dyna.actor.cutscene), this->dyna.actor.halfDaysBits, NULL);
|
||||
CutsceneManager_GetAdditionalCsId(this->dyna.actor.csId), this->dyna.actor.halfDaysBits, NULL);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ void func_80B81010(BgIkanaRotaryroom* this, PlayState* play) {
|
||||
CollisionPoly* sp7C;
|
||||
s32 sp78;
|
||||
|
||||
if (ActorCutscene_GetCurrentIndex() == this->dyna.actor.cutscene) {
|
||||
if (CutsceneManager_GetCurrentCsId() == this->dyna.actor.csId) {
|
||||
phi_s7 = true;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_3E0); i++) {
|
||||
@@ -582,7 +582,7 @@ void func_80B81234(BgIkanaRotaryroom* this, PlayState* play) {
|
||||
CollisionPoly* sp40;
|
||||
s32 sp3C;
|
||||
|
||||
if (ActorCutscene_GetCurrentIndex() == this->dyna.actor.cutscene) {
|
||||
if (CutsceneManager_GetCurrentCsId() == this->dyna.actor.csId) {
|
||||
if (player == NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -646,7 +646,7 @@ void func_80B81234(BgIkanaRotaryroom* this, PlayState* play) {
|
||||
void func_80B814B8(BgIkanaRotaryroom* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (ActorCutscene_GetCurrentIndex() == this->dyna.actor.cutscene) {
|
||||
if (CutsceneManager_GetCurrentCsId() == this->dyna.actor.csId) {
|
||||
if (player->actor.bgCheckFlags & BGCHECKFLAG_CRUSHED) {
|
||||
Player_PlaySfx(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->voiceSfxIdOffset);
|
||||
func_80169EFC(&play->state);
|
||||
@@ -791,14 +791,14 @@ void func_80B819DC(BgIkanaRotaryroom* this) {
|
||||
void func_80B819F0(Actor* thisx, PlayState* play) {
|
||||
BgIkanaRotaryroom* this = THIS;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (this->dyna.actor.cutscene >= 0) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
if (this->dyna.actor.csId >= 0) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
|
||||
}
|
||||
func_80B81A64(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -926,7 +926,7 @@ void func_80B81DC8(Actor* thisx, PlayState* play) {
|
||||
this->unk_584--;
|
||||
|
||||
if (this->unk_584 <= 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
func_80B818B4(this);
|
||||
} else if (this->unk_584 == 19) {
|
||||
s16 quakeIndex = Quake_Add(GET_ACTIVE_CAM(play), QUAKE_TYPE_3);
|
||||
|
||||
@@ -106,12 +106,12 @@ void func_80BD5878(BgIkanaShutter* this) {
|
||||
}
|
||||
|
||||
void func_80BD5894(BgIkanaShutter* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
func_80BD58F0(this);
|
||||
return;
|
||||
}
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
|
||||
void func_80BD58F0(BgIkanaShutter* this) {
|
||||
@@ -177,13 +177,13 @@ void func_80BD5B44(BgIkanaShutter* this) {
|
||||
}
|
||||
|
||||
void func_80BD5B60(BgIkanaShutter* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
Flags_SetClear(play, this->dyna.actor.room);
|
||||
func_80BD5BC4(this);
|
||||
return;
|
||||
}
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
|
||||
void func_80BD5BC4(BgIkanaShutter* this) {
|
||||
|
||||
@@ -179,11 +179,11 @@ void func_80C0ACD4(BgIkninSusceil* this) {
|
||||
}
|
||||
|
||||
void func_80C0ACE8(BgIkninSusceil* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
func_80C0AD44(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ void func_80C0AD64(BgIkninSusceil* this, PlayState* play) {
|
||||
if (Math_SmoothStepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 365.0f, 0.5f,
|
||||
this->dyna.actor.velocity.y, 1.0f) < 0.1f) {
|
||||
func_80C0A86C(this, play, 1, 14, 3);
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
func_80C0AB14(this);
|
||||
} else {
|
||||
func_800B9010(&this->dyna.actor, NA_SE_EV_ICE_PILLAR_RISING - SFX_FLAG);
|
||||
|
||||
@@ -80,16 +80,16 @@ void func_80C07220(BgIkninside* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C07230(BgIkninside* this, PlayState* play) {
|
||||
if (this->dyna.actor.cutscene == -1) {
|
||||
if (this->dyna.actor.csId == CS_ID_NONE) {
|
||||
this->actionFunc = func_80C07220;
|
||||
} else if (ActorCutscene_GetCurrentIndex() == 0x7C) {
|
||||
ActorCutscene_Stop(0x7C);
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
} else if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
} else if (CutsceneManager_GetCurrentCsId() == CS_ID_GLOBAL_TALK) {
|
||||
CutsceneManager_Stop(CS_ID_GLOBAL_TALK);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
} else if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->actionFunc = func_80C07220;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) {
|
||||
switch (BGIKNVDOUKUTU_GET_F(&this->dyna.actor)) {
|
||||
case BGIKNVDOUKUTU_F_0:
|
||||
this->actionFunc = func_80BD71BC;
|
||||
this->csAction = 0x204;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_516;
|
||||
this->unk_160 = 1.0f;
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04) || CHECK_WEEKEVENTREG(WEEKEVENTREG_52_20)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_14_04) || CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE)) {
|
||||
this->dyna.actor.draw = func_80BD7768;
|
||||
this->actionFunc = func_80BD73D0;
|
||||
play->envCtx.lightSettingOverride = 25;
|
||||
@@ -65,7 +65,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) {
|
||||
case BGIKNVDOUKUTU_F_1:
|
||||
Actor_SetScale(&this->dyna.actor, 1.0f);
|
||||
this->dyna.actor.draw = func_80BD7820;
|
||||
this->csAction = 0x204;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_516;
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&object_iknv_obj_Colheader_012788, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
@@ -75,7 +75,7 @@ void BgIknvDoukutu_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
|
||||
case BGIKNVDOUKUTU_F_2:
|
||||
this->csAction = 0x204;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_516;
|
||||
this->dyna.actor.draw = func_80BD78C4;
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
CollisionHeader_GetVirtual(&object_iknv_obj_Colheader_0117C8, &colHeader);
|
||||
@@ -116,8 +116,8 @@ void func_80BD716C(BgIknvDoukutu* this, PlayState* play) {
|
||||
|
||||
void func_80BD71BC(BgIknvDoukutu* this, PlayState* play) {
|
||||
play->envCtx.lightSettingOverride = 24;
|
||||
if (Cutscene_CheckActorAction(play, this->csAction) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->csAction)]->action == 2)) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id == 2)) {
|
||||
this->actionFunc = func_80BD716C;
|
||||
this->dyna.actor.draw = func_80BD7538;
|
||||
}
|
||||
@@ -135,8 +135,8 @@ void func_80BD7250(BgIknvDoukutu* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BD72BC(BgIknvDoukutu* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, this->csAction) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->csAction)]->action == 3)) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id == 3)) {
|
||||
this->actionFunc = func_80BD7250;
|
||||
}
|
||||
|
||||
@@ -146,8 +146,8 @@ void func_80BD72BC(BgIknvDoukutu* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BD7360(BgIknvDoukutu* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, this->csAction) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->csAction)]->action == 2)) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id == 2)) {
|
||||
this->actionFunc = func_80BD72BC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ enum {
|
||||
typedef struct BgIknvDoukutu {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ s16 unk_15C; // set and not used
|
||||
/* 0x15E */ u16 csAction;
|
||||
/* 0x15E */ u16 cueType;
|
||||
/* 0x160 */ f32 unk_160;
|
||||
/* 0x164 */ BgIknvDoukutuActionFunc actionFunc;
|
||||
} BgIknvDoukutu;// size = 0x168
|
||||
|
||||
@@ -107,20 +107,20 @@ void BgIknvObj_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
s32 func_80BD7CEC(BgIknvObj* this) {
|
||||
if (this->dyna.actor.cutscene == -1) {
|
||||
if (this->dyna.actor.csId == CS_ID_NONE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ActorCutscene_GetCurrentIndex() == this->dyna.actor.cutscene) {
|
||||
if (CutsceneManager_GetCurrentCsId() == this->dyna.actor.csId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
return true;
|
||||
}
|
||||
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ 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.currentCsIndex == 4) &&
|
||||
(play->csCtx.frames == 1495)) {
|
||||
if ((play->csCtx.state != 0) && (gSaveContext.sceneLayer == 1) && (play->csCtx.scriptIndex == 4) &&
|
||||
(play->csCtx.curFrame == 1495)) {
|
||||
func_8019F128(NA_SE_EV_DOOR_UNLOCK);
|
||||
}
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void func_80BD7F4C(BgIknvObj* this, PlayState* play) {
|
||||
this->actionFunc = func_80BD7ED8;
|
||||
}
|
||||
if ((this->dyna.actor.home.rot.x == 1) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_58_80)) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->dyna.actor.home.rot.x = 0;
|
||||
}
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
||||
@@ -126,7 +126,7 @@ s32 func_80953DA8(BgIngate* this, PlayState* play) {
|
||||
Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN);
|
||||
|
||||
if (CHECK_EVENTINF(EVENTINF_35)) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
|
||||
} else {
|
||||
SET_EVENTINF(EVENTINF_41);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void func_80953F14(BgIngate* this, PlayState* play) {
|
||||
if (this->timePath != NULL) {
|
||||
func_80953B40(this);
|
||||
}
|
||||
this->unk16E = -1;
|
||||
this->csId = CS_ID_NONE;
|
||||
this->actionFunc = func_80953F9C;
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
|
||||
|
||||
if (this->timePath->unk1 != 0xFF) {
|
||||
func_80953E38(play);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
|
||||
this->dyna.actor.textId = 0x9E4;
|
||||
Message_StartTextbox(play, this->dyna.actor.textId, NULL);
|
||||
this->unk16C += 1;
|
||||
@@ -206,13 +206,13 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
|
||||
}
|
||||
this->actionFunc = func_809542A0;
|
||||
}
|
||||
} else if ((ActorCutscene_GetCurrentIndex() == -1) && (this->timePath != NULL)) {
|
||||
} else if ((CutsceneManager_GetCurrentCsId() == CS_ID_NONE) && (this->timePath != NULL)) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_CRUISER - SFX_FLAG);
|
||||
func_80953BEC(this);
|
||||
}
|
||||
}
|
||||
if (ActorCutscene_GetCurrentIndex() != this->unk16E) {
|
||||
if (ActorCutscene_GetCurrentIndex() != -1) {
|
||||
if (CutsceneManager_GetCurrentCsId() != this->csId) {
|
||||
if (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
play->actorCtx.flags &= ~ACTORCTX_FLAG_PICTO_BOX_ON;
|
||||
@@ -221,7 +221,7 @@ void func_80953F9C(BgIngate* this, PlayState* play) {
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
}
|
||||
}
|
||||
this->unk16E = ActorCutscene_GetCurrentIndex();
|
||||
this->csId = CutsceneManager_GetCurrentCsId();
|
||||
}
|
||||
|
||||
void func_809541B8(BgIngate* this, PlayState* play) {
|
||||
@@ -231,7 +231,7 @@ void func_809541B8(BgIngate* this, PlayState* play) {
|
||||
if ((player->transformation == PLAYER_FORM_HUMAN) && (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
(this->dyna.actor.xzDistToPlayer < 40.0f)) {
|
||||
if (this->dyna.actor.playerHeightRel > 15.0f) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_7);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_WAIT);
|
||||
this->dyna.actor.textId = 0x9E6;
|
||||
Message_StartTextbox(play, this->dyna.actor.textId, NULL);
|
||||
this->actionFunc = func_809543D4;
|
||||
@@ -261,7 +261,7 @@ void func_809542A0(BgIngate* this, PlayState* play) {
|
||||
void func_80954340(BgIngate* this, PlayState* play) {
|
||||
if (!DECR(this->unk16A)) {
|
||||
if (this->timePath != NULL) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
|
||||
this->timePath = &play->setupPathList[this->timePath->unk1];
|
||||
func_80953F14(this, play);
|
||||
Environment_StopTime();
|
||||
@@ -280,7 +280,7 @@ void func_809543D4(BgIngate* this, PlayState* play) {
|
||||
break;
|
||||
case 0x9E5:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
|
||||
this->unk160 &= ~0x4;
|
||||
this->actionFunc = func_809541B8;
|
||||
Environment_StartTime();
|
||||
@@ -301,7 +301,7 @@ void func_809543D4(BgIngate* this, PlayState* play) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
|
||||
func_8019F208();
|
||||
} else {
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_6);
|
||||
func_800B7298(play, &this->dyna.actor, PLAYER_CSMODE_END);
|
||||
this->unk160 &= ~0x4;
|
||||
this->actionFunc = func_809541B8;
|
||||
Environment_StartTime();
|
||||
@@ -330,7 +330,7 @@ void BgIngate_Init(Actor* thisx, PlayState* play2) {
|
||||
Actor_SetScale(&this->dyna.actor, 1.0f);
|
||||
this->timePath = SubS_GetAdditionalPath(play, BGINGATE_GET_FF(&this->dyna.actor), 0);
|
||||
this->dyna.actor.room = -1;
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_40);
|
||||
}
|
||||
if (!CHECK_EVENTINF(EVENTINF_35) && CHECK_WEEKEVENTREG(WEEKEVENTREG_90_40)) {
|
||||
|
||||
@@ -17,7 +17,7 @@ typedef struct BgIngate {
|
||||
/* 0x168 */ s16 timePathTimeSpeed;
|
||||
/* 0x16A */ s16 unk16A;
|
||||
/* 0x16C */ s16 unk16C;
|
||||
/* 0x16E */ s16 unk16E;
|
||||
/* 0x16E */ s16 csId;
|
||||
/* 0x170 */ Vec3f timePathTargetPos;
|
||||
/* 0x17C */ f32 timePathProgress;
|
||||
/* 0x180 */ s32 timePathTotalTime;
|
||||
|
||||
@@ -171,7 +171,7 @@ void BgKin2Bombwall_SetupWait(BgKin2Bombwall* this) {
|
||||
void BgKin2Bombwall_Wait(BgKin2Bombwall* this, PlayState* play) {
|
||||
if (BgKin2Bombwall_IsHitFromNearby(this, play)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
BgKin2Bombwall_SetupPlayCutscene(this);
|
||||
} else {
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
@@ -183,8 +183,8 @@ void BgKin2Bombwall_SetupPlayCutscene(BgKin2Bombwall* this) {
|
||||
}
|
||||
|
||||
void BgKin2Bombwall_PlayCutscene(BgKin2Bombwall* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
Flags_SetSwitch(play, BG_KIN2_BOMBWALL_SWITCH_FLAG(&this->dyna.actor));
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 60, NA_SE_EV_WALL_BROKEN);
|
||||
DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
@@ -193,7 +193,7 @@ void BgKin2Bombwall_PlayCutscene(BgKin2Bombwall* this, PlayState* play) {
|
||||
BgKin2Bombwall_SetupEndCutscene(this);
|
||||
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ void BgKin2Bombwall_SetupEndCutscene(BgKin2Bombwall* this) {
|
||||
void BgKin2Bombwall_EndCutscene(BgKin2Bombwall* this, PlayState* play) {
|
||||
this->timer--;
|
||||
if (this->timer <= 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,13 +217,13 @@ void BgKin2Fence_SetupPlayOpenCutscene(BgKin2Fence* this) {
|
||||
}
|
||||
|
||||
void BgKin2Fence_PlayOpenCutscene(BgKin2Fence* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
Flags_SetSwitch(play, this->dyna.actor.params & 0x7F);
|
||||
BgKin2Fence_SetupWaitBeforeOpen(this);
|
||||
return;
|
||||
}
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
|
||||
void BgKin2Fence_SetupWaitBeforeOpen(BgKin2Fence* this) {
|
||||
|
||||
@@ -202,7 +202,7 @@ void BgKin2Picture_Wait(BgKin2Picture* this, PlayState* play) {
|
||||
// hit by projectile
|
||||
if (this->colliderTris.base.acFlags & AC_HIT) {
|
||||
this->colliderTris.base.acFlags &= ~AC_HIT;
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
BgKin2Picture_SetupPlayCutscene(this);
|
||||
} else { // Gold Skulltula can be heard behind Skullkid's painting.
|
||||
if (this->skulltulaNoiseTimer >= 0) {
|
||||
@@ -227,12 +227,12 @@ void BgKin2Picture_SetupPlayCutscene(BgKin2Picture* this) {
|
||||
}
|
||||
|
||||
void BgKin2Picture_PlayCutscene(BgKin2Picture* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->cutsceneStarted = true;
|
||||
BgKin2Picture_SetupShiver(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ void BgKin2Picture_Fall(BgKin2Picture* this, PlayState* play) {
|
||||
this->dyna.actor.shape.yOffset = 40.0f;
|
||||
|
||||
if (this->cutsceneStarted) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
}
|
||||
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
@@ -90,20 +90,20 @@ void BgLadder_Destroy(Actor* thisx, PlayState* play) {
|
||||
void BgLadder_Wait(BgLadder* this, PlayState* play) {
|
||||
// Wait for the flag to be set, then trigger the cutscene
|
||||
if (Flags_GetSwitch(play, this->switchFlag)) {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->action = BgLadder_StartCutscene;
|
||||
}
|
||||
}
|
||||
|
||||
void BgLadder_StartCutscene(BgLadder* this, PlayState* play) {
|
||||
// Trigger the cutscene, then make the ladder fade in
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
this->dyna.actor.draw = BgLadder_Draw;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SECRET_LADDER_APPEAR);
|
||||
this->action = BgLadder_FadeIn;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ void BgLadder_FadeIn(BgLadder* this, PlayState* play) {
|
||||
this->alpha += 5;
|
||||
if (this->alpha >= 255) {
|
||||
this->alpha = 255;
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->dyna.actor.flags &= ~ACTOR_FLAG_10; // always update = off
|
||||
this->action = BgLadder_DoNothing;
|
||||
|
||||
@@ -164,7 +164,7 @@ void BgLastBwall_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
BgLastBwall_InitCollider(&sTrisInit, &this->dyna.actor.world.pos, &this->dyna.actor.shape.rot, &this->colliderTris,
|
||||
D_80C18AC0[this->type]);
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->cutscenes, ARRAY_COUNT(this->cutscenes));
|
||||
SubS_FillCutscenesList(&this->dyna.actor, this->csIdList, ARRAY_COUNT(this->csIdList));
|
||||
func_80C187E4(this);
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ void func_80C1886C(BgLastBwall* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C18884(BgLastBwall* this, PlayState* play) {
|
||||
if (SubS_StartActorCutscene(&this->dyna.actor, this->cutscenes[0], -1, SUBS_CUTSCENE_SET_UNK_LINK_FIELDS)) {
|
||||
if (SubS_StartCutscene(&this->dyna.actor, this->csIdList[0], CS_ID_NONE, SUBS_CUTSCENE_WITH_PLAYER)) {
|
||||
func_80C188C4(this, play);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef struct BgLastBwall {
|
||||
/* 0x160 */ ColliderTris colliderTris;
|
||||
/* 0x180 */ ColliderTrisElement colliderTrisElement[2];
|
||||
/* 0x238 */ u8 type;
|
||||
/* 0x23A */ s16 cutscenes[1];
|
||||
/* 0x23A */ s16 csIdList[1];
|
||||
} BgLastBwall; // size = 0x23C
|
||||
|
||||
#endif // Z_BG_LAST_BWALL_H
|
||||
|
||||
@@ -217,13 +217,13 @@ void BgNumaHana_SetupClosedIdle(BgNumaHana* this) {
|
||||
void BgNumaHana_ClosedIdle(BgNumaHana* this, PlayState* play) {
|
||||
if (this->fire.state != FIRE_STATE_NOT_LIT) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_FLAME_IGNITION);
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_12_01);
|
||||
Flags_SetSwitch(play, BG_NUMA_HANA_SWITCH_FLAG(&this->dyna.actor));
|
||||
BgNumaHana_SetupUnfoldInnerPetals(this);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,7 +327,7 @@ void BgNumaHana_RaiseFlower(BgNumaHana* this, PlayState* play) {
|
||||
this->flowerRotationalVelocity = 0x147;
|
||||
this->settleScale = 0.0f;
|
||||
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
BgNumaHana_SetupOpenedIdle(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -166,18 +166,18 @@ void func_80ACAEF0(BgOpenShutter* this, PlayState* play) {
|
||||
void BgOpenShutter_Update(Actor* thisx, PlayState* play2) {
|
||||
BgOpenShutter* this = THIS;
|
||||
PlayState* play = play2;
|
||||
s32 index;
|
||||
s32 cueChannel;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x7C)) {
|
||||
index = Cutscene_GetActorActionIndex(play, 0x7C);
|
||||
if (play->csCtx.actorActions[index]->action == BGOPENSHUTTER_DOOR_OPEN) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_124)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_124);
|
||||
if (play->csCtx.actorCues[cueChannel]->id == BGOPENSHUTTER_DOOR_OPEN) {
|
||||
if (this->actionFunc == func_80ACAD88) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
this->actionFunc = func_80ACAE5C;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
}
|
||||
this->unk_164 = 0;
|
||||
} else if (play->csCtx.actorActions[index]->action == BGOPENSHUTTER_DOOR_CLOSED) {
|
||||
} else if (play->csCtx.actorCues[cueChannel]->id == BGOPENSHUTTER_DOOR_CLOSED) {
|
||||
if (this->actionFunc == func_80ACAE5C) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
this->actionFunc = func_80ACAEF0;
|
||||
|
||||
@@ -47,13 +47,13 @@ void BgOpenSpot_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
void BgOpenSpot_Update(Actor* thisx, PlayState* play) {
|
||||
BgOpenSpot* this = THIS;
|
||||
u32 action;
|
||||
u32 cueId;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x7D)) {
|
||||
action = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 0x7D)]->action;
|
||||
if (action == 1) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_125)) {
|
||||
cueId = play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_125)]->id;
|
||||
if (cueId == 1) {
|
||||
this->actor.draw = NULL;
|
||||
} else if (action == 2) {
|
||||
} else if (cueId == 2) {
|
||||
this->actor.draw = BgOpenSpot_Draw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) {
|
||||
Vec3f pos;
|
||||
s32 pad2;
|
||||
s32 shouldSpawnSeahorse;
|
||||
s32 cs;
|
||||
s32 csId;
|
||||
s32 i;
|
||||
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
@@ -54,11 +54,11 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) {
|
||||
Math_Vec3f_Copy(&pos, &this->dyna.actor.world.pos);
|
||||
pos.x += Math_SinS(this->dyna.actor.world.rot.y + 0x8000) * 3000.0f;
|
||||
pos.z += Math_CosS(this->dyna.actor.world.rot.y + 0x8000) * 3000.0f;
|
||||
cs = this->dyna.actor.cutscene;
|
||||
csId = this->dyna.actor.csId;
|
||||
i = 0;
|
||||
|
||||
// clang-format off
|
||||
while (cs != -1) { this->cutscenes[i] = cs; cs = ActorCutscene_GetAdditionalCutscene(cs); i++; }
|
||||
while (csId != CS_ID_NONE) { this->csIdList[i] = csId; csId = CutsceneManager_GetAdditionalCsId(csId); i++; }
|
||||
// clang-format on
|
||||
|
||||
this->dyna.actor.scale.x = 0.1f;
|
||||
@@ -74,9 +74,9 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) {
|
||||
if (this->deepPython != NULL) {
|
||||
EnDragon* dragon = (EnDragon*)this->deepPython;
|
||||
|
||||
dragon->grabCutsceneIndex = this->cutscenes[0];
|
||||
dragon->deathCutsceneIndex = this->cutscenes[1];
|
||||
dragon->actor.cutscene = this->dyna.actor.cutscene;
|
||||
dragon->grabCsId = this->csIdList[0];
|
||||
dragon->deathCsId = this->csIdList[1];
|
||||
dragon->actor.csId = this->dyna.actor.csId;
|
||||
Math_Vec3f_Copy(&dragon->burrowEntrancePos, &this->dyna.actor.world.pos);
|
||||
dragon->pythonIndex = this->pythonIndex;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ void BgSinkaiKabe_Init(Actor* thisx, PlayState* play) {
|
||||
pos.z += (Math_CosS(this->dyna.actor.world.rot.y + 0x8000) * 500.0f);
|
||||
if (shouldSpawnSeahorse) {
|
||||
Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_EN_OT, pos.x, pos.y, pos.z, 0,
|
||||
this->dyna.actor.shape.rot.y, 0, 0x4000, this->dyna.actor.cutscene,
|
||||
this->dyna.actor.shape.rot.y, 0, 0x4000, this->dyna.actor.csId,
|
||||
this->dyna.actor.halfDaysBits, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ typedef struct BgSinkaiKabe {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ BgSinkaiKabeActionFunc actionFunc;
|
||||
/* 0x160 */ Actor* deepPython;
|
||||
/* 0x164 */ s16 cutscenes[2];
|
||||
/* 0x164 */ s16 csIdList[2];
|
||||
/* 0x168 */ UNK_TYPE1 unk_168[0x4];
|
||||
/* 0x16C */ s32 pythonIndex;
|
||||
} BgSinkaiKabe; // size = 0x170
|
||||
|
||||
@@ -229,7 +229,7 @@ void func_809CE234(BgSpdweb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->unk_162 == 0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
@@ -369,8 +369,8 @@ void func_809CE830(BgSpdweb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->unk_162 == 0) {
|
||||
if (ActorCutscene_GetLength(this->dyna.actor.cutscene) == -1) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
if (CutsceneManager_GetLength(this->dyna.actor.csId) == -1) {
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
}
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
@@ -470,16 +470,16 @@ void func_809CEBC0(BgSpdweb* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809CEE74(BgSpdweb* this) {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
this->actionFunc = func_809CEEAC;
|
||||
}
|
||||
|
||||
void func_809CEEAC(BgSpdweb* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
func_809CE1D0(this, play);
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,24 +47,24 @@ void func_80919F30(BgUmajump* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void BgUmajump_StopCutscene(BgUmajump* this, PlayState* play) {
|
||||
if ((play->csCtx.frames >= 6) && !this->hasSoundPlayed) {
|
||||
if ((play->csCtx.curFrame >= 6) && !this->hasSoundPlayed) {
|
||||
this->hasSoundPlayed = true;
|
||||
play_sound(NA_SE_EV_KID_HORSE_NEIGH);
|
||||
}
|
||||
|
||||
if (play->csCtx.state == CS_STATE_0) {
|
||||
ActorCutscene_Stop(this->dyna.actor.cutscene);
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
CutsceneManager_Stop(this->dyna.actor.csId);
|
||||
this->dyna.actor.update = Actor_Noop;
|
||||
}
|
||||
}
|
||||
|
||||
void BgUmajump_PlayCutscene(BgUmajump* this, PlayState* play) {
|
||||
if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) {
|
||||
ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(this->dyna.actor.csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->dyna.actor.csId, &this->dyna.actor);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_89_20);
|
||||
this->actionFunc = BgUmajump_StopCutscene;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene);
|
||||
CutsceneManager_Queue(this->dyna.actor.csId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ void BgUmajump_Init(Actor* thisx, PlayState* play) {
|
||||
if ((thisx->params == BG_UMAJUMP_TYPE_2)) {
|
||||
if ((((play->sceneId == SCENE_F01) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_89_20)) &&
|
||||
!CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) &&
|
||||
(thisx->cutscene != -1)) {
|
||||
(thisx->csId != CS_ID_NONE)) {
|
||||
this->actionFunc = BgUmajump_CheckDistance;
|
||||
thisx->update = func_8091A5A0;
|
||||
thisx->flags |= ACTOR_FLAG_10;
|
||||
|
||||
@@ -550,7 +550,7 @@ void Boss02_Init(Actor* thisx, PlayState* play) {
|
||||
s32 i;
|
||||
s32 pad[2];
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_52_20) && (this->actor.params == TWINMOLD_RED)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE) && (this->actor.params == TWINMOLD_RED)) {
|
||||
sBlueWarp = (DoorWarp1*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 60.0f,
|
||||
0.0f, 0, 0, 0, 1);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 0.0f, 30.0f, -150.0f, 0, 1, 0, 0);
|
||||
@@ -1631,7 +1631,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
|
||||
switch (this->unk_1D18) {
|
||||
case 0:
|
||||
if (player->stateFlags1 & PLAYER_STATE1_100) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
@@ -1751,7 +1751,7 @@ void func_809DD934(Boss02* this, PlayState* play) {
|
||||
this->unk_1D18 = 0;
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_100;
|
||||
this->unk_1D70 = 0.01f;
|
||||
@@ -2050,10 +2050,11 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_52_20) || ((u32)(KREG(13) + 15) >= this->unk_1D1C)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE) ||
|
||||
((u32)(KREG(13) + 15) >= this->unk_1D1C)) {
|
||||
break;
|
||||
}
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
@@ -2138,8 +2139,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
if (this->unk_1D1C == (u32)(BREG(27) + 335)) {
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->unk_1D20 = 0;
|
||||
sRedTwinmold->unk_0144 = sBlueTwinmold->unk_0144 = 3;
|
||||
@@ -2149,8 +2150,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
break;
|
||||
|
||||
case 100:
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
@@ -2199,8 +2200,8 @@ void func_809DEAC4(Boss02* this, PlayState* play) {
|
||||
if (this->unk_1D1C == 30) {
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
this->unk_1D20 = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
sp68->unk_0144 = 10;
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
* - Effect Update/Draw
|
||||
* - Seaweed
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_boss_03.h"
|
||||
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
|
||||
#include "overlays/actors/ovl_En_Water_Effect/z_en_water_effect.h"
|
||||
@@ -450,7 +448,7 @@ void Boss03_Init(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
Vec3f sp70;
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, PLATFORM_HEIGHT, 200.0f, 0, 0,
|
||||
0, ENDOORWARP1_FF_1);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, 0.0f, PLATFORM_HEIGHT, 0.0f, 0, 0, 0, 0);
|
||||
@@ -1147,8 +1145,8 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
|
||||
switch (this->csState) {
|
||||
case 0:
|
||||
if (player->actor.world.pos.y < 1350.0f) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
@@ -1369,8 +1367,8 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) {
|
||||
mainCam->at = this->subCamAt;
|
||||
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
|
||||
func_809E344C(this, play);
|
||||
@@ -1446,8 +1444,8 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
|
||||
|
||||
switch (this->csState) {
|
||||
case 0:
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
@@ -1628,8 +1626,8 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) {
|
||||
mainCam->at = this->subCamAt;
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
this->csState = 3;
|
||||
Play_DisableMotionBlur();
|
||||
Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_INIT_OLD);
|
||||
@@ -1661,8 +1659,8 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
|
||||
this->csTimer++;
|
||||
switch (this->csState) {
|
||||
case 0:
|
||||
if (ActorCutscene_GetCurrentIndex() == -1) {
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
if (CutsceneManager_GetCurrentCsId() == CS_ID_NONE) {
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_1);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
@@ -1723,8 +1721,8 @@ void Boss03_SpawnSmallFishesCutscene(Boss03* this, PlayState* play) {
|
||||
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
|
||||
func_809E344C(this, play);
|
||||
this->workTimer[WORK_TIMER_UNK1_A] = 50;
|
||||
|
||||
@@ -254,16 +254,16 @@ void func_809EC568(Boss04* this, PlayState* play) {
|
||||
this->unk_2D0 = 2000.0f;
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_100000) && (this->actor.projectedPos.z > 0.0f) &&
|
||||
(fabsf(this->actor.projectedPos.x) < 300.0f) && (fabsf(this->actor.projectedPos.y) < 300.0f)) {
|
||||
if ((this->unk_704 >= 15) && (ActorCutscene_GetCurrentIndex() == -1)) {
|
||||
if ((this->unk_704 >= 15) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE)) {
|
||||
Actor* boss;
|
||||
|
||||
this->unk_708 = 10;
|
||||
this->unk_704 = 0;
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
|
||||
player->actor.world.pos.x = this->unk_6E8;
|
||||
player->actor.world.pos.z = this->unk_6F0 + 410.0f;
|
||||
player->actor.shape.rot.y = 0x7FFF;
|
||||
@@ -389,8 +389,8 @@ void func_809EC568(Boss04* this, PlayState* play) {
|
||||
mainCam->at = this->subCamAt;
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
Play_DisableMotionBlur();
|
||||
SET_EVENTINF(EVENTINF_60);
|
||||
}
|
||||
|
||||
@@ -195,12 +195,12 @@ void func_809F24C8(Boss06* this, PlayState* play) {
|
||||
|
||||
switch (this->unk_1C9) {
|
||||
case 0:
|
||||
if (ActorCutscene_GetCurrentIndex() != -1) {
|
||||
if (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) {
|
||||
break;
|
||||
}
|
||||
|
||||
Cutscene_Start(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_7);
|
||||
Cutscene_StartManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STATUS_WAIT);
|
||||
Play_ChangeCameraStatus(play, this->subCamId, CAM_STATUS_ACTIVE);
|
||||
@@ -332,8 +332,8 @@ void func_809F24C8(Boss06* this, PlayState* play) {
|
||||
func_809F2ED0(this, play);
|
||||
func_80169AFC(play, this->subCamId, 0);
|
||||
this->subCamId = SUB_CAM_ID_DONE;
|
||||
Cutscene_End(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_6);
|
||||
Cutscene_StopManual(play, &play->csCtx);
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_END);
|
||||
D_809F4970->unk_151 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -34,7 +34,7 @@ static s16 sObjectBankIndices[] = { OBJECT_GI_MASK14, OBJECT_GI_SWORD_4 };
|
||||
|
||||
static s16 sGetItemDraws[] = { GID_MASK_GREAT_FAIRY, GID_SWORD_GREAT_FAIRY };
|
||||
|
||||
static u16 sCsActionIndices[] = { 0x6E, 0x236 };
|
||||
static u16 sCueTypes[] = { CS_CMD_ACTOR_CUE_110, CS_CMD_ACTOR_CUE_566 };
|
||||
|
||||
void DemoGetitem_Init(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
@@ -49,7 +49,7 @@ void DemoGetitem_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_SetScale(&this->actor, 0.25f);
|
||||
this->actionFunc = func_80A4FB10;
|
||||
this->item = sGetItemDraws[itemIndex];
|
||||
this->csAction = sCsActionIndices[itemIndex];
|
||||
this->cueType = sCueTypes[itemIndex];
|
||||
objectIndex = Object_GetIndex(&play->objectCtx, sObjectBankIndices[itemIndex]);
|
||||
if (objectIndex < 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
@@ -74,14 +74,14 @@ void func_80A4FB68(DemoGetitem* this, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
u16 sp22 = (play->gameplayFrames * 1000) & 0xFFFF;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, this->csAction)) {
|
||||
if (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->csAction)]->action != 4) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType)) {
|
||||
if (play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id != 4) {
|
||||
this->actor.shape.yOffset = 0.0f;
|
||||
}
|
||||
switch (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->csAction)]->action) {
|
||||
switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id) {
|
||||
case 2:
|
||||
this->actor.draw = DemoGetitem_Draw;
|
||||
Cutscene_ActorTranslate(&this->actor, play, Cutscene_GetActorActionIndex(play, this->csAction));
|
||||
Cutscene_ActorTranslate(&this->actor, play, Cutscene_GetCueChannel(play, this->cueType));
|
||||
this->actor.shape.rot.y += 0x3E8;
|
||||
break;
|
||||
|
||||
@@ -91,7 +91,7 @@ void func_80A4FB68(DemoGetitem* this, PlayState* play2) {
|
||||
|
||||
case 4:
|
||||
this->actor.draw = DemoGetitem_Draw;
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, Cutscene_GetActorActionIndex(play, this->csAction));
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, Cutscene_GetCueChannel(play, this->cueType));
|
||||
this->actor.shape.yOffset = Math_SinS(sp22) * 15.0f;
|
||||
break;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ typedef void (*DemoGetitemActionFunc)(struct DemoGetitem*, PlayState*);
|
||||
typedef struct DemoGetitem {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ s16 item;
|
||||
/* 0x146 */ u16 csAction;
|
||||
/* 0x146 */ u16 cueType;
|
||||
/* 0x148 */ s8 objectIndex;
|
||||
/* 0x14C */ DemoGetitemActionFunc actionFunc;
|
||||
} DemoGetitem; // size = 0x150
|
||||
|
||||
@@ -68,7 +68,7 @@ void DemoSyoten_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_3E6 = 0;
|
||||
this->unk_3DC = NULL;
|
||||
this->unk_3E0 = NULL;
|
||||
this->unk_3F2 = 0;
|
||||
this->cueId = 0;
|
||||
this->unk_3D8 = 1.0f;
|
||||
|
||||
switch (DEMOSYOTEN_GET_F(&this->actor)) {
|
||||
@@ -81,7 +81,7 @@ void DemoSyoten_Init(Actor* thisx, PlayState* play) {
|
||||
this->actor.child =
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EFF_DUST, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, 0);
|
||||
this->unk_3F0 = 0x215;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_533;
|
||||
Actor_SetScale(&this->actor, 0.05f);
|
||||
break;
|
||||
|
||||
@@ -91,14 +91,14 @@ void DemoSyoten_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_3E0 = Lib_SegmentedToVirtual(&object_syoten_Matanimheader_001448);
|
||||
this->unk_3E4 |= 1;
|
||||
this->actionFunc = func_80C16BD4;
|
||||
this->unk_3F0 = 0x215;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_533;
|
||||
Actor_SetScale(&this->actor, 0.05f);
|
||||
break;
|
||||
|
||||
case DEMOSYOTEN_F_2:
|
||||
this->unk_3DC = object_syoten_DL_001730;
|
||||
this->unk_3E0 = Lib_SegmentedToVirtual(&object_syoten_Matanimheader_0018B8);
|
||||
this->unk_3F0 = 0x216;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_534;
|
||||
this->actionFunc = func_80C16DD4;
|
||||
this->unk_3E4 |= 2;
|
||||
Actor_SetScale(&this->actor, 4.0f);
|
||||
@@ -107,7 +107,7 @@ void DemoSyoten_Init(Actor* thisx, PlayState* play) {
|
||||
case DEMOSYOTEN_F_3:
|
||||
this->unk_3DC = object_syoten_DL_001DD0;
|
||||
this->unk_3E0 = Lib_SegmentedToVirtual(&object_syoten_Matanimheader_002B98);
|
||||
this->unk_3F0 = 0x218;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_536;
|
||||
this->unk_3E4 |= 8;
|
||||
this->actionFunc = func_80C16EAC;
|
||||
Actor_SetScale(&this->actor, 0.5f);
|
||||
@@ -118,7 +118,7 @@ void DemoSyoten_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_3E0 = Lib_SegmentedToVirtual(&object_syoten_Matanimheader_002B88);
|
||||
this->unk_3E4 |= 2;
|
||||
this->actionFunc = func_80C17008;
|
||||
this->unk_3F0 = 0x217;
|
||||
this->cueType = CS_CMD_ACTOR_CUE_535;
|
||||
this->unk_3E4 |= 1;
|
||||
this->unk_3E4 |= 8;
|
||||
this->actor.draw = func_80C17690;
|
||||
@@ -219,20 +219,20 @@ void func_80C16A64(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C16A74(DemoSyoten* this, PlayState* play) {
|
||||
u16 temp_a0;
|
||||
u16 cueId;
|
||||
|
||||
func_80183DE0(&this->unk_144);
|
||||
if (Cutscene_CheckActorAction(play, this->unk_3F0)) {
|
||||
if ((play->csCtx.frames >= 160) && (play->csCtx.frames < 322)) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType)) {
|
||||
if ((play->csCtx.curFrame >= 160) && (play->csCtx.curFrame < 322)) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_IKANA_SOUL_LV - SFX_FLAG);
|
||||
} else if (play->csCtx.frames == 322) {
|
||||
} else if (play->csCtx.curFrame == 322) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_IKANA_SOUL_TRANSFORM);
|
||||
}
|
||||
|
||||
temp_a0 = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->action;
|
||||
if (this->unk_3F2 != temp_a0) {
|
||||
this->unk_3F2 = temp_a0;
|
||||
switch (temp_a0) {
|
||||
cueId = play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id;
|
||||
if (this->cueId != cueId) {
|
||||
this->cueId = cueId;
|
||||
switch (cueId) {
|
||||
case 1:
|
||||
this->actor.draw = NULL;
|
||||
break;
|
||||
@@ -251,7 +251,7 @@ void func_80C16A74(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (temp_a0 == 3) {
|
||||
if (cueId == 3) {
|
||||
if (this->unk_3D8 > 0.0125f) {
|
||||
this->unk_3D8 -= 0.0125f;
|
||||
if (this->actor.child != NULL) {
|
||||
@@ -271,13 +271,13 @@ void func_80C16A74(DemoSyoten* this, PlayState* play) {
|
||||
|
||||
void func_80C16BD4(DemoSyoten* this, PlayState* play) {
|
||||
s32 pad;
|
||||
u16 temp_a0;
|
||||
u16 cueId;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, this->unk_3F0)) {
|
||||
temp_a0 = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->action;
|
||||
if (this->unk_3F2 != temp_a0) {
|
||||
this->unk_3F2 = temp_a0;
|
||||
switch (temp_a0) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType)) {
|
||||
cueId = play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id;
|
||||
if (this->cueId != cueId) {
|
||||
this->cueId = cueId;
|
||||
switch (cueId) {
|
||||
default:
|
||||
this->actor.draw = NULL;
|
||||
break;
|
||||
@@ -304,7 +304,7 @@ void func_80C16BD4(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
switch (temp_a0) {
|
||||
switch (cueId) {
|
||||
case 3:
|
||||
if (this->actor.scale.x < 0.05f) {
|
||||
this->actor.scale.x += 0.000625f;
|
||||
@@ -314,7 +314,7 @@ void func_80C16BD4(DemoSyoten* this, PlayState* play) {
|
||||
|
||||
case 4:
|
||||
this->actor.speed =
|
||||
play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->urot.z * 0.005493164f;
|
||||
play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->rot.z * 0.005493164f;
|
||||
if (this->unk_3EC < this->unk_3E8->count) {
|
||||
if (func_80C16818(this)) {
|
||||
this->unk_3EC++;
|
||||
@@ -330,13 +330,13 @@ void func_80C16BD4(DemoSyoten* this, PlayState* play) {
|
||||
|
||||
void func_80C16DD4(DemoSyoten* this, PlayState* play) {
|
||||
s32 pad;
|
||||
u16 temp_a0;
|
||||
u16 cueId;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, this->unk_3F0)) {
|
||||
temp_a0 = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->action;
|
||||
if (this->unk_3F2 != temp_a0) {
|
||||
this->unk_3F2 = temp_a0;
|
||||
switch (temp_a0) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType)) {
|
||||
cueId = play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id;
|
||||
if (this->cueId != cueId) {
|
||||
this->cueId = cueId;
|
||||
switch (cueId) {
|
||||
case 1:
|
||||
this->actor.draw = NULL;
|
||||
break;
|
||||
@@ -349,7 +349,7 @@ void func_80C16DD4(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((temp_a0 == 2) && (this->unk_3E6 < 40)) {
|
||||
if ((cueId == 2) && (this->unk_3E6 < 40)) {
|
||||
this->unk_3E6++;
|
||||
}
|
||||
} else {
|
||||
@@ -359,13 +359,13 @@ void func_80C16DD4(DemoSyoten* this, PlayState* play) {
|
||||
|
||||
void func_80C16EAC(DemoSyoten* this, PlayState* play) {
|
||||
s32 pad;
|
||||
u16 temp_a0;
|
||||
u16 cueId;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, this->unk_3F0)) {
|
||||
temp_a0 = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->action;
|
||||
if (this->unk_3F2 != temp_a0) {
|
||||
this->unk_3F2 = temp_a0;
|
||||
switch (temp_a0) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType)) {
|
||||
cueId = play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id;
|
||||
if (this->cueId != cueId) {
|
||||
this->cueId = cueId;
|
||||
switch (cueId) {
|
||||
case 1:
|
||||
this->actor.draw = NULL;
|
||||
this->unk_3D8 = 0.0f;
|
||||
@@ -378,7 +378,7 @@ void func_80C16EAC(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (temp_a0 == 2) {
|
||||
if (cueId == 2) {
|
||||
if (this->actor.scale.x < 8.0f) {
|
||||
this->actor.scale.x += 0.1875f;
|
||||
}
|
||||
@@ -401,13 +401,13 @@ void func_80C16EAC(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C17008(DemoSyoten* this, PlayState* play) {
|
||||
u16 temp_a0;
|
||||
u16 cueId;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, this->unk_3F0)) {
|
||||
temp_a0 = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->action;
|
||||
if (this->unk_3F2 != temp_a0) {
|
||||
this->unk_3F2 = temp_a0;
|
||||
switch (temp_a0) {
|
||||
if (Cutscene_IsCueInChannel(play, this->cueType)) {
|
||||
cueId = play->csCtx.actorCues[Cutscene_GetCueChannel(play, this->cueType)]->id;
|
||||
if (this->cueId != cueId) {
|
||||
this->cueId = cueId;
|
||||
switch (cueId) {
|
||||
case 1:
|
||||
this->actor.draw = NULL;
|
||||
break;
|
||||
@@ -419,7 +419,7 @@ void func_80C17008(DemoSyoten* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((temp_a0 == 2) && (this->unk_3E6 < 15)) {
|
||||
if ((cueId == 2) && (this->unk_3E6 < 15)) {
|
||||
this->unk_3E6++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -32,8 +32,8 @@ typedef struct DemoSyoten {
|
||||
/* 0x3E6 */ s16 unk_3E6;
|
||||
/* 0x3E8 */ Path* unk_3E8;
|
||||
/* 0x3EC */ s32 unk_3EC;
|
||||
/* 0x3F0 */ u16 unk_3F0;
|
||||
/* 0x3F2 */ u16 unk_3F2;
|
||||
/* 0x3F0 */ u16 cueType;
|
||||
/* 0x3F2 */ u16 cueId;
|
||||
/* 0x3F4 */ DemoSyotenActionFunc actionFunc;
|
||||
} DemoSyoten; // size = 0x3F8
|
||||
|
||||
|
||||
@@ -124,23 +124,23 @@ Actor* func_80C1D78C(PlayState* play) {
|
||||
|
||||
void func_80C1D7FC(DmAh* this, PlayState* play) {
|
||||
s32 D_80C1DE00[] = { 0, 0, 0, 0, 0 };
|
||||
u16 csAction;
|
||||
s32 actionIndex;
|
||||
u16 cueId;
|
||||
s32 cueChannel;
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (!this->unk_29C) {
|
||||
this->action = 0xFF;
|
||||
this->cueId = 255;
|
||||
this->unk_29C = true;
|
||||
this->animationIndex2 = this->animationIndex;
|
||||
}
|
||||
if (Cutscene_CheckActorAction(play, 0x232)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 0x232);
|
||||
csAction = play->csCtx.actorActions[actionIndex]->action;
|
||||
if (this->action != (u8)csAction) {
|
||||
this->action = csAction;
|
||||
func_80C1D410(this, D_80C1DE00[csAction]);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_562)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_562);
|
||||
cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
if (this->cueId != (u8)cueId) {
|
||||
this->cueId = cueId;
|
||||
func_80C1D410(this, D_80C1DE00[cueId]);
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
} else if (this->unk_29C) {
|
||||
this->unk_29C = false;
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef struct DmAh {
|
||||
/* 0x1B0 */ Vec3s morphTable[OBJECT_AH_LIMB_MAX];
|
||||
/* 0x216 */ Vec3s jointTable[OBJECT_AH_LIMB_MAX];
|
||||
/* 0x27C */ u16 unk_27C;
|
||||
/* 0x27E */ u8 action;
|
||||
/* 0x27E */ u8 cueId;
|
||||
/* 0x280 */ Actor* unk_280;
|
||||
/* 0x284 */ s16 unk_284;
|
||||
/* 0x286 */ s16 unk_286;
|
||||
|
||||
@@ -48,23 +48,23 @@ s32 DmAl_ChangeAnim(DmAl* this, s32 animIndex) {
|
||||
|
||||
void func_80C1BDD8(DmAl* this, PlayState* play) {
|
||||
s32 D_80C1C280[] = { 0, 0, 0, 0, 0 };
|
||||
u16 csAction;
|
||||
s32 actionIndex;
|
||||
u16 cueId;
|
||||
s32 cueChannel;
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (!this->unk_45C) {
|
||||
this->action = 0xFF;
|
||||
this->cueId = 255;
|
||||
this->unk_45C = true;
|
||||
this->animIndex2 = this->animIndex;
|
||||
}
|
||||
if (Cutscene_CheckActorAction(play, 0x232)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 0x232);
|
||||
csAction = play->csCtx.actorActions[actionIndex]->action;
|
||||
if (this->action != (u8)csAction) {
|
||||
this->action = csAction;
|
||||
DmAl_ChangeAnim(this, D_80C1C280[csAction]);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_562)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_562);
|
||||
cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
if (this->cueId != (u8)cueId) {
|
||||
this->cueId = cueId;
|
||||
DmAl_ChangeAnim(this, D_80C1C280[cueId]);
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
} else if (this->unk_45C) {
|
||||
this->unk_45C = false;
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef struct DmAl {
|
||||
/* 0x18C */ MtxF shawlMatrices[6];
|
||||
/* 0x30C */ Vec3s jointTable[MADAME_AROMA_LIMB_MAX];
|
||||
/* 0x3AE */ Vec3s morphTable[MADAME_AROMA_LIMB_MAX];
|
||||
/* 0x450 */ u8 action;
|
||||
/* 0x450 */ u8 cueId;
|
||||
/* 0x454 */ s32 animIndex;
|
||||
/* 0x458 */ s32 animIndex2;
|
||||
/* 0x45C */ s32 unk_45C;
|
||||
|
||||
@@ -195,28 +195,28 @@ void func_80C1C958(DmAn* this, PlayState* play) {
|
||||
|
||||
void func_80C1CAB0(DmAn* this, PlayState* play) {
|
||||
s32 sp28[] = { 0, 0, 12, 2, 4, 6, 8, 10, 11, 3 };
|
||||
u16 action;
|
||||
s32 sp20;
|
||||
u16 cueId;
|
||||
s32 cueChannel;
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (this->unk_2D0 == 0) {
|
||||
this->unk_2B0 = 255;
|
||||
this->cueId = 255;
|
||||
this->unk_2D0 = 1;
|
||||
this->unk_2D4 = 0;
|
||||
this->unk_2CC = this->unk_2C8;
|
||||
}
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x22D)) {
|
||||
sp20 = Cutscene_GetActorActionIndex(play, 0x22D);
|
||||
action = play->csCtx.actorActions[sp20]->action;
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_557)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_557);
|
||||
cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
|
||||
if (this->unk_2B0 != (action & 0xFF)) {
|
||||
this->unk_2B0 = action;
|
||||
if (this->cueId != (u8)cueId) {
|
||||
this->cueId = cueId;
|
||||
this->unk_2D4 = 1;
|
||||
func_80C1C4D8(this, play, sp28[action]);
|
||||
func_80C1C4D8(this, play, sp28[cueId]);
|
||||
}
|
||||
|
||||
switch (this->unk_2B0) {
|
||||
switch (this->cueId) {
|
||||
case 2:
|
||||
case 4:
|
||||
case 5:
|
||||
@@ -230,7 +230,7 @@ void func_80C1CAB0(DmAn* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, sp20);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
} else if (this->unk_2D0 != 0) {
|
||||
this->unk_2D0 = 0;
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef struct DmAn {
|
||||
/* 0x2AC */ s8 unk_2AC;
|
||||
/* 0x2AD */ s8 unk_2AD;
|
||||
/* 0x2AE */ u16 unk_2AE;
|
||||
/* 0x2B0 */ u8 unk_2B0;
|
||||
/* 0x2B0 */ u8 cueId;
|
||||
/* 0x2B4 */ Actor* unk_2B4;
|
||||
/* 0x2B8 */ s16 unk_2B8;
|
||||
/* 0x2BA */ s16 unk_2BA;
|
||||
|
||||
@@ -74,15 +74,15 @@ void DmBal_DoNothing(DmBal* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80C1EAE8(DmBal* this, PlayState* play) {
|
||||
static u16 D_80C1F2C0 = 0x63;
|
||||
s32 actionIndex;
|
||||
static u16 sCueId = 99;
|
||||
s32 cueChannel;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x238)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 0x238);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_568)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_568);
|
||||
|
||||
if (D_80C1F2C0 != play->csCtx.actorActions[actionIndex]->action) {
|
||||
D_80C1F2C0 = play->csCtx.actorActions[actionIndex]->action;
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (sCueId != play->csCtx.actorCues[cueChannel]->id) {
|
||||
sCueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
this->keepEyesShut = false;
|
||||
this->eyeIndex = 0;
|
||||
@@ -96,7 +96,7 @@ void func_80C1EAE8(DmBal* this, PlayState* play) {
|
||||
Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 13);
|
||||
break;
|
||||
}
|
||||
} else if (D_80C1F2C0 == 3) {
|
||||
} else if (sCueId == 3) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f)) {
|
||||
this->keepEyesShut = true;
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 29.0f)) {
|
||||
@@ -104,12 +104,12 @@ void func_80C1EAE8(DmBal* this, PlayState* play) {
|
||||
this->eyeIndex = 0;
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
} else {
|
||||
this->keepEyesShut = false;
|
||||
this->eyeIndex = 0;
|
||||
D_80C1F2C0 = 0x63;
|
||||
sCueId = 99;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ void func_80AA5580(SkelAnime* skelAnime, AnimationInfo* animation, u16 idx) {
|
||||
|
||||
void func_80AA561C(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames + 20) {
|
||||
switch (play->csCtx.curFrame + 20) {
|
||||
case 503:
|
||||
case 926:
|
||||
case 979:
|
||||
@@ -169,7 +169,7 @@ void func_80AA561C(DmChar00* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (play->csCtx.frames + 20) {
|
||||
switch (play->csCtx.curFrame + 20) {
|
||||
case 503:
|
||||
case 926:
|
||||
case 979:
|
||||
@@ -188,14 +188,14 @@ void func_80AA561C(DmChar00* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA5720(DmChar00* this, PlayState* play) {
|
||||
if ((DMCHAR00_GET(&this->actor) == DMCHAR00_0) && (play->csCtx.frames == 505)) {
|
||||
if ((DMCHAR00_GET(&this->actor) == DMCHAR00_0) && (play->csCtx.curFrame == 505)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_SPOT_LIGHT_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA575C(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 474:
|
||||
case 489:
|
||||
case 495:
|
||||
@@ -227,24 +227,24 @@ void func_80AA575C(DmChar00* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BELL_BRAKE);
|
||||
break;
|
||||
}
|
||||
} else if (play->csCtx.frames == 660) {
|
||||
} else if (play->csCtx.curFrame == 660) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_MONDO_SURPRISE);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA5890(DmChar00* this, PlayState* play) {
|
||||
if ((DMCHAR00_GET(&this->actor) == DMCHAR00_0) && (play->csCtx.frames == 20)) {
|
||||
if ((DMCHAR00_GET(&this->actor) == DMCHAR00_0) && (play->csCtx.curFrame == 20)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA58CC(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
if (play->csCtx.frames == 568) {
|
||||
if (play->csCtx.curFrame == 568) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_FAIRY_SURPRISE);
|
||||
}
|
||||
} else {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 375:
|
||||
case 479:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_DASH);
|
||||
@@ -262,11 +262,11 @@ void func_80AA5950(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA5960(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
if (play->csCtx.frames == 280) {
|
||||
if (play->csCtx.curFrame == 280) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_FAIRY_SURPRISE);
|
||||
}
|
||||
} else {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 87:
|
||||
case 190:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_DASH);
|
||||
@@ -281,7 +281,7 @@ void func_80AA5960(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA59E4(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 125:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
break;
|
||||
@@ -291,14 +291,14 @@ void func_80AA59E4(DmChar00* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_SY_WHITE_OUT_INTO_MOON);
|
||||
break;
|
||||
}
|
||||
} else if (play->csCtx.frames == 125) {
|
||||
} else if (play->csCtx.curFrame == 125) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_DASH);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA5A6C(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 44:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
break;
|
||||
@@ -308,14 +308,14 @@ void func_80AA5A6C(DmChar00* this, PlayState* play) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_SY_WHITE_OUT_INTO_MOON);
|
||||
break;
|
||||
}
|
||||
} else if (play->csCtx.frames == 44) {
|
||||
} else if (play->csCtx.curFrame == 44) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_DASH);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA5AF4(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 352:
|
||||
case 401:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
@@ -330,7 +330,7 @@ void func_80AA5AF4(DmChar00* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 362:
|
||||
case 401:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_DASH);
|
||||
@@ -341,7 +341,7 @@ void func_80AA5AF4(DmChar00* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((play->csCtx.frames >= 500) && (play->csCtx.frames < 602)) {
|
||||
if ((play->csCtx.curFrame >= 500) && (play->csCtx.curFrame < 602)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_FAIRY_SHIVER - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
@@ -349,7 +349,7 @@ void func_80AA5AF4(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA5BF8(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 762:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_SHOT_DASH);
|
||||
break;
|
||||
@@ -358,7 +358,7 @@ void func_80AA5BF8(DmChar00* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 762:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_SHOT_DASH);
|
||||
break;
|
||||
@@ -375,14 +375,14 @@ void func_80AA5BF8(DmChar00* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA5CD4(DmChar00* this, PlayState* play) {
|
||||
if ((DMCHAR00_GET(&this->actor) != DMCHAR00_0) && (play->csCtx.frames == 467)) {
|
||||
if ((DMCHAR00_GET(&this->actor) != DMCHAR00_0) && (play->csCtx.curFrame == 467)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BLACK_FAIRY_DASH);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA5D10(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 8:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_FAIRY_SURPRISE);
|
||||
break;
|
||||
@@ -396,7 +396,7 @@ void func_80AA5D10(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA5D6C(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 2:
|
||||
case 166:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
@@ -411,7 +411,7 @@ void func_80AA5D6C(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA5DC8(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_0) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 233:
|
||||
case 415:
|
||||
case 593:
|
||||
@@ -427,7 +427,7 @@ void func_80AA5DC8(DmChar00* this, PlayState* play) {
|
||||
|
||||
void func_80AA5E2C(DmChar00* this, PlayState* play) {
|
||||
if (DMCHAR00_GET(&this->actor) == DMCHAR00_1) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 32:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_WHITE_FAIRY_DASH);
|
||||
break;
|
||||
@@ -458,11 +458,11 @@ void func_80AA5EBC(DmChar00* this, PlayState* play) {
|
||||
|
||||
case SCENE_OPENINGDAN:
|
||||
if (gSaveContext.sceneLayer == 0) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
if (play->csCtx.scriptIndex == 0) {
|
||||
func_80AA5720(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 1) {
|
||||
} else if (play->csCtx.scriptIndex == 1) {
|
||||
func_80AA575C(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 2) {
|
||||
} else if (play->csCtx.scriptIndex == 2) {
|
||||
func_80AA5890(this, play);
|
||||
}
|
||||
}
|
||||
@@ -470,17 +470,17 @@ void func_80AA5EBC(DmChar00* this, PlayState* play) {
|
||||
|
||||
case SCENE_OKUJOU:
|
||||
if (gSaveContext.sceneLayer == 0) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
if (play->csCtx.scriptIndex == 0) {
|
||||
func_80AA58CC(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 1) {
|
||||
} else if (play->csCtx.scriptIndex == 1) {
|
||||
func_80AA5950(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 2) {
|
||||
} else if (play->csCtx.scriptIndex == 2) {
|
||||
func_80AA5960(this, play);
|
||||
}
|
||||
} else if (gSaveContext.sceneLayer == 2) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
if (play->csCtx.scriptIndex == 0) {
|
||||
func_80AA59E4(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 1) {
|
||||
} else if (play->csCtx.scriptIndex == 1) {
|
||||
func_80AA5A6C(this, play);
|
||||
}
|
||||
}
|
||||
@@ -488,34 +488,34 @@ void func_80AA5EBC(DmChar00* this, PlayState* play) {
|
||||
|
||||
case SCENE_00KEIKOKU:
|
||||
if (gSaveContext.sceneLayer == 3) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
if (play->csCtx.scriptIndex == 0) {
|
||||
func_80AA5AF4(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 2) {
|
||||
} else if (play->csCtx.scriptIndex == 2) {
|
||||
func_80AA5E2C(this, play);
|
||||
}
|
||||
} else if (gSaveContext.sceneLayer == 7) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
if (play->csCtx.scriptIndex == 0) {
|
||||
func_80AA5BF8(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 1) {
|
||||
} else if (play->csCtx.scriptIndex == 1) {
|
||||
func_80AA5CD4(this, play);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case SCENE_MITURIN:
|
||||
if ((gSaveContext.sceneLayer == 0) && (play->csCtx.currentCsIndex == 1)) {
|
||||
if ((gSaveContext.sceneLayer == 0) && (play->csCtx.scriptIndex == 1)) {
|
||||
func_80AA5DC8(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case SCENE_INSIDETOWER:
|
||||
if ((gSaveContext.sceneLayer == 0) && (play->csCtx.currentCsIndex == 0)) {
|
||||
if ((gSaveContext.sceneLayer == 0) && (play->csCtx.scriptIndex == 0)) {
|
||||
func_80AA5D10(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case SCENE_PIRATE:
|
||||
if ((gSaveContext.sceneLayer == 0) && (play->csCtx.currentCsIndex == 0)) {
|
||||
if ((gSaveContext.sceneLayer == 0) && (play->csCtx.scriptIndex == 0)) {
|
||||
func_80AA5D6C(this, play);
|
||||
}
|
||||
break;
|
||||
@@ -535,7 +535,7 @@ void DmChar00_Init(Actor* thisx, PlayState* play) {
|
||||
this->unk_250 = D_80AA77D8[DMCHAR00_GET(thisx)];
|
||||
|
||||
thisx->targetArrowOffset = 3000.0f;
|
||||
this->unk_260 = 99;
|
||||
this->cueId = 99;
|
||||
this->unk_262 = DMCHAR00_GET_F800(thisx);
|
||||
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
@@ -551,18 +551,18 @@ void DmChar00_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA62FC(DmChar00* this, PlayState* play) {
|
||||
u16 sp26 = DMCHAR00_GET(&this->actor) + 113;
|
||||
s32 temp_v0;
|
||||
u16 cueType = CS_CMD_ACTOR_CUE_113 + DMCHAR00_GET(&this->actor);
|
||||
s32 cueChannel;
|
||||
s32 pad;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, sp26)) {
|
||||
temp_v0 = Cutscene_GetActorActionIndex(play, sp26);
|
||||
if (Cutscene_IsCueInChannel(play, cueType)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, cueType);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[temp_v0]->startFrame) {
|
||||
if (this->unk_260 != play->csCtx.actorActions[temp_v0]->action) {
|
||||
this->unk_260 = play->csCtx.actorActions[temp_v0]->action;
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
if (this->cueId != play->csCtx.actorCues[cueChannel]->id) {
|
||||
this->cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
|
||||
switch (play->csCtx.actorActions[temp_v0]->action) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 0x1:
|
||||
this->unk_261 = 0;
|
||||
break;
|
||||
@@ -786,9 +786,9 @@ void func_80AA62FC(DmChar00* this, PlayState* play) {
|
||||
func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0);
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, temp_v0);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
} else {
|
||||
this->unk_260 = 99;
|
||||
this->cueId = 99;
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
@@ -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.currentCsIndex == 1)) {
|
||||
if ((play->csCtx.state == 0) && (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);
|
||||
@@ -916,7 +916,7 @@ void DmChar00_Draw(Actor* thisx, PlayState* play2) {
|
||||
|
||||
if ((play->csCtx.state == 0) &&
|
||||
((play->sceneId != SCENE_OPENINGDAN) || (gSaveContext.sceneLayer != 0) || (play->roomCtx.curRoom.num != 0) ||
|
||||
(play->csCtx.currentCsIndex != 1) || (DMCHAR00_GET(&this->actor) != DMCHAR00_0))) {
|
||||
(play->csCtx.scriptIndex != 1) || (DMCHAR00_GET(&this->actor) != DMCHAR00_0))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ typedef struct DmChar00 {
|
||||
/* 0x23C */ DmChar00ActionFunc actionFunc;
|
||||
/* 0x240 */ Color_RGBAf unk_240;
|
||||
/* 0x250 */ Color_RGBAf unk_250;
|
||||
/* 0x260 */ u8 unk_260;
|
||||
/* 0x260 */ u8 cueId;
|
||||
/* 0x261 */ u8 unk_261;
|
||||
/* 0x262 */ u16 unk_262;
|
||||
} DmChar00; // size = 0x264
|
||||
|
||||
@@ -67,7 +67,7 @@ void DmChar01_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
switch (DMCHAR01_GET(&this->dyna.actor)) {
|
||||
case DMCHAR01_0:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) {
|
||||
this->unk_34C = 2;
|
||||
this->actionFunc = func_80AA8F1C;
|
||||
break;
|
||||
@@ -97,7 +97,7 @@ void DmChar01_Init(Actor* thisx, PlayState* play) {
|
||||
break;
|
||||
|
||||
case DMCHAR01_1:
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02) || (gSaveContext.sceneLayer == 1)) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE) || (gSaveContext.sceneLayer == 1)) {
|
||||
this->unk_34C = 1;
|
||||
this->actionFunc = func_80AA8F1C;
|
||||
} else {
|
||||
@@ -134,7 +134,7 @@ void DmChar01_Init(Actor* thisx, PlayState* play) {
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gWoodfallSceneryTempleRampAndPlatformCol);
|
||||
|
||||
this->unk_34D = true;
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_20_02)) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) {
|
||||
this->actionFunc = func_80AA9020;
|
||||
this->dyna.actor.world.pos.y -= 120.0f;
|
||||
} else {
|
||||
@@ -187,19 +187,20 @@ void func_80AA8698(DmChar01* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA884C(DmChar01* this, PlayState* play) {
|
||||
s16 sp1E = this->dyna.actor.cutscene;
|
||||
s16 csId = this->dyna.actor.csId;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(sp1E)) {
|
||||
ActorCutscene_Start(sp1E, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(csId)) {
|
||||
CutsceneManager_Start(csId, &this->dyna.actor);
|
||||
this->actionFunc = func_80AA88A8;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(sp1E);
|
||||
CutsceneManager_Queue(csId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AA88A8(DmChar01* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 135)) {
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 135)]->startFrame) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_135)) {
|
||||
if (play->csCtx.curFrame ==
|
||||
play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_135)]->startFrame) {
|
||||
D_80AAAE24 = 1;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_FORT_RISING);
|
||||
}
|
||||
@@ -344,11 +345,11 @@ void func_80AA8F2C(DmChar01* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AA9020(DmChar01* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 135)) {
|
||||
CsCmdActorAction* temp_v1 = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 135)];
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_135)) {
|
||||
CsCmdActorCue* cue = play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_135)];
|
||||
|
||||
if ((temp_v1->startFrame == play->csCtx.frames) && (temp_v1->action == 2)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_20_02);
|
||||
if ((cue->startFrame == play->csCtx.curFrame) && (cue->id == 2)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE);
|
||||
this->actionFunc = func_80AA90AC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ void DmChar02_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animationInfo, u16
|
||||
}
|
||||
|
||||
void DmChar02_PlaySfxForDroppingOcarinaCutscene(DmChar02* this, PlayState* play) {
|
||||
switch (play->csCtx.frames) {
|
||||
switch (play->csCtx.curFrame) {
|
||||
case 95:
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_OCARINA_BOUND_0);
|
||||
break;
|
||||
@@ -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.currentCsIndex == 1)) {
|
||||
if ((play->csCtx.state != 0) && (play->sceneId == SCENE_OKUJOU) && (play->csCtx.scriptIndex == 1)) {
|
||||
DmChar02_PlaySfxForDroppingOcarinaCutscene(this, play);
|
||||
}
|
||||
}
|
||||
@@ -101,12 +101,12 @@ void DmChar02_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
||||
void DmChar02_PerformCutsceneActions(DmChar02* this, PlayState* play) {
|
||||
u8 shouldChangeAnimation = true;
|
||||
s32 actionIndex;
|
||||
s32 cueChannel;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x83)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 0x83);
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_131)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_131);
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
default:
|
||||
this->animIndex = DMCHAR02_ANIM_HIT_GROUND;
|
||||
shouldChangeAnimation = false;
|
||||
@@ -130,7 +130,7 @@ void DmChar02_PerformCutsceneActions(DmChar02* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
@@ -174,8 +174,8 @@ void DmChar02_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
if ((play->csCtx.state == 0) && (this->actor.world.pos.y < 100.0f)) {
|
||||
shouldDraw = true;
|
||||
} else if (Cutscene_CheckActorAction(play, 0x6B)) {
|
||||
switch (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 0x6B)]->action) {
|
||||
} else if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_107)) {
|
||||
switch (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_107)]->id) {
|
||||
case 0x17:
|
||||
case 0x1C:
|
||||
case 0x26:
|
||||
|
||||
@@ -76,14 +76,14 @@ void func_80AAB5F8(DmChar03* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AAB644(DmChar03* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 0x88)) {
|
||||
s32 index = Cutscene_GetActorActionIndex(play, 0x88);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_136);
|
||||
|
||||
if (play->csCtx.actorActions[index]->action == 4) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 4) {
|
||||
this->unk_18E = true;
|
||||
this->offset.x = play->csCtx.actorActions[index]->startPos.x;
|
||||
this->offset.y = play->csCtx.actorActions[index]->startPos.y;
|
||||
this->offset.z = play->csCtx.actorActions[index]->startPos.z;
|
||||
this->offset.x = play->csCtx.actorCues[cueChannel]->startPos.x;
|
||||
this->offset.y = play->csCtx.actorCues[cueChannel]->startPos.y;
|
||||
this->offset.z = play->csCtx.actorCues[cueChannel]->startPos.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,11 +94,11 @@ void DmChar03_DoNothing(DmChar03* this, PlayState* play) {
|
||||
void func_80AAB710(DmChar03* this, PlayState* play) {
|
||||
u8 shouldChangeAnim = true;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x88)) {
|
||||
s32 index = Cutscene_GetActorActionIndex(play, 0x88);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_136);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[index]->startFrame) {
|
||||
switch (play->csCtx.actorActions[index]->action) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
shouldChangeAnim = false;
|
||||
break;
|
||||
@@ -124,7 +124,7 @@ void func_80AAB710(DmChar03* this, PlayState* play) {
|
||||
DmChar03_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, index);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ void func_80AAB838(DmChar03* this, PlayState* play) {
|
||||
void DmChar03_Update(Actor* thisx, PlayState* play) {
|
||||
DmChar03* this = THIS;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x88) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 0x88)]->action == 2)) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_136)]->id == 2)) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
this->actionFunc(this, play);
|
||||
@@ -163,8 +163,8 @@ void DmChar03_Draw(Actor* thisx, PlayState* play) {
|
||||
DmChar03* this = THIS;
|
||||
|
||||
if (!this->unk_18E) {
|
||||
if ((Cutscene_CheckActorAction(play, 0x88)) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 0x88)]->action != 1)) {
|
||||
if ((Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_136)) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_136)]->id != 1)) {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, DmChar03_OverrideLimbDraw, DmChar03_PostLimbDraw,
|
||||
|
||||
@@ -66,7 +66,7 @@ void DmChar04_Init(Actor* thisx, PlayState* play) {
|
||||
this->primColors = sPrimColors[this->actor.params];
|
||||
this->envColors = sEnvColors[this->actor.params];
|
||||
this->actor.targetArrowOffset = 3000.0f;
|
||||
this->csAction = 0x63;
|
||||
this->cueId = 99;
|
||||
this->timer = this->actor.params << 0xB;
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
|
||||
SkelAnime_Init(play, &this->skelAnime, &gameplay_keep_Skel_02AF58.sh, &gameplay_keep_Anim_029140, this->jointTable,
|
||||
@@ -81,15 +81,15 @@ void DmChar04_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AABE34(DmChar04* this, PlayState* play) {
|
||||
u16 params = this->actor.params + 0x71;
|
||||
u16 cueType = CS_CMD_ACTOR_CUE_113 + this->actor.params;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, params)) {
|
||||
s32 actionIndex = Cutscene_GetActorActionIndex(play, params);
|
||||
if (Cutscene_IsCueInChannel(play, cueType)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, cueType);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
if (this->csAction != play->csCtx.actorActions[actionIndex]->action) {
|
||||
this->csAction = play->csCtx.actorActions[actionIndex]->action;
|
||||
if (play->csCtx.actorActions[actionIndex]->action == 1) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
if (this->cueId != play->csCtx.actorCues[cueChannel]->id) {
|
||||
this->cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 1) {
|
||||
this->animIndex = 0;
|
||||
} else {
|
||||
this->animIndex = 0;
|
||||
@@ -97,9 +97,9 @@ void func_80AABE34(DmChar04* this, PlayState* play) {
|
||||
DmChar04_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0);
|
||||
}
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
} else {
|
||||
this->csAction = 0x63;
|
||||
this->cueId = 99;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef struct DmChar04 {
|
||||
/* 0x023C */ DmChar04ActionFunc actionFunc;
|
||||
/* 0x240 */ Color_RGBAf primColors;
|
||||
/* 0x250 */ Color_RGBAf envColors;
|
||||
/* 0x260 */ u8 csAction;
|
||||
/* 0x260 */ u8 cueId;
|
||||
/* 0x261 */ u8 animIndex;
|
||||
/* 0x262 */ u16 timer;
|
||||
} DmChar04; // size = 0x264
|
||||
|
||||
@@ -177,14 +177,14 @@ void func_80AAC990(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AAC9DC(DmChar05* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 109) != 0) {
|
||||
s32 actionIndex = Cutscene_GetActorActionIndex(play, 109);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_109)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_109);
|
||||
|
||||
if (play->csCtx.actorActions[actionIndex]->action == 4) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 4) {
|
||||
this->unk_18E = 1;
|
||||
this->unk_190.x = play->csCtx.actorActions[actionIndex]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorActions[actionIndex]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorActions[actionIndex]->startPos.z;
|
||||
this->unk_190.x = play->csCtx.actorCues[cueChannel]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorCues[cueChannel]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorCues[cueChannel]->startPos.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,17 +199,17 @@ void func_80AACA98(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AACAE4(DmChar05* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 564)) {
|
||||
s32 actionIndex = Cutscene_GetActorActionIndex(play, 564);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_564)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_564);
|
||||
|
||||
if (play->csCtx.actorActions[actionIndex]->action == 2) {
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 2) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
Item_Give(play, ITEM_MASK_COUPLE);
|
||||
}
|
||||
this->unk_18E = 1;
|
||||
this->unk_190.x = play->csCtx.actorActions[actionIndex]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorActions[actionIndex]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorActions[actionIndex]->startPos.z;
|
||||
this->unk_190.x = play->csCtx.actorCues[cueChannel]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorCues[cueChannel]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorCues[cueChannel]->startPos.z;
|
||||
} else {
|
||||
this->unk_18E = 0;
|
||||
}
|
||||
@@ -277,13 +277,13 @@ void func_80AACD1C(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AACD68(DmChar05* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 473)) {
|
||||
s32 actionIndex = Cutscene_GetActorActionIndex(play, 473);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_473)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_473);
|
||||
|
||||
this->unk_18E = 1;
|
||||
this->unk_190.x = play->csCtx.actorActions[actionIndex]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorActions[actionIndex]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorActions[actionIndex]->startPos.z;
|
||||
this->unk_190.x = play->csCtx.actorCues[cueChannel]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorCues[cueChannel]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorCues[cueChannel]->startPos.z;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,27 +297,27 @@ void func_80AACE10(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AACE5C(DmChar05* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 518)) {
|
||||
s32 actionIndex = Cutscene_GetActorActionIndex(play, 518);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518);
|
||||
|
||||
this->unk_18E = 1;
|
||||
this->unk_190.x = play->csCtx.actorActions[actionIndex]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorActions[actionIndex]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorActions[actionIndex]->startPos.z;
|
||||
this->unk_190.x = play->csCtx.actorCues[cueChannel]->startPos.x;
|
||||
this->unk_190.y = play->csCtx.actorCues[cueChannel]->startPos.y;
|
||||
this->unk_190.z = play->csCtx.actorCues[cueChannel]->startPos.z;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
u8 sp2F = true;
|
||||
s32 actionIndex;
|
||||
s32 cueChannel;
|
||||
|
||||
switch (DMCHAR05_GET(&this->actor)) {
|
||||
case DMCHAR05_0:
|
||||
if (Cutscene_CheckActorAction(play, 109)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 109);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_109)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_109);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
sp2F = false;
|
||||
break;
|
||||
@@ -351,16 +351,16 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
break;
|
||||
|
||||
case DMCHAR05_1:
|
||||
if (Cutscene_CheckActorAction(play, 473)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 473);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_473)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_473);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
sp2F = false;
|
||||
break;
|
||||
@@ -395,16 +395,16 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
break;
|
||||
|
||||
case DMCHAR05_2:
|
||||
if (Cutscene_CheckActorAction(play, 518)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 518);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
sp2F = false;
|
||||
break;
|
||||
@@ -438,16 +438,16 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
break;
|
||||
|
||||
case DMCHAR05_3:
|
||||
if (Cutscene_CheckActorAction(play, 559)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 559);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_559)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_559);
|
||||
|
||||
if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) {
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (play->csCtx.curFrame == play->csCtx.actorCues[cueChannel]->startFrame) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
default:
|
||||
sp2F = false;
|
||||
break;
|
||||
@@ -474,10 +474,10 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (play->csCtx.actorActions[actionIndex]->action != 4) {
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex);
|
||||
if (play->csCtx.actorCues[cueChannel]->id != 4) {
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
} else {
|
||||
Cutscene_ActorTranslate(&this->actor, play, actionIndex);
|
||||
Cutscene_ActorTranslate(&this->actor, play, cueChannel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,29 +492,29 @@ void func_80AACF04(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AAD3F8(DmChar05* this, PlayState* play) {
|
||||
if (play->csCtx.frames == 490) {
|
||||
if (play->csCtx.curFrame == 490) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EVIL_POWER);
|
||||
}
|
||||
|
||||
if (play->csCtx.frames > 550) {
|
||||
if (play->csCtx.curFrame > 550) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_MASK_FLOAT - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AAD450(DmChar05* this, PlayState* play) {
|
||||
if (play->csCtx.frames == 262) {
|
||||
if (play->csCtx.curFrame == 262) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EVIL_POWER);
|
||||
}
|
||||
|
||||
if (play->csCtx.frames > 318) {
|
||||
if (play->csCtx.curFrame > 318) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_MASK_FLOAT - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AAD4A8(DmChar05* this, PlayState* play) {
|
||||
if (DMCHAR05_GET(&this->actor) == DMCHAR05_0) {
|
||||
if (Cutscene_CheckActorAction(play, 109) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 109)]->action == 3)) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_109) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_109)]->id == 3)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 14.0f) || Animation_OnFrame(&this->skelAnime, 15.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_MASK_BOUND_0);
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 19.0f)) {
|
||||
@@ -522,15 +522,15 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_1) {
|
||||
if (Cutscene_CheckActorAction(play, 473)) {
|
||||
if ((play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 473)]->action == 3) &&
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_473)) {
|
||||
if ((play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_473)]->id == 3) &&
|
||||
Animation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_MASK_BOUND_SAND);
|
||||
}
|
||||
}
|
||||
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_2) {
|
||||
if (Cutscene_CheckActorAction(play, 518) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 518)]->action == 2)) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518)]->id == 2)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_MASK_BOUND_0);
|
||||
}
|
||||
@@ -546,18 +546,18 @@ void func_80AAD4A8(DmChar05* this, PlayState* play) {
|
||||
} else if (DMCHAR05_GET(&this->actor) == DMCHAR05_3) {
|
||||
if (play->sceneId == SCENE_OKUJOU) {
|
||||
if (gSaveContext.sceneLayer == 2) {
|
||||
if (play->csCtx.currentCsIndex == 0) {
|
||||
if (play->csCtx.scriptIndex == 0) {
|
||||
func_80AAD3F8(this, play);
|
||||
} else if (play->csCtx.currentCsIndex == 1) {
|
||||
} else if (play->csCtx.scriptIndex == 1) {
|
||||
func_80AAD450(this, play);
|
||||
}
|
||||
}
|
||||
} else if (play->sceneId == SCENE_SPOT00) {
|
||||
if (gSaveContext.sceneLayer == 9) {
|
||||
if ((play->csCtx.currentCsIndex == 0) && (play->csCtx.frames == 255)) {
|
||||
if ((play->csCtx.scriptIndex == 0) && (play->csCtx.curFrame == 255)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EVIL_POWER);
|
||||
}
|
||||
} else if ((gSaveContext.sceneLayer == 0xB) && (play->csCtx.frames == 115)) {
|
||||
} else if ((gSaveContext.sceneLayer == 0xB) && (play->csCtx.curFrame == 115)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_EVIL_POWER_PREDEMO);
|
||||
}
|
||||
}
|
||||
@@ -568,25 +568,25 @@ void DmChar05_Update(Actor* thisx, PlayState* play) {
|
||||
DmChar05* this = THIS;
|
||||
|
||||
func_80AACF04(this, play);
|
||||
if (Cutscene_CheckActorAction(play, 109)) {
|
||||
if (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 109)]->action == 3) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_109)) {
|
||||
if (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_109)]->id == 3) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
} else if (Cutscene_CheckActorAction(play, 473)) {
|
||||
if (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 473)]->action == 3) {
|
||||
} else if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_473)) {
|
||||
if (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_473)]->id == 3) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
} else if (Cutscene_CheckActorAction(play, 518)) {
|
||||
if (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 518)]->action == 2) {
|
||||
} else if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518)) {
|
||||
if (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518)]->id == 2) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
} else if (Cutscene_CheckActorAction(play, 559)) {
|
||||
if ((play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 559)]->action == 2) ||
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 559)]->action == 3)) {
|
||||
} else if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_559)) {
|
||||
if ((play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_559)]->id == 2) ||
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_559)]->id == 3)) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
if (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 559)]->action == 4) {
|
||||
if (play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_559)]->id == 4) {
|
||||
this->actor.world.rot.y += 0x258;
|
||||
this->actor.shape.rot.y += 0x258;
|
||||
}
|
||||
@@ -607,8 +607,8 @@ void func_80AAD998(Actor* thisx, PlayState* play) {
|
||||
s32 pad[2];
|
||||
|
||||
if (this->unk_18E == 0) {
|
||||
if (Cutscene_CheckActorAction(play, 109) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 109)]->action != 1)) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_109) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_109)]->id != 1)) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
@@ -628,8 +628,8 @@ void func_80AADA90(Actor* thisx, PlayState* play) {
|
||||
DmChar05* this = THIS;
|
||||
|
||||
if (this->unk_18E == 0) {
|
||||
if (Cutscene_CheckActorAction(play, 473) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 473)]->action != 1)) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_473) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_473)]->id != 1)) {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, DmChar05_OverrideLimbDraw,
|
||||
DmChar05_PostLimbDraw, &this->actor);
|
||||
@@ -643,8 +643,8 @@ void func_80AADB4C(Actor* thisx, PlayState* play) {
|
||||
DmChar05* this = THIS;
|
||||
|
||||
if (this->unk_18E == 0) {
|
||||
if (Cutscene_CheckActorAction(play, 518) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 518)]->action != 1)) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_518) &&
|
||||
(play->csCtx.actorCues[Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_518)]->id != 1)) {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, NULL, NULL, &this->actor);
|
||||
@@ -657,19 +657,18 @@ void func_80AADB4C(Actor* thisx, PlayState* play) {
|
||||
void func_80AADC00(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
DmChar05* this = THIS;
|
||||
s32 actionIndex;
|
||||
s32 cueChannel;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 559)) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 559);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_559)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_559);
|
||||
|
||||
if ((play->csCtx.actorActions[actionIndex]->action != 1) &&
|
||||
(play->csCtx.actorActions[actionIndex]->action != 4)) {
|
||||
if ((play->csCtx.actorCues[cueChannel]->id != 1) && (play->csCtx.actorCues[cueChannel]->id != 4)) {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, DmChar05_OverrideLimbDraw,
|
||||
DmChar05_PostLimbDraw, &this->actor);
|
||||
}
|
||||
|
||||
if (play->csCtx.actorActions[actionIndex]->action == 4) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 4) {
|
||||
Matrix_Translate(-600.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Gfx_DrawDListOpa(play, object_dmask_DL_001E70);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ void DmChar06_SetupAction(DmChar06* this, DmChar06ActionFunc actionFunc) {
|
||||
void DmChar06_Init(Actor* thisx, PlayState* play) {
|
||||
DmChar06* this = THIS;
|
||||
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_33_80);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_CLEARED_SNOWHEAD_TEMPLE);
|
||||
Actor_SetScale(&this->actor, 1.0f);
|
||||
this->alpha = 255;
|
||||
DmChar06_SetupAction(this, func_80AAE6F0);
|
||||
@@ -47,17 +47,17 @@ void DmChar06_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AAE6F0(DmChar06* this, PlayState* play) {
|
||||
if (Cutscene_CheckActorAction(play, 0x1CF)) {
|
||||
s32 actionIndex = Cutscene_GetActorActionIndex(play, 0x1CF);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_463)) {
|
||||
s32 cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_463);
|
||||
|
||||
if ((play->csCtx.frames >= play->csCtx.actorActions[actionIndex]->startFrame) &&
|
||||
(play->csCtx.actorActions[actionIndex]->endFrame >= play->csCtx.frames)) {
|
||||
if (play->csCtx.actorActions[actionIndex]->action == 1) {
|
||||
if ((play->csCtx.curFrame >= play->csCtx.actorCues[cueChannel]->startFrame) &&
|
||||
(play->csCtx.actorCues[cueChannel]->endFrame >= play->csCtx.curFrame)) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 1) {
|
||||
this->alpha = 255;
|
||||
} else if (play->csCtx.actorActions[actionIndex]->action == 2) {
|
||||
f32 lerp = 1.0f - Environment_LerpWeight(play->csCtx.actorActions[actionIndex]->endFrame,
|
||||
play->csCtx.actorActions[actionIndex]->startFrame,
|
||||
play->csCtx.frames);
|
||||
} else if (play->csCtx.actorCues[cueChannel]->id == 2) {
|
||||
f32 lerp =
|
||||
1.0f - Environment_LerpWeight(play->csCtx.actorCues[cueChannel]->endFrame,
|
||||
play->csCtx.actorCues[cueChannel]->startFrame, play->csCtx.curFrame);
|
||||
this->alpha = 255 * lerp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,27 +275,27 @@ void DmChar08_WaitForSong(DmChar08* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void DmChar08_SetupAppearCs(DmChar08* this, PlayState* play) {
|
||||
s16 cs1 = this->dyna.actor.cutscene;
|
||||
s16 cs = ActorCutscene_GetAdditionalCutscene(
|
||||
ActorCutscene_GetAdditionalCutscene(ActorCutscene_GetAdditionalCutscene(cs1)));
|
||||
s16 csId = this->dyna.actor.csId;
|
||||
s16 additionalCsId =
|
||||
CutsceneManager_GetAdditionalCsId(CutsceneManager_GetAdditionalCsId(CutsceneManager_GetAdditionalCsId(csId)));
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_93_08)) {
|
||||
cs1 = cs;
|
||||
csId = additionalCsId;
|
||||
}
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(cs1)) {
|
||||
ActorCutscene_Start(cs1, &this->dyna.actor);
|
||||
if (CutsceneManager_IsNext(csId)) {
|
||||
CutsceneManager_Start(csId, &this->dyna.actor);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_53_20);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_93_08);
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
this->actionFunc = func_80AAF884;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(cs1);
|
||||
CutsceneManager_Queue(csId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AAF884(DmChar08* this, PlayState* play) {
|
||||
if (play->csCtx.state == CS_STATE_0) {
|
||||
if (play->csCtx.state == CS_STATE_IDLE) {
|
||||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS | DYNA_TRANSFORM_ROT_Y);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gTurtleZoraCapeAwakeCol);
|
||||
this->dyna.actor.flags |= ACTOR_FLAG_1;
|
||||
@@ -321,22 +321,22 @@ void func_80AAF8F4(DmChar08* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AAFA18(DmChar08* this, PlayState* play) {
|
||||
s16 nextCs;
|
||||
s16 nextCs2;
|
||||
s16 nextCs1;
|
||||
s16 nextCsId;
|
||||
s16 nextCsId2;
|
||||
s16 nextCsId1;
|
||||
|
||||
nextCs1 = ActorCutscene_GetAdditionalCutscene(this->dyna.actor.cutscene);
|
||||
nextCs2 = nextCs1;
|
||||
nextCs1 = ActorCutscene_GetAdditionalCutscene(nextCs1);
|
||||
nextCsId1 = CutsceneManager_GetAdditionalCsId(this->dyna.actor.csId);
|
||||
nextCsId2 = nextCsId1;
|
||||
nextCsId1 = CutsceneManager_GetAdditionalCsId(nextCsId1);
|
||||
|
||||
nextCs = CHECK_WEEKEVENTREG(WEEKEVENTREG_53_40) ? nextCs1 : nextCs2;
|
||||
nextCsId = CHECK_WEEKEVENTREG(WEEKEVENTREG_53_40) ? nextCsId1 : nextCsId2;
|
||||
|
||||
if (ActorCutscene_GetCanPlayNext(nextCs) != 0) {
|
||||
if (CutsceneManager_IsNext(nextCsId)) {
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_53_40);
|
||||
ActorCutscene_Start(nextCs, &this->dyna.actor);
|
||||
CutsceneManager_Start(nextCsId, &this->dyna.actor);
|
||||
this->actionFunc = DmChar08_DoNothing;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(nextCs);
|
||||
CutsceneManager_Queue(nextCsId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ void DmChar08_SpawnBubbles(DmChar08* this, PlayState* play) {
|
||||
void func_80AAFCCC(DmChar08* this, PlayState* play) {
|
||||
switch (play->sceneId) {
|
||||
case SCENE_31MISAKI:
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_55_80)) {
|
||||
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_GREAT_BAY_TEMPLE)) {
|
||||
switch (this->unk_206) {
|
||||
case 0:
|
||||
break;
|
||||
@@ -455,15 +455,15 @@ void DmChar08_DoNothing(DmChar08* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80AAFE88(DmChar08* this, PlayState* play) {
|
||||
s32 actorActionIndex;
|
||||
CsCmdActorAction* csAction;
|
||||
s32 cueChannel;
|
||||
s32 pad;
|
||||
f32 phi_f12;
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 474)) {
|
||||
actorActionIndex = Cutscene_GetActorActionIndex(play, 474);
|
||||
if (this->unk_1F6 != play->csCtx.actorActions[actorActionIndex]->action) {
|
||||
this->unk_1F6 = play->csCtx.actorActions[actorActionIndex]->action;
|
||||
switch (play->csCtx.actorActions[actorActionIndex]->action) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_474)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_474);
|
||||
if (this->cueId != play->csCtx.actorCues[cueChannel]->id) {
|
||||
this->cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 1:
|
||||
this->animIndex = TURTLE_ANIM_IDLE;
|
||||
break;
|
||||
@@ -514,12 +514,12 @@ void func_80AAFE88(DmChar08* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (play->csCtx.actorActions[actorActionIndex]->action) {
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 2:
|
||||
this->unk_1FF = 1;
|
||||
phi_f12 = 2.0f * Environment_LerpWeight(play->csCtx.actorActions[actorActionIndex]->endFrame,
|
||||
play->csCtx.actorActions[actorActionIndex]->startFrame,
|
||||
play->csCtx.frames);
|
||||
phi_f12 =
|
||||
2.0f * Environment_LerpWeight(play->csCtx.actorCues[cueChannel]->endFrame,
|
||||
play->csCtx.actorCues[cueChannel]->startFrame, play->csCtx.curFrame);
|
||||
if (phi_f12 > 1.0f) {
|
||||
phi_f12 = 1.0f;
|
||||
}
|
||||
@@ -529,30 +529,30 @@ void func_80AAFE88(DmChar08* this, PlayState* play) {
|
||||
this->unk_1FF = 2;
|
||||
}
|
||||
|
||||
Cutscene_ActorTranslateAndYaw(&this->dyna.actor, play, actorActionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->dyna.actor, play, cueChannel);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
Cutscene_ActorTranslateAndYawSmooth(&this->dyna.actor, play, actorActionIndex);
|
||||
Cutscene_ActorTranslateAndYawSmooth(&this->dyna.actor, play, cueChannel);
|
||||
break;
|
||||
|
||||
case 14:
|
||||
Cutscene_ActorTranslate(&this->dyna.actor, play, actorActionIndex);
|
||||
Math_SmoothStepToS(&this->dyna.actor.world.rot.y, play->csCtx.actorActions[actorActionIndex]->rot.y,
|
||||
0xA, 0xDC, 1);
|
||||
Cutscene_ActorTranslate(&this->dyna.actor, play, cueChannel);
|
||||
Math_SmoothStepToS(&this->dyna.actor.world.rot.y, play->csCtx.actorCues[cueChannel]->rot.y, 0xA, 0xDC,
|
||||
1);
|
||||
this->dyna.actor.shape.rot.y = this->dyna.actor.world.rot.y;
|
||||
break;
|
||||
|
||||
default:
|
||||
Cutscene_ActorTranslateAndYaw(&this->dyna.actor, play, actorActionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->dyna.actor, play, cueChannel);
|
||||
break;
|
||||
}
|
||||
this->targetYPos = this->dyna.actor.world.pos.y;
|
||||
if ((this->unk_1FF >= 2) || (play->csCtx.actorActions[actorActionIndex]->action == 2)) {
|
||||
if ((this->unk_1FF >= 2) || (play->csCtx.actorCues[cueChannel]->id == 2)) {
|
||||
Math_SmoothStepToF(&this->unk_1F0, 1.0f, 0.02f, 0.1f, 0.00001f);
|
||||
}
|
||||
} else {
|
||||
this->unk_1F6 = 99;
|
||||
this->cueId = 99;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,8 +894,8 @@ 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) &&
|
||||
(play->csCtx.currentCsIndex == 0)) {
|
||||
if ((play->csCtx.frames >= 890) && (play->csCtx.frames < 922)) {
|
||||
(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);
|
||||
}
|
||||
}
|
||||
@@ -1097,7 +1097,7 @@ void DmChar08_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sBigTurtleEyeTextures[this->eyeIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(sBigTurtleEyeTextures[this->eyeIndex]));
|
||||
if ((this->unk_1FF > 0) || (play->csCtx.state != CS_STATE_0)) {
|
||||
if ((this->unk_1FF > 0) || (play->csCtx.state != CS_STATE_IDLE)) {
|
||||
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, DmChar08_OverrideLimbDraw, DmChar08_PostLimbDraw,
|
||||
DmChar08_TransformLimbDraw, &this->dyna.actor);
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef struct DmChar08 {
|
||||
/* 0x1E8 */ UNK_TYPE1 unk_1E8[8];
|
||||
/* 0x1F0 */ f32 unk_1F0;
|
||||
/* 0x1F4 */ s16 unk_1F4;
|
||||
/* 0x1F6 */ s16 unk_1F6;
|
||||
/* 0x1F6 */ s16 cueId;
|
||||
/* 0x1F6 */ s16 blinkTimer;
|
||||
/* 0x1FA */ s16 unk_1FA;
|
||||
/* 0x1FC */ u16 unk_1FC;
|
||||
|
||||
@@ -127,24 +127,24 @@ void func_80AB2268(DmChar09* this, PlayState* play) {
|
||||
Path* path;
|
||||
s32 pad;
|
||||
s32 i;
|
||||
s32 actionIndex;
|
||||
s32 cueChannel;
|
||||
s32 max = 0;
|
||||
s32 pathnum;
|
||||
u8 temp = false;
|
||||
|
||||
if (!DMCHAR09_GET_F(&this->actor)) {
|
||||
if (play->csCtx.currentCsIndex == 1) {
|
||||
if (play->csCtx.scriptIndex == 1) {
|
||||
temp = true;
|
||||
}
|
||||
} else if (play->csCtx.currentCsIndex == 0) {
|
||||
} else if (play->csCtx.scriptIndex == 0) {
|
||||
temp = true;
|
||||
}
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x1F7) && temp) {
|
||||
actionIndex = Cutscene_GetActorActionIndex(play, 0x1F7);
|
||||
if (this->unk_22F != play->csCtx.actorActions[actionIndex]->action) {
|
||||
this->unk_22F = play->csCtx.actorActions[actionIndex]->action;
|
||||
switch (play->csCtx.actorActions[actionIndex]->action) {
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_503) && temp) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_503);
|
||||
if (this->cueId != play->csCtx.actorCues[cueChannel]->id) {
|
||||
this->cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
switch (play->csCtx.actorCues[cueChannel]->id) {
|
||||
case 2:
|
||||
max = 0;
|
||||
break;
|
||||
@@ -159,7 +159,7 @@ void func_80AB2268(DmChar09* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (play->csCtx.actorActions[actionIndex]->action >= 2) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id >= 2) {
|
||||
pathnum = DMCHAR09_GET_PATH(&this->actor);
|
||||
path = &play->setupPathList[pathnum];
|
||||
|
||||
@@ -175,7 +175,7 @@ void func_80AB2268(DmChar09* this, PlayState* play) {
|
||||
this->unk_220 = 1;
|
||||
this->unk_22E = true;
|
||||
|
||||
this->speed = (u16)play->csCtx.actorActions[actionIndex]->rot.z * 0.00390625f;
|
||||
this->speed = (u16)play->csCtx.actorCues[cueChannel]->rot.z * 0.00390625f;
|
||||
this->actionFunc = func_80AB1FDC;
|
||||
} else {
|
||||
this->unk_22E = false;
|
||||
@@ -183,7 +183,7 @@ void func_80AB2268(DmChar09* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this->unk_22F = 0x63;
|
||||
this->cueId = 99;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef struct DmChar09 {
|
||||
/* 0x22A */ s16 unk_22A;
|
||||
/* 0x22C */ UNK_TYPE1 pad22C[2];
|
||||
/* 0x22E */ u8 unk_22E;
|
||||
/* 0x22F */ u8 unk_22F;
|
||||
/* 0x22F */ u8 cueId;
|
||||
} DmChar09; // size = 0x230
|
||||
|
||||
#endif // Z_DM_CHAR09_H
|
||||
|
||||
@@ -195,28 +195,28 @@ void func_80C248A8(DmGm* this, PlayState* play) {
|
||||
|
||||
void func_80C24A00(DmGm* this, PlayState* play) {
|
||||
s32 sp28[] = { 0, 0, 12, 2, 4, 6, 8, 10, 11, 3 };
|
||||
u16 action;
|
||||
s32 sp20;
|
||||
u16 cueId;
|
||||
s32 cueChannel;
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (this->unk_2D0 == 0) {
|
||||
this->unk_2B0 = 255;
|
||||
this->cueId = 255;
|
||||
this->unk_2D0 = 1;
|
||||
this->unk_2D4 = 0;
|
||||
this->unk_2CC = this->unk_2C8;
|
||||
}
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x22D)) {
|
||||
sp20 = Cutscene_GetActorActionIndex(play, 0x22D);
|
||||
action = play->csCtx.actorActions[sp20]->action;
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_557)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_557);
|
||||
cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
|
||||
if (this->unk_2B0 != (action & 0xFF)) {
|
||||
this->unk_2B0 = action;
|
||||
if (this->cueId != (u8)cueId) {
|
||||
this->cueId = cueId;
|
||||
this->unk_2D4 = 1;
|
||||
func_80C24428(this, play, sp28[action]);
|
||||
func_80C24428(this, play, sp28[cueId]);
|
||||
}
|
||||
|
||||
switch (this->unk_2B0) {
|
||||
switch (this->cueId) {
|
||||
case 2:
|
||||
case 4:
|
||||
case 5:
|
||||
@@ -230,7 +230,7 @@ void func_80C24A00(DmGm* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, sp20);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
} else if (this->unk_2D0 != 0) {
|
||||
this->unk_2D0 = 0;
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef struct DmGm {
|
||||
/* 0x2AC */ s8 unk_2AC;
|
||||
/* 0x2AD */ s8 unk_2AD;
|
||||
/* 0x2AE */ u16 unk_2AE;
|
||||
/* 0x2B0 */ u8 unk_2B0;
|
||||
/* 0x2B0 */ u8 cueId;
|
||||
/* 0x2B4 */ Actor* unk_2B4;
|
||||
/* 0x2B8 */ s16 unk_2B8;
|
||||
/* 0x2BA */ s16 unk_2BA;
|
||||
|
||||
@@ -43,23 +43,23 @@ s32 func_80C1DED0(DmNb* this, s32 arg1) {
|
||||
|
||||
void func_80C1DF18(DmNb* this, PlayState* play) {
|
||||
s32 sp2C[] = { 0, 0, 0, 0, 0 };
|
||||
u16 csAction;
|
||||
s32 csActionIndex;
|
||||
u16 cueId;
|
||||
s32 cueChannel;
|
||||
|
||||
if (play->csCtx.state != 0) {
|
||||
if (this->unk1F8 == 0) {
|
||||
this->unk1EC = 0xFF;
|
||||
this->cueId = 255;
|
||||
this->unk1F8 = 1;
|
||||
this->unk1F4 = this->unk1F0;
|
||||
}
|
||||
if (Cutscene_CheckActorAction(play, 0x232)) {
|
||||
csActionIndex = Cutscene_GetActorActionIndex(play, 0x232);
|
||||
csAction = play->csCtx.actorActions[csActionIndex]->action;
|
||||
if (this->unk1EC != (u8)csAction) {
|
||||
this->unk1EC = csAction;
|
||||
func_80C1DED0(this, sp2C[csAction]);
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_562)) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_562);
|
||||
cueId = play->csCtx.actorCues[cueChannel]->id;
|
||||
if (this->cueId != (u8)cueId) {
|
||||
this->cueId = cueId;
|
||||
func_80C1DED0(this, sp2C[cueId]);
|
||||
}
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, csActionIndex);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
} else if (this->unk1F8 != 0) {
|
||||
this->unk1F8 = 0;
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef struct DmNb {
|
||||
/* 0x188 */ DmNbActionFunc actionFunc;
|
||||
/* 0x18C */ Vec3s jointTable[NB_LIMB_MAX];
|
||||
/* 0x1BC */ Vec3s morphTable[NB_LIMB_MAX];
|
||||
/* 0x1EC */ u8 unk1EC;
|
||||
/* 0x1EC */ u8 cueId;
|
||||
/* 0x1F0 */ s32 unk1F0;
|
||||
/* 0x1F4 */ s32 unk1F4;
|
||||
/* 0x1F8 */ s32 unk1F8;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user