summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorbriaguya <70942617+briaguya-ai@users.noreply.github.com>2024-04-03 21:07:42 -0400
committerGitHub <noreply@github.com>2024-04-03 20:07:42 -0500
commit0334c4e35484882c09225b29a0f7dfc5642bcae8 (patch)
tree105a4afd7d46d82d42cef8a51bbf339c9aabefa8 /soh/src/code
parent416ed84bc689fecc1e1b2e62cf7b3353a9711977 (diff)
pull in docs (#97)
* rename `func_8002DF54` to `Player_SetCsActionWithHaltedActors` * rename `func_8002F434` to `Actor_OfferGetItem`
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_actor.c7
-rw-r--r--soh/src/code/z_camera.c12
-rw-r--r--soh/src/code/z_en_item00.c2
-rw-r--r--soh/src/code/z_onepointdemo.c66
-rw-r--r--soh/src/code/z_parameter.c2
5 files changed, 44 insertions, 45 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index fed5ec639..e4edcc1d3 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -1462,7 +1462,7 @@ s32 func_8002DF38(PlayState* play, Actor* actor, u8 csAction) {
return true;
}
-s32 func_8002DF54(PlayState* play, Actor* actor, u8 csAction) {
+s32 Player_SetCsActionWithHaltedActors(PlayState* play, Actor* actor, u8 csAction) {
Player* player = GET_PLAYER(play);
func_8002DF38(play, actor, csAction);
@@ -2084,9 +2084,8 @@ s32 GiveItemEntryFromActorWithFixedRange(Actor* actor, PlayState* play, GetItemE
return GiveItemEntryFromActor(actor, play, getItemEntry, 50.0f, 10.0f);
}
-// TODO: Rename to GiveItemIdFromActor or similar
// If you're doing something for randomizer, you're probably looking for GiveItemEntryFromActor
-s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
+s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 &
@@ -2116,7 +2115,7 @@ s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
// TODO: Rename to GiveItemIdFromActorWithFixedRange or similar
// If you're doing something for randomizer, you're probably looking for GiveItemEntryFromActorWithFixedRange
void func_8002F554(Actor* actor, PlayState* play, s32 getItemId) {
- func_8002F434(actor, play, getItemId, 50.0f, 10.0f);
+ Actor_OfferGetItem(actor, play, getItemId, 50.0f, 10.0f);
}
void func_8002F580(Actor* actor, PlayState* play) {
diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c
index 90634ea31..b5719d48c 100644
--- a/soh/src/code/z_camera.c
+++ b/soh/src/code/z_camera.c
@@ -6184,14 +6184,14 @@ s32 Camera_Demo5(Camera* camera) {
pad = camera->play->state.frames - sDemo5PrevAction12Frame;
if (player->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) {
// holding object over head.
- func_8002DF54(camera->play, camera->target, 8);
+ Player_SetCsActionWithHaltedActors(camera->play, camera->target, 8);
} else if (ABS(pad) > 3000) {
- func_8002DF54(camera->play, camera->target, 12);
+ Player_SetCsActionWithHaltedActors(camera->play, camera->target, 12);
} else {
- func_8002DF54(camera->play, camera->target, 69);
+ Player_SetCsActionWithHaltedActors(camera->play, camera->target, 69);
}
} else {
- func_8002DF54(camera->play, camera->target, 1);
+ Player_SetCsActionWithHaltedActors(camera->play, camera->target, 1);
}
}
@@ -6250,7 +6250,7 @@ s32 Camera_Demo6(Camera* camera) {
camera->animState++;
case 1:
if (stateTimers[camera->animState] < anim->animTimer) {
- func_8002DF54(camera->play, &camera->player->actor, 8);
+ Player_SetCsActionWithHaltedActors(camera->play, &camera->player->actor, 8);
Actor_GetWorld(&focusPosRot, camFocus);
anim->atTarget.x = focusPosRot.pos.x;
anim->atTarget.y = focusPosRot.pos.y - 20.0f;
@@ -7735,7 +7735,7 @@ void Camera_Finish(Camera* camera) {
player->stateFlags1 &= ~PLAYER_STATE1_IN_CUTSCENE;
if (player->csAction != 0) {
- func_8002DF54(camera->play, &player->actor, 7);
+ Player_SetCsActionWithHaltedActors(camera->play, &player->actor, 7);
osSyncPrintf("camera: player demo end!!\n");
}
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index da7454961..873a91ec9 100644
--- a/soh/src/code/z_en_item00.c
+++ b/soh/src/code/z_en_item00.c
@@ -732,7 +732,7 @@ void func_8001E5C8(EnItem00* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->getItemId != GI_NONE) {
if (!Actor_HasParent(&this->actor, play)) {
- func_8002F434(&this->actor, play, this->getItemId, 50.0f, 80.0f);
+ Actor_OfferGetItem(&this->actor, play, this->getItemId, 50.0f, 80.0f);
this->unk_15A++;
} else {
this->getItemId = GI_NONE;
diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c
index 4224066c1..24a8820af 100644
--- a/soh/src/code/z_onepointdemo.c
+++ b/soh/src/code/z_onepointdemo.c
@@ -268,7 +268,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 2290: {
Actor* rideActor = player->rideActor;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
if (rideActor != NULL) {
rideActor->freezeTimer = 180;
}
@@ -279,7 +279,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
} break;
case 5120:
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
csInfo->keyFrames = D_80121314;
csInfo->keyFrameCnt = 1;
@@ -289,7 +289,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 4510:
D_8012133C[0].eyeTargetInit = actor->world.pos;
D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
csInfo->keyFrames = D_8012133C;
csInfo->keyFrameCnt = 3;
@@ -307,7 +307,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
Play_CameraChangeSetting(play, camIdx, CAM_SET_FREE2);
Play_CameraSetAtEye(play, camIdx, &spC0, &spB4);
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
csCam->roll = 0;
csCam->fov = 50.0f;
if (csCam->childCamIdx != SUBCAM_FREE) {
@@ -321,7 +321,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
if (Rand_ZeroOne() < 0.0f) {
D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x;
}
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
csInfo->keyFrames = D_801213B4;
csInfo->keyFrameCnt = 5;
@@ -374,10 +374,10 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
Play_CameraSetAtEye(play, camIdx, &spC0, &spB4);
csCam->roll = 6;
csCam->fov = 75.0f;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
break;
case 3040:
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
D_8012151C[0].timerInit = timer - 1;
csInfo->keyFrames = D_8012151C;
@@ -401,7 +401,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrameCnt = 2;
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
break;
case 3010:
D_801215BC[0].timerInit = timer;
@@ -429,7 +429,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 3090:
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
csInfo->keyFrames = D_80121814;
csInfo->keyFrameCnt = 4;
@@ -445,14 +445,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
Play_CameraSetAtEye(play, camIdx, &spC0, &spB4);
csCam->roll = 0;
csCam->fov = 70.0f;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
break;
case 3380:
case 3065:
csInfo->keyFrames = D_801218B4;
csInfo->keyFrameCnt = 2;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
i = Quake_Add(csCam, 1);
@@ -464,12 +464,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_80121904;
csInfo->keyFrameCnt = 2;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 3050:
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
- func_8002DF54(play, &player->actor, 5);
+ Player_SetCsActionWithHaltedActors(play, &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);
@@ -498,14 +498,14 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csCam->unk_14C |= 2;
csInfo->keyFrameCnt = 2;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 3130:
csInfo->keyFrames = D_80121A44;
csInfo->keyFrameCnt = 12;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
csCam->unk_14C |= 2;
break;
@@ -636,7 +636,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csCam->roll = 0;
csCam->fov = 75.0f;
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = spD0.yaw + 0x7FFF;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
break;
case 3240:
D_80121D3C[2].timerInit = timer - 5;
@@ -644,12 +644,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_80121D3C;
csInfo->keyFrameCnt = 3;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 6001:
Play_CameraChangeSetting(play, camIdx, CAM_SET_CS_3);
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
Actor_GetWorld(&spA0, actor);
if (spA0.pos.z > -750.0f) {
OnePointCutscene_SetCsCamPoints(csCam, D_801208E8, D_801208E4, D_801206A0, D_80120820);
@@ -680,12 +680,12 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_80121DB4;
csInfo->keyFrameCnt = 9;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 3310:
Play_CameraChangeSetting(play, camIdx, CAM_SET_FIRE_STAIRCASE);
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
Play_CopyCamera(play, camIdx, MAIN_CAM);
i = Quake_Add(csCam, 1);
@@ -718,7 +718,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_80121FBC;
csInfo->keyFrameCnt = 4;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
i = Quake_Add(csCam, 3);
@@ -745,7 +745,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
D_801220D4[1].eyeTargetInit.y = 80.0f;
D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x;
}
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
csInfo->keyFrames = D_801220D4;
csInfo->keyFrameCnt = 5;
@@ -763,7 +763,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_801222B4;
csInfo->keyFrameCnt = 5;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
i = Quake_Add(csCam, 1);
@@ -787,7 +787,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_801223CC;
csInfo->keyFrameCnt = 6;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
player->stateFlags1 |= PLAYER_STATE1_IN_CUTSCENE;
player->actor.freezeTimer = 90;
@@ -801,7 +801,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_801224BC;
csInfo->keyFrameCnt = 7;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
i = Quake_Add(csCam, 1);
@@ -815,7 +815,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
player->actor.shape.rot.y = player->actor.world.rot.y = player->yaw = 0x3FFC;
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
break;
case 4110:
csInfo->keyFrames = D_8012269C;
@@ -825,7 +825,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 4120:
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
D_80122714[1].timerInit = 80;
csInfo->keyFrames = D_80122714;
csInfo->keyFrameCnt = 4;
@@ -843,7 +843,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_801228A4;
csInfo->keyFrameCnt = 5;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
@@ -851,7 +851,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_8012296C;
csInfo->keyFrameCnt = 4;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
@@ -859,7 +859,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_80122A0C;
csInfo->keyFrameCnt = 2;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
@@ -908,11 +908,11 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
csInfo->keyFrames = D_80122C8C;
csInfo->keyFrameCnt = 1;
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 3260:
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
D_80122CB4[1].timerInit = timer - 5;
csInfo->keyFrames = D_80122CB4;
@@ -921,7 +921,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
func_800C0808(play, camIdx, player, CAM_SET_CS_C);
break;
case 3261:
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
D_80122D04[1].timerInit = timer - 10;
csInfo->keyFrames = D_80122D04;
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 21c45a1ae..cb665999e 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -6159,7 +6159,7 @@ void Interface_Draw(PlayState* play) {
gSaveContext.timer2State = 5;
gSaveContext.cutsceneIndex = 0;
Message_StartTextbox(play, 0x71B0, NULL);
- func_8002DF54(play, NULL, 8);
+ Player_SetCsActionWithHaltedActors(play, NULL, 8);
} else {
D_8015FFE6 = 40;
gSaveContext.timer2State = 6;