Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions assets/xml/objects/object_in.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Root>
<File Name="object_in" Segment="6">
<Animation Name="object_in_Anim_0003B4" Offset="0x3B4"/>
<Animation Name="object_in_Anim_000CB0" Offset="0xCB0"/>
<Animation Name="object_in_Anim_001BE0" Offset="0x1BE0"/>
<Animation Name="object_in_Anim_001CC0" Offset="0x1CC0"/>
<Animation Name="gIngoRunningAnim" Offset="0x3B4"/>
<Animation Name="gIngoGloatingAnim" Offset="0xCB0"/>
<Animation Name="gIngoLosingAnim" Offset="0x1BE0"/>
<Animation Name="gIngoStandingAnim" Offset="0x1CC0"/>
<Texture Name="gIngoTLUT" Format="rgba16" Width="16" Height="16" Offset="0x1CD0"/>
<Texture Name="gIngoSkinGradientTLUT" Format="rgba16" Width="16" Height="16" Offset="0x1ED0"/>
<Texture Name="gIngoUnusedEyeTex" Format="rgba16" Width="32" Height="32" Offset="0x2150"/>
Expand Down Expand Up @@ -238,18 +238,18 @@

<Skeleton Name="gIngoSkel" Type="Flex" LimbType="Standard" LimbNone="INGO_LIMB_NONE" LimbMax="INGO_LIMB_MAX" EnumName="IngoLimb" Offset="0x13B88"/>

<Animation Name="object_in_Anim_013C6C" Offset="0x13C6C"/>
<Animation Name="object_in_Anim_013D60" Offset="0x13D60"/>
<Animation Name="object_in_Anim_01431C" Offset="0x1431C"/>
<Animation Name="object_in_Anim_014CA8" Offset="0x14CA8"/>
<Animation Name="object_in_Anim_0151C8" Offset="0x151C8"/>
<Animation Name="object_in_Anim_015814" Offset="0x15814"/>
<Animation Name="object_in_Anim_015DF0" Offset="0x15DF0"/>
<Animation Name="object_in_Anim_01646C" Offset="0x1646C"/>
<Animation Name="object_in_Anim_016B3C" Offset="0x16B3C"/>
<Animation Name="object_in_Anim_0175D0" Offset="0x175D0"/>
<Animation Name="object_in_Anim_017B58" Offset="0x17B58"/>
<Animation Name="object_in_Anim_018C38" Offset="0x18C38"/>
<Animation Name="gIngoStandingAnim2" Offset="0x13C6C"/>
<Animation Name="gIngoSleepingAnim" Offset="0x13D60"/>
<Animation Name="gIngoObedientAnim" Offset="0x1431C"/>
<Animation Name="gIngoWorkingAnim" Offset="0x14CA8"/>
<Animation Name="gIngoHorsebackSlowRideAnim" Offset="0x151C8"/>
<Animation Name="gIngoHorsebackLashingFastAnim" Offset="0x15814"/>
<Animation Name="gIngoHorsebackSittingForwardAnim" Offset="0x15DF0"/>
<Animation Name="gIngoHorsebackLashingSlowAnim" Offset="0x1646C"/>
<Animation Name="gIngoHorsebackRearingAnim" Offset="0x16B3C"/>
<Animation Name="gIngoHorsebackKickingAnim" Offset="0x175D0"/>
<Animation Name="gIngoHorsebackSittingUprightAnim" Offset="0x17B58"/>
<Animation Name="gIngoHorsebackWhoopingAnim" Offset="0x18C38"/>

