diff options
| author | petrie911 <69443847+petrie911@users.noreply.github.com> | 2021-03-31 11:18:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-31 12:18:31 -0400 |
| commit | 9b4482314a1dbbaf8ac354f587db45ee8697d431 (patch) | |
| tree | 8cac42b160f39a2ff6fd29f6a1948441e6c154ae /src/code | |
| parent | 28cfd82a4f692cdeb1e66c2df980da07e6b41e2d (diff) | |
OnePointDemo OK (#719)
* matches
* more matches
* progress?
* it's time
* so close
* organize declarations
* docs
* more fixes
* more fixes
* fix stage 1
* more fixes
* first try
* demo ids in decimal
* final cleanup
* one more thing
* fixes
* more cleanup
* onepointcs
* OnePointCutscene
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 18 | ||||
| -rw-r--r-- | src/code/z_camera.c | 350 | ||||
| -rw-r--r-- | src/code/z_camera_data.c | 16 | ||||
| -rw-r--r-- | src/code/z_demo.c | 16 | ||||
| -rw-r--r-- | src/code/z_eff_spark.c | 2 | ||||
| -rw-r--r-- | src/code/z_effect_soft_sprite_old_init.c | 2 | ||||
| -rw-r--r-- | src/code/z_onepointdemo.c | 1374 | ||||
| -rw-r--r-- | src/code/z_onepointdemo_data.c | 670 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 7 | ||||
| -rw-r--r-- | src/code/z_play.c | 111 | ||||
| -rw-r--r-- | src/code/z_player_lib.c | 22 | ||||
| -rw-r--r-- | src/code/z_quake.c | 2 | ||||
| -rw-r--r-- | src/code/z_room.c | 6 | ||||
| -rw-r--r-- | src/code/z_scene.c | 2 | ||||
| -rw-r--r-- | src/code/z_scene_table.c | 5 |
15 files changed, 2294 insertions, 309 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 807f90356..f5d99fff3 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -42,7 +42,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf Matrix_Put(&sp60); if (dlist != gCircleShadowDL) { - Matrix_RotateY(actor->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateY(actor->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY); } temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale; @@ -407,7 +407,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f, actor->focus.pos.z, MTXMODE_NEW); - Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255); @@ -1898,7 +1898,7 @@ void func_8002FBAC(GlobalContext* globalCtx) { spD4 = spCC * 0.200000000000000011102230246252 + 1.0f; } - if ((globalCtx->csCtx.state == 0) && + if ((globalCtx->csCtx.state == CS_STATE_IDLE) && (gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) && (globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) { POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19); @@ -2430,7 +2430,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { if ((HREG(64) != 1) || (HREG(72) != 0)) { if (globalCtx->actorCtx.unk_03 != 0) { func_8003115C(globalCtx, invisibleActorCounter, invisibleActors); - if ((globalCtx->csCtx.state != 0) || Player_InCsMode(globalCtx)) { + if ((globalCtx->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(globalCtx)) { func_800304B0(globalCtx); } } @@ -3842,7 +3842,7 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) { Player* player = PLAYER; f32 var; - if ((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) { + if ((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) { var = Math_Vec3f_DistXYZ(&actor->world.pos, &globalCtx->view.eye) * 0.25f; } else { var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos); @@ -5488,7 +5488,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar actor->focus.pos = actor->world.pos; actor->focus.pos.y += arg4; - if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) { + if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) { var = actor->yawTowardsPlayer - actor->shape.rot.y; abs_var = ABS(var); if (abs_var >= 0x4300) { @@ -5497,7 +5497,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar } } - if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) { + if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) { sp2C = globalCtx->view.eye; } else { sp2C = player->actor.focus.pos; @@ -5517,7 +5517,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar actor->focus.pos = arg4; - if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) { + if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) { var = actor->yawTowardsPlayer - actor->shape.rot.y; abs_var = ABS(var); if (abs_var >= 0x4300) { @@ -5526,7 +5526,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar } } - if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) { + if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) { sp24 = globalCtx->view.eye; } else { sp24 = player->actor.focus.pos; diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 4bd292f2e..6b15d4c32 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -15,8 +15,6 @@ s32 Camera_CheckWater(Camera* camera); #define NEXTSETTING ((values++)->val) #define NEXTPCT PCT(NEXTSETTING) -#define ONEPOINTDEMO ((Unique9OnePointDemo*)camera->paramData) - #define BGCAM_POS(v) ((v)[0]) #define BGCAM_ROT(v) ((v)[1]) #define BGCAM_FOV(v) ((v)[2].x) @@ -1498,7 +1496,7 @@ s32 Camera_Normal1(Camera* camera) { sp9C = camera->speedRatio * PCT(OREG(26)); sp98 = anim->swing.unk_18 != 0 ? PCT(OREG(25)) : spA0; - sp94 = (camera->xzSpeed - anim->unk_20) * (0.3333329856395721435546875f); + sp94 = (camera->xzSpeed - anim->unk_20) * (0.333333f); if (sp94 > 1.0f) { sp94 = 1.0f; } @@ -4993,13 +4991,13 @@ s32 Camera_Unique8(Camera* camera) { s32 Camera_Unique9(Camera* camera) { Vec3f atTarget; Vec3f eyeTarget; - Unique9* uniq9 = &ONEPOINTDEMO->uniq9; + Unique9* uniq9 = &ONEPOINT_CS_INFO(camera)->uniq9; Unique9Anim* anim = &uniq9->anim; f32 invKeyFrameTimer; VecSph eyeNextAtOffset; VecSph scratchSph; VecSph playerTargetOffset; - s16 pad; + s16 action; s16 atInitFlags; s16 eyeInitFlags; s16 pad2; @@ -5008,19 +5006,17 @@ s32 Camera_Unique9(Camera* camera) { PosRot playerPosRot; Vec3f* eyeNext = &camera->eyeNext; Vec3f* at = &camera->at; - s16 action; - Player* player; + Vec3f* eye = &camera->eye; + Player* player = camera->player; Actor* focusActor; f32 spB4; PosRot atFocusPosRot; Vec3f eyeLookAtPos; - Vec3f* eye = &camera->eye; + CameraModeValue* values; PosRot eyeFocusPosRot; - player = camera->player; - if (RELOAD_PARAMS) { - CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; + values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; uniq9->interfaceFlags = NEXTSETTING; } @@ -5051,8 +5047,8 @@ s32 Camera_Unique9(Camera* camera) { if (anim->keyFrameTimer == 0) { anim->isNewKeyFrame = true; anim->curKeyFrameIdx++; - if (anim->curKeyFrameIdx < ONEPOINTDEMO->keyFrameCnt) { - anim->curKeyFrame = &ONEPOINTDEMO->keyFrames[anim->curKeyFrameIdx]; + if (anim->curKeyFrameIdx < ONEPOINT_CS_INFO(camera)->keyFrameCnt) { + anim->curKeyFrame = &ONEPOINT_CS_INFO(camera)->keyFrames[anim->curKeyFrameIdx]; anim->keyFrameTimer = anim->curKeyFrame->timerInit; if (anim->curKeyFrame->unk_01 != 0xFF) { @@ -5070,7 +5066,7 @@ s32 Camera_Unique9(Camera* camera) { } } else { // We've gone through all the keyframes. - if (camera->thisIdx != 0) { + if (camera->thisIdx != MAIN_CAM) { camera->timer = 0; } return true; @@ -5132,13 +5128,10 @@ s32 Camera_Unique9(Camera* camera) { if (focusActor != NULL) { if ((atInitFlags & 0xF) == 1) { - // head Actor_GetFocus(&atFocusPosRot, focusActor); } else if ((atInitFlags & 0xF) == 2) { - // world Actor_GetWorld(&atFocusPosRot, focusActor); } else { - // world, shape rot Actor_GetWorldPosShapeRot(&atFocusPosRot, focusActor); } @@ -5179,19 +5172,59 @@ s32 Camera_Unique9(Camera* camera) { anim->eyeTarget.y = camera->eyeNext.y + anim->curKeyFrame->eyeTargetInit.y; anim->eyeTarget.z = camera->eyeNext.z + anim->curKeyFrame->eyeTargetInit.z; } - } else { - if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 || - eyeInitFlags == (s16)0x8500) { - if (camera->target != NULL && camera->target->update != NULL) { - Actor_GetFocus(&targethead, camera->target); - Actor_GetFocus(&playerhead, &camera->player->actor); - playerhead.pos.x = playerPosRot.pos.x; - playerhead.pos.z = playerPosRot.pos.z; - OLib_Vec3fDiffToVecSphGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos); - if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) { - eyeLookAtPos = targethead.pos; + } else if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 || + eyeInitFlags == (s16)0x8500) { + if (camera->target != NULL && camera->target->update != NULL) { + Actor_GetFocus(&targethead, camera->target); + Actor_GetFocus(&playerhead, &camera->player->actor); + playerhead.pos.x = playerPosRot.pos.x; + playerhead.pos.z = playerPosRot.pos.z; + OLib_Vec3fDiffToVecSphGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos); + if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) { + eyeLookAtPos = targethead.pos; + } else { + eyeLookAtPos = anim->atTarget; + } + + if (eyeInitFlags & (s16)0x8080) { + scratchSph.pitch = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.x); + scratchSph.yaw = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.y); + scratchSph.r = anim->curKeyFrame->eyeTargetInit.z; + } else { + OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit); + } + + scratchSph.yaw += playerTargetOffset.yaw; + scratchSph.pitch += playerTargetOffset.pitch; + Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeLookAtPos, &scratchSph); + } else { + if (camera->target == NULL) { + osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST); + } + camera->target = NULL; + anim->eyeTarget = *eyeNext; + } + } else if (eyeInitFlags & 0x6060) { + if (!(eyeInitFlags & 0x400) || anim->isNewKeyFrame) { + if (eyeInitFlags & 0x2020) { + focusActor = &camera->player->actor; + } else if (camera->target != NULL && camera->target->update != NULL) { + focusActor = camera->target; + } else { + camera->target = NULL; + focusActor = NULL; + } + + if (focusActor != NULL) { + if ((eyeInitFlags & 0xF00) == 0x100) { + // head + Actor_GetFocus(&eyeFocusPosRot, focusActor); + } else if ((eyeInitFlags & 0xF00) == 0x200) { + // world + Actor_GetWorld(&eyeFocusPosRot, focusActor); } else { - eyeLookAtPos = anim->atTarget; + // world, shapeRot + Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor); } if (eyeInitFlags & (s16)0x8080) { @@ -5202,9 +5235,9 @@ s32 Camera_Unique9(Camera* camera) { OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit); } - scratchSph.yaw += playerTargetOffset.yaw; - scratchSph.pitch += playerTargetOffset.pitch; - Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeLookAtPos, &scratchSph); + scratchSph.yaw += eyeFocusPosRot.rot.y; + scratchSph.pitch -= eyeFocusPosRot.rot.x; + Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeFocusPosRot.pos, &scratchSph); } else { if (camera->target == NULL) { osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST); @@ -5212,53 +5245,9 @@ s32 Camera_Unique9(Camera* camera) { camera->target = NULL; anim->eyeTarget = *eyeNext; } - } else { - if (eyeInitFlags & 0x6060) { - if (!(eyeInitFlags & 0x400) || anim->isNewKeyFrame) { - if (eyeInitFlags & 0x2020) { - focusActor = &camera->player->actor; - } else if (camera->target != NULL && camera->target->update != NULL) { - focusActor = camera->target; - } else { - camera->target = NULL; - focusActor = NULL; - } - - if (focusActor != NULL) { - if ((eyeInitFlags & 0xF00) == 0x100) { - // head - Actor_GetFocus(&eyeFocusPosRot, focusActor); - } else if ((eyeInitFlags & 0xF00) == 0x200) { - // world - Actor_GetWorld(&eyeFocusPosRot, focusActor); - } else { - // world, shapeRot - Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor); - } - - if (eyeInitFlags & (s16)0x8080) { - scratchSph.pitch = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.x); - scratchSph.yaw = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.y); - scratchSph.r = anim->curKeyFrame->eyeTargetInit.z; - } else { - OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit); - } - - scratchSph.yaw += eyeFocusPosRot.rot.y; - scratchSph.pitch -= eyeFocusPosRot.rot.x; - Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeFocusPosRot.pos, &scratchSph); - } else { - if (camera->target == NULL) { - osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST); - } - camera->target = NULL; - anim->eyeTarget = *eyeNext; - } - } - } else { - anim->eyeTarget = *eyeNext; - } } + } else { + anim->eyeTarget = *eyeNext; } if (anim->curKeyFrame->initFlags == 2) { @@ -5413,19 +5402,22 @@ s32 Camera_Unique9(Camera* camera) { // Set current keyframe to the roll target? anim->curKeyFrameIdx = anim->rollTarget; break; - case 19: + case 19: { // Change the parent camera (or default)'s mode to normal - Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camera->parentCamIdx < 0 ? 0 : camera->parentCamIdx], - CAM_MODE_NORMAL, 1); - case 18: + s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx; + + Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1); + } + case 18: { // copy the current camera to the parent (or default)'s camera. - { - Camera* cam = camera->globalCtx->cameraPtrs[camera->parentCamIdx < 0 ? 0 : camera->parentCamIdx]; - *eye = *eyeNext; - Camera_Copy(cam, camera); - } + s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx; + Camera* cam = camera->globalCtx->cameraPtrs[camIdx]; + + *eye = *eyeNext; + Camera_Copy(cam, camera); + } default: - if (camera->thisIdx != 0) { + if (camera->thisIdx != MAIN_CAM) { camera->timer = 0; } } @@ -5598,19 +5590,18 @@ s32 Camera_Demo3(Camera* camera) { Vec3f sp5C; f32 temp_f0; s32 pad; - u8 skipUpdateEye; - f32 yOffset; + u8 skipUpdateEye = false; + f32 yOffset = Player_GetHeight(camera->player); s16 angle; Demo3* demo3 = (Demo3*)camera->paramData; Demo3Anim* anim = &demo3->anim; s32 pad2; - skipUpdateEye = false; - yOffset = Player_GetHeight(camera->player); camera->unk_14C &= ~0x10; if (RELOAD_PARAMS) { CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; + demo3->fov = NEXTSETTING; demo3->unk_04 = NEXTSETTING; // unused. demo3->interfaceFlags = NEXTSETTING; @@ -5762,7 +5753,7 @@ s32 Camera_Demo3(Camera* camera) { } sCameraInterfaceFlags = 0; skipeyeUpdate: - skipUpdateEye = 1; + skipUpdateEye = true; break; } @@ -5845,28 +5836,28 @@ s32 Camera_Demo5(Camera* camera) { D_8011D6AC[1].timerInit = camera->timer - 1; D_8011D6AC[1].atTargetInit.z = Rand_ZeroOne() * 10.0f; D_8011D6AC[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f; - ONEPOINTDEMO->keyFrames = D_8011D6AC; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D6AC); - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt--; + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D6AC; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D6AC); + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt--; } else { camera->timer += D_8011D6AC[2].timerInit; } } else { D_8011D724[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f; D_8011D724[1].timerInit = camera->timer - 1; - ONEPOINTDEMO->keyFrames = D_8011D724; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D724); - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt--; + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D724; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D724); + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt--; } else { camera->timer += D_8011D724[2].timerInit; } } } else if (playerTargetGeo.r < 30.0f) { // distance between player and target is less than 30 units. - ONEPOINTDEMO->keyFrames = D_8011D79C; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D79C); + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D79C; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D79C); if ((sp78.yaw < 0x15) || (sp78.yaw >= 0x12C) || (sp78.pitch < 0x29) || (sp78.pitch >= 0xC8)) { D_8011D79C[0].actionFlags = 0x41; D_8011D79C[0].atTargetInit.y = -30.0f; @@ -5879,8 +5870,8 @@ s32 Camera_Demo5(Camera* camera) { D_8011D79C[1].timerInit = camera->timer - 1; - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt -= 2; + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2; } else { camera->timer += D_8011D79C[2].timerInit + D_8011D79C[3].timerInit; } @@ -5888,10 +5879,10 @@ s32 Camera_Demo5(Camera* camera) { // distance from the camera's current positon and the target is less than 300 units // and the distance fromthe camera's current position to the player is less than 30 units D_8011D83C[0].timerInit = camera->timer; - ONEPOINTDEMO->keyFrames = D_8011D83C; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D83C); - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt--; + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D83C; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D83C); + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt--; } else { camera->timer += D_8011D83C[1].timerInit; } @@ -5901,10 +5892,10 @@ s32 Camera_Demo5(Camera* camera) { // is less than ~76.9 degrees if (sp78.yaw >= 0x15 && sp78.yaw < 0x12C && sp78.pitch >= 0x29 && sp78.pitch < 0xC8 && eyePlayerGeo.r > 30.0f) { D_8011D88C[0].timerInit = camera->timer; - ONEPOINTDEMO->keyFrames = D_8011D88C; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D88C); - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt--; + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D88C; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D88C); + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt--; } else { camera->timer += D_8011D88C[1].timerInit; } @@ -5919,10 +5910,10 @@ s32 Camera_Demo5(Camera* camera) { } D_8011D8DC[0].timerInit = camera->timer; D_8011D8DC[1].timerInit = (s16)(eyeTargetDist * 0.005f) + 8; - ONEPOINTDEMO->keyFrames = D_8011D8DC; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D8DC); - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt -= 2; + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D8DC; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D8DC); + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2; } else { camera->timer += D_8011D8DC[1].timerInit + D_8011D8DC[2].timerInit; } @@ -5956,10 +5947,10 @@ s32 Camera_Demo5(Camera* camera) { } else { D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6; } - ONEPOINTDEMO->keyFrames = D_8011D954; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D954); - if (camera->parentCamIdx != 0) { - ONEPOINTDEMO->keyFrameCnt -= 2; + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D954; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D954); + if (camera->parentCamIdx != MAIN_CAM) { + ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2; } else { camera->timer += D_8011D954[2].timerInit + D_8011D954[3].timerInit; } @@ -5981,14 +5972,14 @@ s32 Camera_Demo5(Camera* camera) { t = eyeTargetDist * 0.005f; D_8011D9F4[1].timerInit = t + 8; } - ONEPOINTDEMO->keyFrames = D_8011D9F4; - ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D9F4); - if (camera->parentCamIdx != 0) { + ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D9F4; + ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D9F4); + if (camera->parentCamIdx != MAIN_CAM) { if (camera->globalCtx->state.frames & 1) { D_8011D9F4[0].rollTargetInit = -D_8011D9F4[0].rollTargetInit; D_8011D9F4[1].rollTargetInit = -D_8011D9F4[1].rollTargetInit; } - ONEPOINTDEMO->keyFrameCnt -= 2; + ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2; } else { camera->timer += D_8011D9F4[1].timerInit + D_8011D9F4[2].timerInit; D_8011D9F4[0].rollTargetInit = D_8011D9F4[1].rollTargetInit = 0; @@ -6035,7 +6026,7 @@ s32 Camera_Demo5(Camera* camera) { * Fixed position, rotates to follow the target */ s32 Camera_Demo6(Camera* camera) { - Camera* cam0; + Camera* mainCam; Demo6Anim* anim = (Demo6Anim*)&((Demo6*)camera->paramData)->anim; Vec3f* eyeNext = &camera->eyeNext; CameraModeValue* values; @@ -6045,7 +6036,7 @@ s32 Camera_Demo6(Camera* camera) { s16 stateTimers[4]; Vec3f* at = &camera->at; - cam0 = Gameplay_GetCamera(camera->globalCtx, 0); + mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM); camFocus = camera->target; stateTimers[1] = 0x37; stateTimers[2] = 0x46; @@ -6071,7 +6062,7 @@ s32 Camera_Demo6(Camera* camera) { camera->at.z = focusPosRot.pos.z; eyeOffset.r = 200.0f; // 0x7D0 ~10.99 degrees - eyeOffset.yaw = Camera_XZAngle(&focusPosRot.pos, &cam0->playerPosRot.pos) + 0x7D0; + eyeOffset.yaw = Camera_XZAngle(&focusPosRot.pos, &mainCam->playerPosRot.pos) + 0x7D0; // -0x3E8 ~5.49 degrees eyeOffset.pitch = -0x3E8; Camera_Vec3fVecSphGeoAdd(eyeNext, at, &eyeOffset); @@ -6131,17 +6122,17 @@ s32 Camera_Demo8(Camera* camera) { s32 Camera_Demo9(Camera* camera) { s32 pad; s32 finishAction; - s16 onePointParam; - Demo9OnePointDemo* demo9OnePoint = (Demo9OnePointDemo*)camera->paramData; + s16 onePointTimer; + Demo9OnePointCs* demo9OnePoint = (Demo9OnePointCs*)camera->paramData; Vec3f csEyeUpdate; Vec3f csAtUpdate; Vec3f newEye; Vec3f newAt; f32 newRoll; CameraModeValue* values; - Camera* cam0; + Camera* mainCam; Vec3f* eye = &camera->eye; - PosRot* cam0PlayerPosRot; + PosRot* mainCamPlayerPosRot; PosRot focusPosRot; s32 pad3; Vec3f* eyeNext = &camera->eyeNext; @@ -6150,8 +6141,8 @@ s32 Camera_Demo9(Camera* camera) { f32* camFOV = &camera->fov; Demo9Anim* anim = &demo9->anim; - cam0 = Gameplay_GetCamera(camera->globalCtx, 0); - cam0PlayerPosRot = &cam0->playerPosRot; + mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM); + mainCamPlayerPosRot = &mainCam->playerPosRot; if (RELOAD_PARAMS) { values = sCameraSettings[camera->setting].cameraModes[camera->mode].values; demo9->interfaceFlags = NEXTSETTING; @@ -6171,14 +6162,14 @@ s32 Camera_Demo9(Camera* camera) { anim->curFrame = 0.0f; camera->animState++; anim->doLERPAt = false; - finishAction = demo9OnePoint->onePointDemo.actionParameters & 0xF000; + finishAction = demo9OnePoint->onePointCs.actionParameters & 0xF000; if (finishAction != 0) { anim->finishAction = finishAction; // Clear finish parameters - demo9OnePoint->onePointDemo.actionParameters &= 0xFFF; + demo9OnePoint->onePointCs.actionParameters &= 0xFFF; } - anim->animTimer = demo9OnePoint->onePointDemo.initTimer; + anim->animTimer = demo9OnePoint->onePointCs.initTimer; case 1: // Run the camera state if (anim->animTimer > 0) { @@ -6187,23 +6178,23 @@ s32 Camera_Demo9(Camera* camera) { // Run the at and eye cs interpoloation functions, if either of them return 1 (that no more points // exist) change the animation state to 2 (standby) - if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointDemo.eyePoints, + if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.eyePoints, &anim->keyframe, &anim->curFrame) != 0 || - func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointDemo.atPoints, &anim->keyframe, + func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.atPoints, &anim->keyframe, &anim->curFrame) != 0) { camera->animState = 2; } - if (demo9OnePoint->onePointDemo.actionParameters == 1) { - // rotate around cam0's player - Camera_RotateAroundPoint(cam0PlayerPosRot, &csEyeUpdate, &newEye); - Camera_RotateAroundPoint(cam0PlayerPosRot, &csAtUpdate, &newAt); - } else if (demo9OnePoint->onePointDemo.actionParameters == 4) { + if (demo9OnePoint->onePointCs.actionParameters == 1) { + // rotate around mainCam's player + Camera_RotateAroundPoint(mainCamPlayerPosRot, &csEyeUpdate, &newEye); + Camera_RotateAroundPoint(mainCamPlayerPosRot, &csAtUpdate, &newAt); + } else if (demo9OnePoint->onePointCs.actionParameters == 4) { // rotate around the current camera's player Actor_GetWorld(&focusPosRot, &camera->player->actor); Camera_RotateAroundPoint(&focusPosRot, &csEyeUpdate, &newEye); Camera_RotateAroundPoint(&focusPosRot, &csAtUpdate, &newAt); - } else if (demo9OnePoint->onePointDemo.actionParameters == 8) { + } else if (demo9OnePoint->onePointCs.actionParameters == 8) { // rotate around the current camera's target if (camera->target != NULL && camera->target->update != NULL) { Actor_GetWorld(&focusPosRot, camera->target); @@ -6238,16 +6229,15 @@ s32 Camera_Demo9(Camera* camera) { if (anim->finishAction != 0) { if (anim->finishAction != 0x1000) { if (anim->finishAction == 0x2000) { - // finish action = 0x2000, run OnePointDemo 0x3FC (Dramatic Return to Link) - onePointParam = demo9OnePoint->onePointDemo.initTimer < 0x32 - ? 5 - : demo9OnePoint->onePointDemo.initTimer / 5; - func_800800F8(camera->globalCtx, 0x3FC, onePointParam, NULL, camera->parentCamIdx); + // finish action = 0x2000, run OnePointCs 0x3FC (Dramatic Return to Link) + onePointTimer = + demo9OnePoint->onePointCs.initTimer < 50 ? 5 : demo9OnePoint->onePointCs.initTimer / 5; + OnePointCutscene_Init(camera->globalCtx, 1020, onePointTimer, NULL, camera->parentCamIdx); } } else { // finish action = 0x1000, copy the current camera's values to the // default camera. - Camera_Copy(cam0, camera); + Camera_Copy(mainCam, camera); } } break; @@ -6804,7 +6794,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon sNextUID++; } - for (j = 0; j < 4; j++) { + for (j = 0; j < NUM_CAMS; j++) { camP = camera->globalCtx->cameraPtrs[j]; if (camP != NULL && curUID == camP->uid) { break; @@ -6835,11 +6825,11 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon sCameraShrinkWindowVal = 0x20; sCameraInterfaceAlpha = 0; camera->unk_14C = 0; - camera->setting = camera->prevSetting = 0x21; + camera->setting = camera->prevSetting = CAM_SET_FREE0; camera->camDataIdx = camera->prevCamDataIdx = -1; camera->mode = 0; camera->bgCheckId = BGCHECK_SCENE; - camera->unk_168 = 0x7FFF; + camera->csId = 0x7FFF; camera->timer = -1; camera->unk_14C |= 0x4000; @@ -6947,7 +6937,7 @@ void Camera_InitPlayerSettings(Camera* camera, Player* player) { Camera_QRegInit(); osSyncPrintf(VT_FGCOL(BLUE) "camera: personalize ---" VT_RST "\n"); - if (camera->thisIdx == 0) { + if (camera->thisIdx == MAIN_CAM) { Camera_CheckWater(camera); } } @@ -6994,7 +6984,7 @@ void Camera_PrintSettings(Camera* camera) { phi_a1 = 0; phi_v1 = sp58; phi_t0 = sp48; - for (; phi_v1 < sp58 + 4; phi_v1++, phi_t0++, phi_a1++) { + for (; phi_v1 < sp58 + NUM_CAMS; phi_v1++, phi_t0++, phi_a1++) { if (camera->globalCtx->cameraPtrs[phi_a1] == NULL) { *phi_v1 = '-'; *phi_t0 = ' '; @@ -7198,7 +7188,7 @@ s32 Camera_SetRoomHotFlag(Camera* camera) { s32 Camera_DbgChangeMode(Camera* camera) { s32 changeDir = 0; - if (gDbgCamEnabled == 0 && camera->globalCtx->activeCamera == 0) { + if (!gDbgCamEnabled && camera->globalCtx->activeCamera == MAIN_CAM) { if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) { osSyncPrintf("attention sound URGENCY\n"); func_80078884(NA_SE_SY_ATTENTION_URGENCY); @@ -7318,7 +7308,7 @@ Vec3s Camera_Update(Camera* camera) { QuakeCamCalc quake; Player* player; - player = camera->globalCtx->cameraPtrs[0]->player; + player = camera->globalCtx->cameraPtrs[MAIN_CAM]->player; if (R_DBG_CAM_UPDATE) { osSyncPrintf("camera: in %x\n", camera); @@ -7424,14 +7414,14 @@ Vec3s Camera_Update(Camera* camera) { if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3)) { sCameraInterfaceFlags = 0; Camera_UpdateInterface(sCameraInterfaceFlags); - } else if ((D_8011D3F0 != 0) && (camera->thisIdx == 0)) { + } else if ((D_8011D3F0 != 0) && (camera->thisIdx == MAIN_CAM)) { D_8011D3F0--; sCameraInterfaceFlags = 0x3200; Camera_UpdateInterface(sCameraInterfaceFlags); } else if (camera->globalCtx->transitionMode != 0) { sCameraInterfaceFlags = 0xF200; Camera_UpdateInterface(sCameraInterfaceFlags); - } else if (camera->globalCtx->csCtx.state != 0) { + } else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) { sCameraInterfaceFlags = 0x3200; Camera_UpdateInterface(sCameraInterfaceFlags); } else { @@ -7455,7 +7445,7 @@ Vec3s Camera_Update(Camera* camera) { gDbgCamEnabled ^= 1; if (gDbgCamEnabled) { DbgCamera_Enable(&D_8015BD80, camera); - } else if (camera->globalCtx->csCtx.state != 0) { + } else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) { func_80064534(camera->globalCtx, &camera->globalCtx->csCtx); } } @@ -7554,13 +7544,13 @@ Vec3s Camera_Update(Camera* camera) { * When the camera's timer is 0, change the camera to it's parent */ void Camera_Finish(Camera* camera) { - Camera* defaultCam = camera->globalCtx->cameraPtrs[0]; + Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM]; Player* player = (Player*)camera->globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head; if (camera->timer == 0) { - Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, 7); + Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, CAM_STAT_ACTIVE); - if ((camera->parentCamIdx == 0) && (camera->unk_168 != 0)) { + if ((camera->parentCamIdx == MAIN_CAM) && (camera->csId != 0)) { player->actor.freezeTimer = 0; player->stateFlags1 &= ~0x20000000; @@ -7569,23 +7559,22 @@ void Camera_Finish(Camera* camera) { osSyncPrintf("camera: player demo end!!\n"); } - defaultCam->unk_14C |= 8; + mainCam->unk_14C |= 8; } - if (camera->globalCtx->cameraPtrs[camera->childCamIdx]->parentCamIdx == camera->thisIdx) { - camera->globalCtx->cameraPtrs[camera->childCamIdx]->parentCamIdx = camera->parentCamIdx; + if (CHILD_CAM(camera)->parentCamIdx == camera->thisIdx) { + CHILD_CAM(camera)->parentCamIdx = camera->parentCamIdx; } - if (camera->globalCtx->cameraPtrs[camera->parentCamIdx]->childCamIdx == camera->thisIdx) { - camera->globalCtx->cameraPtrs[camera->parentCamIdx]->childCamIdx = camera->childCamIdx; + if (PARENT_CAM(camera)->childCamIdx == camera->thisIdx) { + PARENT_CAM(camera)->childCamIdx = camera->childCamIdx; } - if (camera->globalCtx->cameraPtrs[camera->parentCamIdx]->thisIdx == 0) { - camera->globalCtx->cameraPtrs[camera->parentCamIdx]->animState = 0; + if (PARENT_CAM(camera)->thisIdx == MAIN_CAM) { + PARENT_CAM(camera)->animState = 0; } - camera->parentCamIdx = 0; - camera->childCamIdx = camera->parentCamIdx; + camera->childCamIdx = camera->parentCamIdx = SUBCAM_FREE; camera->timer = -1; camera->globalCtx->envCtx.unk_E1 = 0; @@ -7744,7 +7733,7 @@ s32 Camera_CheckValidMode(Camera* camera, s16 mode) { } s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) { - if ((camera->unk_14A & 1) != 0) { + if (camera->unk_14A & 1) { if ((u32)((u32)(sCameraSettings[camera->setting].unk_00 & 0xF000000) >> 0x18) >= (u32)((u32)(sCameraSettings[setting].unk_00 & 0xF000000) >> 0x18)) { camera->unk_14A |= 0x10; @@ -7759,7 +7748,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) { if (setting == CAM_SET_NONE || setting >= CAM_SET_MAX) { osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting); - return -0x63; + return -99; } if ((setting == camera->setting) && (!(flags & 1))) { @@ -7771,7 +7760,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) { } camera->unk_14A |= 0x10; - if ((flags & 2) == 0) { + if (!(flags & 2)) { camera->unk_14A |= 1; } @@ -7827,7 +7816,8 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) { camera->unk_14A |= 4; Camera_CopyModeValuesToPREG(camera, camera->mode); } else if (settingChangeSuccessful < -1) { - // @bug: This condition can never happen since settingChangeSuccesful is only ever 0 or 1. + // @bug: This is likely checking the wrong value. The actual return of Camera_ChangeSettingFlags or + // camDataIdx would make more sense. osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera ID (%d) !! (%d|%d|%d)\n" VT_RST, camDataIdx, camera->thisIdx, 0x32, newCameraSetting); } @@ -7836,7 +7826,7 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) { } Vec3s* Camera_GetInputDir(Vec3s* dst, Camera* camera) { - if (gDbgCamEnabled != 0) { + if (gDbgCamEnabled) { *dst = D_8015BD80.unk_10C6; return dst; } else { @@ -7860,7 +7850,7 @@ s16 Camera_GetInputDirYaw(Camera* camera) { } Vec3s* Camera_GetCamDir(Vec3s* dst, Camera* camera) { - if (gDbgCamEnabled != 0) { + if (gDbgCamEnabled) { *dst = D_8015BD80.unk_10C6; return dst; } else { @@ -8124,7 +8114,7 @@ s32 func_8005B198() { s16 func_8005B1A4(Camera* camera) { camera->unk_14C |= 0x8; - if ((camera->thisIdx == 0) && (camera->globalCtx->activeCamera != 0)) { + if ((camera->thisIdx == MAIN_CAM) && (camera->globalCtx->activeCamera != MAIN_CAM)) { camera->globalCtx->cameraPtrs[camera->globalCtx->activeCamera]->unk_14C |= 0x8; return camera->globalCtx->activeCamera; } diff --git a/src/code/z_camera_data.c b/src/code/z_camera_data.c index 4ec44ff3d..a88d5e9a1 100644 --- a/src/code/z_camera_data.c +++ b/src/code/z_camera_data.c @@ -3445,7 +3445,7 @@ Vec3f D_8011D678[] = { s32 sDemo5PrevSfxFrame = -200; // target is player, far from eye -OnePointDemoFull D_8011D6AC[] = { +OnePointCsFull D_8011D6AC[] = { { // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit // initFlags & 0xFF00 (eye): none // action: 15, copy at, eye, roll, fov to camera @@ -3487,14 +3487,14 @@ OnePointDemoFull D_8011D6AC[] = { }; // target is player close to current eye -OnePointDemoFull D_8011D724[] = { +OnePointCsFull D_8011D724[] = { { 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } }, { 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; // target is close to player -OnePointDemoFull D_8011D79C[] = { +OnePointCsFull D_8011D79C[] = { { 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } }, { @@ -3512,7 +3512,7 @@ OnePointDemoFull D_8011D79C[] = { }; // target is within 300 units of eye, and player is within 30 units of eye -OnePointDemoFull D_8011D83C[] = { +OnePointCsFull D_8011D83C[] = { { 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; @@ -3520,20 +3520,20 @@ OnePointDemoFull D_8011D83C[] = { // target is within 700 units of eye, angle between player/eye and target/eye is less than // 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200), // and the player is farther than 30 units of the eye -OnePointDemoFull D_8011D88C[] = { +OnePointCsFull D_8011D88C[] = { { 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; // same as above, but the target is NOT within the screen area. -OnePointDemoFull D_8011D8DC[] = { +OnePointCsFull D_8011D8DC[] = { { 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } }, { 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, }; // target is a door. -OnePointDemoFull D_8011D954[] = { +OnePointCsFull D_8011D954[] = { { 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } }, { 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } }, { 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, @@ -3541,7 +3541,7 @@ OnePointDemoFull D_8011D954[] = { }; // otherwise -OnePointDemoFull D_8011D9F4[] = { +OnePointCsFull D_8011D9F4[] = { { 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } }, { 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, { 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 7a3d4d967..dbde06067 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -106,7 +106,7 @@ void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) { } if (CHECK_BTN_ALL(pad1->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) && - (gSaveContext.sceneSetupIndex >= 4) && (gDbgCamEnabled == 0)) { + (gSaveContext.sceneSetupIndex >= 4) && !gDbgCamEnabled) { D_8015FCC8 = 1; gSaveContext.cutsceneIndex = 0xFFFD; gSaveContext.cutsceneTrigger = 1; @@ -428,8 +428,8 @@ void func_80065134(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdDayTim s16 temp2; if (csCtx->frames == cmd->startFrame) { - temp1 = (cmd->hour * 60.0f) / 0.021972656f; - temp2 = (cmd->minute + 1) / 0.021972656f; + temp1 = (cmd->hour * 60.0f) / (360.0f / 0x4000); + temp2 = (cmd->minute + 1) / (360.0f / 0x4000); gSaveContext.dayTime = temp1 + temp2; gSaveContext.environmentTime = temp1 + temp2; @@ -1301,7 +1301,7 @@ s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext* } while (shouldContinue) { - if (((CutsceneCameraPoint*)cmd)->continueFlag == -1) { + if (((CutsceneCameraPoint*)cmd)->continueFlag == CS_CMD_STOP) { shouldContinue = 0; } cmd += 0x10; @@ -1338,7 +1338,7 @@ s32 Cutscene_Command_CameraFocus(GlobalContext* globalCtx, CutsceneContext* csCt } while (shouldContinue) { - if (((CutsceneCameraPoint*)cmd)->continueFlag == -1) { + if (((CutsceneCameraPoint*)cmd)->continueFlag == CS_CMD_STOP) { shouldContinue = 0; } cmd += 0x10; @@ -1369,7 +1369,7 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm if (D_8015FCC8 != 0) { sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14); sp2C->player = NULL; - Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT); + Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT); Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE); Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0); sp28 = csCtx->cameraFocus->cameraRoll * 1.40625f; @@ -1412,7 +1412,7 @@ s32 Cutscene_Command_08(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm if (D_8015FCC8 != 0) { sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14); sp2C->player = NULL; - Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT); + Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT); Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE); Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0); sp3C.x = csCtx->cameraFocus->pos.x; @@ -1914,7 +1914,7 @@ void func_80068DC0(GlobalContext* globalCtx, CutsceneContext* csCtx) { Gameplay_CopyCamera(globalCtx, D_8015FCC6, csCtx->unk_14); } - Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, 7); + Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_ACTIVE); Gameplay_ClearCamera(globalCtx, csCtx->unk_14); func_8005B1A4(globalCtx->cameraPtrs[D_8015FCC6]); } diff --git a/src/code/z_eff_spark.c b/src/code/z_eff_spark.c index 480645ea3..dae4d580f 100644 --- a/src/code/z_eff_spark.c +++ b/src/code/z_eff_spark.c @@ -211,7 +211,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) { f32 temp; SkinMatrix_SetTranslate(&spEC, elem->position.x, elem->position.y, elem->position.z); - temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) * 0.015625f; + temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) / 64.0f; SkinMatrix_SetScale(&spAC, temp, temp, 1.0f); SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->mf_11DA0, &sp6C); SkinMatrix_MtxFMtxFMult(&sp6C, &spAC, &sp12C); diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index 4f66f25df..30390e827 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -849,7 +849,7 @@ void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 sc { 0.0f, 20.0f, 20.0f }, { 17.320474f, 20.0f, -9.999695f }, { -17.320474f, 20.0f, -9.999695f }, - }; + }; // 17.320474 is approximately 10 * sqrt(3) s32 i; Vec3f velocity; Vec3f pos; diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c index 15654cc0d..acdcae4c6 100644 --- a/src/code/z_onepointdemo.c +++ b/src/code/z_onepointdemo.c @@ -1,55 +1,1377 @@ #include "global.h" +#include "vt.h" +#include "overlays/actors/ovl_En_Sw/z_en_sw.h" -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C680.s") +static s16 sDisableAttention = false; +static s16 sUnused = -1; +static s32 sPrevFrameCs1100 = -4096; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C704.s") +#include "z_onepointdemo_data.c" -void func_8007C76C(Vec3f* src, Vec3s* dst) { +void OnePointCutscene_AddVecSphToVec3f(Vec3f* dst, Vec3f* src, VecSph* vecSph) { + Vec3f out; + Vec3f vec; + + OLib_VecSphGeoToVec3f(&vec, vecSph); + + out.x = src->x + vec.x; + out.y = src->y + vec.y; + out.z = src->z + vec.z; + if (dst) {} + *dst = out; +} + +s16 OnePointCutscene_Vec3fYaw(Vec3f* vec1, Vec3f* vec2) { + return DEGF_TO_BINANG(RADF_TO_DEGF(Math_FAtan2F(vec2->x - vec1->x, vec2->z - vec1->z))); +} + +void OnePointCutscene_Vec3sToVec3f(Vec3f* src, Vec3s* dst) { dst->x = src->x; dst->y = src->y; dst->z = src->z; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C7A8.s") +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); +} -void func_8007C7F8(CollisionContext* colCtx, Vec3f* pos) { - CollisionPoly* poly; +f32 OnePointCutscene_RaycastFloor(CollisionContext* colCtx, Vec3f* pos) { + CollisionPoly* outPoly; s32 bgId; - BgCheck_EntityRaycastFloor3(colCtx, &poly, &bgId, pos); + return BgCheck_EntityRaycastFloor3(colCtx, &outPoly, &bgId, pos); } -void func_8007C820(OnePointDemoCamera* onePointCamera, s16 actionParameters, s16 initTimer, - CutsceneCameraPoint* atPoints, CutsceneCameraPoint* eyePoints) { - onePointCamera->atPoints = atPoints; - onePointCamera->eyePoints = eyePoints; - onePointCamera->actionParameters = actionParameters; - onePointCamera->initTimer = initTimer; +void OnePointCutscene_SetCsCamPoints(Camera* camera, s16 actionParameters, s16 initTimer, CutsceneCameraPoint* atPoints, + CutsceneCameraPoint* eyePoints) { + OnePointCsCamera* onePointCamData = (OnePointCsCamera*)&camera->paramData; + + onePointCamData->atPoints = atPoints; + onePointCamData->eyePoints = eyePoints; + onePointCamData->actionParameters = actionParameters; + onePointCamData->initTimer = initTimer; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C850.s") +s32 OnePointCutscene_SetInfo(GlobalContext* globalCtx, s16 camIdx, s16 csId, Actor* actor, s16 timer) { + Camera* csCam = globalCtx->cameraPtrs[camIdx]; + Camera* childCam = globalCtx->cameraPtrs[csCam->childCamIdx]; + Camera* mainCam = globalCtx->cameraPtrs[MAIN_CAM]; + Player* player = mainCam->player; + VecSph spD0; + s32 i; + Vec3f spC0; + Vec3f spB4; + PosRot spA0; + PosRot sp8C; + f32 tempRand; + Unique9OnePointCs* csInfo = ONEPOINT_CS_INFO(csCam); + + switch (csId) { + case 1020: + if (timer < 20) { + timer = 20; + } + D_801208EC[0].atTargetInit = globalCtx->view.lookAt; + D_801208EC[0].eyeTargetInit = globalCtx->view.eye; + D_801208EC[0].fovTargetInit = globalCtx->view.fovy; + D_801208EC[1].atTargetInit = mainCam->at; + D_801208EC[1].eyeTargetInit = mainCam->eye; + D_801208EC[1].fovTargetInit = mainCam->fov; + D_801208EC[1].timerInit = timer - 1; + csCam->timer = timer + 1; + D_801208EC[1].lerpStepScale = 1.0f / (0.5f * timer); + + csInfo->keyFrames = D_801208EC; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 1030: + D_80120964[0].atTargetInit = globalCtx->view.lookAt; + D_80120964[0].eyeTargetInit = globalCtx->view.eye; + D_80120964[0].fovTargetInit = globalCtx->view.fovy; + OLib_Vec3fDiffToVecSphGeo(&spD0, &mainCam->at, &mainCam->eye); + D_80120964[1].eyeTargetInit.y = BINANG_TO_DEGF(spD0.yaw); + D_80120964[1].timerInit = timer - 1; + + csInfo->keyFrames = D_80120964; + csInfo->keyFrameCnt = 2; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 5000: + D_801209B4[0].atTargetInit = D_801209B4[1].atTargetInit = globalCtx->view.lookAt; + D_801209B4[0].eyeTargetInit = globalCtx->view.eye; + D_801209B4[0].fovTargetInit = D_801209B4[2].fovTargetInit = globalCtx->view.fovy; + OLib_Vec3fDiffToVecSphGeo(&spD0, &actor->focus.pos, &mainCam->at); + spD0.r = mainCam->dist; + OnePointCutscene_AddVecSphToVec3f(&D_801209B4[1].eyeTargetInit, &D_801209B4[1].atTargetInit, &spD0); + D_801209B4[1].atTargetInit.y += 20.0f; + + csInfo->keyFrames = D_801209B4; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 5010: + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMO4); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &mainCam->at, &mainCam->eye); + csCam->roll = 0; + break; + case 9500: + csInfo->keyFrames = D_80120A54; + csInfo->keyFrameCnt = 3; + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 2260: + D_80120ACC[0].atTargetInit.x = D_80120ACC[2].atTargetInit.x = + ((mainCam->globalCtx->state.frames & 1) ? -10.0f : 10.0f) + (Rand_ZeroOne() * 8.0f); + + D_80120ACC[0].eyeTargetInit.x = D_80120ACC[2].eyeTargetInit.x = + ((mainCam->globalCtx->state.frames & 1) ? 20.0f : -20.0f) + (Rand_ZeroOne() * 5.0f); + + csInfo->keyFrames = D_80120ACC; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + 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; + } + } + + D_80120B94[camIdx - 1].eyeTargetInit.y = + ((mainCam->globalCtx->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne(); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 5); + Quake_SetSpeed(i, 400); + Quake_SetQuakeValues(i, 4, 5, 40, 0x3C); + Quake_SetCountdown(i, 1600); + 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; + } + } + D_80120D4C[camIdx - 1].eyeTargetInit.y = + ((mainCam->globalCtx->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne(); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 5); + Quake_SetSpeed(i, 400); + Quake_SetQuakeValues(i, 2, 3, 200, 0x32); + Quake_SetCountdown(i, 9999); + break; + case 2220: + csInfo->keyFrames = D_80120E64; + csInfo->keyFrameCnt = 8; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 5); + Quake_SetSpeed(i, 400); + Quake_SetQuakeValues(i, 2, 2, 50, 0); + Quake_SetCountdown(i, 280); + 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; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 2340: + csInfo->keyFrames = D_80121094; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 5); + Quake_SetSpeed(i, 400); + Quake_SetQuakeValues(i, 2, 2, 50, 0); + Quake_SetCountdown(i, 60); + break; + case 2350: + csInfo->keyFrames = D_8012110C; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 2200: { + s16 sp82; + s16 sp80; + s16 sp7E; + s16 sp7C; + + func_8002F374(globalCtx, &player->actor, &sp82, &sp7E); + func_8002F374(globalCtx, actor, &sp80, &sp7C); + if ((sp82 > 0) && (sp82 < 320) && (sp7E > 0) && (sp7E < 240) && (sp80 > 0) && (sp80 < 320) && (sp7C > 0) && + (sp7C < 240) && + !OnePointCutscene_BgCheckLineTest(&globalCtx->colCtx, &actor->focus.pos, &player->actor.focus.pos)) { + D_80121184[0].atTargetInit.x = (globalCtx->view.lookAt.x + actor->focus.pos.x) * 0.5f; + D_80121184[0].atTargetInit.y = (globalCtx->view.lookAt.y + actor->focus.pos.y) * 0.5f; + D_80121184[0].atTargetInit.z = (globalCtx->view.lookAt.z + actor->focus.pos.z) * 0.5f; + D_80121184[0].eyeTargetInit = globalCtx->view.eye; + 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; + } + Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_UNK3); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + } break; + case 2290: { + Actor* rideActor = player->rideActor; + + func_8002DF54(globalCtx, NULL, 8); + if (rideActor != NULL) { + rideActor->freezeTimer = 180; + } + + csInfo->keyFrames = D_80121224; + csInfo->keyFrameCnt = 6; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + } break; + case 5120: + func_8002DF54(globalCtx, NULL, 8); + + csInfo->keyFrames = D_80121314; + csInfo->keyFrameCnt = 1; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4510: + D_8012133C[0].eyeTargetInit = actor->world.pos; + D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f; + func_8002DF54(globalCtx, NULL, 8); + + csInfo->keyFrames = D_8012133C; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4500: + Actor_GetFocus(&spA0, actor); + spC0 = spA0.pos; + spC0.y = OnePointCutscene_RaycastFloor(&globalCtx->colCtx, &spC0) + 40.0f; + spD0.r = 150.0f; + spD0.yaw = spA0.rot.y; + spD0.pitch = 0x3E8; + + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + func_8002DF54(globalCtx, NULL, 8); + csCam->roll = 0; + csCam->fov = 50.0f; + if (csCam->childCamIdx != SUBCAM_FREE) { + OnePointCutscene_EndCutscene(globalCtx, csCam->childCamIdx); + } + break; + case 2210: + OLib_Vec3fDiffToVecSphGeo(&spD0, &player->actor.world.pos, &actor->world.pos); + D_801213B4[0].eyeTargetInit.y = D_801213B4[1].eyeTargetInit.y = D_801213B4[2].eyeTargetInit.y = + D_801213B4[2].atTargetInit.y = BINANG_TO_DEGF(spD0.yaw); + if (Rand_ZeroOne() < 0.0f) { + D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x; + } + func_8002DF54(globalCtx, NULL, 8); + + csInfo->keyFrames = D_801213B4; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 1010: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &childCam->at, &childCam->eye); + Gameplay_CameraSetFov(globalCtx, camIdx, childCam->fov); + Gameplay_SetCameraRoll(globalCtx, camIdx, childCam->roll); + break; + case 9601: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3); + Gameplay_CameraChangeSetting(globalCtx, MAIN_CAM, mainCam->prevSetting); + OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398); + break; + case 9602: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3); + Gameplay_CameraChangeSetting(globalCtx, MAIN_CAM, mainCam->prevSetting); + OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434); + break; + case 4175: + csInfo->keyFrames = D_8012147C; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + 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; + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 6; + csCam->fov = 75.0f; + func_8002DF54(globalCtx, NULL, 8); + break; + case 3040: + func_8002DF54(globalCtx, NULL, 8); + D_8012151C[0].timerInit = timer - 1; + + csInfo->keyFrames = D_8012151C; + csInfo->keyFrameCnt = 2; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3020: + D_8012156C[1].timerInit = timer - 1; + if (mainCam->globalCtx->state.frames & 1) { + 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; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + func_8002DF54(globalCtx, NULL, 8); + break; + case 3010: + D_801215BC[0].timerInit = timer; + + csInfo->keyFrames = D_801215BC; + csInfo->keyFrameCnt = 1; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3070: + csInfo->keyFrames = D_801215E4; + csInfo->keyFrameCnt = 10; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 3); + Quake_SetSpeed(i, 22000); + Quake_SetQuakeValues(i, 2, 0, 200, 0); + Quake_SetCountdown(i, 10); + break; + case 3080: + csInfo->keyFrames = D_80121774; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3090: + func_8002DF54(globalCtx, NULL, 8); + + csInfo->keyFrames = D_80121814; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3100: + VEC_SET(spB4, 0.0f, -280.0f, -1400.0f); + + Actor_GetFocus(&spA0, actor); + spC0 = spA0.pos; + func_800C0808(globalCtx, camIdx, player, CAM_SET_CIRCLE6); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0; + csCam->fov = 70.0f; + func_8002DF54(globalCtx, NULL, 8); + break; + case 3380: + case 3065: + csInfo->keyFrames = D_801218B4; + csInfo->keyFrameCnt = 2; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 24000); + Quake_SetQuakeValues(i, 2, 0, 0, 0); + Quake_SetCountdown(i, 160); + break; + case 3060: + csInfo->keyFrames = D_80121904; + csInfo->keyFrameCnt = 2; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3050: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3); + func_8002DF54(globalCtx, &player->actor, 5); + OnePointCutscene_SetCsCamPoints(csCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C); + func_80078884(NA_SE_SY_CORRECT_CHIME); + OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos); + 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; + + i = Quake_Add(mainCam, 3); + Quake_SetSpeed(i, 30000); + Quake_SetQuakeValues(i, 2, 1, 1, 0); + Quake_SetCountdown(i, 200); + break; + case 3120: + csInfo->keyFrames = D_80121954[-(timer + 101)]; + csCam->timer = 100; + csCam->unk_14C |= 2; + csInfo->keyFrameCnt = 2; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3130: + csInfo->keyFrames = D_80121A44; + csInfo->keyFrameCnt = 12; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + csCam->unk_14C |= 2; + break; + case 3140: + D_80121C24[0].atTargetInit = globalCtx->view.lookAt; + D_80121C24[0].eyeTargetInit = globalCtx->view.eye; + D_80121C24[0].fovTargetInit = globalCtx->view.fovy; + + csInfo->keyFrames = D_80121C24; + csInfo->keyFrameCnt = 7; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + 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; + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0x50; + csCam->fov = 55.0f; + func_8002DF38(globalCtx, &player->actor, 8); + 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; + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + Gameplay_CopyCamera(globalCtx, MAIN_CAM, camIdx); + csCam->roll = -1; + csCam->fov = 55.0f; + func_8002DF38(globalCtx, actor, 1); + break; + case 3160: + Actor_GetWorld(&spA0, actor); + spC0 = spA0.pos; + spD0.pitch = 0; + spD0.yaw = spA0.rot.y; + spD0.r = 150.0f; + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0; + csCam->fov = 55.0f; + func_8002DF38(globalCtx, &player->actor, 8); + 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; + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0; + csCam->fov = 60.0f; + func_8002DF38(globalCtx, actor, 1); + break; + case 3190: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_MORI3); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + func_8002DF38(globalCtx, actor, 0xC); + 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; + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0x1E; + csCam->fov = 75.0f; + func_8002DF38(globalCtx, &player->actor, 8); + 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; + OLib_Vec3fDiffToVecSphGeo(&spD0, &spA0.pos, &sp8C.pos); + spD0.pitch = 0x5DC; + spD0.r = 120.0f; + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + Gameplay_CameraSetAtEye(globalCtx, MAIN_CAM, &spC0, &spB4); + + i = Quake_Add(csCam, 3); + Quake_SetSpeed(i, 22000); + Quake_SetQuakeValues(i, 1, 0, 0, 0); + Quake_SetCountdown(i, 90); + 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; + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0; + csCam->fov = 45.0f; + func_8002DF38(globalCtx, &player->actor, 8); + break; + case 3220: + Actor_GetFocus(&spA0, actor); + spC0 = spA0.pos; + func_800C0808(globalCtx, camIdx, player, CAM_SET_CIRCLE6); + Actor_GetWorld(&spA0, &player->actor); + OLib_Vec3fDiffToVecSphGeo(&spD0, &spC0, &spA0.pos); + spD0.yaw += 0x3E8; + spD0.r = 400.0f; + OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0); + spB4.y = spA0.pos.y + 60.0f; + Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4); + csCam->roll = 0; + csCam->fov = 75.0f; + player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF; + func_8002DF54(globalCtx, NULL, 8); + break; + case 3240: + D_80121D3C[2].timerInit = timer - 5; + + csInfo->keyFrames = D_80121D3C; + csInfo->keyFrameCnt = 3; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 6001: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3); + func_8002DF54(globalCtx, NULL, 8); + Actor_GetWorld(&spA0, actor); + if (spA0.pos.z > -750.0f) { + OnePointCutscene_SetCsCamPoints(csCam, D_801208E8, D_801208E4, D_801206A0, D_80120820); + } else { + OnePointCutscene_SetCsCamPoints(csCam, D_801208E8, D_801208E4, D_801206A0, D_80120760); + } + + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 32000); + Quake_SetQuakeValues(i, 0, 0, 20, 0); + Quake_SetCountdown(i, D_801208E4 - 10); + break; + case 3400: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3); + func_8002DF38(globalCtx, &player->actor, 8); + OnePointCutscene_SetCsCamPoints(csCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4); + OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos); + OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos); + + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 0x4E20); + Quake_SetQuakeValues(i, 1, 0, 50, 0); + Quake_SetCountdown(i, D_80120698 - 20); + break; + case 3390: + player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = -0x3FD9; + + csInfo->keyFrames = D_80121DB4; + csInfo->keyFrameCnt = 9; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3310: + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_HIDAN2); + func_8002DF54(globalCtx, NULL, 8); + Gameplay_CopyCamera(globalCtx, camIdx, MAIN_CAM); + + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 32000); + Quake_SetQuakeValues(i, 2, 0, 0, 0); + Quake_SetCountdown(i, timer); + break; + case 3290: + D_80121F1C[0].atTargetInit = globalCtx->view.lookAt; + D_80121F1C[0].eyeTargetInit = globalCtx->view.eye; + D_80121F1C[0].fovTargetInit = globalCtx->view.fovy; + 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; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 3); + Quake_SetSpeed(i, 12000); + Quake_SetQuakeValues(i, 0, 0, 1000, 0); + Quake_SetCountdown(i, 5); + break; + case 3340: + D_80121FBC[0].atTargetInit = globalCtx->view.lookAt; + D_80121FBC[0].eyeTargetInit = globalCtx->view.eye; + D_80121FBC[0].fovTargetInit = globalCtx->view.fovy; + + csInfo->keyFrames = D_80121FBC; + csInfo->keyFrameCnt = 4; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 3); + Quake_SetSpeed(i, 12000); + Quake_SetQuakeValues(i, 0, 0, 1000, 0); + Quake_SetCountdown(i, 5); + break; + case 3360: + csInfo->keyFrames = D_8012205C; + csInfo->keyFrameCnt = 3; + + func_8002DF38(globalCtx, &player->actor, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3350: + D_801220D4[0].atTargetInit = globalCtx->view.lookAt; + D_801220D4[0].eyeTargetInit = globalCtx->view.eye; + D_801220D4[0].fovTargetInit = globalCtx->view.fovy; + 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; + } + func_8002DF54(globalCtx, NULL, 8); + + csInfo->keyFrames = D_801220D4; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3330: + csInfo->keyFrames = D_8012219C; + csInfo->keyFrameCnt = 7; + + func_8002DF38(globalCtx, &player->actor, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3410: + csInfo->keyFrames = D_801222B4; + csInfo->keyFrameCnt = 5; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 32000); + Quake_SetQuakeValues(i, 4, 0, 0, 0); + Quake_SetCountdown(i, 20); + break; + case 3450: + csInfo->keyFrames = D_8012237C; + csInfo->keyFrameCnt = 2; + + func_8002DF38(globalCtx, &player->actor, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 32000); + Quake_SetQuakeValues(i, 2, 0, 0, 0); + Quake_SetCountdown(i, 10); + break; + case 3440: + csInfo->keyFrames = D_801223CC; + csInfo->keyFrameCnt = 6; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007FFE0.s") + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + player->stateFlags1 |= 0x20000000; + player->actor.freezeTimer = 90; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_80080024.s") + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 32000); + Quake_SetQuakeValues(i, 2, 0, 0, 0); + Quake_SetCountdown(i, 10); + break; + case 3430: + csInfo->keyFrames = D_801224BC; + csInfo->keyFrameCnt = 7; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_800800F8.s") + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_800803F0.s") + i = Quake_Add(csCam, 1); + Quake_SetSpeed(i, 32000); + Quake_SetQuakeValues(i, 1, 0, 10, 0); + Quake_SetCountdown(i, 20); + break; + case 4100: + csInfo->keyFrames = D_801225D4; + csInfo->keyFrameCnt = 5; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_80080480.s") + player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC; + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + func_8002DF54(globalCtx, NULL, 8); + break; + case 4110: + csInfo->keyFrames = D_8012269C; + csInfo->keyFrameCnt = 3; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_800806BC.s") + func_8002DF38(globalCtx, &player->actor, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4120: + func_8002DF54(globalCtx, NULL, 8); + D_80122714[1].timerInit = 80; + csInfo->keyFrames = D_80122714; + csInfo->keyFrameCnt = 4; -void func_8008070C() { - D_80120130 = 0; + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4140: + csInfo->keyFrames = D_801227B4; + csInfo->keyFrameCnt = 6; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + break; + case 4150: + csInfo->keyFrames = D_801228A4; + csInfo->keyFrameCnt = 5; + + func_8002DF54(globalCtx, NULL, 8); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4160: + csInfo->keyFrames = D_8012296C; + csInfo->keyFrameCnt = 4; + + func_8002DF54(globalCtx, NULL, 8); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4170: + csInfo->keyFrames = D_80122A0C; + csInfo->keyFrameCnt = 2; + + func_8002DF54(globalCtx, NULL, 8); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4190: + csInfo->keyFrames = D_80122A5C; + csInfo->keyFrameCnt = 8; + + func_8002DF38(globalCtx, &player->actor, 8); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4200: + csInfo->keyFrames = D_80122B9C; + csInfo->keyFrameCnt = 3; + + func_8002DF38(globalCtx, &player->actor, 8); + Camera_ChangeMode(mainCam, CAM_MODE_NORMAL); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4210: + player->actor.freezeTimer = timer; + + csInfo->keyFrames = D_80122C14; + csInfo->keyFrameCnt = 1; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + + i = Quake_Add(csCam, 3); + Quake_SetSpeed(i, 12000); + Quake_SetQuakeValues(i, 0, 1, 100, 0); + Quake_SetCountdown(i, timer - 80); + break; + case 4220: + csInfo->keyFrames = (player->actor.world.pos.z < -15.0f) ? D_80122C3C : D_80122C64; + csInfo->keyFrameCnt = 1; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + func_8002DF38(globalCtx, &player->actor, 1); + + i = Quake_Add(csCam, 3); + Quake_SetSpeed(i, 12000); + Quake_SetQuakeValues(i, 0, 1, 10, 0); + Quake_SetCountdown(i, timer - 10); + break; + case 4221: + csInfo->keyFrames = D_80122C8C; + csInfo->keyFrameCnt = 1; + + func_8002DF54(globalCtx, NULL, 8); + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3260: + func_8002DF54(globalCtx, NULL, 8); + D_80122CB4[1].timerInit = timer - 5; + + csInfo->keyFrames = D_80122CB4; + csInfo->keyFrameCnt = 2; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 3261: + func_8002DF54(globalCtx, NULL, 8); + D_80122D04[1].timerInit = timer - 10; + + csInfo->keyFrames = D_80122D04; + csInfo->keyFrameCnt = 2; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 8010: + csInfo->keyFrames = D_80122D54; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 8002: + csInfo->keyFrames = D_80122DCC; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + 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; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 1100: { + s32 tempDiff = globalCtx->state.frames - sPrevFrameCs1100; + + if ((tempDiff > 3600) || (tempDiff < -3600)) { + csInfo->keyFrames = D_80123074; + csInfo->keyFrameCnt = 5; + } else { + if (globalCtx->state.frames & 1) { + 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; + } + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + sPrevFrameCs1100 = globalCtx->state.frames; + + } break; + case 9806: + csCam->timer = -99; + if (func_800C0CB8(globalCtx)) { + func_800C0808(globalCtx, camIdx, player, CAM_SET_ITEM2); + csCam->data2 = 0xC; + } else { + Gameplay_CopyCamera(globalCtx, camIdx, MAIN_CAM); + Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2); + } + break; + case 9908: + if (func_800C0CB8(globalCtx)) { + D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = LINK_IS_CHILD ? 100.0f : 120.0f; + + if (player->stateFlags1 & 0x08000000) { + D_801231B4[2].atTargetInit.z = 0.0f; + } + Actor_GetWorldPosShapeRot(&spA0, &player->actor); + OLib_Vec3fDiffToVecSphGeo(&spD0, &spA0.pos, &mainCam->at); + spD0.yaw -= spA0.rot.y; + OLib_VecSphGeoToVec3f(&D_801231B4[3].atTargetInit, &spD0); + OLib_Vec3fDiffToVecSphGeo(&spD0, &spA0.pos, &mainCam->eye); + spD0.yaw -= spA0.rot.y; + OLib_VecSphGeoToVec3f(&D_801231B4[3].eyeTargetInit, &spD0); + D_801231B4[3].fovTargetInit = mainCam->fov; + D_801231B4[3].timerInit = timer - 50; + + csInfo->keyFrames = D_801231B4; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + } 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; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + } + break; + case 1000: + D_801232A4[0].atTargetInit = globalCtx->view.lookAt; + D_801232A4[0].eyeTargetInit = globalCtx->view.eye; + D_801232A4[0].fovTargetInit = globalCtx->view.fovy; + + csInfo->keyFrames = D_801232A4; + csInfo->keyFrameCnt = 1; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 8603: + csInfo->keyFrames = D_801232CC; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 8604: + csInfo->keyFrames = D_80123394; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4000: + csInfo->keyFrames = D_8012345C; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4010: + csInfo->keyFrames = D_801234FC; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4011: + csInfo->keyFrames = D_801235C4; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4020: + csInfo->keyFrames = D_8012368C; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4021: + csInfo->keyFrames = D_8012372C; + csInfo->keyFrameCnt = 4; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 4022: + csCam->timer = D_801237CC[0].timerInit + D_801237CC[3].timerInit + D_801237CC[1].timerInit + + D_801237CC[2].timerInit + D_801237CC[4].timerInit; + + csInfo->keyFrames = D_801237CC; + csInfo->keyFrameCnt = 5; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 9703: + D_80123894[0].atTargetInit = globalCtx->view.lookAt; + D_80123894[0].eyeTargetInit = globalCtx->view.eye; + D_80123894[0].fovTargetInit = globalCtx->view.fovy; + 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; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 9704: + D_8012390C[0].atTargetInit = globalCtx->view.lookAt; + D_8012390C[0].eyeTargetInit = globalCtx->view.eye; + D_8012390C[0].fovTargetInit = globalCtx->view.fovy; + + csInfo->keyFrames = D_8012390C; + csInfo->keyFrameCnt = 2; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 9705: + D_8012395C[0].atTargetInit = globalCtx->view.lookAt; + D_8012395C[0].eyeTargetInit = globalCtx->view.eye; + D_8012395C[0].fovTargetInit = globalCtx->view.fovy; + + csInfo->keyFrames = D_8012395C; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC); + break; + case 5110: + D_801239D4[1].timerInit = 10; + + csInfo->keyFrames = D_801239D4; + csInfo->keyFrameCnt = 3; + + func_800C0808(globalCtx, camIdx, (Player*)actor, CAM_SET_DEMOC); + break; + default: + osSyncPrintf(VT_COL(RED, WHITE) "onepointdemo camera: demo number not found !! (%d)\n" VT_RST, csId); + break; + } + return 0; +} + +s16 OnePointCutscene_SetAsChild(GlobalContext* globalCtx, s16 newCamIdx, s16 parentCamIdx) { + s16 prevCamIdx = globalCtx->cameraPtrs[parentCamIdx]->childCamIdx; + + globalCtx->cameraPtrs[newCamIdx]->parentCamIdx = parentCamIdx; + globalCtx->cameraPtrs[parentCamIdx]->childCamIdx = newCamIdx; + + return prevCamIdx; } -void func_80080718() { - D_80120130 = 1; +/** + * Removes a cutscene camera from the list. Returns the parent cam if the removed camera is active, otherwise returns + * SUBCAM_NONE + */ +s32 OnePointCutscene_RemoveCamera(GlobalContext* globalCtx, s16 camIdx) { + Camera* camera = globalCtx->cameraPtrs[camIdx]; + s32 nextCamIdx; + + if (camera->thisIdx == CHILD_CAM(camera)->parentCamIdx) { + CHILD_CAM(camera)->parentCamIdx = camera->parentCamIdx; + } + if (camera->thisIdx == PARENT_CAM(camera)->childCamIdx) { + PARENT_CAM(camera)->childCamIdx = camera->childCamIdx; + } + nextCamIdx = (globalCtx->activeCamera == camIdx) ? camera->parentCamIdx : SUBCAM_NONE; + camera->parentCamIdx = MAIN_CAM; + camera->childCamIdx = camera->parentCamIdx; + camera->timer = -1; + Gameplay_ClearCamera(camera->globalCtx, camera->thisIdx); + return nextCamIdx; +} + +#define vChildCamIdx temp2 +#define vCsStatus temp1 +#define vCurCamIdx temp2 +#define vNextCamIdx temp1 + +/** + * 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. + */ +s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 parentCamIdx) { + s16 temp1; + s16 temp2; + s16 csCamIdx; + Camera* csCam; + + if (parentCamIdx == SUBCAM_ACTIVE) { + parentCamIdx = globalCtx->activeCamera; + } + csCamIdx = Gameplay_CreateSubCamera(globalCtx); + if (csCamIdx == SUBCAM_NONE) { + osSyncPrintf(VT_COL(RED, WHITE) "onepoint demo: error: too many cameras ... give up! type=%d\n" VT_RST, csId); + return SUBCAM_NONE; + } + + // Inserts the cutscene camera into the cutscene queue in front of parentCam + + vChildCamIdx = globalCtx->cameraPtrs[parentCamIdx]->childCamIdx; + vCsStatus = CAM_STAT_ACTIVE; + if (vChildCamIdx >= SUBCAM_FIRST) { + OnePointCutscene_SetAsChild(globalCtx, vChildCamIdx, csCamIdx); + vCsStatus = CAM_STAT_WAIT; + } else { + Interface_ChangeAlpha(2); + } + OnePointCutscene_SetAsChild(globalCtx, csCamIdx, parentCamIdx); + + csCam = globalCtx->cameraPtrs[csCamIdx]; + + csCam->timer = timer; + csCam->target = actor; + + csCam->at = globalCtx->view.lookAt; + csCam->eye = globalCtx->view.eye; + csCam->fov = globalCtx->view.fovy; + + csCam->csId = csId; + + if (parentCamIdx == MAIN_CAM) { + Gameplay_ChangeCameraStatus(globalCtx, parentCamIdx, CAM_STAT_UNK3); + } else { + Gameplay_ChangeCameraStatus(globalCtx, parentCamIdx, CAM_STAT_WAIT); + } + OnePointCutscene_SetInfo(globalCtx, csCamIdx, csId, actor, timer); + Gameplay_ChangeCameraStatus(globalCtx, csCamIdx, vCsStatus); + + // Removes all lower priority cutscenes in front of this cutscene from the queue. + vCurCamIdx = csCamIdx; + vNextCamIdx = globalCtx->cameraPtrs[csCamIdx]->childCamIdx; + + while (vNextCamIdx >= SUBCAM_FIRST) { + s16 nextCsId = globalCtx->cameraPtrs[vNextCamIdx]->csId; + s16 thisCsId = globalCtx->cameraPtrs[csCamIdx]->csId; + + if ((nextCsId / 100) < (thisCsId / 100)) { + osSyncPrintf(VT_COL(YELLOW, BLACK) "onepointdemo camera[%d]: killed 'coz low priority (%d < %d)\n" VT_RST, + vNextCamIdx, nextCsId, thisCsId); + if (globalCtx->cameraPtrs[vNextCamIdx]->csId != 5010) { + if ((vNextCamIdx = OnePointCutscene_RemoveCamera(globalCtx, vNextCamIdx)) != SUBCAM_NONE) { + Gameplay_ChangeCameraStatus(globalCtx, vNextCamIdx, CAM_STAT_ACTIVE); + } + } else { + vCurCamIdx = vNextCamIdx; + OnePointCutscene_EndCutscene(globalCtx, vNextCamIdx); + } + } else { + vCurCamIdx = vNextCamIdx; + } + vNextCamIdx = globalCtx->cameraPtrs[vCurCamIdx]->childCamIdx; + } + return csCamIdx; } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_80080728.s") +/** + * Ends the cutscene in camIdx by setting its timer to 0. For attention cutscenes, it is set to 5 instead. + */ +s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camIdx) { + if (camIdx == SUBCAM_ACTIVE) { + camIdx = globalCtx->activeCamera; + } + if (globalCtx->cameraPtrs[camIdx] != NULL) { + osSyncPrintf("onepointdemo camera[%d]: delete timer=%d next=%d\n", camIdx, globalCtx->cameraPtrs[camIdx]->timer, + globalCtx->cameraPtrs[camIdx]->parentCamIdx); + if (globalCtx->cameraPtrs[camIdx]->csId == 5010) { + globalCtx->cameraPtrs[camIdx]->timer = 5; + } else { + globalCtx->cameraPtrs[camIdx]->timer = 0; + } + } + return camIdx; +} + +#define vTargetCat temp1 +#define vParentCamIdx temp1 +#define vLastHigherCat temp2 +#define vCsCamIdx temp2 + +/** + * Adds an attention cutscene to the cutscene queue. + */ +s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor) { + 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); + return SUBCAM_NONE; + } + sUnused = -1; + + parentCam = globalCtx->cameraPtrs[MAIN_CAM]; + if (parentCam->mode == CAM_MODE_BOOMFOLLLOW) { + 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; + while (parentCam->childCamIdx != SUBCAM_FREE) { + parentCam = globalCtx->cameraPtrs[parentCam->childCamIdx]; + if (parentCam == NULL) { + break; + } else if (parentCam->setting != CAM_SET_DEMO4) { + 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. + vParentCamIdx = (vLastHigherCat == -1) ? MAIN_CAM : parentCam->thisIdx; + + 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, + globalCtx->state.frames, actor->category); + timer = 30; + break; + } + osSyncPrintf(VT_FGCOL(CYAN) "%06u:" VT_RST " actor attention demo camera: request %d ", globalCtx->state.frames, + actor->category); + + // If the previous attention cutscene has an actor in the same category, skip this actor. + if (actor->category == vLastHigherCat) { + osSyncPrintf("→ " VT_FGCOL(PURPLE) "×" VT_RST " (%d)\n", actor->id); + return SUBCAM_NONE; + } + osSyncPrintf("→ " VT_FGCOL(BLUE) "○" VT_RST " (%d)\n", actor->id); + vCsCamIdx = OnePointCutscene_Init(globalCtx, 5010, timer, actor, vParentCamIdx); + if (vCsCamIdx == SUBCAM_NONE) { + osSyncPrintf(VT_COL(RED, WHITE) "actor attention demo: give up! \n" VT_RST, actor->id); + return SUBCAM_NONE; + } else { + s32* data = (s32*)&globalCtx->cameraPtrs[vCsCamIdx]->data1; + + *data = NA_SE_SY_CORRECT_CHIME; + return vCsCamIdx; + } +} + +/** + * Adds an attention cutscene to the cutscene queue with the specified sound effect + */ +s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32 sfxId) { + s32 csCamIdx = OnePointCutscene_Attention(globalCtx, actor); + + if (csCamIdx != SUBCAM_NONE) { + s32* data = (s32*)&globalCtx->cameraPtrs[csCamIdx]->data1; + + *data = sfxId; + } + return csCamIdx; +} + +// unused +void OnePointCutscene_EnableAttention() { + sDisableAttention = false; +} + +// unused +void OnePointCutscene_DisableAttention() { + sDisableAttention = true; +} + +s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 category) { + Camera* parentCam = globalCtx->cameraPtrs[MAIN_CAM]; + + while (parentCam->childCamIdx != SUBCAM_FREE) { + parentCam = globalCtx->cameraPtrs[parentCam->childCamIdx]; + if ((parentCam == NULL) || (parentCam->setting != CAM_SET_DEMO4)) { + break; + } else if (category == parentCam->target->category) { + return true; + } + } + return false; +} -void func_80080788(UNK_TYPE arg0, UNK_TYPE arg1) { +// unused, also empty. +void OnePointCutscene_Noop(GlobalContext* globalCtx, s32 arg1) { } diff --git a/src/code/z_onepointdemo_data.c b/src/code/z_onepointdemo_data.c new file mode 100644 index 000000000..1d1838b05 --- /dev/null +++ b/src/code/z_onepointdemo_data.c @@ -0,0 +1,670 @@ +#include "global.h" + +static CutsceneCameraPoint D_8012013C[14] = { + { CS_CMD_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } }, + { CS_CMD_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } }, + { CS_CMD_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } }, + { CS_CMD_CONTINUE, 5, 25, 60.0f, { -1817, 218, -1270 } }, + { CS_CMD_CONTINUE, 3, 20, 60.0f, { -1836, 168, -1243 } }, + { CS_CMD_CONTINUE, 0, 20, 60.0f, { -1905, 115, -1193 } }, + { CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 58, -1212 } }, + { CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 31, -1164 } }, + { CS_CMD_CONTINUE, 0, 30, 60.0f, { -1969, 54, -1209 } }, + { CS_CMD_CONTINUE, 0, 30, 60.0f, { -1973, 35, -1206 } }, + { CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } }, + { CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } }, + { CS_CMD_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } }, + { CS_CMD_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } }, +}; +static CutsceneCameraPoint D_8012021C[14] = { + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 72, -1077 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 7, -1048 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 1, -1030 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1987, 17, -1076 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } }, + { CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } }, +}; +static s16 D_801202FC = 13; +static s16 D_80120300 = 210; +static s16 D_80120304 = 0; + +static CutsceneCameraPoint D_80120308[9] = { + { CS_CMD_CONTINUE, 0, 10, 40.0f, { 0, 4, 0 } }, { CS_CMD_CONTINUE, 0, 10, 40.000004f, { 0, 4, 0 } }, + { CS_CMD_CONTINUE, 0, 10, 50.0f, { 0, 9, 0 } }, { CS_CMD_CONTINUE, 0, 12, 55.0f, { 0, 12, 0 } }, + { CS_CMD_CONTINUE, 0, 15, 61.0f, { 0, 18, 0 } }, { CS_CMD_CONTINUE, 0, 20, 65.0f, { 0, 29, 0 } }, + { CS_CMD_CONTINUE, 0, 40, 60.0f, { 0, 34, 0 } }, { CS_CMD_STOP, 0, 40, 60.0f, { 0, 34, 0 } }, + { CS_CMD_STOP, 0, 10, 60.0f, { 0, 34, 0 } }, +}; +static CutsceneCameraPoint D_80120398[9] = { + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, 45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, 50 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, 58 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, 78 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, 109 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, 118 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, 119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } }, + { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } }, +}; +static s16 D_80120428 = 9; +static s16 D_8012042C = 90; +static s16 D_80120430 = 1; +static CutsceneCameraPoint D_80120434[10] = { + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, -50 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, -58 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, -78 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, -109 } }, + { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, -118 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, -119 } }, + { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, +}; + +static CutsceneCameraPoint D_801204D4[14] = { + { CS_CMD_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } }, + { CS_CMD_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } }, + { CS_CMD_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } }, + { CS_CMD_CONTINUE, -18, 32, 80.600006f, { -80, 251, -8 } }, + { CS_CMD_CONTINUE, -12, 28, 80.600006f, { -64, 259, -28 } }, + { CS_CMD_CONTINUE, -8, 22, 80.600006f, { -79, 200, -342 } }, + { CS_CMD_CONTINUE, -5, 10, 65.80005f, { -110, 140, -549 } }, + { CS_CMD_CONTINUE, -2, 8, 65.2f, { -74, 109, -507 } }, + { CS_CMD_CONTINUE, 0, 10, 65.80002f, { -32, 78, -680 } }, + { CS_CMD_CONTINUE, 0, 20, 85.199936f, { 25, 127, -950 } }, + { CS_CMD_CONTINUE, 0, 30, 85.199936f, { 25, 127, -950 } }, + { CS_CMD_CONTINUE, 0, 40, 85.199936f, { 25, 127, -950 } }, + { CS_CMD_STOP, 6, 30, 85.199936f, { 25, 127, -950 } }, + { CS_CMD_STOP, 0, 30, 85.199936f, { 25, 127, -950 } }, +}; +static CutsceneCameraPoint D_801205B4[14] = { + { CS_CMD_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -250, 244, -442 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -163, 21, -415 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -98, 86, -520 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -86, 31, -816 } }, + { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -74, 18, -931 } }, + { CS_CMD_CONTINUE, 1, 0, 80.600006f, { -91, 80, -1220 } }, + { CS_CMD_CONTINUE, 0, 0, 85.199936f, { 14, 153, -1340 } }, + { CS_CMD_CONTINUE, 0, 0, 85.199936f, { 28, 125, -1340 } }, + { CS_CMD_CONTINUE, 0, 0, 85.199936f, { 48, 124, -1340 } }, + { CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1502 } }, + { CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1262 } }, +}; +static s16 D_80120694 = 14; +static s16 D_80120698 = 190; +static s16 D_8012069C = 8; + +static CutsceneCameraPoint D_801206A0[12] = { + { CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } }, { CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } }, + { CS_CMD_CONTINUE, 6, 20, 70.0f, { -70, 35, 150 } }, { CS_CMD_CONTINUE, 5, 10, 60.0f, { -57, 34, 133 } }, + { CS_CMD_CONTINUE, 4, 25, 65.0f, { -22, 32, 110 } }, { CS_CMD_CONTINUE, 3, 12, 60.0f, { -9, 33, 98 } }, + { CS_CMD_CONTINUE, 3, 5, 65.0f, { -3, 29, 87 } }, { CS_CMD_CONTINUE, 2, 10, 65.0f, { -1, 15, 84 } }, + { CS_CMD_CONTINUE, 1, 200, 65.0f, { 0, 17, 82 } }, { CS_CMD_CONTINUE, 1, 500, 65.0f, { 0, 18, 82 } }, + { CS_CMD_STOP, 8, 50, 65.0f, { 0, 18, 82 } }, { CS_CMD_STOP, 11, 60, 65.0f, { 0, 18, 82 } }, +}; +static CutsceneCameraPoint D_80120760[12] = { + { CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 10, 180 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 20, 180 } }, + { CS_CMD_CONTINUE, 6, 0, 70.0f, { -40, 30, 177 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 0, 35, 172 } }, + { CS_CMD_CONTINUE, 4, 0, 65.0f, { 34, 35, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 61, 32, 147 } }, + { CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 30, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } }, + { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } }, + { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, +}; +static CutsceneCameraPoint D_80120820[12] = { + { CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 5, 170 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 10, 170 } }, + { CS_CMD_CONTINUE, 6, 0, 70.0f, { 80, 20, 167 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 74, 25, 165 } }, + { CS_CMD_CONTINUE, 4, 0, 65.0f, { 63, 30, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 66, 34, 147 } }, + { CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 34, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } }, + { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } }, + { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, +}; +static s16 D_801208E0 = 12; +static s16 D_801208E4 = 90; +static s16 D_801208E8 = 8; + +static OnePointCsFull D_801208EC[3] = { + { 0x0F, 0x08, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x81, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120964[2] = { + { 0x8F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x81, 0xFF, 0xA121, 1, 0, 75.0f, 0.6f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, +}; + +static OnePointCsFull D_801209B4[4] = { + { 0x8F, 0x08, 0x0101, 1, 0, 60.0f, 0.9f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x84, 0x01, 0x0100, 29, 0, 45.0f, 0.1f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, + { 0x83, 0xFF, 0x0000, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120A54[3] = { + { 0x8F, 0xFF, 0x2525, 1, 0, 75.0f, 0.1f, { 0.0f, 20.0f, -10.0f }, { 0.0f, 10.0f, -40.0f } }, + { 0x8F, 0xFF, 0x0000, 9, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x8B, 0xFF, 0x0022, 5000, 0, 75.0f, 0.005f, { 0.0f, 0.0f, -10.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120ACC[5] = { + { 0x8F, 0xFF, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } }, + { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x8F, 0x01, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } }, + { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120B94[11] = { + { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } }, + { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x8F, 0xFF, 0x4141, 1, 0, 40.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 20.0f, 50.0f } }, + { 0x84, 0xFF, 0x0404, 19, 0, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x84, 0xFF, 0x0404, 40, 10, 50.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x84, 0xFF, 0x0404, 70, 0, 60.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } }, + { 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } }, + { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120D4C[7] = { + { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } }, + { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } }, + { 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } }, + { 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } }, + { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120E64[8] = { + { 0x41, 0x01, 0x2142, 20, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x4F, 0xFF, 0x0000, 80, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x4B, 0xFF, 0x4242, 8, 0, 60.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x4B, 0xFF, 0x4242, 15, 4, 55.0f, 0.05f, { -50.0f, 20.0f, 20.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x4B, 0xFF, 0x4242, 15, -4, 50.0f, 0.05f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x4B, 0xFF, 0x4242, 15, 0, 50.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x4F, 0xFF, 0x0000, 40, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80120FA4[6] = { + { 0x8F, 0x01, 0x2143, 30, 0, 70.0f, 0.4f, { 0.0f, 40.0f, 50.0f }, { 30.0f, 10.0f, -50.0f } }, + { 0x95, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x8F, 0xFF, 0x2222, 10, 0, 42.0f, 1.0f, { 0.0f, 40.0f, 0.0f }, { 0.0f, 85.0f, 45.0f } }, + { 0x90, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121094[3] = { + { 0x0F, 0x08, 0x2101, 20, 0, 50.0f, 1.0f, { 3840.0f, 10.0f, 950.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x01, 0x01, 0x2101, 50, 0, 55.0f, 1.0f, { 4000.0f, 50.0f, 1000.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012110C[3] = { + { 0x4F, 0x05, 0x2142, 1, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } }, + { 0x41, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121184[2] = { + { 0x83, 0x01, 0x0101, 40, 0, -1.0f, 0.1f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801211D4[2] = { + { 0x8F, 0x08, 0x0101, 50, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { -10.0f, 85.0f, 0.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121224[6] = { + { 0x8F, 0x01, 0x4141, 2, 0, 60.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 0.0f, 45.0f } }, + { 0x81, 0xFF, 0x4141, 18, 0, 45.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, -10.0f, 50.0f } }, + { 0x84, 0x34, 0x4104, 80, 0, 70.0f, 0.05f, { 0.0f, 0.0f, 60.0f }, { 0.0f, 250.0f, -50.0f } }, + { 0x8F, 0x01, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x8F, 0xFF, 0x0421, 60, 0, 50.0f, 1.0f, { 0.0f, -30.0f, 20.0f }, { 10.0f, 5.0f, -50.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121314[1] = { + { 0x8F, 0x08, 0x4141, 1000, 0, 75.0f, 0.6f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 100.0f } }, +}; + +static OnePointCsFull D_8012133C[3] = { + { 0x8F, 0x01, 0x0141, 40, 0, 75.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { 0.0f, 0.0f, 100.0f } }, + { 0x83, 0xFF, 0x2121, 20, 0, 60.0f, 0.2f, { 0.0f, -10.0f, -10.0f }, { 0.0f, 10.0f, -100.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801213B4[5] = { + { 0x8F, 0x08, 0xC2C2, 40, 0, 70.0f, 1.0f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } }, + { 0x8B, 0x01, 0xC2C2, 120, 0, 70.0f, 0.1f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } }, + { 0x8F, 0x53, 0xC2C2, 30, 0, 50.0f, 1.0f, { 60.0f, 0.0f, 20.0f }, { 60.0f, 0.0f, 60.0f } }, + { 0x84, 0x45, 0x4222, 30, 0, 60.0f, 0.1f, { 0.0f, 50.0f, 0.0f }, { 5.0f, 30.0f, 220.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012147C[4] = { + { 0x8F, 0x01, 0x0101, 40, 0, 45.0f, 1.0f, { 820.0f, 1600.0f, -400.0f }, { 777.0f, 1577.0f, -577.0f } }, + { 0x8F, 0x01, 0x0142, 1, 0, 50.0f, 1.0f, { -50.0f, 80.0f, 0.0f }, { 900.0f, 1575.0f, 850.0f } }, + { 0x83, 0x08, 0x0142, 89, -4, 80.0f, 0.07f, { -50.0f, 70.0f, 0.0f }, { 975.0f, 1575.0f, 770.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012151C[2] = { + { 0x0F, 0x01, 0x0101, 29, 0, 60.0f, 1.0f, { -700.0f, 875.0f, -100.0f }, { -550.0f, 920.0f, -150.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012156C[2] = { + { 0x8F, 0x4D, 0x4242, 1, 0, 65.0f, 1.0f, { 60.0f, 30.0f, 0.0f }, { 50.0f, 20.0f, 150.0f } }, + { 0x81, 0xFF, 0x4242, -1, 0, 65.0f, 1.0f, { -50.0f, 60.0f, 0.0f }, { -60.0f, 40.0f, 150.0f } }, +}; + +static OnePointCsFull D_801215BC[1] = { + { 0x0F, 0xFF, 0x0101, 5, 0, 65.0f, 1.0f, { -1185.0f, 655.0f, 1185.0f }, { -1255.0f, 735.0f, 1255.0f } }, +}; + +static OnePointCsFull D_801215E4[10] = { + { 0x0F, 0x08, 0x4141, 20, 0, 30.0f, 1.0f, { 0.0f, 120.0f, 0.0f }, { -10.0f, 140.0f, -90.0f } }, + { 0x0F, 0x01, 0x0101, 1, 4, 75.0f, 1.0f, { -1360.0f, -940.0f, -3343.0f }, { -1060.0f, -980.0f, -3325.0f } }, + { 0x0B, 0xFF, 0x4141, 129, 0, 75.0f, 0.5f, { 0.0f, 50.0f, 0.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x03, 0xFF, 0x0303, 30, 0, 70.0f, 0.05f, { 0.0f, 80.0f, 0.0f }, { -10.0f, 120.0f, 10.0f } }, + { 0x0F, 0x09, 0x0101, 40, -5, 70.0f, 1.0f, { -973.0f, -924.0f, -3263.0f }, { -1190.0f, -1010.0f, -3365.0f } }, + { 0x0F, 0x01, 0x0101, 1, 0, 75.0f, 1.0f, { -1355.0f, -700.0f, -3340.0f }, { -1040.0f, -940.0f, -3345.0f } }, + { 0x02, 0xFF, 0x0101, 60, 0, 45.0f, 0.8f, { -1370.0f, -875.0f, -3345.0f }, { -1230.0f, -885.0f, -3345.0f } }, + { 0x01, 0xFF, 0x0101, 10, 0, 70.0f, 1.0f, { -1370.0f, -875.0f, -3345.0f }, { -1210.0f, -900.0f, -3420.0f } }, + { 0x0F, 0xFF, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121774[4] = { + { 0x0F, 0x08, 0x0101, 1, -2, 75.0f, 1.0f, { -1340.0f, -860.0f, -3345.0f }, { -1415.0f, -940.0f, -3520.0f } }, + { 0x01, 0x01, 0x0142, 39, 2, 70.0f, 1.0f, { 0.0f, -20.0f, 10.0f }, { -1140.0f, -1010.0f, -3560.0f } }, + { 0x01, 0x05, 0x0121, 20, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 20.0f }, { -1220.0f, -1005.0f, -3660.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121814[4] = { + { 0x0F, 0x4C, 0x0101, 5, 0, 40.0f, 1.0f, { -1400.0f, -540.0f, -3327.0f }, { -1254.0f, -20.0f, -3357.0f } }, + { 0x01, 0xFF, 0x0101, 70, 0, 75.0f, 0.75f, { -1327.0f, 100.0f, -3342.0f }, { -1320.0f, 350.0f, -3540.0f } }, + { 0x01, 0xFF, 0x2121, 10, 0, 60.0f, 0.75f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801218B4[2] = { + { 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 0.0f, 350.0f, -1520.0f }, { 0.0f, 715.0f, -885.0f } }, + { 0x03, 0xFF, 0x0101, 100, 0, 70.0f, 0.02f, { 0.0f, 75.0f, -1335.0f }, { 0.0f, 20.0f, -1190.0f } }, +}; + +static OnePointCsFull D_80121904[2] = { + { 0x0F, 0xFF, 0x0101, 50, 10, 65.0f, 1.0f, { 165.0f, 85.0f, -920.0f }, { 65.0f, -30.0f, -720.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121954[3][2] = { + { + { 0x0F, 0xFF, 0x0101, 20, 5, 60.0f, 1.0f, { -700.0f, 940.0f, 300.0f }, { -765.0f, 1000.0f, 335.0f } }, + { 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.1f, { -540.0f, 875.0f, 245.0f }, { -585.0f, 900.0f, 335.0f } }, + }, + { + { 0x0F, 0xFF, 0x0101, 40, -30, 70.0f, 1.0f, { -80.0f, 115.0f, -180.0f }, { -5.0f, 240.0f, -190.0f } }, + { 0x0B, 0xFF, 0x0101, 60, 20, 70.0f, 0.1f, { -100.0f, 350.0f, -175.0f }, { -5.0f, 240.0f, -190.0f } }, + }, + { + { 0x03, 0xFF, 0x0101, 80, 5, 70.0f, 0.2f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } }, + { 0x0F, 0xFF, 0x0101, 20, 5, 70.0f, 1.0f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } }, + }, +}; + +static OnePointCsFull D_80121A44[12] = { + { 0x4F, 0x05, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } }, + { 0x42, 0x01, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 45.0f, 0.0f }, { 0.0f, 45.0f, 50.0f } }, + { 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x4F, 0x05, 0x2222, 40, 5, 50.0f, 1.0f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 50.0f, 50.0f } }, + { 0x4F, 0x01, 0x4242, 40, 5, 60.0f, 1.0f, { 30.0f, 30.0f, 15.0f }, { 70.0f, 30.0f, -40.0f } }, + { 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x4F, 0xFF, 0x4242, 30, -5, 50.0f, 1.0f, { 20.0f, 30.0f, -5.0f }, { 0.0f, 70.0f, 70.0f } }, + { 0x50, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x4F, 0x01, 0x2242, 40, 0, 45.0f, 1.0f, { 0.0f, 30.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } }, + { 0x4B, 0x01, 0x22C2, 140, 0, 60.0f, 0.04f, { 0.0f, 0.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } }, + { 0x49, 0xFF, 0x2222, 20, 0, 60.0f, 0.8f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 60.0f, -60.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121C24[7] = { + { 0x0F, 0x05, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x03, 0xFF, 0x0101, 89, 0, 50.0f, 0.4f, { 125.0f, 320.0f, -1500.0f }, { 125.0f, 500.0f, -1150.0f } }, + { 0x0F, 0x08, 0x0101, 40, 4, 55.0f, 1.0f, { 0.0f, 375.0f, -1440.0f }, { 5.0f, 365.0f, -1315.0f } }, + { 0x0F, 0xFF, 0x0101, 40, -4, 55.0f, 1.0f, { 250.0f, 375.0f, -1440.0f }, { 235.0f, 365.0f, -1315.0f } }, + { 0x0F, 0xFF, 0x0101, 100, 0, 95.0f, 1.0f, { 125.0f, 345.0f, -1500.0f }, { 125.0f, 255.0f, -1350.0f } }, + { 0x02, 0xFF, 0x0101, 100, 0, 60.0f, 1.0f, { 125.0f, 325.0f, -1500.0f }, { 125.0f, 480.0f, -1000.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121D3C[3] = { + { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 1023.0f, 738.0f, -2628.0f }, { 993.0f, 770.0f, -2740.0f } }, + { 0x02, 0xFF, 0x0101, 4, 0, 50.0f, 1.0f, { 1255.0f, 350.0f, -1870.0f }, { 1240.0f, 575.0f, -2100.0f } }, + { 0x0F, 0xFF, 0x0000, -1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121DB4[9] = { + { 0x0F, 0xFF, 0x0101, 40, 0, 70.0f, 1.0f, { 4290.0f, -1332.0f, -1900.0f }, { 4155.0f, -1360.0f, -1840.0f } }, + { 0x02, 0xFF, 0x0101, 60, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } }, + { 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } }, + { 0x0F, 0xFF, 0x0101, 80, 8, 75.0f, 1.0f, { 4010.0f, -1152.0f, -1728.0f }, { 3997.0f, -1194.0f, -1629.0f } }, + { 0x0F, 0x39, 0x2121, 1, 8, 75.0f, 1.0f, { 20.0f, 20.0f, 0.0f }, { 50.0f, 30.0f, 200.0f } }, + { 0x04, 0xFF, 0x2121, 99, 2, 70.0f, 0.02f, { -20.0f, 0.0f, 20.0f }, { 300.0f, 50.0f, -500.0f } }, + { 0x09, 0x38, 0x2121, 149, -20, 70.0f, 0.1f, { 100.0f, 50.0f, -100.0f }, { 5000.0f, 1055.0f, -2250.0f } }, + { 0x0F, 0xFF, 0x2121, 1, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } }, + { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121F1C[4] = { + { 0x0F, 0x08, 0x0101, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x01, 0xFF, 0x2121, 10, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, + { 0x01, 0x02, 0x2121, 23, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80121FBC[4] = { + { 0x0F, 0xFF, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x01, 0xFF, 0x0101, 10, 0, 30.0f, 1.0f, { -2130.0f, 2885.0f, -1055.0f }, { -2085.0f, 2875.0f, -1145.0f } }, + { 0x0F, 0xFF, 0x0000, 30, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012205C[3] = { + { 0x0F, 0xFF, 0x42C2, 1, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } }, + { 0x0F, 0xFF, 0x0080, 29, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } }, + { 0x01, 0x01, 0x21A1, 10, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -200.0f } }, +}; + +static OnePointCsFull D_801220D4[5] = { + { 0x0F, 0x01, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x01, 0xFF, 0x4141, 10, 5, 55.0f, 0.75f, { 400.0f, -50.0f, 800.0f }, { 600.0f, -60.0f, 800.0f } }, + { 0x01, 0xFF, 0x4141, 15, 10, 40.0f, 0.75f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 200.0f } }, + { 0x0F, 0xFF, 0x0000, 25, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012219C[7] = { + { 0x0F, 0xFF, 0x2121, 5, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } }, + { 0x02, 0xFF, 0x4242, 15, 0, 40.0f, 0.4f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } }, + { 0x0F, 0xFF, 0x0000, 20, 0, 40.0f, 1.0f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } }, + { 0x01, 0xFF, 0x4242, 20, 0, 60.0f, 1.0f, { 20.0f, 60.0f, 20.0f }, { 40.0f, 60.0f, -80.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0000, 90, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801222B4[5] = { + { 0x0F, 0xFF, 0x0101, 20, 10, 45.0f, 1.0f, { -1200.0f, 730.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, + { 0x0B, 0xFF, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 480.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, + { 0x0B, 0x81, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, + { 0x0B, 0x8A, 0x0101, 5, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } }, + { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012237C[2] = { + { 0x0F, 0xFF, 0x0101, 20, -2, 65.0f, 1.0f, { -625.0f, 185.0f, -685.0f }, { -692.0f, 226.0f, -515.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801223CC[6] = { + { 0x0F, 0xFF, 0x0101, 20, 0, 55.0f, 1.0f, { 60.0f, 1130.0f, -1430.0f }, { 60.0f, 1130.0f, -1190.0f } }, + { 0x0F, 0xFF, 0x0101, 18, -13, 68.0f, 1.0f, { 60.0f, 1130.0f, -1445.0f }, { 180.0f, 1170.0f, -1240.0f } }, + { 0x0F, 0xFF, 0x0101, 16, 18, 75.0f, 1.0f, { 42.0f, 1040.0f, -1400.0f }, { -20.0f, 940.0f, -1280.0f } }, + { 0x0F, 0xFF, 0x0101, 4, 0, 60.0f, 1.0f, { 60.0f, 1100.0f, -1465.0f }, { 60.0f, 1100.0f, -1180.0f } }, + { 0x02, 0xFF, 0x0101, 32, 0, 70.0f, 1.0f, { 60.0f, 1100.0f, -1030.0f }, { 60.0f, 1150.0f, -740.0f } }, + { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801224BC[7] = { + { 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 60.0f, 1800.0f, -920.0f }, { 60.0f, 1860.0f, -800.0f } }, + { 0x03, 0xFF, 0x0101, 20, 0, 70.0f, 0.1f, { 60.0f, 1720.0f, -920.0f }, { 60.0f, 1780.0f, -800.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0142, 1, 0, 75.0f, 1.0f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } }, + { 0x03, 0xFF, 0x0142, 119, 0, 75.0f, 0.05f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } }, + { 0x03, 0xFF, 0x4242, 20, 0, 60.0f, 0.1f, { 0.0f, 70.0f, 0.0f }, { 0.0f, 100.0f, 200.0f } }, + { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801225D4[5] = { + { 0x0F, 0x08, 0x0101, 1, 0, 50.0f, 1.0f, { 4100.0f, 1200.0f, -1400.0f }, { 3900.0f, 1100.0f, -1400.0f } }, + { 0x01, 0x3B, 0x0101, 60, 4, 50.0f, 0.94f, { 4100.0f, 965.0f, -1385.0f }, { 3790.0f, 825.0f, -1325.0f } }, + { 0x03, 0xFF, 0x0101, 90, -5, 130.0f, 0.02f, { 4100.0f, 975.0f, -1375.0f }, { 3735.0f, 715.0f, -1325.0f } }, + { 0x0F, 0x08, 0x2323, 2, 0, 60.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { -10.0f, 15.0f, -200.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012269C[3] = { + { 0x0F, 0xFF, 0x0101, 20, 2, 45.0f, 1.0f, { 975.0f, 225.0f, -1195.0f }, { 918.0f, 228.0f, -1228.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122714[4] = { + { 0x0F, 0xFF, 0x0101, 20, 0, 45.0f, 1.0f, { -915.0f, -2185.0f, 6335.0f }, { -915.0f, -2290.0f, 6165.0f } }, + { 0x02, 0xFF, 0x0101, -1, 0, 80.0f, 0.8f, { -920.0f, -2270.0f, 6140.0f }, { -920.0f, -2280.0f, 6070.0f } }, + { 0x02, 0xFF, 0x0101, 20, 0, 80.0f, 0.9f, { -920.0f, -2300.0f, 6140.0f }, { -920.0f, -2300.0f, 6070.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801227B4[6] = { + { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 1400.0f, 100.0f, -170.0f }, { 1250.0f, 100.0f, -170.0f } }, + { 0x03, 0xFF, 0x4242, 130, 0, 60.0f, 0.2f, { 0.0f, -5.0f, 0.0f }, { -150.0f, -5.0f, 0.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x02, 0xFF, 0x0303, 69, 0, 85.0f, 1.0f, { -40.0f, 0.0f, 0.0f }, { -40.0f, 0.0f, 0.0f } }, + { 0x02, 0xFF, 0x0303, 20, 0, 60.0f, 1.0f, { 10.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801228A4[5] = { + { 0x0F, 0x01, 0x0101, 20, 5, 30.0f, 1.0f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } }, + { 0x02, 0xFF, 0x0101, 20, -2, 70.0f, 0.8f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } }, + { 0x0F, 0x08, 0x0101, 90, 2, 62.0f, 1.0f, { 1140.0f, 125.0f, 1920.0f }, { 1255.0f, 150.0f, 1785.0f } }, + { 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012296C[4] = { + { 0x0F, 0xFF, 0x0101, 20, -10, 70.0f, 1.0f, { -930.0f, 765.0f, -3075.0f }, { -700.0f, 700.0f, -3075.0f } }, + { 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.05f, { -930.0f, 205.0f, -3075.0f }, { -700.0f, 140.0f, -3075.0f } }, + { 0x0F, 0xFF, 0x0000, 120, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122A0C[2] = { + { 0x0F, 0xFF, 0x0101, 60, 4, 50.0f, 1.0f, { 0.0f, 400.0f, -1000.0f }, { -200.0f, 500.0f, -850.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122A5C[8] = { + { 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -45.0f, 3650.0f, -4415.0f } }, + { 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { -120.0f, 2187.0f, -3286.0f }, { -110.0f, 2162.0f, -3262.0f } }, + { 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0101, 55, 0, 60.0f, 1.0f, { -38.0f, 1467.0f, -1102.0f }, { 64.0f, 1423.0f, -1188.0f } }, + { 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -20.0f, 3650.0f, -4400.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122B9C[3] = { + { 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 1095.0f, 2890.0f, -2980.0f }, { 1166.0f, 2695.0f, -2710.0f } }, + { 0x0F, 0xFF, 0x0101, 60, 15, 65.0f, 1.0f, { 566.0f, 4654.0f, -4550.0f }, { 606.0f, 5160.0f, -4740.0f } }, + { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122C14[1] = { + { 0x0F, 0xFF, 0x0101, 999, 0, 85.0f, 1.0f, { -15.0f, 185.0f, 160.0f }, { -15.0f, 210.0f, 250.0f } }, +}; + +static OnePointCsFull D_80122C3C[1] = { + { 0x0F, 0xFF, 0x0101, 999, -2, 70.0f, 1.0f, { -62.0f, 60.0f, -315.0f }, { -115.0f, 30.0f, -445.0f } }, +}; + +static OnePointCsFull D_80122C64[1] = { + { 0x0F, 0xFF, 0x0101, 999, 3, 70.0f, 1.0f, { -40.0f, 80.0f, 375.0f }, { -85.0f, 45.0f, 485.0f } }, +}; + +static OnePointCsFull D_80122C8C[1] = { + { 0x0F, 0xFF, 0x0101, 999, 5, 60.0f, 1.0f, { -70.0f, 140.0f, 25.0f }, { 10.0f, 180.0f, 195.0f } }, +}; + +static OnePointCsFull D_80122CB4[2] = { + { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } }, + { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } }, +}; + +static OnePointCsFull D_80122D04[2] = { + { 0x0F, 0xFF, 0x4242, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } }, +}; + +static OnePointCsFull D_80122D54[3] = { + { 0x0F, 0xFF, 0x0101, 1, -4, 50.0f, 1.0f, { 230.0f, 65.0f, 300.0f }, { 50.0f, 50.0f, 225.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122DCC[3] = { + { 0x0F, 0xFF, 0x0101, 1, 0, 50.0f, 1.0f, { 0.0f, 5.0f, -145.0f }, { 0.0f, 55.0f, 55.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80122E44[2][7] = { + { + { 0x83, 0xFF, 0x2222, 10, 5, 90.0f, 0.2f, { 50.0f, 100.0f, 140.0f }, { -30.0f, 10.0f, -20.0f } }, + { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x03, 0xFF, 0x4343, 30, -5, 50.0f, 0.2f, { -10.0f, 80.0f, 10.0f }, { 20.0f, 20.0f, 120.0f } }, + { 0x10, 0xFF, 0x0000, 1, -5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0B, 0x01, 0x4343, 160, 10, 80.0f, 0.005f, { -50.0f, 60.0f, 0.0f }, { -100.0f, 20.0f, 50.0f } }, + { 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } }, + { 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + }, + { + { 0x83, 0xFF, 0x2222, 10, -5, 90.0f, 0.2f, { -50.0f, 100.0f, 140.0f }, { 30.0f, 10.0f, -20.0f } }, + { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x03, 0xFF, 0x4343, 30, 5, 50.0f, 0.2f, { 10.0f, 80.0f, 10.0f }, { -20.0f, 20.0f, 120.0f } }, + { 0x10, 0xFF, 0x0000, 1, 5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0B, 0x01, 0x4343, 160, -10, 80.0f, 0.005f, { 50.0f, 60.0f, 0.0f }, { 100.0f, 20.0f, 50.0f } }, + { 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } }, + { 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + }, +}; + +static OnePointCsFull D_80123074[5] = { + { 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { -27.0f, -96.0f, 25.0f }, { 37.0f, -5.0f, 100.0f } }, + { 0x81, 0xFF, 0xA2A2, 38, 4, 60.0f, 1.0f, { 64.0f, -109.0f, 55.0f }, { 37.0f, 150.0f, 155.0f } }, + { 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { 45.0f, 123.0f, 45.0f }, { 70.0f, 5.0f, 125.0f } }, + { 0x81, 0xFF, 0xA2A2, 58, 4, 60.0f, 0.9f, { 82.0f, 95.0f, 55.0f }, { 25.0f, -175.0f, 180.0f } }, + { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012313C[3] = { + { 0x8F, 0xFF, 0xA2A2, 20, 8, 70.0f, 1.0f, { 65.0f, -150.0f, 50.0f }, { 30.0f, 10.0f, 90.0f } }, + { 0x81, 0xFF, 0xA2A2, 100, 0, 60.0f, 1.0f, { 70.0f, -160.0f, 50.0f }, { 25.0f, 180.0f, 180.0f } }, + { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801231B4[4] = { + { 0x8F, 0xC5, 0x4343, 1, 0, 50.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 5.0f, -1.0f } }, + { 0x81, 0xC5, 0x4343, 48, 0, 50.0f, 0.75f, { 0.0f, 80.0f, 0.0f }, { 0.0f, 15.0f, -1.0f } }, + { 0x8F, 0xC5, 0x4343, 1, 5, 45.0f, 1.0f, { 0.0f, 0.0f, 30.0f }, { 30.0f, 120.0f, 60.0f } }, + { 0x81, 0xC5, 0x4343, -1, 0, -1.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80123254[2] = { + { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x03, 0xC5, 0x0101, 49, 0, 50.0f, 0.05f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, +}; + +static OnePointCsFull D_801232A4[1] = { + { 0x0F, 0x45, 0x0101, 9999, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, +}; + +static OnePointCsFull D_801232CC[5] = { + { 0x01, 0xFF, 0x0101, 45, -3, 65.0f, 1.0f, { -52.0f, 84.0f, -846.0f }, { -159.0f, 33.0f, -729.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80123394[5] = { + { 0x01, 0xFF, 0x0101, 45, 3, 65.0f, 1.0f, { -16.0f, 87.0f, -829.0f }, { 98.0f, 24.0f, -714.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012345C[4] = { + { 0x01, 0x01, 0x4242, 40, 0, 40.0f, 1.0f, { 0.0f, 50.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } }, + { 0x04, 0x4D, 0x4242, 40, 0, 60.0f, 0.3f, { 0.0f, 90.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } }, + { 0x04, 0x01, 0x2121, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801234FC[5] = { + { 0x01, 0x05, 0x0441, 10, 0, 70.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 120.0f } }, + { 0x03, 0xFF, 0x4141, 30, 0, 50.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 80.0f } }, + { 0x10, 0x01, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x82, 0xFF, 0x2121, 10, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_801235C4[5] = { + { 0x0F, 0x01, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 60.0f } }, + { 0x83, 0xFF, 0x0441, 39, 0, 70.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 100.0f } }, + { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x82, 0xFF, 0x2121, 15, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_8012368C[4] = { + { 0x0F, 0xFF, 0x0101, 10, 0, 60.0f, 1.0f, { -1110.0f, -180.0f, -840.0f }, { -985.0f, -220.0f, -840.0f } }, + { 0x02, 0xFF, 0x0101, 70, -45, 75.0f, 1.0f, { -1060.0f, -160.0f, -840.0f }, { -1005.0f, -230.0f, -840.0f } }, + { 0x0F, 0xFF, 0x0000, 10, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x0F, 0xFF, 0x0101, 180, 9, 80.0f, 1.0f, { -1205.0f, -175.0f, -840.0f }, { -1305.0f, -230.0f, -828.0f } }, +}; + +static OnePointCsFull D_8012372C[4] = { + { 0x0F, 0xFF, 0x0142, 10, 0, 70.0f, 1.0f, { 0.0f, 80.0f, 0.0f }, { -1650.0f, 200.0f, -2920.0f } }, + { 0x02, 0xFF, 0x0142, 110, -2, 50.0f, 0.5f, { 0.0f, 150.0f, 0.0f }, { -1320.0f, 170.0f, -2900.0f } }, + { 0x0B, 0xFF, 0x4242, 100, 2, 70.0f, 0.1f, { 0.0f, 150.0f, 50.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x03, 0xFF, 0x4242, 60, 2, 45.0f, 0.01f, { 0.0f, 150.0f, 50.0f }, { 0.0f, 200.0f, -80.0f } }, +}; + +static OnePointCsFull D_801237CC[5] = { + { 0x8F, 0xFF, 0x4242, 20, 0, 50.0f, 1.0f, { 0.0f, 50.0f, -10.0f }, { 0.0f, 0.0f, 100.0f } }, + { 0x0A, 0xFF, 0x0101, 80, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 2800.0f, 1190.0f, 540.0f } }, + { 0x0F, 0xFF, 0x0000, 10, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, + { 0x02, 0xFF, 0x0101, 55, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 1500.0f, 1415.0f, 650.0f } }, + { 0x0F, 0xFF, 0x0000, 100, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; + +static OnePointCsFull D_80123894[3] = { + { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, 40.0f } }, + { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 40.0f } }, +}; + +static OnePointCsFull D_8012390C[2] = { + { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x0F, 0xFF, 0x4242, 180, 0, 60.0f, 1.0f, { 0.0f, 78.0f, 0.0f }, { 0.0f, 78.0f, 200.0f } }, +}; + +static OnePointCsFull D_8012395C[3] = { + { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, -45.0f } }, + { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 45.0f } }, +}; + +static OnePointCsFull D_801239D4[3] = { + { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 40.0f, -120.0f } }, + { 0x09, 0xFF, 0x4242, 0, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } }, + { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } }, +}; diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index c16001cf1..634009a4e 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2082,7 +2082,7 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling && - (globalCtx->csCtx.state == 0)) { + (globalCtx->csCtx.state == CS_STATE_IDLE)) { // clang-format off if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); } @@ -2722,7 +2722,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) { } if (interfaceCtx->naviCalling && (globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && - (globalCtx->csCtx.state == 0)) { + (globalCtx->csCtx.state == CS_STATE_IDLE)) { if (!sCUpInvisible) { // C-Up Button Texture, Color & Label (Navi Text) gDPPipeSync(OVERLAY_DISP++); @@ -4058,7 +4058,8 @@ void Interface_Update(GlobalContext* globalCtx) { if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && (msgCtx->msgMode == 0) && (globalCtx->sceneLoadFlag == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) && - (globalCtx->transitionMode == 0) && ((globalCtx->csCtx.state == 0) || !Player_InCsMode(globalCtx))) { + (globalCtx->transitionMode == 0) && + ((globalCtx->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(globalCtx))) { if ((gSaveContext.magicAcquired != 0) && (gSaveContext.magicLevel == 0)) { gSaveContext.magicLevel = gSaveContext.doubleMagic + 1; gSaveContext.unk_13F0 = 8; diff --git a/src/code/z_play.c b/src/code/z_play.c index 513f754bb..23ed6257b 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -219,12 +219,12 @@ void Gameplay_Init(GameState* thisx) { for (i = 0; i < 3; i++) { Camera_Init(&globalCtx->subCameras[i], &globalCtx->view, &globalCtx->colCtx, globalCtx); - Camera_ChangeStatus(&globalCtx->subCameras[i], 0x100); + Camera_ChangeStatus(&globalCtx->subCameras[i], CAM_STAT_UNK100); } - globalCtx->cameraPtrs[0] = &globalCtx->mainCamera; - globalCtx->cameraPtrs[0]->uid = 0; - globalCtx->activeCamera = 0; + globalCtx->cameraPtrs[MAIN_CAM] = &globalCtx->mainCamera; + globalCtx->cameraPtrs[MAIN_CAM]->uid = 0; + globalCtx->activeCamera = MAIN_CAM; func_8005AC48(&globalCtx->mainCamera, 0xFF); Sram_Init(globalCtx, &globalCtx->sramCtx); func_80112098(globalCtx); @@ -428,7 +428,7 @@ void Gameplay_Update(GlobalContext* globalCtx) { for (i = 0; i < gObjectTableSize; i++) { s32 size = gObjectTable[i].vromEnd - gObjectTable[i].vromStart; osSyncPrintf("%08x-%08x %08x(%8.3fKB)\n", gObjectTable[i].vromStart, gObjectTable[i].vromEnd, size, - size * 0.0009765625f); + size / 1024.0f); } osSyncPrintf("\n"); } @@ -997,7 +997,7 @@ skip: LOG_NUM("1", 1, "../z_play.c", 3801); } - if ((sp80 == 0) || (gDbgCamEnabled != 0)) { + if ((sp80 == 0) || (gDbgCamEnabled)) { s32 pad3[5]; s32 i; @@ -1007,7 +1007,7 @@ skip: LOG_NUM("1", 1, "../z_play.c", 3806); } - for (i = 0; i < 4; i++) { + for (i = 0; i < NUM_CAMS; i++) { if ((i != globalCtx->nextCamera) && (globalCtx->cameraPtrs[i] != NULL)) { if (1 && HREG(63)) { LOG_NUM("1", 1, "../z_play.c", 3809); @@ -1104,6 +1104,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { if ((HREG(80) != 10) || (HREG(92) != 0)) { Gfx* gfxP; Gfx* sp1CC = POLY_OPA_DISP; + gfxP = Graph_GfxPlusOne(sp1CC); gSPDisplayList(OVERLAY_DISP++, gfxP); @@ -1134,6 +1135,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { if (gTrnsnUnkState == 3) { Gfx* sp88 = POLY_OPA_DISP; + TransitionUnk_Draw(&sTrnsnUnk, &sp88); POLY_OPA_DISP = sp88; goto Gameplay_Draw_DrawOverlayElements; @@ -1151,23 +1153,23 @@ void Gameplay_Draw(GlobalContext* globalCtx) { if (R_PAUSE_MENU_MODE == 3) { Gfx* sp84 = POLY_OPA_DISP; + func_800C24BC(&globalCtx->preRenderCtx, &sp84); POLY_OPA_DISP = sp84; goto Gameplay_Draw_DrawOverlayElements; } else { s32 sp80; + if ((HREG(80) != 10) || (HREG(83) != 0)) { - if (globalCtx->skyboxId) { - if ((globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) { - if ((globalCtx->skyboxId == 1) || (globalCtx->skyboxId == 5)) { - func_8006FC88(globalCtx->skyboxId, &globalCtx->envCtx, &globalCtx->skyboxCtx); - SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, - globalCtx->envCtx.unk_13, globalCtx->view.eye.x, globalCtx->view.eye.y, - globalCtx->view.eye.z); - } else if (globalCtx->skyboxCtx.unk_140 == 0) { - SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, - globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z); - } + if (globalCtx->skyboxId && (globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) { + if ((globalCtx->skyboxId == 1) || (globalCtx->skyboxId == 5)) { + func_8006FC88(globalCtx->skyboxId, &globalCtx->envCtx, &globalCtx->skyboxCtx); + SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, + globalCtx->envCtx.unk_13, globalCtx->view.eye.x, globalCtx->view.eye.y, + globalCtx->view.eye.z); + } else if (globalCtx->skyboxCtx.unk_140 == 0) { + SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, + globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z); } } } @@ -1207,14 +1209,13 @@ void Gameplay_Draw(GlobalContext* globalCtx) { } if ((HREG(80) != 10) || (HREG(83) != 0)) { - if (globalCtx->skyboxCtx.unk_140 != 0) { - if (ACTIVE_CAM->setting != 0x19) { - Vec3f sp74; - Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM); - SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, - globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y, - globalCtx->view.eye.z + sp74.z); - } + if ((globalCtx->skyboxCtx.unk_140 != 0) && (ACTIVE_CAM->setting != CAM_SET_PREREND0)) { + Vec3f sp74; + + Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM); + SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0, + globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y, + globalCtx->view.eye.z + sp74.z); } } @@ -1268,6 +1269,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) { if ((R_PAUSE_MENU_MODE == 1) || (gTrnsnUnkState == 1)) { Gfx* sp70 = OVERLAY_DISP; s32 pad[4]; + globalCtx->preRenderCtx.fbuf = gfxCtx->curFrameBuffer; globalCtx->preRenderCtx.fbufSave = (u16*)gZBuffer; func_800C1F20(&globalCtx->preRenderCtx, &sp70); @@ -1351,7 +1353,7 @@ void Gameplay_Main(GameState* thisx) { // original name: "Game_play_demo_mode_check" s32 Gameplay_InCsMode(GlobalContext* globalCtx) { - return (globalCtx->csCtx.state != 0) || Player_InCsMode(globalCtx); + return (globalCtx->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(globalCtx); } f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) { @@ -1463,7 +1465,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) { globalCtx->sceneNum = sceneNum; globalCtx->sceneConfig = scene->config; - osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) * 0.0009765625f); + osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) / 1024.0f); globalCtx->sceneSegment = Gameplay_LoadFile(globalCtx, &scene->sceneFile); scene->unk_13 = 0; @@ -1474,7 +1476,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) { Gameplay_InitScene(globalCtx, spawn); - osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) * 0.0009765625f); + osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) / 1024.0f); } void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) { @@ -1493,22 +1495,22 @@ void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) { s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) { s16 i; - for (i = 1; i < 4; i++) { + for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) { if (globalCtx->cameraPtrs[i] == NULL) { break; } } - if (i == 4) { + if (i == NUM_CAMS) { osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: fulled sub camera system area\n" VT_RST); - return -1; + return SUBCAM_NONE; } osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " create new sub camera [%d] " VT_BGCOL( CYAN) " " VT_RST "\n", i); - globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - 1]; + globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - SUBCAM_FIRST]; Camera_Init(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx); globalCtx->cameraPtrs[i]->thisIdx = i; @@ -1520,9 +1522,9 @@ s16 Gameplay_GetActiveCamId(GlobalContext* globalCtx) { } s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status) { - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; - if (status == 7) { + if (status == CAM_STAT_ACTIVE) { globalCtx->activeCamera = camIdx; } @@ -1530,14 +1532,14 @@ s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status) } void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) { - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; - if (camIdx == 0) { + if (camIdx == MAIN_CAM) { osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: never clear camera !!\n" VT_RST); } if (globalCtx->cameraPtrs[camIdx] != NULL) { - Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], 0x100); + Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], CAM_STAT_UNK100); globalCtx->cameraPtrs[camIdx] = NULL; osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " clear sub camera [%d] " VT_BGCOL( CYAN) " " VT_RST "\n", @@ -1550,24 +1552,24 @@ void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) { void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx) { s16 i; - for (i = 1; i < 4; i++) { + for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) { if (globalCtx->cameraPtrs[i] != NULL) { Gameplay_ClearCamera(globalCtx, i); } } - globalCtx->activeCamera = 0; + globalCtx->activeCamera = MAIN_CAM; } Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId) { - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; return globalCtx->cameraPtrs[camIdx]; } s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye) { s32 ret = 0; - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; Camera* camera = globalCtx->cameraPtrs[camIdx]; Player* player; @@ -1593,7 +1595,7 @@ s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3 s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) { s32 ret = 0; - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; Camera* camera = globalCtx->cameraPtrs[camIdx]; Player* player; @@ -1626,25 +1628,24 @@ s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov) { } s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) { - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; - Camera* camera; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; + Camera* camera = globalCtx->cameraPtrs[camIdx]; - camera = globalCtx->cameraPtrs[camIdx]; camera->roll = roll; return 1; } void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2) { - s16 camIdx2 = (camId2 == -1) ? globalCtx->activeCamera : camId2; - s16 camIdx1 = (camId1 == -1) ? globalCtx->activeCamera : camId1; + s16 camIdx2 = (camId2 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId2; + s16 camIdx1 = (camId1 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId1; Camera_Copy(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]); } s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting) { Camera* camera; - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; camera = globalCtx->cameraPtrs[camIdx]; Camera_InitPlayerSettings(camera, player); @@ -1656,12 +1657,12 @@ s32 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 settin } void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) { - s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId; + s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId; s16 i; Gameplay_ClearCamera(globalCtx, camIdx); - for (i = 1; i < 4; i++) { + for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) { if (globalCtx->cameraPtrs[i] != NULL) { osSyncPrintf( VT_COL(RED, WHITE) "camera control: error: return to main, other camera left. %d cleared!!\n" VT_RST, @@ -1671,10 +1672,10 @@ void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) { } if (arg2 <= 0) { - Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE); - globalCtx->cameraPtrs[0]->childCamIdx = globalCtx->cameraPtrs[0]->parentCamIdx = 0; + Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE); + globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx = globalCtx->cameraPtrs[MAIN_CAM]->parentCamIdx = SUBCAM_FREE; } else { - func_800800F8(globalCtx, 1020, arg2, NULL, 0); + OnePointCutscene_Init(globalCtx, 1020, arg2, NULL, MAIN_CAM); } } @@ -1695,7 +1696,7 @@ s16 func_800C09D8(GlobalContext* globalCtx, s16 camId, s16 arg2) { return 0; } else if (camera->uid != arg2) { return 0; - } else if (camera->status != 7) { + } else if (camera->status != CAM_STAT_ACTIVE) { return 2; } else { return 1; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 6cb9bb436..a337f458e 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -693,8 +693,8 @@ Vec3f D_80126038[] = { }; f32 D_80126050[] = { 1265.0f, 826.0f }; -f32 D_80126058[] = { 170.0415955f, 48.30249786f }; -f32 D_80126060[] = { 10.019104f, -19.92510223f }; +f32 D_80126058[] = { SQ(13.04f), SQ(6.95f) }; +f32 D_80126060[] = { 10.019104f, -19.925102f }; f32 D_80126068[] = { 5.0f, 3.0f }; Vec3f D_80126070 = { 0.0f, -300.0f, 0.0f }; @@ -705,7 +705,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime, Vec3f sp98; Vec3f footprintPos; CollisionPoly* sp88; - UNK_TYPE sp84; + s32 sp84; f32 sp80; f32 sp7C; f32 sp78; @@ -768,14 +768,14 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime, sp50 = Math_FAtan2F(sp58, sp60); - temp1 = (M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50))) * 10430.378f; + temp1 = (M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50))) * (0x8000 / M_PI); temp1 = temp1 - skelAnime->jointTable[shinLimbIndex].z; if ((s16)(ABS(skelAnime->jointTable[shinLimbIndex].x) + ABS(skelAnime->jointTable[shinLimbIndex].y)) < 0) { temp1 += 0x8000; } - temp2 = (sp50 - sp54) * 10430.378f; + temp2 = (sp50 - sp54) * (0x8000 / M_PI); rot->z -= temp2; skelAnime->jointTable[thighLimbIndex].z = skelAnime->jointTable[thighLimbIndex].z - temp2; @@ -815,7 +815,7 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p if (this->unk_6C2 != 0) { Matrix_Translate(pos->x, ((Math_CosS(this->unk_6C2) - 1.0f) * 200.0f) + pos->y, pos->z, MTXMODE_APPLY); - Matrix_RotateX(this->unk_6C2 * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateX(this->unk_6C2 * (M_PI / 0x8000), MTXMODE_APPLY); Matrix_RotateRPY(rot->x, rot->y, rot->z, MTXMODE_APPLY); pos->x = pos->y = pos->z = 0.0f; rot->x = rot->y = rot->z = 0; @@ -831,17 +831,17 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p rot->z += this->unk_6B6; } else if (limbIndex == PLAYER_LIMB_UPPER) { if (this->unk_6B0 != 0) { - Matrix_RotateZ(0.10546118f, MTXMODE_APPLY); - Matrix_RotateY(this->unk_6B0 * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY); + Matrix_RotateY(this->unk_6B0 * (M_PI / 0x8000), MTXMODE_APPLY); } if (this->unk_6BE != 0) { - Matrix_RotateY(this->unk_6BE * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateY(this->unk_6BE * (M_PI / 0x8000), MTXMODE_APPLY); } if (this->unk_6BC != 0) { - Matrix_RotateX(this->unk_6BC * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateX(this->unk_6BC * (M_PI / 0x8000), MTXMODE_APPLY); } if (this->unk_6C0 != 0) { - Matrix_RotateZ(this->unk_6C0 * (M_PI / 32768), MTXMODE_APPLY); + Matrix_RotateZ(this->unk_6C0 * (M_PI / 0x8000), MTXMODE_APPLY); } } else if (limbIndex == PLAYER_LIMB_L_THIGH) { func_8008F87C(globalCtx, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN, diff --git a/src/code/z_quake.c b/src/code/z_quake.c index f22fc7023..d3f16f025 100644 --- a/src/code/z_quake.c +++ b/src/code/z_quake.c @@ -337,7 +337,7 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) { for (idx = 0; idx < ARRAY_COUNT(sQuakeRequest); idx++) { req = &sQuakeRequest[idx]; if (req->callbackIdx != 0) { - if (globalCtx->cameraPtrs[req->camPtrIdx] == 0) { + if (globalCtx->cameraPtrs[req->camPtrIdx] == NULL) { osSyncPrintf(VT_COL(YELLOW, BLACK) "quake: stopped! 'coz camera [%d] killed!!\n" VT_RST, req->camPtrIdx); Quake_Remove(req); diff --git a/src/code/z_room.c b/src/code/z_room.c index ee49f50c8..6d0d6c4b6 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -332,7 +332,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628); camera = ACTIVE_CAM; - sp9C = (camera->setting == 25); + sp9C = (camera->setting == CAM_SET_PREREND0); polygon1 = &room->mesh->polygon1; polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist); sp98 = (flags & 1) && sp9C && polygon1->single.source && !(SREG(25) & 1); @@ -427,7 +427,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752); camera = ACTIVE_CAM; - sp98 = (camera->setting == 25); + sp98 = (camera->setting == CAM_SET_PREREND0); polygon1 = &room->mesh->polygon1; polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist); bgImage = func_80096A74(polygon1, globalCtx); @@ -533,7 +533,7 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) { osSyncPrintf(VT_FGCOL(YELLOW)); // Translates to: "ROOM BUFFER SIZE=%08x(%5.1fK)" - osSyncPrintf("部屋バッファサイズ=%08x(%5.1fK)\n", maxRoomSize, maxRoomSize * 0.0009765625f); + osSyncPrintf("部屋バッファサイズ=%08x(%5.1fK)\n", maxRoomSize, maxRoomSize / 1024.0f); roomCtx->bufPtrs[0] = GameState_Alloc(&globalCtx->state, maxRoomSize, "../z_room.c", 946); // Translates to: "ROOM BUFFER INITIAL POINTER=%08x" osSyncPrintf("部屋バッファ開始ポインタ=%08x\n", roomCtx->bufPtrs[0]); diff --git a/src/code/z_scene.c b/src/code/z_scene.c index 4fecad4cf..0903ef29a 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -364,7 +364,7 @@ void func_80098D80(GlobalContext* globalCtx, SceneCmd* cmd) { if ((cmd->timeSettings.hour != 0xFF) && (cmd->timeSettings.min != 0xFF)) { gSaveContext.environmentTime = gSaveContext.dayTime = - ((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / 0.021972656f; + ((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / (360.0f / 0x4000); } if (cmd->timeSettings.unk_06 != 0xFF) { diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index df06db515..ea81553ea 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -2332,8 +2332,9 @@ void func_8009FE58(GlobalContext* globalCtx) { D_8012A3A0 += 1820; temp = 0.020000001f; - func_800AA76C(&globalCtx->view, 0.00009587531f * temp * Math_CosS(D_8012A39C), - 0.00009587531f * temp * Math_SinS(D_8012A39C), 0.00009587531f * temp * Math_SinS(D_8012A3A0)); + func_800AA76C(&globalCtx->view, ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C), + ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C), + ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0)); func_800AA78C(&globalCtx->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)), 1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C))); func_800AA7AC(&globalCtx->view, 0.95f); |
