2020-10-03 15:22:44 +00:00
|
|
|
#include "global.h"
|
2022-11-01 23:17:11 +00:00
|
|
|
#include "terminal.h"
|
2022-05-08 22:17:10 +00:00
|
|
|
#include "src/overlays/actors/ovl_En_Horse/z_en_horse.h"
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-07-31 23:44:47 +00:00
|
|
|
s32 func_8006CFC0(s32 sceneId) {
|
2022-11-26 21:15:41 +00:00
|
|
|
s32 validSceneIds[] = { SCENE_HYRULE_FIELD, SCENE_LAKE_HYLIA, SCENE_GERUDO_VALLEY, SCENE_GERUDOS_FORTRESS,
|
|
|
|
SCENE_LON_LON_RANCH };
|
2020-03-17 04:31:30 +00:00
|
|
|
s32 i;
|
|
|
|
|
2022-07-31 23:44:47 +00:00
|
|
|
for (i = 0; i < ARRAY_COUNT(validSceneIds); i++) {
|
|
|
|
if (sceneId == validSceneIds[i]) {
|
2020-03-17 04:31:30 +00:00
|
|
|
return 1;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void func_8006D074(PlayState* play) {
|
2022-11-26 21:15:41 +00:00
|
|
|
gSaveContext.horseData.sceneId = SCENE_HYRULE_FIELD;
|
2020-04-16 21:36:12 +00:00
|
|
|
gSaveContext.horseData.pos.x = -1840;
|
|
|
|
gSaveContext.horseData.pos.y = 72;
|
|
|
|
gSaveContext.horseData.pos.z = 5497;
|
|
|
|
gSaveContext.horseData.angle = -27353;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void func_8006D0AC(PlayState* play) {
|
2022-11-26 21:15:41 +00:00
|
|
|
if (gSaveContext.horseData.sceneId == SCENE_LAKE_HYLIA) {
|
|
|
|
gSaveContext.horseData.sceneId = SCENE_LAKE_HYLIA;
|
2020-04-16 21:36:12 +00:00
|
|
|
gSaveContext.horseData.pos.x = -2065;
|
|
|
|
gSaveContext.horseData.pos.y = -863;
|
|
|
|
gSaveContext.horseData.pos.z = 1839;
|
|
|
|
gSaveContext.horseData.angle = 0;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
typedef struct {
|
2022-07-31 23:44:47 +00:00
|
|
|
/* 0x00 */ s16 sceneId;
|
2020-03-17 04:31:30 +00:00
|
|
|
/* 0x02 */ Vec3s pos;
|
2020-03-22 21:19:43 +00:00
|
|
|
/* 0x08 */ s16 angle;
|
|
|
|
/* 0x0A */ s16 type;
|
2020-03-17 04:31:30 +00:00
|
|
|
} HorseSpawn;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void func_8006D0EC(PlayState* play, Player* player) {
|
2020-03-17 04:31:30 +00:00
|
|
|
s32 i;
|
2020-03-22 21:19:43 +00:00
|
|
|
HorseSpawn horseSpawns[] = {
|
2022-11-26 21:15:41 +00:00
|
|
|
{ SCENE_HYRULE_FIELD, -460, 100, 6640, 0, 2 }, { SCENE_LAKE_HYLIA, -1929, -1025, 768, 0, 2 },
|
|
|
|
{ SCENE_GERUDO_VALLEY, 2566, -259, 767, 0, 2 }, { SCENE_GERUDOS_FORTRESS, -328, 10, 953, 0, 2 },
|
|
|
|
{ SCENE_LON_LON_RANCH, 928, 0, -2280, 0, 2 },
|
2020-03-17 04:31:30 +00:00
|
|
|
};
|
|
|
|
|
2022-10-15 10:28:05 +00:00
|
|
|
if ((AREG(6) != 0) && (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0))) {
|
2022-05-21 18:23:43 +00:00
|
|
|
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, player->actor.world.pos.x,
|
2021-01-18 21:04:04 +00:00
|
|
|
player->actor.world.pos.y, player->actor.world.pos.z, player->actor.shape.rot.x,
|
|
|
|
player->actor.shape.rot.y, player->actor.shape.rot.z, 9);
|
2021-04-29 18:39:46 +00:00
|
|
|
|
|
|
|
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 343);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_MountHorse(play, player, player->rideActor);
|
|
|
|
func_8002DE74(play, player);
|
2022-07-31 23:44:47 +00:00
|
|
|
gSaveContext.horseData.sceneId = play->sceneId;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
|
2020-03-17 04:31:30 +00:00
|
|
|
player->rideActor->room = -1;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2022-11-26 21:15:41 +00:00
|
|
|
} else if ((play->sceneId == SCENE_GERUDOS_FORTRESS) && (gSaveContext.minigameState == 3)) {
|
2020-03-17 04:31:30 +00:00
|
|
|
Actor* horseActor;
|
2020-04-16 21:36:12 +00:00
|
|
|
gSaveContext.minigameState = 0;
|
2022-05-21 18:23:43 +00:00
|
|
|
horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 3586.0f, 1413.0f, -402.0f, 0, 0x4000, 0, 1);
|
2020-03-17 04:31:30 +00:00
|
|
|
horseActor->room = -1;
|
2022-11-26 21:15:41 +00:00
|
|
|
} else if ((gSaveContext.entranceIndex == ENTR_LON_LON_RANCH_7) && GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
|
2021-02-14 00:49:40 +00:00
|
|
|
Actor* horseActor =
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 389);
|
2022-07-31 23:44:47 +00:00
|
|
|
} else if ((play->sceneId == gSaveContext.horseData.sceneId) &&
|
2022-10-15 10:28:05 +00:00
|
|
|
(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || DREG(1) != 0)) {
|
2021-09-04 13:33:19 +00:00
|
|
|
// "Set by existence of horse %d %d %d"
|
2022-07-31 23:44:47 +00:00
|
|
|
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.sceneId,
|
2022-10-15 10:28:05 +00:00
|
|
|
Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED), DREG(1));
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-07-31 23:44:47 +00:00
|
|
|
if (func_8006CFC0(gSaveContext.horseData.sceneId)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, gSaveContext.horseData.pos.x,
|
|
|
|
gSaveContext.horseData.pos.y, gSaveContext.horseData.pos.z, 0,
|
|
|
|
gSaveContext.horseData.angle, 0, 1);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 414);
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
|
2020-03-17 04:31:30 +00:00
|
|
|
horseActor->room = -1;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
|
|
|
} else {
|
2020-03-17 04:31:30 +00:00
|
|
|
osSyncPrintf(VT_COL(RED, WHITE));
|
2021-09-04 13:33:19 +00:00
|
|
|
// "Horse_SetNormal():%d set spot is no good."
|
2022-07-31 23:44:47 +00:00
|
|
|
osSyncPrintf("Horse_SetNormal():%d セットスポットまずいです。\n", gSaveContext.horseData.sceneId);
|
2020-03-17 04:31:30 +00:00
|
|
|
osSyncPrintf(VT_RST);
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8006D074(play);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
2022-11-26 21:15:41 +00:00
|
|
|
} else if ((play->sceneId == SCENE_LON_LON_RANCH) && !Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) &&
|
|
|
|
(DREG(1) == 0)) {
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor* horseActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, 1);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 443);
|
2022-10-15 10:28:05 +00:00
|
|
|
} else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || (DREG(1) != 0)) {
|
2020-03-22 21:19:43 +00:00
|
|
|
for (i = 0; i < ARRAY_COUNT(horseSpawns); i++) {
|
2020-03-17 04:31:30 +00:00
|
|
|
HorseSpawn* horseSpawn = &horseSpawns[i];
|
2022-07-31 23:44:47 +00:00
|
|
|
if (horseSpawn->sceneId == play->sceneId) {
|
2021-02-14 00:49:40 +00:00
|
|
|
Actor* horseActor =
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, horseSpawn->pos.x, horseSpawn->pos.y,
|
2020-03-22 21:19:43 +00:00
|
|
|
horseSpawn->pos.z, 0, horseSpawn->angle, 0, horseSpawn->type);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 466);
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
|
2020-03-17 04:31:30 +00:00
|
|
|
horseActor->room = -1;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2022-10-15 10:28:05 +00:00
|
|
|
} else if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
|
2022-11-26 21:15:41 +00:00
|
|
|
if ((DREG(1) == 0) && (play->sceneId == SCENE_LON_LON_BUILDINGS) && !IS_DAY) {
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -60.0f, 0, 0x7360, 0, 1);
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
typedef struct {
|
2022-07-31 23:44:47 +00:00
|
|
|
/* 0x00 */ s16 sceneId;
|
2020-03-22 21:19:43 +00:00
|
|
|
/* 0x04 */ s32 cutsceneIndex;
|
2020-03-17 04:31:30 +00:00
|
|
|
/* 0x08 */ Vec3s pos;
|
2020-03-22 21:19:43 +00:00
|
|
|
/* 0x0E */ s16 angle;
|
|
|
|
/* 0x10 */ s16 type;
|
2020-03-17 04:31:30 +00:00
|
|
|
} struct_8011F9B8;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void func_8006D684(PlayState* play, Player* player) {
|
2020-03-17 04:31:30 +00:00
|
|
|
s32 pad;
|
|
|
|
s32 i;
|
|
|
|
Vec3s spawnPos;
|
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if ((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12 ||
|
|
|
|
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13 || gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15) &&
|
2020-04-16 21:36:12 +00:00
|
|
|
(gSaveContext.respawnFlag == 0)) {
|
2020-03-22 21:19:43 +00:00
|
|
|
Vec3s spawnPositions[] = {
|
2022-04-30 12:33:28 +00:00
|
|
|
{ -2961, 313, 7700 },
|
|
|
|
{ -1900, 313, 7015 },
|
|
|
|
{ -4043, 313, 6933 },
|
|
|
|
{ -2313, 313, 5990 },
|
2020-03-17 04:31:30 +00:00
|
|
|
};
|
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11) {
|
2020-03-17 04:31:30 +00:00
|
|
|
spawnPos = spawnPositions[0];
|
2022-11-26 21:15:41 +00:00
|
|
|
} else if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12) {
|
2020-03-17 04:31:30 +00:00
|
|
|
spawnPos = spawnPositions[1];
|
2022-11-26 21:15:41 +00:00
|
|
|
} else if (gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13) {
|
2020-03-17 04:31:30 +00:00
|
|
|
spawnPos = spawnPositions[2];
|
2020-03-23 23:11:21 +00:00
|
|
|
} else {
|
2020-03-17 04:31:30 +00:00
|
|
|
spawnPos = spawnPositions[3];
|
2020-03-23 23:11:21 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
player->rideActor = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, spawnPos.x, spawnPos.y, spawnPos.z, 0,
|
|
|
|
player->actor.world.rot.y, 0, 7);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 561);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_MountHorse(play, player, player->rideActor);
|
|
|
|
func_8002DE74(play, player);
|
2022-07-31 23:44:47 +00:00
|
|
|
gSaveContext.horseData.sceneId = play->sceneId;
|
2022-11-26 21:15:41 +00:00
|
|
|
} else if ((play->sceneId == SCENE_LON_LON_RANCH) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) &&
|
2022-10-15 10:28:05 +00:00
|
|
|
!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0)) {
|
2020-03-22 21:19:43 +00:00
|
|
|
player->rideActor =
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 894.0f, 0.0f, -2084.0f, 0, -0x7FFF, 0, 5);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 582);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_MountHorse(play, player, player->rideActor);
|
|
|
|
func_8002DE74(play, player);
|
2022-07-31 23:44:47 +00:00
|
|
|
gSaveContext.horseData.sceneId = play->sceneId;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-11-26 21:15:41 +00:00
|
|
|
if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
|
2020-03-17 04:31:30 +00:00
|
|
|
player->rideActor->room = -1;
|
2020-03-23 23:11:21 +00:00
|
|
|
}
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
|
|
|
static struct_8011F9B8 D_8011F9B8[] = {
|
2022-11-26 21:15:41 +00:00
|
|
|
{ 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 },
|
|
|
|
{ SCENE_LON_LON_RANCH, 0xFFF5, { 0, 0, 0 }, 0x0000, 7 },
|
|
|
|
{ SCENE_HYRULE_FIELD, 0xFFF3, { -2961, 313, 7700 }, 0x0000, 7 },
|
|
|
|
{ SCENE_HYRULE_FIELD, 0xFFF4, { -1900, 313, 7015 }, 0x0000, 7 },
|
|
|
|
{ SCENE_HYRULE_FIELD, 0xFFF5, { -4043, 313, 6933 }, 0x0000, 7 },
|
|
|
|
{ SCENE_HYRULE_FIELD, 0xFFF6, { -4043, 313, 6933 }, 0x0000, 7 },
|
2020-03-17 04:31:30 +00:00
|
|
|
};
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
for (i = 0; i < ARRAY_COUNT(D_8011F9B8); i++) {
|
2022-07-31 23:44:47 +00:00
|
|
|
if ((play->sceneId == D_8011F9B8[i].sceneId) &&
|
2020-08-30 16:51:46 +00:00
|
|
|
(((void)0, gSaveContext.cutsceneIndex) == D_8011F9B8[i].cutsceneIndex)) {
|
2020-03-22 21:19:43 +00:00
|
|
|
if (D_8011F9B8[i].type == 7) {
|
2022-11-26 21:15:41 +00:00
|
|
|
if ((play->sceneId == SCENE_LON_LON_RANCH) && (((void)0, gSaveContext.cutsceneIndex) == 0xFFF1)) {
|
2021-01-18 21:04:04 +00:00
|
|
|
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;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
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);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 628);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_MountHorse(play, player, player->rideActor);
|
|
|
|
func_8002DE74(play, player);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else if ((D_8011F9B8[i].type == 5) || (D_8011F9B8[i].type == 6) || (D_8011F9B8[i].type == 8)) {
|
2020-03-17 04:31:30 +00:00
|
|
|
Vec3f sp54;
|
2021-02-14 00:49:40 +00:00
|
|
|
s32 temp = 0;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-08 22:17:10 +00:00
|
|
|
if (GET_EVENTINF_HORSES_HORSETYPE() != HORSE_EPONA && D_8011F9B8[i].type == 6) {
|
2020-03-17 04:31:30 +00:00
|
|
|
temp = 0x8000;
|
2020-03-23 23:11:21 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
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);
|
2021-04-29 18:39:46 +00:00
|
|
|
ASSERT(player->rideActor != NULL, "player->ride.actor != NULL", "../z_horse.c", 667);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
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;
|
2020-03-17 04:31:30 +00:00
|
|
|
player->actor.shape.rot.x = player->actor.shape.rot.z = 0;
|
|
|
|
player->actor.shape.rot.y = D_8011F9B8[i].angle;
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
Actor_MountHorse(play, player, player->rideActor);
|
|
|
|
func_8002DE74(play, player);
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
sp54.x = player->actor.world.pos.x - 200.0f;
|
|
|
|
sp54.y = player->actor.world.pos.y + 100.0f;
|
|
|
|
sp54.z = player->actor.world.pos.z;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2022-12-17 21:07:31 +00:00
|
|
|
Play_SetCameraAtEye(play, play->activeCamId, &player->actor.world.pos, &sp54);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
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);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-21 18:23:43 +00:00
|
|
|
void func_8006DC68(PlayState* play, Player* player) {
|
2020-03-22 21:19:43 +00:00
|
|
|
if (LINK_IS_ADULT) {
|
2022-07-31 23:44:47 +00:00
|
|
|
if (!func_8006CFC0(gSaveContext.horseData.sceneId)) {
|
2020-03-17 04:31:30 +00:00
|
|
|
osSyncPrintf(VT_COL(RED, WHITE));
|
2021-09-04 13:33:19 +00:00
|
|
|
// "Horse_Set_Check():%d set spot is no good."
|
2022-07-31 23:44:47 +00:00
|
|
|
osSyncPrintf("Horse_Set_Check():%d セットスポットまずいです。\n", gSaveContext.horseData.sceneId);
|
2020-03-17 04:31:30 +00:00
|
|
|
osSyncPrintf(VT_RST);
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8006D074(play);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
|
2022-07-31 23:44:47 +00:00
|
|
|
if (func_8006CFC0(play->sceneId)) {
|
2022-07-30 21:28:50 +00:00
|
|
|
if (IS_CUTSCENE_LAYER ||
|
2022-11-26 21:15:41 +00:00
|
|
|
((gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_11 ||
|
|
|
|
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_12 ||
|
|
|
|
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_13 ||
|
|
|
|
gSaveContext.entranceIndex == ENTR_HYRULE_FIELD_15) &&
|
2020-04-16 21:36:12 +00:00
|
|
|
(gSaveContext.respawnFlag == 0)) ||
|
2022-11-26 21:15:41 +00:00
|
|
|
((play->sceneId == SCENE_LON_LON_RANCH) && (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_6) &&
|
2022-10-15 10:28:05 +00:00
|
|
|
!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) && (DREG(1) == 0))) {
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8006D684(play, player);
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2022-05-21 18:23:43 +00:00
|
|
|
func_8006D0EC(play, player);
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2) {
|
2021-01-18 21:04:04 +00:00
|
|
|
s16 x = Math_Vec3f_Yaw(&actor->world.pos, arg1) - actor->world.rot.y;
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2020-03-22 21:19:43 +00:00
|
|
|
if (x > arg2) {
|
2021-01-18 21:04:04 +00:00
|
|
|
actor->world.rot.y += arg2;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else if (x < -arg2) {
|
2021-01-18 21:04:04 +00:00
|
|
|
actor->world.rot.y -= arg2;
|
2020-03-22 21:19:43 +00:00
|
|
|
} else {
|
2021-01-18 21:04:04 +00:00
|
|
|
actor->world.rot.y += x;
|
2020-03-22 21:19:43 +00:00
|
|
|
}
|
2020-03-17 04:31:30 +00:00
|
|
|
|
2021-01-18 21:04:04 +00:00
|
|
|
actor->shape.rot.y = actor->world.rot.y;
|
2020-03-17 04:31:30 +00:00
|
|
|
}
|