1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

OnePointDemo ActionFlags Macros (#1451)

* actionflags

* more macros

* distinguish enums better

* PR Suggestions

* Update src/code/z_camera_data.inc.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/code/z_camera_data.inc.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
engineer124 2022-12-11 22:18:36 -05:00 committed by GitHub
parent 2e9e895bf9
commit da06e9a701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3803 additions and 401 deletions

View file

@ -1221,6 +1221,33 @@ typedef struct {
{ fov, CAM_DATA_FOV }, \
{ interfaceField, CAM_DATA_INTERFACE_FIELD }
typedef enum {
/* 0x1 */ ONEPOINT_CS_ACTION_ID_1 = 1,
/* 0x2 */ ONEPOINT_CS_ACTION_ID_2,
/* 0x3 */ ONEPOINT_CS_ACTION_ID_3,
/* 0x4 */ ONEPOINT_CS_ACTION_ID_4,
/* 0x9 */ ONEPOINT_CS_ACTION_ID_9 = 9,
/* 0xA */ ONEPOINT_CS_ACTION_ID_10,
/* 0xB */ ONEPOINT_CS_ACTION_ID_11,
/* 0xC */ ONEPOINT_CS_ACTION_ID_12,
/* 0xD */ ONEPOINT_CS_ACTION_ID_13,
/* 0xF */ ONEPOINT_CS_ACTION_ID_15 = 15,
/* 0x10 */ ONEPOINT_CS_ACTION_ID_16,
/* 0x11 */ ONEPOINT_CS_ACTION_ID_17,
/* 0x12 */ ONEPOINT_CS_ACTION_ID_18,
/* 0x13 */ ONEPOINT_CS_ACTION_ID_19,
/* 0x15 */ ONEPOINT_CS_ACTION_ID_21 = 21,
/* 0x18 */ ONEPOINT_CS_ACTION_ID_24 = 24
} OnePointCsAction;
#define ONEPOINT_CS_ACTION_FLAG_40 0x40
#define ONEPOINT_CS_ACTION_FLAG_BGCHECK 0x80
#define ONEPOINT_CS_ACTION(action, isBit40, checkBg) \
(((action) & 0x1F) | ((isBit40) ? ONEPOINT_CS_ACTION_FLAG_40 : 0) | ((checkBg) ? ONEPOINT_CS_ACTION_FLAG_BGCHECK : 0))
#define ONEPOINT_CS_GET_ACTION(onePointCsFull) ((onePointCsFull)->actionFlags & 0x1F)
/** initFlags
* & 0x00FF = atInitFlags
* & 0xFF00 = eyeInitFlags

View file

@ -5464,9 +5464,9 @@ s32 Camera_Unique9(Camera* camera) {
rwData->rollTarget = CAM_DEG_TO_BINANG(rwData->curKeyFrame->rollTargetInit);
}
action = rwData->curKeyFrame->actionFlags & 0x1F;
action = ONEPOINT_CS_GET_ACTION(rwData->curKeyFrame);
switch (action) {
case 15:
case ONEPOINT_CS_ACTION_ID_15:
// static copy to at/eye/fov/roll
*at = rwData->atTarget;
*eyeNext = rwData->eyeTarget;
@ -5474,7 +5474,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->roll = rwData->rollTarget;
camera->stateFlags |= CAM_STATE_10;
break;
case 21:
case ONEPOINT_CS_ACTION_ID_21:
// same as 15, but with unk_38 ?
if (rwData->unk_38 == 0) {
rwData->unk_38 = 1;
@ -5487,7 +5488,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->fov = rwData->fovTarget;
camera->roll = rwData->rollTarget;
break;
case 16:
case ONEPOINT_CS_ACTION_ID_16:
// same as 21, but don't unset CAM_STATE_3 on stateFlags
if (rwData->unk_38 == 0) {
rwData->unk_38 = 1;
@ -5500,7 +5502,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->fov = rwData->fovTarget;
camera->roll = rwData->rollTarget;
break;
case 1:
case ONEPOINT_CS_ACTION_ID_1:
// linear interpolation of eye/at using the geographic coordinates
OLib_Vec3fDiffToVecGeo(&eyeNextAtOffset, at, eyeNext);
OLib_Vec3fDiffToVecGeo(&rwData->atEyeOffsetTarget, &rwData->atTarget, &rwData->eyeTarget);
@ -5512,7 +5515,8 @@ s32 Camera_Unique9(Camera* camera) {
eyeNextAtOffset.yaw + ((s16)(rwData->atEyeOffsetTarget.yaw - eyeNextAtOffset.yaw) * invKeyFrameTimer);
Camera_AddVecGeoToVec3f(&eyeTarget, at, &scratchGeo);
goto setEyeNext;
case 2:
case ONEPOINT_CS_ACTION_ID_2:
// linear interpolation of eye/at using the eyeTarget
invKeyFrameTimer = 1.0f / rwData->keyFrameTimer;
eyeTarget.x = F32_LERPIMP(camera->eyeNext.x, rwData->eyeTarget.x, invKeyFrameTimer);
@ -5527,8 +5531,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->eyeNext.z =
Camera_LERPFloorF(eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f);
FALLTHROUGH;
case 9:
case 10:
case ONEPOINT_CS_ACTION_ID_9:
case ONEPOINT_CS_ACTION_ID_10:
// linear interpolation of at/fov/roll
invKeyFrameTimer = 1.0f / rwData->keyFrameTimer;
atTarget.x = F32_LERPIMP(camera->at.x, rwData->atTarget.x, invKeyFrameTimer);
@ -5542,7 +5546,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->roll = Camera_LERPFloorS(BINANG_LERPIMPINV(camera->roll, rwData->rollTarget, rwData->keyFrameTimer),
camera->roll, rwData->curKeyFrame->lerpStepScale, 0xA);
break;
case 4:
case ONEPOINT_CS_ACTION_ID_4:
// linear interpolation of eye/at/fov/roll using the step scale, and spherical coordinates
OLib_Vec3fDiffToVecGeo(&eyeNextAtOffset, at, eyeNext);
OLib_Vec3fDiffToVecGeo(&rwData->atEyeOffsetTarget, &rwData->atTarget, &rwData->eyeTarget);
@ -5554,7 +5559,8 @@ s32 Camera_Unique9(Camera* camera) {
rwData->curKeyFrame->lerpStepScale, 1);
Camera_AddVecGeoToVec3f(eyeNext, at, &scratchGeo);
goto setAtFOVRoll;
case 3:
case ONEPOINT_CS_ACTION_ID_3:
// linear interplation of eye/at/fov/roll using the step scale using eyeTarget
camera->eyeNext.x =
Camera_LERPCeilF(rwData->eyeTarget.x, camera->eyeNext.x, rwData->curKeyFrame->lerpStepScale, 1.0f);
@ -5563,8 +5569,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->eyeNext.z =
Camera_LERPCeilF(rwData->eyeTarget.z, camera->eyeNext.z, rwData->curKeyFrame->lerpStepScale, 1.0f);
FALLTHROUGH;
case 11:
case 12:
case ONEPOINT_CS_ACTION_ID_11:
case ONEPOINT_CS_ACTION_ID_12:
setAtFOVRoll:
// linear interpolation of at/fov/roll using the step scale.
camera->at.x = Camera_LERPCeilF(rwData->atTarget.x, camera->at.x, rwData->curKeyFrame->lerpStepScale, 1.0f);
@ -5573,7 +5579,8 @@ s32 Camera_Unique9(Camera* camera) {
camera->fov = Camera_LERPCeilF(rwData->fovTarget, camera->fov, rwData->curKeyFrame->lerpStepScale, 1.0f);
camera->roll = Camera_LERPCeilS(rwData->rollTarget, camera->roll, rwData->curKeyFrame->lerpStepScale, 1);
break;
case 13:
case ONEPOINT_CS_ACTION_ID_13:
// linear interpolation of at, with rotation around eyeTargetInit.y
camera->at.x = Camera_LERPCeilF(rwData->atTarget.x, camera->at.x, rwData->curKeyFrame->lerpStepScale, 1.0f);
camera->at.y += camera->playerPosDelta.y * rwData->curKeyFrame->lerpStepScale;
@ -5603,18 +5610,20 @@ s32 Camera_Unique9(Camera* camera) {
camera->fov, rwData->curKeyFrame->lerpStepScale, 1.0f);
camera->roll = Camera_LERPCeilS(rwData->rollTarget, camera->roll, rwData->curKeyFrame->lerpStepScale, 1);
break;
case 24:
case ONEPOINT_CS_ACTION_ID_24:
// Set current keyframe to the roll target?
rwData->curKeyFrameIdx = rwData->rollTarget;
break;
case 19: {
case ONEPOINT_CS_ACTION_ID_19: {
// Change the parent camera (or default)'s mode to normal
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
Camera_ChangeModeFlags(camera->play->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1);
}
FALLTHROUGH;
case 18: {
case ONEPOINT_CS_ACTION_ID_18: {
// copy the current camera to the parent (or default)'s camera.
s32 camIdx = camera->parentCamId <= CAM_ID_NONE ? CAM_ID_MAIN : camera->parentCamId;
Camera* cam = camera->play->cameraPtrs[camIdx];
@ -5632,11 +5641,11 @@ s32 Camera_Unique9(Camera* camera) {
*eye = *eyeNext;
if (rwData->curKeyFrame->actionFlags & 0x80) {
if (rwData->curKeyFrame->actionFlags & ONEPOINT_CS_ACTION_FLAG_BGCHECK) {
Camera_BGCheck(camera, at, eye);
}
if (rwData->curKeyFrame->actionFlags & 0x40) {
if (rwData->curKeyFrame->actionFlags & ONEPOINT_CS_ACTION_FLAG_40) {
// Set the player's position
camera->player->actor.world.pos.x = rwData->playerPos.x;
camera->player->actor.world.pos.z = rwData->playerPos.z;
@ -6072,7 +6081,7 @@ s32 Camera_Demo5(Camera* camera) {
ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D79C);
if ((targetScreenPosX < 0x15) || (targetScreenPosX >= 0x12C) || (targetScreenPosY < 0x29) ||
(targetScreenPosY >= 0xC8)) {
D_8011D79C[0].actionFlags = 0x41;
D_8011D79C[0].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, false);
D_8011D79C[0].atTargetInit.y = -30.0f;
D_8011D79C[0].atTargetInit.x = 0.0f;
D_8011D79C[0].atTargetInit.z = 0.0f;
@ -6156,8 +6165,8 @@ s32 Camera_Demo5(Camera* camera) {
targethead.pos.x += 50.0f * Math_SinS(sp4A - 0x7FFF);
targethead.pos.z += 50.0f * Math_CosS(sp4A - 0x7FFF);
if (Camera_BGCheck(camera, &playerhead.pos, &targethead.pos)) {
D_8011D954[1].actionFlags = 0xC1;
D_8011D954[2].actionFlags = 0x8F;
D_8011D954[1].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true);
D_8011D954[2].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true);
} else {
D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6;
}
@ -6181,7 +6190,7 @@ s32 Camera_Demo5(Camera* camera) {
Actor_GetFocus(&targethead, camera->target);
if (Camera_BGCheck(camera, &playerhead.pos, &targethead.pos)) {
D_8011D9F4[1].timerInit = 4;
D_8011D9F4[1].actionFlags = 0x8F;
D_8011D9F4[1].actionFlags = ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true);
} else {
t = eyeTargetDist * 0.005f;
D_8011D9F4[1].timerInit = t + 8;

View file

@ -2675,105 +2675,311 @@ s32 sDemo5PrevSfxFrame = -200;
// target is player, far from eye
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
// result: eye remains in the same locaiton, at is View's lookAt
0x8F,
0xFF,
0x0002,
0x0001,
0x0000,
60.0f,
1.0f,
{ 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f } },
{ // initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit
// initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit
// action: interplate eye and at.
// result: eye and at's y interpolate to become +20 from their current location.
0x81,
0xFF,
0x0303,
0x0013,
0x0000,
45.0f,
1.0f,
{ 0.0f, 20.0f, 0.0f },
{ 0.0f, 20.0f, 0.0f } },
{ // initFlags & 0x00FF (at): 0 none
// initFlags & 0xFF00 (eye): 0 none
// action: 18, copy this camera to default camera.
0x12,
0xFF,
0x0000,
0x0001,
0x0000,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f } },
{
// initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
// initFlags & 0xFF00 (eye): none
// action: 15, copy at, eye, roll, fov to camera
// result: eye remains in the same location, at is View's lookAt
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
0xFF,
0x0002,
1,
0,
60.0f,
1.0f,
{ 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f },
},
{
// initFlags & 0x00FF (at): 3, atTarget is camera's current at + atInit
// initFlags & 0xFF00 (eye): 3, eyeTarget is the camera's current eye + eyeInit
// action: interpolate eye and at.
// result: eye and at's y interpolate to become +20 from their current location.
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
0xFF,
0x0303,
19,
0,
45.0f,
1.0f,
{ 0.0f, 20.0f, 0.0f },
{ 0.0f, 20.0f, 0.0f },
},
{
// initFlags & 0x00FF (at): 0 none
// initFlags & 0xFF00 (eye): 0 none
// action: 18, copy this camera to default camera.
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
// target is player close to current eye
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 } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
0xFF,
0x2424,
1,
0,
60.0f,
1.0f,
{ 0.0f, 0.0f, 0.0f },
{ 0.0f, 10.0f, -20.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
0xFF,
0x2121,
19,
0,
50.0f,
1.0f,
{ 0.0f, -10.0f, 0.0f },
{ 0.0f, 0.0f, 60.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
// target is close to player
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 } },
{
0xC1,
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, true, true),
0xFF,
0x0002,
1,
0,
60.0f,
1.0f,
{ 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true),
0xFF,
0x0303,
0x0009,
0x0000,
19,
0,
45.0f,
1.0f,
{ 0.0f, -20.0f, 0.0f },
{ 0.0f, -10.0f, 5.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, true, true),
0xFF,
0x0303,
9,
0,
60.0f,
1.0f,
{ 0.0f, 10.0f, 0.0f },
{ 0.0f, 10.0f, 0.0f },
},
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
// target is within 300 units of eye, and player is within 30 units of eye
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 } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
0xFF,
0x2141,
20,
0,
45.0f,
0.2f,
{ 0.0f, 0.0f, 10.0f },
{ 0.0f, 0.0f, 10.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
// 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
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 } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_1, false, true),
0xFF,
0x0303,
20,
0,
45.0f,
1.0f,
{ 0.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
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.
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 } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
0xFF,
0x0404,
20,
1,
50.0f,
1.0f,
{ 0.0f, 5.0f, 10.0f },
{ 0.0f, 10.0f, -80.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
0xFF,
0x2121,
5,
0,
60.0f,
1.0f,
{ 0.0f, 5.0f, 0.0f },
{ 5.0f, 5.0f, -200.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
// target is a door.
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 } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, false),
0xFF,
0xC1C1,
20,
0,
60.0f,
1.0f,
{ 0.0f, 0.0f, 50.0f },
{ 0.0f, 0.0f, 250.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_3, false, true),
0xFF,
0x05B1,
5,
0,
60.0f,
0.1f,
{ 0.0f, 10.0f, 50.0f },
{ 0.0f, 10.0f, 100.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
0xFF,
0x2121,
5,
2,
60.0f,
1.0f,
{ 0.0f, 10.0f, 0.0f },
{ 0.0f, 20.0f, -150.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
// otherwise
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 } },
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true),
0xFF,
0x0504,
20,
2,
60.0f,
1.0f,
{ 0.0f, 5.0f, 50.0f },
{ 0.0f, 20.0f, 300.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_2, false, true),
0xFF,
0x2121,
5,
2,
60.0f,
1.0f,
{ 0.0f, 10.0f, 0.0f },
{ 0.0f, 20.0f, -150.0f },
},
{
ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_18, false, false),
0xFF,
0x0000,
1,
0,
60.0f,
1.0f,
{ -1.0f, -1.0f, -1.0f },
{ -1.0f, -1.0f, -1.0f },
},
};
typedef enum {

View file

@ -147,7 +147,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
csInfo->keyFrameCnt = 11;
for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
if (D_80120B94[i].actionFlags != 0x8F) {
if (D_80120B94[i].actionFlags != ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true)) {
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;
@ -169,7 +169,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 subCamId, s16 csId, Actor* act
csInfo->keyFrameCnt = 7;
for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
if (D_80120D4C[i].actionFlags != 0x8F) {
if (D_80120D4C[i].actionFlags != ONEPOINT_CS_ACTION(ONEPOINT_CS_ACTION_ID_15, false, true)) {
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;

File diff suppressed because it is too large Load diff