<!-- No idea what these are -->
<Blob Name="gIngoBlob_0020D0" Size="0x80" Offset="0x20D0"/>
Expand Down
6 changes: 3 additions & 3 deletions include/save.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,9 +833,9 @@ typedef enum LinkAge {
#define INFTABLE_TALKED_TO_ADULT_MALON_AFTER_SONG 0x8C
#define INFTABLE_8D 0x8D // unreachable flag in EnMa2
#define INFTABLE_PLAYED_SONG_FOR_ADULT_MALON 0x8E
#define INFTABLE_94 0x94
#define INFTABLE_97 0x97
#define INFTABLE_9A 0x9A
#define INFTABLE_INGO_TALKED_TO_CHILD_LINK_BEFORE_TALON_RETURNED 0x94
#define INFTABLE_INGO_TALKED_TO_CHILD_LINK_AFTER_TALON_RETURNED 0x97
#define INFTABLE_INGO_TALKED_TO_ADULT_LINK 0x9A
#define INFTABLE_A2 0xA2
#define INFTABLE_AB 0xAB
#define INFTABLE_B0 0xB0
Expand Down
6 changes: 3 additions & 3 deletions src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -5628,7 +5628,7 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
if (!LINK_IS_ADULT) {
if (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
retTextId = 0x2040;
} else if (Flags_GetInfTable(INFTABLE_94)) {
} else if (Flags_GetInfTable(INFTABLE_INGO_TALKED_TO_CHILD_LINK_BEFORE_TALON_RETURNED)) {
retTextId = 0x2040;
} else {
retTextId = 0x203F;
Expand All @@ -5637,7 +5637,7 @@ u32 func_80035BFC(PlayState* play, s16 arg1) {
if (!Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED)) {
if (!IS_DAY) {
retTextId = 0x204E;
} else if (Flags_GetInfTable(INFTABLE_9A)) {
} else if (Flags_GetInfTable(INFTABLE_INGO_TALKED_TO_ADULT_LINK)) {
retTextId = 0x2031;
} else {
retTextId = 0x2030;
Expand Down Expand Up @@ -6024,7 +6024,7 @@ s32 func_800374E0(PlayState* play, Actor* actor, u16 textId) {
if (msgCtx->choiceIndex == 1) {
func_80035B18(play, actor, 0x2032);
}
Flags_SetInfTable(INFTABLE_9A);
Flags_SetInfTable(INFTABLE_INGO_TALKED_TO_ADULT_LINK);
ret = 0;
break;
case 0x2035:
Expand Down
38 changes: 23 additions & 15 deletions src/overlays/actors/ovl_En_Horse/z_en_horse.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED

#define INGO_FLAG_LASHING (1 << 0)

typedef void (*EnHorseCsFunc)(EnHorse*, PlayState*, CsCmdActorCue*);
typedef void (*EnHorseActionFunc)(EnHorse*, PlayState*);

Expand Down Expand Up @@ -399,9 +401,14 @@ static InitChainEntry sInitChain[] = {

static u8 sResetNoInput[] = { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0 };

static s32 sIdleAnimIds[] = { 1, 3, 0, 3, 1, 0 };
static s32 sIdleAnimIds[] = { ENHORSE_ANIM_WHINNEY, ENHORSE_ANIM_REARING, ENHORSE_ANIM_IDLE,
ENHORSE_ANIM_REARING, ENHORSE_ANIM_WHINNEY, ENHORSE_ANIM_IDLE };

static s16 sIngoAnimations[] = { 7, 6, 2, 2, 1, 1, 0, 0, 0, 0 };
static s16 sIngoAnimations[] = { ENIN_HORSE_ANIM_WHOOPING, ENIN_HORSE_ANIM_SITTING_UPRIGHT,
ENIN_HORSE_ANIM_REARING, ENIN_HORSE_ANIM_REARING,
ENIN_HORSE_ANIM_SITTING_FORWARD, ENIN_HORSE_ANIM_SITTING_FORWARD,
ENIN_HORSE_ANIM_SLOW_RIDE, ENIN_HORSE_ANIM_SLOW_RIDE,
ENIN_HORSE_ANIM_SLOW_RIDE, ENIN_HORSE_ANIM_SLOW_RIDE };

void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorCue* cue);
void EnHorse_CsJumpInit(EnHorse* this, PlayState* play, CsCmdActorCue* cue);
Expand Down Expand Up @@ -609,7 +616,7 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn
} else {
this->actor.speed -= 0.47f;
}
this->ingoRaceFlags |= 1;
this->ingoRaceFlags |= INGO_FLAG_LASHING;
return;
}

Expand All @@ -618,7 +625,7 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn
} else {
this->actor.speed -= 0.4f;
}
this->ingoRaceFlags &= ~0x1;
this->ingoRaceFlags &= ~INGO_FLAG_LASHING;
}

void EnHorse_PlayWalkingSfx(EnHorse* this) {
Expand Down Expand Up @@ -2011,18 +2018,19 @@ void EnHorse_InitIngoHorse(EnHorse* this) {
}
}

void EnHorse_SetIngoAnimation(s32 index, f32 curFrame, s32 arg2, s16* animIdxOut, f32* curFrameOut) {
void EnHorse_SetIngoAnimation(s32 index, f32 curFrame, s32 isLashing, s16* animIdxOut, f32* curFrameOut) {
*animIdxOut = sIngoAnimations[index];
*curFrameOut = curFrame;
if ((index == 3) || (index == 7) || (index == 8) || (index == 4)) {
if ((index == ENHORSE_ANIM_REARING) || (index == ENHORSE_ANIM_LOW_JUMP) || (index == ENHORSE_ANIM_HIGH_JUMP) ||
(index == ENHORSE_ANIM_WALK)) {
*curFrameOut = 0.0f;
}
if (arg2 == 1) {
if (index == 5) {
*animIdxOut = 4;
if (isLashing == INGO_FLAG_LASHING) {
if (index == ENHORSE_ANIM_TROT) {
*animIdxOut = ENIN_HORSE_ANIM_LASHING_SLOW;
*curFrameOut = curFrame;
} else if (index == 6) {
*animIdxOut = 3;
} else if (index == ENHORSE_ANIM_GALLOP) {
*animIdxOut = ENIN_HORSE_ANIM_LASHING_FAST;
*curFrameOut = curFrame;
}
}
Expand Down Expand Up @@ -2113,13 +2121,13 @@ void EnHorse_UpdateIngoRace(EnHorse* this, PlayState* play) {
}

if (this->stateFlags & ENHORSE_INGO_WON) {
((EnIn*)this->rider)->animationIdx = 7;
((EnIn*)this->rider)->unk_1E0 = 0;
((EnIn*)this->rider)->horsebackAnimationIdx = ENIN_HORSE_ANIM_WHOOPING;
((EnIn*)this->rider)->horsebackAnimFrame = 0;
return;
}

EnHorse_SetIngoAnimation(this->animationIdx, this->skin.skelAnime.curFrame, this->ingoRaceFlags & 1,
&((EnIn*)this->rider)->animationIdx, &((EnIn*)this->rider)->unk_1E0);
EnHorse_SetIngoAnimation(this->animationIdx, this->skin.skelAnime.curFrame, this->ingoRaceFlags & INGO_FLAG_LASHING,
&((EnIn*)this->rider)->horsebackAnimationIdx, &((EnIn*)this->rider)->horsebackAnimFrame);
}

void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorCue* cue) {
Expand Down
Loading