mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-08 05:51:03 -07:00
z_horse: rename struct_8011F9B8 → HorseCutsceneRecipe
Purely mechanical rename that lifts the last inscrutable horse struct into plain English: * `struct_8011F9B8` → `HorseCutsceneRecipe` * Local static array `D_8011F9B8[]` → `horseCutsceneRecipes[]` * All loop/field accesses updated accordingly. No behaviour or layout changes; the resulting ELF is identical (zero bin diff). Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
76b7b756bb
commit
8b718f6c02
1 changed files with 21 additions and 21 deletions
|
@ -144,7 +144,7 @@ typedef struct {
|
|||
/* 0x08 */ Vec3s pos;
|
||||
/* 0x0E */ s16 angle;
|
||||
/* 0x10 */ s16 type;
|
||||
} struct_8011F9B8;
|
||||
} HorseCutsceneRecipe;
|
||||
|
||||
// Handles “special” scripted mounts: field reload points, Lon Lon race, Gerudo
|
||||
// Fortress archery, etc. It mounts Link, positions the camera, or spawns
|
||||
|
@ -195,7 +195,7 @@ void Horse_SetCutsceneMount(PlayState* play, Player* player) {
|
|||
player->rideActor->room = -1;
|
||||
}
|
||||
} else {
|
||||
static struct_8011F9B8 D_8011F9B8[] = {
|
||||
static HorseCutsceneRecipe horseCutsceneRecipes[] = {
|
||||
{ SCENE_GERUDOS_FORTRESS, 0xFFF0, { 3600, 1413, 360 }, 0x8001, 8 },
|
||||
{ SCENE_LON_LON_RANCH, 0xFFF0, { -250, 1, -1580 }, 0x4000, 6 },
|
||||
{ SCENE_LON_LON_RANCH, 0xFFF1, { 0, 0, 0 }, 0x0000, 5 },
|
||||
|
@ -206,41 +206,41 @@ void Horse_SetCutsceneMount(PlayState* play, Player* player) {
|
|||
{ SCENE_HYRULE_FIELD, 0xFFF6, { -4043, 313, 6933 }, 0x0000, 7 },
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(D_8011F9B8); i++) {
|
||||
if ((play->sceneNum == D_8011F9B8[i].scene) &&
|
||||
(((void)0, gSaveContext.cutsceneIndex) == D_8011F9B8[i].cutsceneIndex)) {
|
||||
if (D_8011F9B8[i].type == 7) {
|
||||
for (i = 0; i < ARRAY_COUNT(horseCutsceneRecipes); i++) {
|
||||
if ((play->sceneNum == horseCutsceneRecipes[i].scene) &&
|
||||
(((void)0, gSaveContext.cutsceneIndex) == horseCutsceneRecipes[i].cutsceneIndex)) {
|
||||
if (horseCutsceneRecipes[i].type == 7) {
|
||||
if ((play->sceneNum == SCENE_LON_LON_RANCH) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) {
|
||||
D_8011F9B8[i].pos.x = player->actor.world.pos.x;
|
||||
D_8011F9B8[i].pos.y = player->actor.world.pos.y;
|
||||
D_8011F9B8[i].pos.z = player->actor.world.pos.z;
|
||||
horseCutsceneRecipes[i].pos.x = player->actor.world.pos.x;
|
||||
horseCutsceneRecipes[i].pos.y = player->actor.world.pos.y;
|
||||
horseCutsceneRecipes[i].pos.z = player->actor.world.pos.z;
|
||||
}
|
||||
|
||||
player->rideActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
|
||||
D_8011F9B8[i].pos.z, 0, player->actor.world.rot.y, 0, D_8011F9B8[i].type, true);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseCutsceneRecipes[i].pos.x, horseCutsceneRecipes[i].pos.y,
|
||||
horseCutsceneRecipes[i].pos.z, 0, player->actor.world.rot.y, 0, horseCutsceneRecipes[i].type, true);
|
||||
assert(player->rideActor != NULL);
|
||||
|
||||
Actor_MountHorse(play, player, player->rideActor);
|
||||
func_8002DE74(play, player);
|
||||
} else if ((D_8011F9B8[i].type == 5) || (D_8011F9B8[i].type == 6) || (D_8011F9B8[i].type == 8)) {
|
||||
} else if ((horseCutsceneRecipes[i].type == 5) || (horseCutsceneRecipes[i].type == 6) || (horseCutsceneRecipes[i].type == 8)) {
|
||||
Vec3f sp54;
|
||||
s32 temp = 0;
|
||||
|
||||
if (((gSaveContext.eventInf[0] & 0x10) >> 4) && D_8011F9B8[i].type == 6) {
|
||||
if (((gSaveContext.eventInf[0] & 0x10) >> 4) && horseCutsceneRecipes[i].type == 6) {
|
||||
temp = 0x8000;
|
||||
}
|
||||
|
||||
player->rideActor =
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
|
||||
D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type | temp, true);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseCutsceneRecipes[i].pos.x, horseCutsceneRecipes[i].pos.y,
|
||||
horseCutsceneRecipes[i].pos.z, 0, horseCutsceneRecipes[i].angle, 0, horseCutsceneRecipes[i].type | temp, true);
|
||||
assert(player->rideActor != NULL);
|
||||
|
||||
player->actor.world.pos.x = D_8011F9B8[i].pos.x;
|
||||
player->actor.world.pos.y = D_8011F9B8[i].pos.y;
|
||||
player->actor.world.pos.z = D_8011F9B8[i].pos.z;
|
||||
player->actor.world.pos.x = horseCutsceneRecipes[i].pos.x;
|
||||
player->actor.world.pos.y = horseCutsceneRecipes[i].pos.y;
|
||||
player->actor.world.pos.z = horseCutsceneRecipes[i].pos.z;
|
||||
player->actor.shape.rot.x = player->actor.shape.rot.z = 0;
|
||||
player->actor.shape.rot.y = D_8011F9B8[i].angle;
|
||||
player->actor.shape.rot.y = horseCutsceneRecipes[i].angle;
|
||||
|
||||
Actor_MountHorse(play, player, player->rideActor);
|
||||
func_8002DE74(play, player);
|
||||
|
@ -251,8 +251,8 @@ void Horse_SetCutsceneMount(PlayState* play, Player* player) {
|
|||
|
||||
Play_CameraSetAtEye(play, play->activeCamera, &player->actor.world.pos, &sp54);
|
||||
} else {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, D_8011F9B8[i].pos.x, D_8011F9B8[i].pos.y,
|
||||
D_8011F9B8[i].pos.z, 0, D_8011F9B8[i].angle, 0, D_8011F9B8[i].type, true);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseCutsceneRecipes[i].pos.x, horseCutsceneRecipes[i].pos.y,
|
||||
horseCutsceneRecipes[i].pos.z, 0, horseCutsceneRecipes[i].angle, 0, horseCutsceneRecipes[i].type, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue