2020-10-03 15:22:44 +00:00
|
|
|
|
#include "global.h"
|
2022-10-15 06:16:37 +00:00
|
|
|
|
#include "quake.h"
|
2022-11-01 23:17:11 +00:00
|
|
|
|
#include "terminal.h"
|
2021-03-31 16:18:31 +00:00
|
|
|
|
#include "overlays/actors/ovl_En_Sw/z_en_sw.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
static s16 sDisableAttention = false;
|
|
|
|
|
static s16 sUnused = -1;
|
|
|
|
|
static s32 sPrevFrameCs1100 = -4096;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-10-04 10:36:25 +00:00
|
|
|
|
#include "z_onepointdemo_data.inc.c"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-10-15 13:43:59 +00:00
|
|
|
|
Vec3f* OnePointCutscene_AddVecGeoToVec3f(Vec3f* dest, Vec3f* a, VecGeo* geo) {
|
|
|
|
|
Vec3f sum;
|
|
|
|
|
Vec3f b;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_VecGeoToVec3f(&b, geo);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 13:43:59 +00:00
|
|
|
|
sum.x = a->x + b.x;
|
|
|
|
|
sum.y = a->y + b.y;
|
|
|
|
|
sum.z = a->z + b.z;
|
|
|
|
|
|
|
|
|
|
*dest = sum;
|
|
|
|
|
|
|
|
|
|
return dest;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s16 OnePointCutscene_Vec3fYaw(Vec3f* vec1, Vec3f* vec2) {
|
2022-04-24 14:23:49 +00:00
|
|
|
|
return CAM_DEG_TO_BINANG(RAD_TO_DEG(Math_FAtan2F(vec2->x - vec1->x, vec2->z - vec1->z)));
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OnePointCutscene_Vec3sToVec3f(Vec3f* src, Vec3s* dst) {
|
decompile z_camera (#398)
* cleanup
* name camera action functions
* decompile a few small functions, name a few Camera struct members
* decompile camera data, decompile a few camera functions
* Split ASM for code_800BB0A0
* removing code_800BB0A0.s
* PR Requests, Camera WIP
* remove #define NON_MATCHING from db_camera
* rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c
* camera wip
* rename some struct memebers, some decomp wip
* pr updates
* camera wip
* name some fields in Camera Struct, being making sense of Camera_Update
* Camera WIP
* wip
* wip
* add z64camera.h header, begin creating CameraSetting macros
* wip
* wip
* wip
* wip
* migrate camera bss to c
* match a couple functions in db_camera
* match some small db_camera functions
* wip
* migrate db_camera rodata, match a few functions
* remote db_camera.rodata.s
* match some of db_camera
* identify types of some unknown data pieces
* some small wip
* Match Camera_Init, some function changes, some struct name changes. Change unk_C0 and unk_CC to floats from Vec3fs
* add naming for a few more Camera struct members
* wip
* match func_80043F94
* Match Camera_Jump1
* document some of Camera_Jump1
* wip
* match Camera_Jump3
* Match Camera_Update, FeelsAmazing
* wip
* wip
* match Camera_SetParam
* minor cleanup
* wip
* wip
* match Camera_KeepOn0
* some documentation, modify some matching functions to match style of others.
* match Camera_Demo1
* match camera_demo9
* document Camera_Demo1 and Camera_Demo9
* wip
* Match camera_battle4
* match camera_unique2
* Match Camera_Unique3
* match camera_special6
* match Camera_Special5
* wip
* document camera_special6
* naming updates
* match camera_Unique1
* match Camera_Unique0
* wip
* Match Camera_CalcUpFromPitchYawRoll
* match func_80045508
* document Camera_Battle4
* document several camera functions, move camera data to separate file
* rename phi/theta to pitch/yaw
* wip
* uniq9 wip
* Camera_Unqiue9 OK
* document Camera_Unique9
* name unk_160 in camera struct
* wip
* wip
* minor updates
* fix conflicts
* wip
* wip
* Olib updates
* wip
* wip
* rename most Math3D functions, few matches, documentation
* wip
* document most of math3d
* wip
* wip
* wip
* pr updates
* Match Camera_Fixed4
* match func_80058E8C
* pr updates
* add missing comment block finalizer
* Merge math3dupdates
* match Camera_ChangeSetting
* Match Camera_ChangeMode
* match func_80058148
* Match Camera_Special9
* decompile the rest of camera data
* match Camera_Demo5
* name a few camera functions in z_play
* match func_80046CB4, some work on other fucntions
* wip
* impove some non matchings
* fix function rename
* match func_800588B4
* match Camera_Subj4
* wip
* Camera_Demo3 matching, Camera_Battle1 big progress
* Camera_Normal2 OK
* wip
* match Camera_Parallel1
* normalize some things across functions
* match Camera_Normal1
* Match Camera_Normal3
* some cleanup
* more cleanup
* more cleanup , match Camera_CalcDefaultPitch
* data formatting
* Match Camera_Jump2
* document Camera_Jump2
* Match Camera_KeepOn3
* document some of Camera_KeepOn3
* improve some non_matchings
* match func_80045C74 and func_800460A8
* code cleanup, documentation
* match Camera_KeepOn1
* Match Camera_Subj3
* Match Camera_Battle1
* remove non_matching from func_80044adc and func_80046e20
* name several members of Battle1
* more documentation on Battle1
* cleanup
* renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector
* reorganize update structs, remove final references to params, remove CameraParams union
* implement camera enums into player
* Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player
* remove non-global camera variables from variables.h
* clean up some variable declarations
* finish pr comment updates
* fix some warnings
* data formatting
* finish commenting on data
* delete unused asm
* remove asm
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-06 22:39:47 +00:00
|
|
|
|
dst->x = src->x;
|
|
|
|
|
dst->y = src->y;
|
|
|
|
|
dst->z = src->z;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
s32 OnePointCutscene_BgCheckLineTest(CollisionContext* colCtx, Vec3f* vec1, Vec3f* vec2) {
|
|
|
|
|
Vec3f posResult;
|
|
|
|
|
s32 bgId;
|
|
|
|
|
CollisionPoly* outPoly = NULL;
|
|
|
|
|
|
|
|
|
|
return BgCheck_CameraLineTest1(colCtx, vec1, vec2, &posResult, &outPoly, true, true, true, false, &bgId);
|
|
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-08-30 15:49:51 +00:00
|
|
|
|
f32 OnePointCutscene_RaycastDown(CollisionContext* colCtx, Vec3f* pos) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
CollisionPoly* outPoly;
|
decompile z_camera (#398)
* cleanup
* name camera action functions
* decompile a few small functions, name a few Camera struct members
* decompile camera data, decompile a few camera functions
* Split ASM for code_800BB0A0
* removing code_800BB0A0.s
* PR Requests, Camera WIP
* remove #define NON_MATCHING from db_camera
* rename code_8007BF90.c to z_olib.c, rename functions in z_olib.c
* camera wip
* rename some struct memebers, some decomp wip
* pr updates
* camera wip
* name some fields in Camera Struct, being making sense of Camera_Update
* Camera WIP
* wip
* wip
* add z64camera.h header, begin creating CameraSetting macros
* wip
* wip
* wip
* wip
* migrate camera bss to c
* match a couple functions in db_camera
* match some small db_camera functions
* wip
* migrate db_camera rodata, match a few functions
* remote db_camera.rodata.s
* match some of db_camera
* identify types of some unknown data pieces
* some small wip
* Match Camera_Init, some function changes, some struct name changes. Change unk_C0 and unk_CC to floats from Vec3fs
* add naming for a few more Camera struct members
* wip
* match func_80043F94
* Match Camera_Jump1
* document some of Camera_Jump1
* wip
* match Camera_Jump3
* Match Camera_Update, FeelsAmazing
* wip
* wip
* match Camera_SetParam
* minor cleanup
* wip
* wip
* match Camera_KeepOn0
* some documentation, modify some matching functions to match style of others.
* match Camera_Demo1
* match camera_demo9
* document Camera_Demo1 and Camera_Demo9
* wip
* Match camera_battle4
* match camera_unique2
* Match Camera_Unique3
* match camera_special6
* match Camera_Special5
* wip
* document camera_special6
* naming updates
* match camera_Unique1
* match Camera_Unique0
* wip
* Match Camera_CalcUpFromPitchYawRoll
* match func_80045508
* document Camera_Battle4
* document several camera functions, move camera data to separate file
* rename phi/theta to pitch/yaw
* wip
* uniq9 wip
* Camera_Unqiue9 OK
* document Camera_Unique9
* name unk_160 in camera struct
* wip
* wip
* minor updates
* fix conflicts
* wip
* wip
* Olib updates
* wip
* wip
* rename most Math3D functions, few matches, documentation
* wip
* document most of math3d
* wip
* wip
* wip
* pr updates
* Match Camera_Fixed4
* match func_80058E8C
* pr updates
* add missing comment block finalizer
* Merge math3dupdates
* match Camera_ChangeSetting
* Match Camera_ChangeMode
* match func_80058148
* Match Camera_Special9
* decompile the rest of camera data
* match Camera_Demo5
* name a few camera functions in z_play
* match func_80046CB4, some work on other fucntions
* wip
* impove some non matchings
* fix function rename
* match func_800588B4
* match Camera_Subj4
* wip
* Camera_Demo3 matching, Camera_Battle1 big progress
* Camera_Normal2 OK
* wip
* match Camera_Parallel1
* normalize some things across functions
* match Camera_Normal1
* Match Camera_Normal3
* some cleanup
* more cleanup
* more cleanup , match Camera_CalcDefaultPitch
* data formatting
* Match Camera_Jump2
* document Camera_Jump2
* Match Camera_KeepOn3
* document some of Camera_KeepOn3
* improve some non_matchings
* match func_80045C74 and func_800460A8
* code cleanup, documentation
* match Camera_KeepOn1
* Match Camera_Subj3
* Match Camera_Battle1
* remove non_matching from func_80044adc and func_80046e20
* name several members of Battle1
* more documentation on Battle1
* cleanup
* renaming Camera_Vec3fScaleXYZFactor to Camera_Vec3fTranslateByUnitVector
* reorganize update structs, remove final references to params, remove CameraParams union
* implement camera enums into player
* Renaming Camera_GetDir to Camera_GetInputDir, Camera_GetRealDir to Camera_GetCamDir, etc, implement camera enum's into player
* remove non-global camera variables from variables.h
* clean up some variable declarations
* finish pr comment updates
* fix some warnings
* data formatting
* finish commenting on data
* delete unused asm
* remove asm
Co-authored-by: fig <fig02srl@gmail.com>
2020-12-06 22:39:47 +00:00
|
|
|
|
s32 bgId;
|
2020-03-22 21:19:43 +00:00
|
|
|
|
|
2022-08-30 15:49:51 +00:00
|
|
|
|
return BgCheck_EntityRaycastDown3(colCtx, &outPoly, &bgId, pos);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
void OnePointCutscene_SetCsCamPoints(Camera* camera, s16 actionParameters, s16 initTimer, CutsceneCameraPoint* atPoints,
|
2021-04-04 21:48:12 +00:00
|
|
|
|
CutsceneCameraPoint* eyePoints) {
|
2022-05-08 21:35:54 +00:00
|
|
|
|
OnePointCamData* onePointCamData = &camera->paramData.demo9.onePointCamData;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
onePointCamData->atPoints = atPoints;
|
|
|
|
|
onePointCamData->eyePoints = eyePoints;
|
|
|
|
|
onePointCamData->actionParameters = actionParameters;
|
|
|
|
|
onePointCamData->initTimer = initTimer;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* actor, s16 timer) {
|
|
|
|
|
Camera* subCam = play->cameraPtrs[subCamId];
|
|
|
|
|
Camera* childCam = play->cameraPtrs[subCam->childCamId];
|
|
|
|
|
Camera* mainCam = play->cameraPtrs[CAM_ID_MAIN];
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Player* player = mainCam->player;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
VecGeo spD0;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
s32 i;
|
|
|
|
|
Vec3f spC0;
|
|
|
|
|
Vec3f spB4;
|
|
|
|
|
PosRot spA0;
|
|
|
|
|
PosRot sp8C;
|
|
|
|
|
f32 tempRand;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
OnePointCsInfo* csInfo = &subCam->paramData.uniq9.csInfo;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
switch (csId) {
|
|
|
|
|
case 1020:
|
|
|
|
|
if (timer < 20) {
|
|
|
|
|
timer = 20;
|
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_801208EC[0].atTargetInit = play->view.at;
|
|
|
|
|
D_801208EC[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_801208EC[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_801208EC[1].atTargetInit = mainCam->at;
|
|
|
|
|
D_801208EC[1].eyeTargetInit = mainCam->eye;
|
|
|
|
|
D_801208EC[1].fovTargetInit = mainCam->fov;
|
|
|
|
|
D_801208EC[1].timerInit = timer - 1;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->timer = timer + 1;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_801208EC[1].lerpStepScale = 1.0f / (0.5f * timer);
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801208EC;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 1030:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_80120964[0].atTargetInit = play->view.at;
|
|
|
|
|
D_80120964[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_80120964[0].fovTargetInit = play->view.fovy;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &mainCam->at, &mainCam->eye);
|
2022-04-24 14:23:49 +00:00
|
|
|
|
D_80120964[1].eyeTargetInit.y = CAM_BINANG_TO_DEG(spD0.yaw);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_80120964[1].timerInit = timer - 1;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80120964;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 5000:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_801209B4[0].atTargetInit = D_801209B4[1].atTargetInit = play->view.at;
|
|
|
|
|
D_801209B4[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_801209B4[0].fovTargetInit = D_801209B4[2].fovTargetInit = play->view.fovy;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &actor->focus.pos, &mainCam->at);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spD0.r = mainCam->dist;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&D_801209B4[1].eyeTargetInit, &D_801209B4[1].atTargetInit, &spD0);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_801209B4[1].atTargetInit.y += 20.0f;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801209B4;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 5010:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_ATTENTION);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &mainCam->at, &mainCam->eye);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 9500:
|
|
|
|
|
csInfo->keyFrames = D_80120A54;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2260:
|
|
|
|
|
D_80120ACC[0].atTargetInit.x = D_80120ACC[2].atTargetInit.x =
|
2022-05-21 18:23:43 +00:00
|
|
|
|
((mainCam->play->state.frames & 1) ? -10.0f : 10.0f) + (Rand_ZeroOne() * 8.0f);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
D_80120ACC[0].eyeTargetInit.x = D_80120ACC[2].eyeTargetInit.x =
|
2022-05-21 18:23:43 +00:00
|
|
|
|
((mainCam->play->state.frames & 1) ? 20.0f : -20.0f) + (Rand_ZeroOne() * 5.0f);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80120ACC;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2270:
|
|
|
|
|
csInfo->keyFrames = D_80120B94;
|
|
|
|
|
csInfo->keyFrameCnt = 11;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
|
|
|
|
|
if (D_80120B94[i].actionFlags != 0x8F) {
|
|
|
|
|
D_80120B94[i].atTargetInit.x = Rand_ZeroOne() * 5.0f;
|
|
|
|
|
D_80120B94[i].atTargetInit.z = (Rand_ZeroOne() * 30.0f) + 10.0f;
|
|
|
|
|
D_80120B94[i].eyeTargetInit.x = (Rand_ZeroOne() * 100.0f) + 20.0f;
|
|
|
|
|
D_80120B94[i].eyeTargetInit.z = (Rand_ZeroOne() * 80.0f) + 50.0f;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
D_80120B94[subCamId - 1].eyeTargetInit.y =
|
2022-05-21 18:23:43 +00:00
|
|
|
|
((mainCam->play->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne();
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_5);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 400);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 4, 5, 40, 0x3C);
|
|
|
|
|
Quake_SetDuration(i, 1600);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2280:
|
|
|
|
|
csInfo->keyFrames = D_80120D4C;
|
|
|
|
|
csInfo->keyFrameCnt = 7;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
|
|
|
|
|
if (D_80120D4C[i].actionFlags != 0x8F) {
|
|
|
|
|
D_80120D4C[i].atTargetInit.x = Rand_ZeroOne() * 20.0f;
|
|
|
|
|
D_80120D4C[i].atTargetInit.z = (Rand_ZeroOne() * 40.0f) + 10.0f;
|
|
|
|
|
D_80120D4C[i].eyeTargetInit.x = (Rand_ZeroOne() * 40.0f) + 60.0f;
|
|
|
|
|
D_80120D4C[i].eyeTargetInit.z = (Rand_ZeroOne() * 40.0f) + 80.0f;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-05-12 18:35:31 +00:00
|
|
|
|
D_80120D4C[subCamId - 1].eyeTargetInit.y =
|
2022-05-21 18:23:43 +00:00
|
|
|
|
((mainCam->play->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne();
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_5);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 400);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 3, 200, 0x32);
|
|
|
|
|
Quake_SetDuration(i, 9999);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2220:
|
|
|
|
|
csInfo->keyFrames = D_80120E64;
|
|
|
|
|
csInfo->keyFrameCnt = 8;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_5);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 400);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 2, 50, 0);
|
|
|
|
|
Quake_SetDuration(i, 280);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2230:
|
|
|
|
|
if (player->actor.world.pos.z < 1000.0f) {
|
|
|
|
|
D_80120FA4[0].eyeTargetInit.x = -D_80120FA4[0].eyeTargetInit.x;
|
|
|
|
|
D_80120FA4[2].eyeTargetInit.x = -D_80120FA4[2].eyeTargetInit.x;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80120FA4;
|
|
|
|
|
csInfo->keyFrameCnt = 6;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2340:
|
|
|
|
|
csInfo->keyFrames = D_80121094;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_5);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 400);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 2, 50, 0);
|
|
|
|
|
Quake_SetDuration(i, 60);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2350:
|
|
|
|
|
csInfo->keyFrames = D_8012110C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 2200: {
|
|
|
|
|
s16 sp82;
|
|
|
|
|
s16 sp80;
|
|
|
|
|
s16 sp7E;
|
|
|
|
|
s16 sp7C;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Actor_GetScreenPos(play, &player->actor, &sp82, &sp7E);
|
|
|
|
|
Actor_GetScreenPos(play, actor, &sp80, &sp7C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if ((sp82 > 0) && (sp82 < 320) && (sp7E > 0) && (sp7E < 240) && (sp80 > 0) && (sp80 < 320) && (sp7C > 0) &&
|
|
|
|
|
(sp7C < 240) &&
|
2022-05-21 18:23:43 +00:00
|
|
|
|
!OnePointCutscene_BgCheckLineTest(&play->colCtx, &actor->focus.pos, &player->actor.focus.pos)) {
|
|
|
|
|
D_80121184[0].atTargetInit.x = (play->view.at.x + actor->focus.pos.x) * 0.5f;
|
|
|
|
|
D_80121184[0].atTargetInit.y = (play->view.at.y + actor->focus.pos.y) * 0.5f;
|
|
|
|
|
D_80121184[0].atTargetInit.z = (play->view.at.z + actor->focus.pos.z) * 0.5f;
|
|
|
|
|
D_80121184[0].eyeTargetInit = play->view.eye;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_80121184[0].eyeTargetInit.y = player->actor.focus.pos.y + 20.0f;
|
|
|
|
|
D_80121184[0].fovTargetInit = mainCam->fov * 0.75f;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121184;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
} else {
|
|
|
|
|
D_801211D4[0].atTargetInit.x = actor->focus.pos.x;
|
|
|
|
|
D_801211D4[0].atTargetInit.y = actor->focus.pos.y - 5.0f;
|
|
|
|
|
D_801211D4[0].atTargetInit.z = actor->focus.pos.z;
|
|
|
|
|
spC0 = ((EnSw*)actor)->unk_364;
|
|
|
|
|
osSyncPrintf("%s(%d): xyz_t: %s (%f %f %f)\n", "../z_onepointdemo.c", 1671, "&cp", spC0.x, spC0.y,
|
|
|
|
|
spC0.z);
|
|
|
|
|
D_801211D4[0].eyeTargetInit.x = (actor->focus.pos.x + (120.0f * spC0.x)) - (Rand_ZeroOne() * 20.0f);
|
|
|
|
|
D_801211D4[0].eyeTargetInit.y = actor->focus.pos.y + (120.0f * spC0.y) + 20.0f;
|
|
|
|
|
D_801211D4[0].eyeTargetInit.z = (actor->focus.pos.z + (120.0f * spC0.z)) - (Rand_ZeroOne() * 20.0f);
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801211D4;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_UNK3);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} break;
|
|
|
|
|
case 2290: {
|
|
|
|
|
Actor* rideActor = player->rideActor;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if (rideActor != NULL) {
|
|
|
|
|
rideActor->freezeTimer = 180;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121224;
|
|
|
|
|
csInfo->keyFrameCnt = 6;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} break;
|
|
|
|
|
case 5120:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121314;
|
|
|
|
|
csInfo->keyFrameCnt = 1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4510:
|
|
|
|
|
D_8012133C[0].eyeTargetInit = actor->world.pos;
|
|
|
|
|
D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_8012133C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4500:
|
|
|
|
|
Actor_GetFocus(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
2022-08-30 15:49:51 +00:00
|
|
|
|
spC0.y = OnePointCutscene_RaycastDown(&play->colCtx, &spC0) + 40.0f;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spD0.r = 150.0f;
|
|
|
|
|
spD0.yaw = spA0.rot.y;
|
|
|
|
|
spD0.pitch = 0x3E8;
|
|
|
|
|
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
|
|
|
|
subCam->fov = 50.0f;
|
|
|
|
|
if (subCam->childCamId != CAM_ID_MAIN) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
OnePointCutscene_EndCutscene(play, subCam->childCamId);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 2210:
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &player->actor.world.pos, &actor->world.pos);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_801213B4[0].eyeTargetInit.y = D_801213B4[1].eyeTargetInit.y = D_801213B4[2].eyeTargetInit.y =
|
2022-04-24 14:23:49 +00:00
|
|
|
|
D_801213B4[2].atTargetInit.y = CAM_BINANG_TO_DEG(spD0.yaw);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if (Rand_ZeroOne() < 0.0f) {
|
|
|
|
|
D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x;
|
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801213B4;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 1010:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &childCam->at, &childCam->eye);
|
|
|
|
|
Play_CameraSetFov(play, subCamId, childCam->fov);
|
|
|
|
|
Play_SetCameraRoll(play, subCamId, childCam->roll);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 9601:
|
2022-10-23 21:32:51 +00:00
|
|
|
|
// Leaving a crawlspace forwards
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
|
|
|
|
Play_CameraChangeSetting(play, CAM_ID_MAIN, mainCam->prevSetting);
|
2022-10-23 21:32:51 +00:00
|
|
|
|
OnePointCutscene_SetCsCamPoints(subCam, sCrawlspaceActionParam | 0x1000, sCrawlspaceTimer,
|
|
|
|
|
sCrawlspaceAtPoints, sCrawlspaceForwardsEyePoints);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 9602:
|
2022-10-23 21:32:51 +00:00
|
|
|
|
// Leaving a crawlspace backwards
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
|
|
|
|
Play_CameraChangeSetting(play, CAM_ID_MAIN, mainCam->prevSetting);
|
2022-10-23 21:32:51 +00:00
|
|
|
|
OnePointCutscene_SetCsCamPoints(subCam, sCrawlspaceActionParam | 0x1000, sCrawlspaceTimer,
|
|
|
|
|
sCrawlspaceAtPoints, sCrawlspaceBackwardsEyePoints);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4175:
|
|
|
|
|
csInfo->keyFrames = D_8012147C;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4180:
|
|
|
|
|
spC0.x = -1881.0f;
|
|
|
|
|
spC0.y = 766.0f;
|
|
|
|
|
spC0.z = -330.0f;
|
|
|
|
|
spB4.x = -1979.0f;
|
|
|
|
|
spB4.y = 703.0f;
|
|
|
|
|
spB4.z = -269.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 6;
|
|
|
|
|
subCam->fov = 75.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3040:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_8012151C[0].timerInit = timer - 1;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_8012151C;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3020:
|
|
|
|
|
D_8012156C[1].timerInit = timer - 1;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
if (mainCam->play->state.frames & 1) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_8012156C[0].atTargetInit.x = -D_8012156C[0].atTargetInit.x;
|
|
|
|
|
D_8012156C[0].eyeTargetInit.x = -D_8012156C[0].eyeTargetInit.x;
|
|
|
|
|
D_8012156C[1].atTargetInit.x = -D_8012156C[1].atTargetInit.x;
|
|
|
|
|
D_8012156C[1].eyeTargetInit.x = -D_8012156C[1].eyeTargetInit.x;
|
|
|
|
|
}
|
|
|
|
|
tempRand = Rand_ZeroOne() * 15.0f;
|
|
|
|
|
D_8012156C[0].eyeTargetInit.x += tempRand;
|
|
|
|
|
D_8012156C[1].eyeTargetInit.x += tempRand;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_8012156C;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3010:
|
|
|
|
|
D_801215BC[0].timerInit = timer;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801215BC;
|
|
|
|
|
csInfo->keyFrameCnt = 1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3070:
|
|
|
|
|
csInfo->keyFrames = D_801215E4;
|
|
|
|
|
csInfo->keyFrameCnt = 10;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 22000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 0, 200, 0);
|
|
|
|
|
Quake_SetDuration(i, 10);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3080:
|
|
|
|
|
csInfo->keyFrames = D_80121774;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3090:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121814;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3100:
|
|
|
|
|
VEC_SET(spB4, 0.0f, -280.0f, -1400.0f);
|
|
|
|
|
|
|
|
|
|
Actor_GetFocus(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_PIVOT_VERTICAL);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
|
|
|
|
subCam->fov = 70.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3380:
|
|
|
|
|
case 3065:
|
|
|
|
|
csInfo->keyFrames = D_801218B4;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 24000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 0, 0, 0);
|
|
|
|
|
Quake_SetDuration(i, 160);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3060:
|
|
|
|
|
csInfo->keyFrames = D_80121904;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3050:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
|
|
|
|
func_8002DF54(play, &player->actor, 5);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
OnePointCutscene_SetCsCamPoints(subCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
|
|
|
|
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
|
|
|
|
|
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_8012021C[D_801202FC - 2].pos);
|
|
|
|
|
D_8012013C[D_801202FC - 3].pos.x +=
|
|
|
|
|
(D_8012013C[D_801202FC - 2].pos.x - D_8012013C[D_801202FC - 3].pos.x) / 2;
|
|
|
|
|
D_8012013C[D_801202FC - 3].pos.y +=
|
|
|
|
|
(D_8012013C[D_801202FC - 2].pos.y - D_8012013C[D_801202FC - 3].pos.y) / 2;
|
|
|
|
|
D_8012013C[D_801202FC - 3].pos.z +=
|
|
|
|
|
(D_8012013C[D_801202FC - 2].pos.z - D_8012013C[D_801202FC - 3].pos.z) / 2;
|
|
|
|
|
D_8012021C[D_801202FC - 3].pos.x +=
|
|
|
|
|
(D_8012021C[D_801202FC - 2].pos.x - D_8012021C[D_801202FC - 3].pos.x) / 2;
|
|
|
|
|
D_8012021C[D_801202FC - 3].pos.y +=
|
|
|
|
|
(D_8012021C[D_801202FC - 2].pos.y - D_8012021C[D_801202FC - 3].pos.y) / 2;
|
|
|
|
|
D_8012021C[D_801202FC - 3].pos.z +=
|
|
|
|
|
(D_8012021C[D_801202FC - 2].pos.z - D_8012021C[D_801202FC - 3].pos.z) / 2;
|
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(mainCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 30000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 1, 1, 0);
|
|
|
|
|
Quake_SetDuration(i, 200);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3120:
|
|
|
|
|
csInfo->keyFrames = D_80121954[-(timer + 101)];
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->timer = 100;
|
2022-12-05 04:02:24 +00:00
|
|
|
|
subCam->stateFlags |= CAM_STATE_1;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3130:
|
|
|
|
|
csInfo->keyFrames = D_80121A44;
|
|
|
|
|
csInfo->keyFrameCnt = 12;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2022-12-05 04:02:24 +00:00
|
|
|
|
subCam->stateFlags |= CAM_STATE_1;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3140:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_80121C24[0].atTargetInit = play->view.at;
|
|
|
|
|
D_80121C24[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_80121C24[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121C24;
|
|
|
|
|
csInfo->keyFrameCnt = 7;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3150:
|
|
|
|
|
spC0.x = 1890.0f;
|
|
|
|
|
spC0.y = 886.0f;
|
|
|
|
|
spC0.z = -1432.0f;
|
|
|
|
|
spB4.x = 1729.0f;
|
|
|
|
|
spB4.y = 995.0f;
|
|
|
|
|
spB4.z = -1405.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0x50;
|
|
|
|
|
subCam->fov = 55.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3170:
|
|
|
|
|
Actor_GetWorld(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
|
|
|
|
spD0.pitch = -0x5DC;
|
|
|
|
|
spC0.y += 50.0f;
|
|
|
|
|
spD0.r = 250.0f;
|
|
|
|
|
Actor_GetWorld(&spA0, &player->actor);
|
|
|
|
|
spD0.yaw = OnePointCutscene_Vec3fYaw(&spC0, &spA0.pos) - 0x7D0;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
|
|
|
|
Play_CopyCamera(play, CAM_ID_MAIN, subCamId);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = -1;
|
|
|
|
|
subCam->fov = 55.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, actor, 1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3160:
|
|
|
|
|
Actor_GetWorld(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
|
|
|
|
spD0.pitch = 0;
|
|
|
|
|
spD0.yaw = spA0.rot.y;
|
|
|
|
|
spD0.r = 150.0f;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
|
|
|
|
subCam->fov = 55.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3180:
|
|
|
|
|
Actor_GetWorldPosShapeRot(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
|
|
|
|
spC0.y += 120.0f;
|
|
|
|
|
spD0.r = 300.0f;
|
|
|
|
|
spD0.yaw = spA0.rot.y;
|
|
|
|
|
spD0.pitch = -0xAF0;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
|
|
|
|
subCam->fov = 60.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, actor, 1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3190:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FOREST_DEFEAT_POE);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, actor, 0xC);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3230:
|
|
|
|
|
spC0.x = 120.0f;
|
|
|
|
|
spC0.y = 265.0f;
|
|
|
|
|
spC0.z = -1570.0f;
|
|
|
|
|
spB4.x = 80.0f;
|
|
|
|
|
spB4.y = 445.0f;
|
|
|
|
|
spB4.z = -1425.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0x1E;
|
|
|
|
|
subCam->fov = 75.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Actor_GetWorldPosShapeRot(&spA0, actor);
|
|
|
|
|
Actor_GetFocus(&sp8C, &player->actor);
|
|
|
|
|
spC0.x = sp8C.pos.x;
|
|
|
|
|
spC0.y = sp8C.pos.y + 70.0f;
|
|
|
|
|
spC0.z = sp8C.pos.z;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &spA0.pos, &sp8C.pos);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spD0.pitch = 0x5DC;
|
|
|
|
|
spD0.r = 120.0f;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraSetAtEye(play, CAM_ID_MAIN, &spC0, &spB4);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 22000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 1, 0, 0, 0);
|
|
|
|
|
Quake_SetDuration(i, 90);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 6010:
|
|
|
|
|
Actor_GetWorld(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
|
|
|
|
spD0.pitch = 0;
|
|
|
|
|
spC0.y += 70.0f;
|
|
|
|
|
spD0.yaw = spA0.rot.y + 0x7FFF;
|
|
|
|
|
spD0.r = 300.0f;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
|
|
|
|
subCam->fov = 45.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3220:
|
|
|
|
|
Actor_GetFocus(&spA0, actor);
|
|
|
|
|
spC0 = spA0.pos;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_PIVOT_VERTICAL);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Actor_GetWorld(&spA0, &player->actor);
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &spC0, &spA0.pos);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spD0.yaw += 0x3E8;
|
|
|
|
|
spD0.r = 400.0f;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OnePointCutscene_AddVecGeoToVec3f(&spB4, &spC0, &spD0);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spB4.y = spA0.pos.y + 60.0f;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraSetAtEye(play, subCamId, &spC0, &spB4);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->roll = 0;
|
|
|
|
|
subCam->fov = 75.0f;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3240:
|
|
|
|
|
D_80121D3C[2].timerInit = timer - 5;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121D3C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 6001:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Actor_GetWorld(&spA0, actor);
|
|
|
|
|
if (spA0.pos.z > -750.0f) {
|
2022-05-12 18:35:31 +00:00
|
|
|
|
OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120820);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
2022-05-12 18:35:31 +00:00
|
|
|
|
OnePointCutscene_SetCsCamPoints(subCam, D_801208E8, D_801208E4, D_801206A0, D_80120760);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 32000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 0, 0, 20, 0);
|
|
|
|
|
Quake_SetDuration(i, D_801208E4 - 10);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3400:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_CS_3);
|
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
OnePointCutscene_SetCsCamPoints(subCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos);
|
|
|
|
|
OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos);
|
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 0x4E20);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 1, 0, 50, 0);
|
|
|
|
|
Quake_SetDuration(i, D_80120698 - 20);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3390:
|
|
|
|
|
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = -0x3FD9;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121DB4;
|
|
|
|
|
csInfo->keyFrameCnt = 9;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3310:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FIRE_STAIRCASE);
|
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 32000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 0, 0, 0);
|
|
|
|
|
Quake_SetDuration(i, timer);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3290:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_80121F1C[0].atTargetInit = play->view.at;
|
|
|
|
|
D_80121F1C[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_80121F1C[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Actor_GetFocus(&spA0, actor);
|
|
|
|
|
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spA0.rot.y;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121F1C;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 12000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 0, 0, 1000, 0);
|
|
|
|
|
Quake_SetDuration(i, 5);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3340:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_80121FBC[0].atTargetInit = play->view.at;
|
|
|
|
|
D_80121FBC[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_80121FBC[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80121FBC;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 12000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 0, 0, 1000, 0);
|
|
|
|
|
Quake_SetDuration(i, 5);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3360:
|
|
|
|
|
csInfo->keyFrames = D_8012205C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3350:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_801220D4[0].atTargetInit = play->view.at;
|
|
|
|
|
D_801220D4[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_801220D4[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if (actor->world.pos.x > 0.0f) {
|
|
|
|
|
D_801220D4[1].rollTargetInit = -D_801220D4[1].rollTargetInit;
|
|
|
|
|
D_801220D4[2].rollTargetInit = -D_801220D4[2].rollTargetInit;
|
|
|
|
|
D_801220D4[1].atTargetInit.x = -D_801220D4[1].atTargetInit.x;
|
|
|
|
|
D_801220D4[1].atTargetInit.y = 50.0f;
|
|
|
|
|
D_801220D4[1].eyeTargetInit.y = 80.0f;
|
|
|
|
|
D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x;
|
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801220D4;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3330:
|
|
|
|
|
csInfo->keyFrames = D_8012219C;
|
|
|
|
|
csInfo->keyFrameCnt = 7;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3410:
|
|
|
|
|
csInfo->keyFrames = D_801222B4;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 32000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 4, 0, 0, 0);
|
|
|
|
|
Quake_SetDuration(i, 20);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3450:
|
|
|
|
|
csInfo->keyFrames = D_8012237C;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 32000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 0, 0, 0);
|
|
|
|
|
Quake_SetDuration(i, 10);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3440:
|
|
|
|
|
csInfo->keyFrames = D_801223CC;
|
|
|
|
|
csInfo->keyFrameCnt = 6;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2022-01-18 00:04:07 +00:00
|
|
|
|
player->stateFlags1 |= PLAYER_STATE1_29;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
player->actor.freezeTimer = 90;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 32000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 2, 0, 0, 0);
|
|
|
|
|
Quake_SetDuration(i, 10);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3430:
|
|
|
|
|
csInfo->keyFrames = D_801224BC;
|
|
|
|
|
csInfo->keyFrameCnt = 7;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 32000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 1, 0, 10, 0);
|
|
|
|
|
Quake_SetDuration(i, 20);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4100:
|
|
|
|
|
csInfo->keyFrames = D_801225D4;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4110:
|
|
|
|
|
csInfo->keyFrames = D_8012269C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4120:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_80122714[1].timerInit = 80;
|
|
|
|
|
csInfo->keyFrames = D_80122714;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4140:
|
|
|
|
|
csInfo->keyFrames = D_801227B4;
|
|
|
|
|
csInfo->keyFrameCnt = 6;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
|
|
|
|
break;
|
|
|
|
|
case 4150:
|
|
|
|
|
csInfo->keyFrames = D_801228A4;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4160:
|
|
|
|
|
csInfo->keyFrames = D_8012296C;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4170:
|
|
|
|
|
csInfo->keyFrames = D_80122A0C;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4190:
|
|
|
|
|
csInfo->keyFrames = D_80122A5C;
|
|
|
|
|
csInfo->keyFrameCnt = 8;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4200:
|
|
|
|
|
csInfo->keyFrames = D_80122B9C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF38(play, &player->actor, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4210:
|
|
|
|
|
player->actor.freezeTimer = timer;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80122C14;
|
|
|
|
|
csInfo->keyFrameCnt = 1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 12000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 0, 1, 100, 0);
|
|
|
|
|
Quake_SetDuration(i, timer - 80);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4220:
|
|
|
|
|
csInfo->keyFrames = (player->actor.world.pos.z < -15.0f) ? D_80122C3C : D_80122C64;
|
|
|
|
|
csInfo->keyFrameCnt = 1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
|
|
|
|
func_8002DF38(play, &player->actor, 1);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-10-15 06:16:37 +00:00
|
|
|
|
i = Quake_Request(subCam, QUAKE_TYPE_3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Quake_SetSpeed(i, 12000);
|
2022-10-15 06:16:37 +00:00
|
|
|
|
Quake_SetPerturbations(i, 0, 1, 10, 0);
|
|
|
|
|
Quake_SetDuration(i, timer - 10);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4221:
|
|
|
|
|
csInfo->keyFrames = D_80122C8C;
|
|
|
|
|
csInfo->keyFrameCnt = 1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3260:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_80122CB4[1].timerInit = timer - 5;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80122CB4;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3261:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_8002DF54(play, NULL, 8);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_80122D04[1].timerInit = timer - 10;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80122D04;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 8010:
|
|
|
|
|
csInfo->keyFrames = D_80122D54;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 8002:
|
|
|
|
|
csInfo->keyFrames = D_80122DCC;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 8700:
|
|
|
|
|
Actor_GetFocus(&spA0, actor);
|
|
|
|
|
Actor_GetFocus(&sp8C, &player->actor);
|
|
|
|
|
D_80122E44[timer & 1][0].atTargetInit.y = ((spA0.pos.y - sp8C.pos.y) / 10.0f) + 90.0f;
|
|
|
|
|
D_80122E44[timer & 1][5].atTargetInit = mainCam->at;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80122E44[timer & 1];
|
|
|
|
|
csInfo->keyFrameCnt = 7;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 1100: {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32 tempDiff = play->state.frames - sPrevFrameCs1100;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
if ((tempDiff > 3600) || (tempDiff < -3600)) {
|
|
|
|
|
csInfo->keyFrames = D_80123074;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
if (play->state.frames & 1) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_8012313C[0].rollTargetInit = -D_8012313C[0].rollTargetInit;
|
|
|
|
|
D_8012313C[0].atTargetInit.y = -D_8012313C[0].atTargetInit.y;
|
|
|
|
|
D_8012313C[0].eyeTargetInit.y = -D_8012313C[0].eyeTargetInit.y;
|
|
|
|
|
D_8012313C[1].atTargetInit.y = -D_8012313C[1].atTargetInit.y;
|
|
|
|
|
}
|
|
|
|
|
csInfo->keyFrames = D_8012313C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
|
|
|
|
sPrevFrameCs1100 = play->state.frames;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
} break;
|
|
|
|
|
case 9806:
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->timer = -99;
|
2022-06-21 00:31:53 +00:00
|
|
|
|
if (Play_CamIsNotFixed(play)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_TURN_AROUND);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->data2 = 0xC;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_CopyCamera(play, subCamId, CAM_ID_MAIN);
|
|
|
|
|
Play_CameraChangeSetting(play, subCamId, CAM_SET_FREE2);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 9908:
|
2022-06-21 00:31:53 +00:00
|
|
|
|
if (Play_CamIsNotFixed(play)) {
|
2021-08-21 23:12:57 +00:00
|
|
|
|
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-01-18 00:04:07 +00:00
|
|
|
|
if (player->stateFlags1 & PLAYER_STATE1_27) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_801231B4[2].atTargetInit.z = 0.0f;
|
|
|
|
|
}
|
|
|
|
|
Actor_GetWorldPosShapeRot(&spA0, &player->actor);
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &spA0.pos, &mainCam->at);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spD0.yaw -= spA0.rot.y;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_VecGeoToVec3f(&D_801231B4[3].atTargetInit, &spD0);
|
|
|
|
|
OLib_Vec3fDiffToVecGeo(&spD0, &spA0.pos, &mainCam->eye);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
spD0.yaw -= spA0.rot.y;
|
2022-10-15 13:43:59 +00:00
|
|
|
|
OLib_VecGeoToVec3f(&D_801231B4[3].eyeTargetInit, &spD0);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
D_801231B4[3].fovTargetInit = mainCam->fov;
|
|
|
|
|
D_801231B4[3].timerInit = timer - 50;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801231B4;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
|
|
|
|
D_80123254[1].timerInit = timer - 1;
|
|
|
|
|
D_80123254[0].fovTargetInit = mainCam->fov;
|
|
|
|
|
D_80123254[0].atTargetInit = D_80123254[1].atTargetInit = mainCam->at;
|
|
|
|
|
D_80123254[0].eyeTargetInit = D_80123254[1].eyeTargetInit = mainCam->eye;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80123254;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 1000:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_801232A4[0].atTargetInit = play->view.at;
|
|
|
|
|
D_801232A4[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_801232A4[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801232A4;
|
|
|
|
|
csInfo->keyFrameCnt = 1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 8603:
|
|
|
|
|
csInfo->keyFrames = D_801232CC;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 8604:
|
|
|
|
|
csInfo->keyFrames = D_80123394;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4000:
|
|
|
|
|
csInfo->keyFrames = D_8012345C;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4010:
|
|
|
|
|
csInfo->keyFrames = D_801234FC;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4011:
|
|
|
|
|
csInfo->keyFrames = D_801235C4;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4020:
|
|
|
|
|
csInfo->keyFrames = D_8012368C;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4021:
|
|
|
|
|
csInfo->keyFrames = D_8012372C;
|
|
|
|
|
csInfo->keyFrameCnt = 4;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 4022:
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->timer = D_801237CC[0].timerInit + D_801237CC[3].timerInit + D_801237CC[1].timerInit +
|
|
|
|
|
D_801237CC[2].timerInit + D_801237CC[4].timerInit;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801237CC;
|
|
|
|
|
csInfo->keyFrameCnt = 5;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 9703:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_80123894[0].atTargetInit = play->view.at;
|
|
|
|
|
D_80123894[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_80123894[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if (LINK_IS_ADULT) {
|
|
|
|
|
D_80123894[1].atTargetInit.y = 60.0f;
|
|
|
|
|
D_80123894[1].eyeTargetInit.y = 52.0f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_80123894;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 9704:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_8012390C[0].atTargetInit = play->view.at;
|
|
|
|
|
D_8012390C[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_8012390C[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_8012390C;
|
|
|
|
|
csInfo->keyFrameCnt = 2;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 9705:
|
2022-05-21 18:23:43 +00:00
|
|
|
|
D_8012395C[0].atTargetInit = play->view.at;
|
|
|
|
|
D_8012395C[0].eyeTargetInit = play->view.eye;
|
|
|
|
|
D_8012395C[0].fovTargetInit = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_8012395C;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, player, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
case 5110:
|
|
|
|
|
D_801239D4[1].timerInit = 10;
|
|
|
|
|
|
|
|
|
|
csInfo->keyFrames = D_801239D4;
|
|
|
|
|
csInfo->keyFrameCnt = 3;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
func_800C0808(play, subCamId, (Player*)actor, CAM_SET_CS_C);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
osSyncPrintf(VT_COL(RED, WHITE) "onepointdemo camera: demo number not found !! (%d)\n" VT_RST, csId);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s16 OnePointCutscene_SetAsChild(PlayState* play, s16 newCamId, s16 parentCamId) {
|
|
|
|
|
s16 prevCamId = play->cameraPtrs[parentCamId]->childCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
play->cameraPtrs[newCamId]->parentCamId = parentCamId;
|
|
|
|
|
play->cameraPtrs[parentCamId]->childCamId = newCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return prevCamId;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
/**
|
|
|
|
|
* Removes a cutscene camera from the list. Returns the parent cam if the removed camera is active, otherwise returns
|
2022-05-12 18:35:31 +00:00
|
|
|
|
* CAM_ID_NONE
|
2021-03-31 16:18:31 +00:00
|
|
|
|
*/
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32 OnePointCutscene_RemoveCamera(PlayState* play, s16 subCamId) {
|
|
|
|
|
Camera* subCam = play->cameraPtrs[subCamId];
|
2022-05-12 18:35:31 +00:00
|
|
|
|
s32 nextCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (subCam->camId == CHILD_CAM(subCam)->parentCamId) {
|
|
|
|
|
CHILD_CAM(subCam)->parentCamId = subCam->parentCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (subCam->camId == PARENT_CAM(subCam)->childCamId) {
|
|
|
|
|
PARENT_CAM(subCam)->childCamId = subCam->childCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
nextCamId = (play->activeCamId == subCamId) ? subCam->parentCamId : CAM_ID_NONE;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->parentCamId = CAM_ID_MAIN;
|
|
|
|
|
subCam->childCamId = subCam->parentCamId;
|
|
|
|
|
subCam->timer = -1;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_ClearCamera(subCam->play, subCam->camId);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return nextCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
#define vChildCamId temp2
|
|
|
|
|
#define vSubCamStatus temp1
|
|
|
|
|
#define vCurCamId temp2
|
|
|
|
|
#define vNextCamId temp1
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a cutscene subcamera with the specified ID, duration, and targeted actor. The camera is placed into the
|
|
|
|
|
* cutscene queue in front of the specified camera, then all lower priority demos in front of it are removed from the
|
|
|
|
|
* queue.
|
|
|
|
|
*/
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s16 parentCamId) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
s16 temp1;
|
|
|
|
|
s16 temp2;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
s16 subCamId;
|
|
|
|
|
Camera* subCam;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (parentCamId == CAM_ID_NONE) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
parentCamId = play->activeCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
subCamId = Play_CreateSubCamera(play);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (subCamId == CAM_ID_NONE) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
osSyncPrintf(VT_COL(RED, WHITE) "onepoint demo: error: too many cameras ... give up! type=%d\n" VT_RST, csId);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return CAM_ID_NONE;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Inserts the cutscene camera into the cutscene queue in front of parentCam
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
vChildCamId = play->cameraPtrs[parentCamId]->childCamId;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vSubCamStatus = CAM_STAT_ACTIVE;
|
|
|
|
|
if (vChildCamId >= CAM_ID_SUB_FIRST) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
OnePointCutscene_SetAsChild(play, vChildCamId, subCamId);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vSubCamStatus = CAM_STAT_WAIT;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
2022-11-22 03:01:44 +00:00
|
|
|
|
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
OnePointCutscene_SetAsChild(play, subCamId, parentCamId);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
subCam = play->cameraPtrs[subCamId];
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->timer = timer;
|
|
|
|
|
subCam->target = actor;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
subCam->at = play->view.at;
|
|
|
|
|
subCam->eye = play->view.eye;
|
|
|
|
|
subCam->fov = play->view.fovy;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
subCam->csId = csId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (parentCamId == CAM_ID_MAIN) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_ChangeCameraStatus(play, parentCamId, CAM_STAT_UNK3);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
Play_ChangeCameraStatus(play, parentCamId, CAM_STAT_WAIT);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
OnePointCutscene_SetInfo(play, subCamId, csId, actor, timer);
|
|
|
|
|
Play_ChangeCameraStatus(play, subCamId, vSubCamStatus);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
// Removes all lower priority cutscenes in front of this cutscene from the queue.
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vCurCamId = subCamId;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
vNextCamId = play->cameraPtrs[subCamId]->childCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
while (vNextCamId >= CAM_ID_SUB_FIRST) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s16 nextCsId = play->cameraPtrs[vNextCamId]->csId;
|
|
|
|
|
s16 thisCsId = play->cameraPtrs[subCamId]->csId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
if ((nextCsId / 100) < (thisCsId / 100)) {
|
|
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "onepointdemo camera[%d]: killed 'coz low priority (%d < %d)\n" VT_RST,
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vNextCamId, nextCsId, thisCsId);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
if (play->cameraPtrs[vNextCamId]->csId != 5010) {
|
|
|
|
|
if ((vNextCamId = OnePointCutscene_RemoveCamera(play, vNextCamId)) != CAM_ID_NONE) {
|
|
|
|
|
Play_ChangeCameraStatus(play, vNextCamId, CAM_STAT_ACTIVE);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
} else {
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vCurCamId = vNextCamId;
|
2022-05-21 18:23:43 +00:00
|
|
|
|
OnePointCutscene_EndCutscene(play, vNextCamId);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
} else {
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vCurCamId = vNextCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
vNextCamId = play->cameraPtrs[vCurCamId]->childCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return subCamId;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
/**
|
2022-05-12 18:35:31 +00:00
|
|
|
|
* Ends the cutscene in subCamId by setting its timer to 0. For attention cutscenes, it is set to 5 instead.
|
2021-03-31 16:18:31 +00:00
|
|
|
|
*/
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s16 OnePointCutscene_EndCutscene(PlayState* play, s16 subCamId) {
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (subCamId == CAM_ID_NONE) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
subCamId = play->activeCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
if (play->cameraPtrs[subCamId] != NULL) {
|
|
|
|
|
osSyncPrintf("onepointdemo camera[%d]: delete timer=%d next=%d\n", subCamId, play->cameraPtrs[subCamId]->timer,
|
|
|
|
|
play->cameraPtrs[subCamId]->parentCamId);
|
|
|
|
|
if (play->cameraPtrs[subCamId]->csId == 5010) {
|
|
|
|
|
play->cameraPtrs[subCamId]->timer = 5;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
play->cameraPtrs[subCamId]->timer = 0;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return subCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define vTargetCat temp1
|
2022-05-12 18:35:31 +00:00
|
|
|
|
#define vParentCamId temp1
|
2021-03-31 16:18:31 +00:00
|
|
|
|
#define vLastHigherCat temp2
|
2022-05-12 18:35:31 +00:00
|
|
|
|
#define vSubCamId temp2
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds an attention cutscene to the cutscene queue.
|
|
|
|
|
*/
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32 OnePointCutscene_Attention(PlayState* play, Actor* actor) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
Camera* parentCam;
|
|
|
|
|
s32 temp1;
|
|
|
|
|
s32 temp2;
|
|
|
|
|
s32 timer;
|
|
|
|
|
|
|
|
|
|
if (sDisableAttention) {
|
|
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: canceled by other camera\n" VT_RST);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return CAM_ID_NONE;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
sUnused = -1;
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
parentCam = play->cameraPtrs[CAM_ID_MAIN];
|
2022-12-11 09:46:03 +00:00
|
|
|
|
if (parentCam->mode == CAM_MODE_FOLLOW_BOOMERANG) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: change mode BOOKEEPON -> NORMAL\n" VT_RST);
|
|
|
|
|
Camera_ChangeMode(parentCam, CAM_MODE_NORMAL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Finds the camera of the first actor attention demo with a lower category actor, or the first non-attention demo
|
|
|
|
|
// after at least one attention demo.
|
|
|
|
|
|
|
|
|
|
vLastHigherCat = -1;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
while (parentCam->childCamId != CAM_ID_MAIN) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
parentCam = play->cameraPtrs[parentCam->childCamId];
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if (parentCam == NULL) {
|
|
|
|
|
break;
|
2021-11-01 15:10:03 +00:00
|
|
|
|
} else if (parentCam->setting != CAM_SET_CS_ATTENTION) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
if (vLastHigherCat == -1) {
|
|
|
|
|
continue;
|
|
|
|
|
} else {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
vTargetCat = parentCam->target->category;
|
|
|
|
|
if (actor->category > vTargetCat) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
vLastHigherCat = vTargetCat;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// Actorcat is only undefined if the actor is in a higher category than all other attention cutscenes. In this case,
|
|
|
|
|
// it goes in the first position of the list. Otherwise, it goes in the index found in the loop.
|
2022-05-12 18:35:31 +00:00
|
|
|
|
vParentCamId = (vLastHigherCat == -1) ? CAM_ID_MAIN : parentCam->camId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
switch (actor->category) {
|
|
|
|
|
case ACTORCAT_SWITCH:
|
|
|
|
|
case ACTORCAT_BG:
|
|
|
|
|
case ACTORCAT_PLAYER:
|
|
|
|
|
case ACTORCAT_PROP:
|
|
|
|
|
case ACTORCAT_DOOR:
|
|
|
|
|
timer = 30;
|
|
|
|
|
break;
|
|
|
|
|
case ACTORCAT_NPC:
|
|
|
|
|
case ACTORCAT_ITEMACTION:
|
|
|
|
|
case ACTORCAT_CHEST:
|
|
|
|
|
timer = 100;
|
|
|
|
|
break;
|
|
|
|
|
case ACTORCAT_EXPLOSIVE:
|
|
|
|
|
case ACTORCAT_ENEMY:
|
|
|
|
|
case ACTORCAT_MISC:
|
|
|
|
|
case ACTORCAT_BOSS:
|
|
|
|
|
default:
|
|
|
|
|
osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: %d: unkown part of actor %d\n" VT_RST,
|
2022-05-21 18:23:43 +00:00
|
|
|
|
play->state.frames, actor->category);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
timer = 30;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2022-05-21 18:23:43 +00:00
|
|
|
|
osSyncPrintf(VT_FGCOL(CYAN) "%06u:" VT_RST " actor attention demo camera: request %d ", play->state.frames,
|
2021-03-31 16:18:31 +00:00
|
|
|
|
actor->category);
|
|
|
|
|
|
|
|
|
|
// If the previous attention cutscene has an actor in the same category, skip this actor.
|
|
|
|
|
if (actor->category == vLastHigherCat) {
|
2022-02-02 21:43:34 +00:00
|
|
|
|
osSyncPrintf("→ " VT_FGCOL(MAGENTA) "×" VT_RST " (%d)\n", actor->id);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return CAM_ID_NONE;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
osSyncPrintf("→ " VT_FGCOL(BLUE) "○" VT_RST " (%d)\n", actor->id);
|
2022-05-21 18:23:43 +00:00
|
|
|
|
vSubCamId = OnePointCutscene_Init(play, 5010, timer, actor, vParentCamId);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (vSubCamId == CAM_ID_NONE) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
osSyncPrintf(VT_COL(RED, WHITE) "actor attention demo: give up! \n" VT_RST, actor->id);
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return CAM_ID_NONE;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32* data = (s32*)&play->cameraPtrs[vSubCamId]->data1;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
*data = NA_SE_SY_CORRECT_CHIME;
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return vSubCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds an attention cutscene to the cutscene queue with the specified sound effect
|
|
|
|
|
*/
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32 OnePointCutscene_AttentionSetSfx(PlayState* play, Actor* actor, s32 sfxId) {
|
|
|
|
|
s32 subCamId = OnePointCutscene_Attention(play, actor);
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
if (subCamId != CAM_ID_NONE) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32* data = (s32*)&play->cameraPtrs[subCamId]->data1;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
|
|
|
|
*data = sfxId;
|
|
|
|
|
}
|
2022-05-12 18:35:31 +00:00
|
|
|
|
return subCamId;
|
2021-03-31 16:18:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// unused
|
2022-02-20 13:22:29 +00:00
|
|
|
|
void OnePointCutscene_EnableAttention(void) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
sDisableAttention = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// unused
|
2022-02-20 13:22:29 +00:00
|
|
|
|
void OnePointCutscene_DisableAttention(void) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
sDisableAttention = true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
|
s32 OnePointCutscene_CheckForCategory(PlayState* play, s32 actorCategory) {
|
|
|
|
|
Camera* parentCam = play->cameraPtrs[CAM_ID_MAIN];
|
2021-03-31 16:18:31 +00:00
|
|
|
|
|
2022-05-12 18:35:31 +00:00
|
|
|
|
while (parentCam->childCamId != CAM_ID_MAIN) {
|
2022-05-21 18:23:43 +00:00
|
|
|
|
parentCam = play->cameraPtrs[parentCam->childCamId];
|
2021-11-01 15:10:03 +00:00
|
|
|
|
if ((parentCam == NULL) || (parentCam->setting != CAM_SET_CS_ATTENTION)) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
break;
|
2022-02-20 13:22:29 +00:00
|
|
|
|
} else if (actorCategory == parentCam->target->category) {
|
2021-03-31 16:18:31 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
2021-03-31 16:18:31 +00:00
|
|
|
|
// unused, also empty.
|
2022-05-21 18:23:43 +00:00
|
|
|
|
void OnePointCutscene_Noop(PlayState* play, s32 arg1) {
|
2020-03-17 04:31:30 +00:00
|
|
|
|
}
|