1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-28 18:01:32 +00:00

implement more skeleton-related types, cleanups, fixups

This commit is contained in:
Dragorn421 2025-02-05 23:17:05 +01:00
parent f70a07f8cf
commit 66db26a999
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335
18 changed files with 459 additions and 128 deletions

View file

@ -93,7 +93,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
if (this->actor.params <= ARROW_SEED) {
if (this->actor.params <= ARROW_0E) {
SkelAnime_Init(play, &this->skelAnime, (void*)&gArrowSkel, &gArrow2Anim, NULL, NULL, 0);
SkelAnime_Init(play, &this->skelAnime, &gArrowSkel, &gArrow2Anim, NULL, NULL, 0);
}
if (this->actor.params <= ARROW_NORMAL) {

View file

@ -67,7 +67,7 @@ static AnimationHeader** sAnimationHeaders[] = { sEponaAnimHeaders, sHniAnimHead
static f32 sPlaybackSpeeds[] = { 2.0f / 3.0f, 2.0f / 3.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 2.0f / 3.0f, 2.0f / 3.0f };
static SkeletonHeader* sSkeletonHeaders[] = { (void*)&gEponaSkel, (void*)&gHorseIngoSkel };
static SkeletonHeader* sSkeletonHeaders[] = { &gEponaSkel, &gHorseIngoSkel };
ActorProfile En_Horse_Profile = {
/**/ ACTOR_EN_HORSE,

View file

@ -177,7 +177,7 @@ void EnHorseGanon_Init(Actor* thisx, PlayState* play) {
this->actor.focus.pos = this->actor.world.pos;
this->action = 0;
this->actor.focus.pos.y += 70.0f;
Skin_Init(play, &this->skin, (void*)&gHorseGanonSkel, &gHorseGanonIdleAnim);
Skin_Init(play, &this->skin, &gHorseGanonSkel, &gHorseGanonIdleAnim);
this->currentAnimation = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]);

View file

@ -162,7 +162,7 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) {
this->action = 1;
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
Skin_Init(play, &this->skin, (void*)&gChildEponaSkel, &gChildEponaGallopingAnim);
Skin_Init(play, &this->skin, &gChildEponaSkel, &gChildEponaGallopingAnim);
this->animationIdx = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[0]);
Collider_InitCylinder(play, &this->bodyCollider);

View file

@ -226,7 +226,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
return;
}
this->actor.home.rot.z = this->actor.world.rot.z = this->actor.shape.rot.z = 0;
Skin_Init(play, &this->skin, (void*)&gHorseNormalSkel, &gHorseNormalIdleAnim);
Skin_Init(play, &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) ||
@ -240,7 +240,7 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
return;
} else {
Skin_Init(play, &this->skin, (void*)&gHorseNormalSkel, &gHorseNormalIdleAnim);
Skin_Init(play, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
func_80A6C6B0(this);
return;
@ -248,15 +248,15 @@ void EnHorseNormal_Init(Actor* thisx, PlayState* play) {
} else if (play->sceneId == SCENE_GERUDOS_FORTRESS) {
if (this->actor.world.pos.x == 3707.0f && this->actor.world.pos.y == 1413.0f &&
this->actor.world.pos.z == -665.0f) {
Skin_Init(play, &this->skin, (void*)&gHorseNormalSkel, &gHorseNormalIdleAnim);
Skin_Init(play, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
func_80A6C4CC(this);
return;
}
Skin_Init(play, &this->skin, (void*)&gHorseNormalSkel, &gHorseNormalIdleAnim);
Skin_Init(play, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
} else {
Skin_Init(play, &this->skin, (void*)&gHorseNormalSkel, &gHorseNormalIdleAnim);
Skin_Init(play, &this->skin, &gHorseNormalSkel, &gHorseNormalIdleAnim);
Animation_PlayOnce(&this->skin.skelAnime, sAnimations[this->animationIdx]);
}
if (PARAMS_GET_NOSHIFT(this->actor.params, 4, 4) == 0x10 && PARAMS_GET_U(this->actor.params, 0, 4) != 0xF) {

View file

@ -158,7 +158,7 @@ void EnHorseZelda_Init(Actor* thisx, PlayState* play) {
this->actor.focus.pos = this->actor.world.pos;
this->action = 0;
this->actor.focus.pos.y += 70.0f;
Skin_Init(play, &this->skin, (void*)&gHorseZeldaSkel, &gHorseZeldaGallopingAnim);
Skin_Init(play, &this->skin, &gHorseZeldaSkel, &gHorseZeldaGallopingAnim);
this->animationIndex = 0;
Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[0]);
Collider_InitCylinder(play, &this->colliderCylinder);

View file

@ -102,7 +102,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
this->currentShield = PLAYER_SHIELD_HYLIAN;
this->heldItemAction = this->heldItemId = PLAYER_IA_SWORD_MASTER;
Player_SetModelGroup(this, PLAYER_MODELGROUP_SWORD_AND_SHIELD);
play->playerInit(this, play, (void*)&gDarkLinkSkel); //! FIXME
play->playerInit(this, play, &gDarkLinkSkel);
this->actor.naviEnemyId = NAVI_ENEMY_DARK_LINK;
this->cylinder.base.acFlags = AC_ON | AC_TYPE_PLAYER;
this->meleeWeaponQuads[0].base.atFlags = this->meleeWeaponQuads[1].base.atFlags = AT_ON | AT_TYPE_ENEMY;

View file

@ -80,7 +80,7 @@ void EnfHG_Init(Actor* thisx, PlayState* play2) {
this->actor.speed = 0.0f;
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 70.0f;
Skin_Init(play, &this->skin, (void*)&gPhantomHorseSkel, &gPhantomHorseRunningAnim);
Skin_Init(play, &this->skin, &gPhantomHorseSkel, &gPhantomHorseRunningAnim);
if (this->actor.params >= GND_FAKE_BOSS) {
EnfHG_SetupApproach(this, play, this->actor.params - GND_FAKE_BOSS);