1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00

object_horse_ganon, object_horse_link_child, object_horse_normal and object_horse_zelda OK (#724)

* object_horse_zelda

Signed-off-by: angie <angheloalf95@gmail.com>

* object_horse_normal

Signed-off-by: angie <angheloalf95@gmail.com>

* object_horse_link_child

Signed-off-by: angie <angheloalf95@gmail.com>

* object_horse_ganon

Signed-off-by: angie <angheloalf95@gmail.com>

* object_horse

Signed-off-by: angie <angheloalf95@gmail.com>

* object_hni

Signed-off-by: Angie <angheloalf95@gmail.com>

* ZAPD is falling to do vtx

Signed-off-by: Angie <angheloalf95@gmail.com>

* Testing

Signed-off-by: Angie <angheloalf95@gmail.com>

* Rename horse_link_child variables

Signed-off-by: angie <angheloalf95@gmail.com>

* horse_zelda with names

Signed-off-by: angie <angheloalf95@gmail.com>

* I'm suspecting that this game doesn't use z_en_horse_ganon

Signed-off-by: angie <angheloalf95@gmail.com>

* Child epona eye textures

Signed-off-by: Angie <angheloalf95@gmail.com>

* Extract eyes textures from Epona

Signed-off-by: Angie <angheloalf95@gmail.com>

* Small rename

Signed-off-by: Angie <angheloalf95@gmail.com>

* change references in EnHorseNormal

Signed-off-by: angie <angheloalf95@gmail.com>

* Rename a few HorseNormal animations

Signed-off-by: angie <angheloalf95@gmail.com>

* Add normal horse eye texture

Signed-off-by: angie <angheloalf95@gmail.com>

* Add some textures

Signed-off-by: angie <angheloalf95@gmail.com>

* change pointers in EnViewer

Signed-off-by: angie <angheloalf95@gmail.com>

* Rename some animations of HorseGanon

Signed-off-by: angie <angheloalf95@gmail.com>

* Add a few dlists in object_horse

Signed-off-by: Angie <angheloalf95@gmail.com>

* Add whinnies

Signed-off-by: Angie <angheloalf95@gmail.com>

* Rename last animations remaining in horse_normal and horse_ganon

Signed-off-by: angie <angheloalf95@gmail.com>

* Remove epona and ingo's horse

Signed-off-by: angie <angheloalf95@gmail.com>

* ./format.sh

Signed-off-by: angie <angheloalf95@gmail.com>

* Give a proper name to horses animations

Signed-off-by: angie <angheloalf95@gmail.com>

* add trailling comma

Signed-off-by: Angie <angheloalf95@gmail.com>

* remove union of skeletons

Signed-off-by: angie <angheloalf95@gmail.com>

* change skeletonheader* to void*

Signed-off-by: angie <angheloalf95@gmail.com>

* remove cast

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* remove cast 2

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* format.sh

Signed-off-by: angie <angheloalf95@gmail.com>

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal 2021-03-28 00:44:11 -03:00 committed by GitHub
parent 3aad8f7244
commit b338f12498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 160 additions and 140 deletions

View File

@ -0,0 +1,22 @@
<Root>
<File Name="object_horse_ganon" Segment="6">
<Skeleton Name="gHorseGanonSkel" Type="Normal" LimbType="Skin" Offset="0x8668"/>
<!-- Idle. Horse moving leg. -->
<Animation Name="gHorseGanonIdleAnim" Offset="0x4AA4"/>
<!-- Idle2. Moving head. -->
<Animation Name="gHorseGanonWhinnyAnim" Offset="0x5264"/>
<!-- Walking slow. -->
<Animation Name="gHorseGanonWalkingAnim" Offset="0x5B78"/>
<!-- Walking fast. -->
<Animation Name="gHorseGanonTrottingAnim" Offset="0x2CE4"/>
<!-- Running. -->
<Animation Name="gHorseGanonGallopingAnim" Offset="0x2650"/>
<!-- Stand in two legs for a moment. -->
<Animation Name="gHorseGanonRearingAnim" Offset="0x3858"/>
<Texture Name="gHorseGanonEyeTex" OutName="horse_ganon_eye" Format="rgb5a1" Width="16" Height="16" Offset="0xAC10" />
<Texture Name="gHorseGanonHeadHairTex" OutName="horse_ganon_head_hair" Format="rgb5a1" Width="16" Height="16" Offset="0xAE10" />
<Texture Name="gHorseGanonLegTex" OutName="horse_ganon_leg" Format="rgb5a1" Width="16" Height="16" Offset="0xA370" />
</File>
</Root>

View File

@ -0,0 +1,21 @@
<Root>
<File Name="object_horse_link_child" Segment="6">
<Skeleton Name="gChildEponaSkel" Type="Normal" LimbType="Skin" Offset="0x7B20"/>
<!-- Idle animation. -->
<Animation Name="gChildEponaIdleAnim" Offset="0x43E4"/>
<!-- The animation that horses usually do. You know, that one... moving its head... -->
<Animation Name="gChildEponaWhinnyAnim" Offset="0x4B08"/>
<!-- Walking slow. -->
<Animation Name="gChildEponaWalkingAnim" Offset="0x53F0"/>
<!-- Walking fast. -->
<Animation Name="gChildEponaTrottingAnim" Offset="0x360C"/>
<!-- Running. -->
<Animation Name="gChildEponaGallopingAnim" Offset="0x2F98"/>
<Texture Name="gChildEponaEyePal" OutName="child_epona_eye_pal" Format="rgb5a1" Width="16" Height="16" Offset="0x1728" />
<Texture Name="gChildEponaEyeOpenTex" OutName="child_epona_eye_open" Format="ci8" Width="32" Height="16" Offset="0x1D28" />
<Texture Name="gChildEponaEyeHalfTex" OutName="child_epona_eye_half" Format="ci8" Width="32" Height="16" Offset="0x1928" />
<Texture Name="gChildEponaEyeCloseTex" OutName="child_epona_eye_close" Format="ci8" Width="32" Height="16" Offset="0x1B28" />
</File>
</Root>

View File

@ -0,0 +1,26 @@
<Root>
<File Name="object_horse_normal" Segment="6">
<Skeleton Name="gHorseNormalSkel" Type="Normal" LimbType="Skin" Offset="0x9FAC"/>
<!-- Running. -->
<Animation Name="gHorseNormalGallopingAnim" Offset="0x608"/>
<!-- Jumping. -->
<Animation Name="gHorseNormalJumpingAnim" Offset="0xC20"/>
<!-- JumpingHigh. -->
<Animation Name="gHorseNormalJumpingHighAnim" Offset="0x13A8"/>
<!-- Walking fast. -->
<Animation Name="gHorseNormalTrottingAnim" Offset="0x1A1C"/>
<!-- Stand in two legs for a moment? -->
<Animation Name="gHorseNormalRearingAnim" Offset="0x2458"/>
<!-- Refusing to jump / Slowing down. -->
<Animation Name="gHorseNormalRefuseAnim" Offset="0x35D4"/>
<!-- Idle1. Horse moving leg. -->
<Animation Name="gHorseNormalIdleAnim" Offset="0x4580"/>
<!-- Idle2. Moving head. -->
<Animation Name="gHorseNormalWhinnyAnim" Offset="0x4C20"/>
<!-- Walking slow. -->
<Animation Name="gHorseNormalWalkingAnim" Offset="0x54BC"/>
<Texture Name="gHorseNormalEyeTex" OutName="horse_normal_eye" Format="rgb5a1" Width="32" Height="16" Offset="0x54D8"/>
</File>
</Root>

View File

@ -0,0 +1,14 @@
<Root>
<File Name="object_horse_zelda" Segment="6">
<Skeleton Name="gHorseZeldaSkel" Type="Normal" LimbType="Skin" Offset="0x6B2C"/>
<!-- Running. -->
<Animation Name="gHorseZeldaGallopingAnim" Offset="0x7148"/>
<Texture Name="gHorseZeldaEyeTex" OutName="horse_zelda_eye" Format="rgb5a1" Width="32" Height="16" Offset="0x8" />
<Texture Name="gHorseZeldaHeadHairTex" OutName="horse_zelda_head_hair" Format="rgb5a1" Width="16" Height="16" Offset="0x688" />
<Texture Name="gHorseZeldaNoseTex" OutName="horse_zelda_nose" Format="rgb5a1" Width="16" Height="16" Offset="0x488" />
<Texture Name="gHorseZeldaLegTex" OutName="horse_zelda_leg" Format="rgb5a1" Width="16" Height="16" Offset="0x9A8" />
</File>
</Root>

12
spec
View File

@ -3694,7 +3694,8 @@ endseg
beginseg
name "object_horse_normal"
romalign 0x1000
include "build/baserom/object_horse_normal.o"
include "build/assets/objects/object_horse_normal/object_horse_normal.o"
number 6
endseg
beginseg
@ -3731,7 +3732,8 @@ endseg
beginseg
name "object_horse_ganon"
romalign 0x1000
include "build/baserom/object_horse_ganon.o"
include "build/assets/objects/object_horse_ganon/object_horse_ganon.o"
number 6
endseg
beginseg
@ -3878,7 +3880,8 @@ endseg
beginseg
name "object_horse_zelda"
romalign 0x1000
include "build/baserom/object_horse_zelda.o"
include "build/assets/objects/object_horse_zelda/object_horse_zelda.o"
number 6
endseg
beginseg
@ -4357,7 +4360,8 @@ endseg
beginseg
name "object_horse_link_child"
romalign 0x1000
include "build/baserom/object_horse_link_child.o"
include "build/assets/objects/object_horse_link_child/object_horse_link_child.o"
number 6
endseg
beginseg

View File

@ -5,6 +5,7 @@
*/
#include "z_en_horse_ganon.h"
#include "objects/object_horse_ganon/object_horse_ganon.h"
#define FLAGS 0x00000010
@ -36,7 +37,10 @@ const ActorInit En_Horse_Ganon_InitVars = {
(ActorFunc)EnHorseGanon_Draw,
};
static AnimationHeader* D_80A691B0[] = { 0x06004AA4, 0x06005264, 0x06005B78, 0x06002CE4, 0x06002650, 0x06003858 };
static AnimationHeader* sAnimations[] = {
&gHorseGanonIdleAnim, &gHorseGanonWhinnyAnim, &gHorseGanonWalkingAnim,
&gHorseGanonTrottingAnim, &gHorseGanonGallopingAnim, &gHorseGanonRearingAnim,
};
static f32 splaySpeeds[] = { 0.66666666f, 0.66666666f, 1.0f, 1.0f, 1.0f, 0.66666666f };
@ -105,9 +109,6 @@ static InitChainEntry sInitChain[] = {
static EnHorseGanonActionFunc sActionFuncs[] = { func_80A68AF0, func_80A68DB0 };
extern SkeletonHeader D_06008668;
extern AnimationHeader D_06004AA4;
void func_80A68660(unk_D_80A69248* data, s32 index, Vec3f* vec) {
vec->x = data[index].unk_0.x;
vec->y = data[index].unk_0.y;
@ -178,9 +179,9 @@ void EnHorseGanon_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.focus.pos = this->actor.world.pos;
this->action = 0;
this->actor.focus.pos.y += 70.0f;
func_800A663C(globalCtx, &this->skin, &D_06008668, &D_06004AA4);
func_800A663C(globalCtx, &this->skin, &gHorseGanonSkel, &gHorseGanonIdleAnim);
this->currentAnimation = 0;
Animation_PlayOnce(&this->skin.skelAnime, D_80A691B0[0]);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]);
Collider_InitCylinder(globalCtx, &this->colliderBody);
Collider_SetCylinder(globalCtx, &this->colliderBody, &this->actor, &sCylinderInit);
@ -201,7 +202,7 @@ void EnHorseGanon_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_80A68AC4(EnHorseGanon* this) {
this->action = 0;
Animation_PlayLoop(&this->skin.skelAnime, D_80A691B0[4]);
Animation_PlayLoop(&this->skin.skelAnime, sAnimations[4]);
}
void func_80A68AF0(EnHorseGanon* this, GlobalContext* globalCtx) {
@ -245,13 +246,13 @@ void func_80A68B20(EnHorseGanon* this) {
}
if (animationChanged == 1) {
Animation_Change(&this->skin.skelAnime, D_80A691B0[this->currentAnimation],
Animation_Change(&this->skin.skelAnime, sAnimations[this->currentAnimation],
splaySpeeds[this->currentAnimation] * sp30 * 1.5f, 0.0f,
Animation_GetLastFrame(D_80A691B0[this->currentAnimation]), ANIMMODE_ONCE, -3.0f);
Animation_GetLastFrame(sAnimations[this->currentAnimation]), ANIMMODE_ONCE, -3.0f);
} else {
Animation_Change(&this->skin.skelAnime, D_80A691B0[this->currentAnimation],
Animation_Change(&this->skin.skelAnime, sAnimations[this->currentAnimation],
splaySpeeds[this->currentAnimation] * sp30 * 1.5f, 0.0f,
Animation_GetLastFrame(D_80A691B0[this->currentAnimation]), ANIMMODE_ONCE, 0.0f);
Animation_GetLastFrame(sAnimations[this->currentAnimation]), ANIMMODE_ONCE, 0.0f);
}
}

View File

@ -5,6 +5,7 @@
*/
#include "z_en_horse_link_child.h"
#include "objects/object_horse_link_child/object_horse_link_child.h"
#define FLAGS 0x02000010
@ -32,7 +33,10 @@ const ActorInit En_Horse_Link_Child_InitVars = {
(ActorFunc)EnHorseLinkChild_Draw,
};
static AnimationHeader* sAnimations[] = { 0x060043E4, 0x06004B08, 0x060053F0, 0x0600360C, 0x06002F98 };
static AnimationHeader* sAnimations[] = {
&gChildEponaIdleAnim, &gChildEponaWhinnyAnim, &gChildEponaWalkingAnim,
&gChildEponaTrottingAnim, &gChildEponaGallopingAnim,
};
static ColliderCylinderInitType1 sCylinderInit = {
{
@ -82,9 +86,6 @@ static ColliderJntSphInit sJntSphInit = {
static CollisionCheckInfoInit sColCheckInfoInit = { 10, 35, 100, MASS_HEAVY };
extern AnimationHeader D_06002F98;
extern SkeletonHeader D_06007B20;
void func_80A693D0(EnHorseLinkChild* this) {
static s32 D_80A6AF5C[] = { 1, 19 };
@ -152,7 +153,7 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) {
this->action = 1;
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
func_800A663C(globalCtx, &this->skin, &D_06007B20, &D_06002F98);
func_800A663C(globalCtx, &this->skin, &gChildEponaSkel, &gChildEponaGallopingAnim);
this->animationIdx = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]);
Collider_InitCylinder(globalCtx, &this->bodyCollider);
@ -161,7 +162,7 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) {
Collider_SetJntSph(globalCtx, &this->headCollider, &this->actor, &sJntSphInit, this->headElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColCheckInfoInit);
this->unk_1F0 = 0;
this->unk_1EC = 0;
this->eyeTexIndex = 0;
if (gSaveContext.sceneSetupIndex > 3) {
func_80A69EC0(this);
@ -546,8 +547,9 @@ void func_80A6A7D0(EnHorseLinkChild* this, GlobalContext* globalCtx) {
static EnHorseLinkChildActionFunc sActionFuncs[] = {
func_80A698F4, func_80A69C18, func_80A699FC, func_80A6A068, func_80A6A7D0, func_80A6A5A4,
};
static UNK_PTR D_80A6AF94[] = { 0x06001D28, 0x06001928, 0x06001B28 };
static u8 D_80A6AFA0[] = { 0, 1, 2, 1 };
static u64* sEyeTextures[] = { gChildEponaEyeOpenTex, gChildEponaEyeHalfTex, gChildEponaEyeCloseTex };
static u8 sEyeIndexOrder[] = { 0, 1, 2, 1 };
void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) {
EnHorseLinkChild* this = THIS;
@ -564,12 +566,12 @@ void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
if ((Rand_ZeroOne() < 0.025f) && (this->unk_1EC == 0)) {
this->unk_1EC++;
} else if (this->unk_1EC > 0) {
this->unk_1EC++;
if (this->unk_1EC >= ARRAY_COUNT(D_80A6AFA0)) {
this->unk_1EC = 0;
if ((Rand_ZeroOne() < 0.025f) && (this->eyeTexIndex == 0)) {
this->eyeTexIndex++;
} else if (this->eyeTexIndex > 0) {
this->eyeTexIndex++;
if (this->eyeTexIndex >= ARRAY_COUNT(sEyeIndexOrder)) {
this->eyeTexIndex = 0;
}
}
@ -605,8 +607,8 @@ s32 func_80A6AD84(Actor* thisx, GlobalContext* globalCtx, s32 arg2, PSkinAwb* ar
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse_link_child.c", 1467);
if (arg2 == 0xD) {
u8 index = D_80A6AFA0[this->unk_1EC];
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80A6AF94[index]));
u8 index = sEyeIndexOrder[this->eyeTexIndex];
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[index]));
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_horse_link_child.c", 1479);

View File

@ -15,7 +15,7 @@ typedef struct EnHorseLinkChild {
/* 0x0154 */ PSkinAwb skin;
/* 0x01E4 */ s32 timer;
/* 0x01E8 */ s32 unk_1E8;
/* 0x01EC */ u8 unk_1EC;
/* 0x01EC */ u8 eyeTexIndex;
/* 0x01F0 */ s32 unk_1F0;
/* 0x01F4 */ ColliderCylinder bodyCollider;
/* 0x0240 */ ColliderJntSph headCollider;

View File

@ -6,6 +6,7 @@
#include "z_en_horse_normal.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_horse_normal/object_horse_normal.h"
#define FLAGS 0x00000000
@ -52,20 +53,10 @@ const ActorInit En_Horse_Normal_InitVars = {
(ActorFunc)EnHorseNormal_Draw,
};
extern AnimationHeader D_06000608;
extern AnimationHeader D_06000C20;
extern AnimationHeader D_060013A8;
extern AnimationHeader D_06001A1C;
extern AnimationHeader D_06002458;
extern AnimationHeader D_060035D4;
extern AnimationHeader D_06004580;
extern AnimationHeader D_06004C20;
extern AnimationHeader D_060054BC;
extern SkeletonHeader D_06009FAC;
static AnimationHeader* sAnimations[] = {
&D_06004580, &D_06004C20, &D_060035D4, &D_06002458, &D_060054BC, &D_06001A1C, &D_06000608, &D_06000C20, &D_060013A8,
&gHorseNormalIdleAnim, &gHorseNormalWhinnyAnim, &gHorseNormalRefuseAnim,
&gHorseNormalRearingAnim, &gHorseNormalWalkingAnim, &gHorseNormalTrottingAnim,
&gHorseNormalGallopingAnim, &gHorseNormalJumpingAnim, &gHorseNormalJumpingHighAnim,
};
static ColliderCylinderInit sCylinderInit1 = {
@ -237,7 +228,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
return;
}
this->actor.home.rot.z = this->actor.world.rot.z = this->actor.shape.rot.z = 0;
func_800A663C(globalCtx, &this->skin, &D_06009FAC, &D_06004580);
func_800A663C(globalCtx, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
if ((this->actor.world.pos.x == -730.0f && this->actor.world.pos.y == 0.0f &&
this->actor.world.pos.z == -1100.0f) ||
@ -251,7 +242,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
return;
} else {
func_800A663C(globalCtx, &this->skin, &D_06009FAC, &D_06004580);
func_800A663C(globalCtx, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
func_80A6C6B0(this);
return;
@ -259,15 +250,15 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) {
} else if (globalCtx->sceneNum == SCENE_SPOT12) {
if (this->actor.world.pos.x == 3707.0f && this->actor.world.pos.y == 1413.0f &&
this->actor.world.pos.z == -665.0f) {
func_800A663C(globalCtx, &this->skin, &D_06009FAC, &D_06004580);
func_800A663C(globalCtx, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
func_80A6C4CC(this);
return;
}
func_800A663C(globalCtx, &this->skin, &D_06009FAC, &D_06004580);
func_800A663C(globalCtx, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
} else {
func_800A663C(globalCtx, &this->skin, &D_06009FAC, &D_06004580);
func_800A663C(globalCtx, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
}
if ((this->actor.params & 0xF0) == 0x10 && (this->actor.params & 0xF) != 0xF) {

View File

@ -5,6 +5,7 @@
*/
#include "z_en_horse_zelda.h"
#include "objects/object_horse_zelda/object_horse_zelda.h"
#define FLAGS 0x00000010
@ -31,7 +32,7 @@ const ActorInit En_Horse_Zelda_InitVars = {
(ActorFunc)EnHorseZelda_Draw,
};
static AnimationHeader* sAnimationHeaders[] = { 0x06007148 };
static AnimationHeader* sAnimationHeaders[] = { &gHorseZeldaGallopingAnim };
static f32 splaySpeeds[] = { 0.66666666f };
@ -105,9 +106,6 @@ static EnHorseZeldaActionFunc sActionFuncs[] = {
func_80A6DDFC,
};
extern SkeletonHeader D_06006B2C;
extern AnimationHeader D_06007148;
void func_80A6D8D0(unknownStruct* data, s32 index, Vec3f* vec) {
vec->x = data[index].unk_0.x;
vec->y = data[index].unk_0.y;
@ -161,7 +159,7 @@ void EnHorseZelda_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.focus.pos = this->actor.world.pos;
this->action = 0;
this->actor.focus.pos.y += 70.0f;
func_800A663C(globalCtx, &this->skin, &D_06006B2C, &D_06007148);
func_800A663C(globalCtx, &this->skin, &gHorseZeldaSkel, &gHorseZeldaGallopingAnim);
this->animationIndex = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[0]);
Collider_InitCylinder(globalCtx, &this->colliderCylinder);

View File

@ -8,6 +8,8 @@
#include "overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.h"
#include "objects/object_zl4/object_zl4.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_horse_zelda/object_horse_zelda.h"
#include "objects/object_horse_ganon/object_horse_ganon.h"
#define FLAGS 0x00000010
@ -25,12 +27,9 @@ void func_80B2A570(EnViewer* this, GlobalContext* globalCtx);
void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx);
// sAnimFuncs
void func_80B2A300(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationSeg);
void func_80B2A448(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationSeg);
void func_80B2A4D8(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationSeg);
void func_80B2A300(EnViewer* this, GlobalContext* globalCtx, void* skeletonHeaderSeg, AnimationHeader* animationSeg);
void func_80B2A448(EnViewer* this, GlobalContext* globalCtx, void* skeletonHeaderSeg, AnimationHeader* animationSeg);
void func_80B2A4D8(EnViewer* this, GlobalContext* globalCtx, void* skeletonHeaderSeg, AnimationHeader* animationSeg);
// sDrawFuncs
void func_80B2B4A8(EnViewer* this, GlobalContext* globalCtx);
@ -48,38 +47,22 @@ extern AnimationHeader D_06001410;
extern AnimationHeader D_060014F4;
extern AnimationHeader D_06001D28;
extern AnimationHeader D_06002574;
extern AnimationHeader D_06002650;
extern AnimationHeader D_06002928;
extern AnimationHeader D_060029CC;
extern UNK_TYPE D_06002EF0;
extern AnimationHeader D_06003284;
extern UNK_TYPE D_060032F0;
extern AnimationHeader D_06003428;
extern UNK_TYPE D_060036F0;
extern AnimationHeader D_06003858;
extern AnimationHeader D_06003D84;
extern UNK_TYPE D_06003EF0;
extern AnimationHeader D_0600420C;
extern AnimationHeader D_06004260;
extern UNK_TYPE D_060042F0;
extern AnimationHeader D_06004534;
extern AnimationHeader D_060048B0;
extern AnimationHeader D_060048FC;
extern AnimationHeader D_06004AA4;
extern UNK_TYPE D_06004EF0;
extern AnimationHeader D_0600504C;
extern AnimationHeader D_060050A8;
extern UNK_TYPE D_060052F0;
extern FlexSkeletonHeader D_06006B2C;
extern AnimationHeader D_06007148;
extern UNK_TYPE D_06007210;
extern FlexSkeletonHeader D_06008668;
extern UNK_TYPE D_0600A4E0;
extern Gfx D_0600BE90[];
extern Gfx D_0600C410[];
extern Gfx D_0600D0D8[];
extern Gfx D_0600DE08[];
extern FlexSkeletonHeader D_0600E038;
extern Gfx D_0600E1A8[];
extern UNK_TYPE D_0600F178;
extern UNK_TYPE D_0600F378;
@ -109,13 +92,13 @@ static InitChainEntry sInitChain[] = {
};
struct_80B2CEE8 D_80B2CEE8[] = {
{ OBJECT_HORSE_ZELDA, OBJECT_HORSE_ZELDA, 1, 0, 2, 20, 1, &D_06006B2C, &D_06007148 },
{ OBJECT_HORSE_ZELDA, OBJECT_HORSE_ZELDA, 1, 0, 2, 20, 1, &gHorseZeldaSkel, &gHorseZeldaGallopingAnim },
{ OBJECT_IM, OBJECT_OPENING_DEMO1, 1, 0, 0, 10, 3, &D_0600F788, &D_060029CC },
{ OBJECT_ZL4, OBJECT_OPENING_DEMO1, 1, 0, 0, 10, 2, &gChildZeldaSkel, &D_06000450 },
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, 0, 10, 0, &D_060119E8, &D_06002928 },
{ OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, 2, 20, 1, &D_06008668, &D_06003858 },
{ OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, 2, 20, 1, &gHorseGanonSkel, &gHorseGanonRearingAnim },
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, 0, 10, 0, &D_060119E8, &D_060005B4 },
{ OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, 2, 20, 1, &D_06008668, &D_06002650 },
{ OBJECT_HORSE_GANON, OBJECT_HORSE_GANON, 1, 0, 2, 20, 1, &gHorseGanonSkel, &gHorseGanonGallopingAnim },
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, 0, 10, 0, &D_060119E8, &D_06004260 },
{ OBJECT_GNDD, OBJECT_GNDD, 1, -6, 0, 10, 0, &D_060119E8, &D_060050A8 },
{ OBJECT_GANON, OBJECT_GANON, 1, -6, 0, 10, 0, &D_060114E8, &D_06011348 },
@ -178,14 +161,13 @@ void EnViewer_Destroy(Actor* thisx, GlobalContext* globalCtx) {
func_800A6888(globalCtx, &this->skin);
}
void func_80B2A300(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationSeg) {
void func_80B2A300(EnViewer* this, GlobalContext* globalCtx, void* skeletonHeaderSeg, AnimationHeader* animationSeg) {
s16 params = this->actor.params >> 8;
if (params == 2 || params == 3 || params == 5 || params == 7 || params == 8 || params == 9) {
SkelAnime_InitFlex(globalCtx, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
} else {
SkelAnime_Init(globalCtx, &this->skin.skelAnime, &skeletonHeaderSeg->sh, NULL, NULL, NULL, 0);
SkelAnime_Init(globalCtx, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
}
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->animObjBankIndex].segment);
@ -196,18 +178,16 @@ void func_80B2A300(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader*
}
}
void func_80B2A448(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationSeg) {
void func_80B2A448(EnViewer* this, GlobalContext* globalCtx, void* skeletonHeaderSeg, AnimationHeader* animationSeg) {
SkelAnime_InitFlex(globalCtx, &this->skin.skelAnime, skeletonHeaderSeg, NULL, NULL, NULL, 0);
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->animObjBankIndex].segment);
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, animationSeg, 3.0f);
}
void func_80B2A4D8(EnViewer* this, GlobalContext* globalCtx, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animationSeg) {
void func_80B2A4D8(EnViewer* this, GlobalContext* globalCtx, void* skeletonHeaderSeg, AnimationHeader* animationSeg) {
u8 params;
func_800A663C(globalCtx, &this->skin, &skeletonHeaderSeg->sh, animationSeg);
func_800A663C(globalCtx, &this->skin, skeletonHeaderSeg, animationSeg);
params = this->actor.params >> 8;
if (!(params == 3 || params == 4 || params == 7 || params == 8 || params == 9)) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, animationSeg, 3.0f);
@ -242,7 +222,7 @@ void func_80B2A570(EnViewer* this, GlobalContext* globalCtx) {
ActorShape_Init(&this->actor.shape, unkStruct->unk_5 * 100,
sActorShadowDrawFunc[unkStruct->actorShadowDrawFuncIndex], unkStruct->unk_7);
this->drawFuncIndex = unkStruct->drawFuncIndex;
sAnimFuncs[this->drawFuncIndex](this, globalCtx, unkStruct->unk_C, unkStruct->unk_10);
sAnimFuncs[this->drawFuncIndex](this, globalCtx, unkStruct->skel, unkStruct->unk_10);
EnViewer_SetupAction(this, func_80B2A75C);
}
@ -305,18 +285,18 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
}
} else if (params == 4) {
curFrame = this->skin.skelAnime.curFrame;
if (this->skin.skelAnime.animation == &D_06003858) {
if (this->skin.skelAnime.animation == &gHorseGanonRearingAnim) {
if (curFrame == 8) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GANON_HORSE_NEIGH);
}
if (curFrame == 30) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_HORSE_LAND2);
}
} else if (this->skin.skelAnime.animation == &D_06004AA4) {
} else if (this->skin.skelAnime.animation == &gHorseGanonIdleAnim) {
if (curFrame == 25) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_HORSE_SANDDUST);
}
} else if (this->skin.skelAnime.animation == &D_06002650) {
} else if (this->skin.skelAnime.animation == &gHorseGanonGallopingAnim) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_HORSE_RUN_LEVEL - SFX_FLAG);
}
}
@ -335,8 +315,8 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
if (this->skin.skelAnime.animation != &D_06002928) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06002928, 1.0f);
}
} else if (this->skin.skelAnime.animation != &D_06004AA4) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06004AA4, 1.0f);
} else if (this->skin.skelAnime.animation != &gHorseGanonIdleAnim) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonIdleAnim, 1.0f);
}
} else if (globalCtx->csCtx.npcActions[1]->action == 1) {
D_80B2CFCC = 100;
@ -344,8 +324,8 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
if (this->skin.skelAnime.animation != &D_06001D28) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06001D28, 1.0f);
}
} else if (this->skin.skelAnime.animation != &D_06003858) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06003858, 1.0f);
} else if (this->skin.skelAnime.animation != &gHorseGanonRearingAnim) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonRearingAnim, 1.0f);
}
} else if (params == 3) {
switch (this->unk_1E5) {
@ -396,8 +376,9 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
this->unk_1E5 = 0;
break;
}
} else if (this->skin.skelAnime.animation != &D_06002650 && globalCtx->csCtx.npcActions[1]->action == 12) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06002650, 3.0f);
} else if (this->skin.skelAnime.animation != &gHorseGanonGallopingAnim &&
globalCtx->csCtx.npcActions[1]->action == 12) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &gHorseGanonGallopingAnim, 3.0f);
}
}
} else if (params == 1) {

View File

@ -8,7 +8,7 @@ struct EnViewer;
typedef void (*EnViewerActionFunc)(struct EnViewer*, GlobalContext*);
typedef void (*EnViewerDrawFunc)(struct EnViewer*, GlobalContext*);
typedef void (*EnViewerAnimFunc)(struct EnViewer*, GlobalContext*, FlexSkeletonHeader*, AnimationHeader*);
typedef void (*EnViewerAnimFunc)(struct EnViewer*, GlobalContext*, void*, AnimationHeader*);
typedef struct {
/* 0x00 */ s16 objId1;
@ -18,7 +18,7 @@ typedef struct {
/* 0x06 */ u8 actorShadowDrawFuncIndex;
/* 0x07 */ u8 unk_7;
/* 0x08 */ u8 drawFuncIndex;
/* 0x0C */ FlexSkeletonHeader* unk_C;
/* 0x0C */ void* skel;
/* 0x10 */ AnimationHeader* unk_10;
} struct_80B2CEE8; // size = 0x14

View File

@ -555,10 +555,6 @@ D_0600BC90 = 0x0600BC90;
D_0600BCA0 = 0x0600BCA0;
D_0600BE40 = 0x0600BE40;
// z_en_horse_zelda
D_06006B2C = 0x06006B2C;
D_06007148 = 0x06007148;
// z_arms_hook
D_0602B288 = 0x0602B288;
D_0602AFF0 = 0x0602AFF0;
@ -785,26 +781,6 @@ D_06002C10 = 0x06002C10;
D_06004F30 = 0x06004F30;
D_060048A8 = 0x060048A8;
// z_en_horse_ganon
D_06008668 = 0x06008668;
D_06004AA4 = 0x06004AA4;
// z_en_horse_link_child
D_06002F98 = 0x06002F98;
D_06007B20 = 0x06007B20;
// z_en_horse_normal
D_06000608 = 0x06000608;
D_06000C20 = 0x06000C20;
D_060013A8 = 0x060013A8;
D_06001A1C = 0x06001A1C;
D_06002458 = 0x06002458;
D_060035D4 = 0x060035D4;
D_06004580 = 0x06004580;
D_06004C20 = 0x06004C20;
D_060054BC = 0x060054BC;
D_06009FAC = 0x06009FAC;
// z_en_skjneedle
D_06000EB0 = 0x06000EB0;
@ -2240,38 +2216,22 @@ D_06001410 = 0x06001410;
D_060014F4 = 0x060014F4;
D_06001D28 = 0x06001D28;
D_06002574 = 0x06002574;
D_06002650 = 0x06002650;
D_06002928 = 0x06002928;
D_060029CC = 0x060029CC;
D_06002EF0 = 0x06002EF0;
D_06003284 = 0x06003284;
D_060032F0 = 0x060032F0;
D_06003428 = 0x06003428;
D_060036F0 = 0x060036F0;
D_06003858 = 0x06003858;
D_06003D84 = 0x06003D84;
D_06003EF0 = 0x06003EF0;
D_0600420C = 0x0600420C;
D_06004260 = 0x06004260;
D_060042F0 = 0x060042F0;
D_06004534 = 0x06004534;
D_060048B0 = 0x060048B0;
D_060048FC = 0x060048FC;
D_06004AA4 = 0x06004AA4;
D_06004EF0 = 0x06004EF0;
D_0600504C = 0x0600504C;
D_060050A8 = 0x060050A8;
D_060052F0 = 0x060052F0;
D_06006B2C = 0x06006B2C;
D_06007148 = 0x06007148;
D_06007210 = 0x06007210;
D_06008668 = 0x06008668;
D_0600A4E0 = 0x0600A4E0;
D_0600BE90 = 0x0600BE90;
D_0600C410 = 0x0600C410;
D_0600D0D8 = 0x0600D0D8;
D_0600DE08 = 0x0600DE08;
D_0600E038 = 0x0600E038;
D_0600E1A8 = 0x0600E1A8;
D_0600F178 = 0x0600F178;
D_0600F378 = 0x0600F378;