1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-06-07 17:11:50 +00:00
This commit is contained in:
Dragorn421 2025-06-08 00:27:46 +09:00 committed by GitHub
commit 2e9a691890
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
119 changed files with 287 additions and 137 deletions

View file

@ -184,9 +184,9 @@ typedef struct SkelAnime {
// Init
BAD_RETURN(s32) SkelAnime_Init(struct PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 tableLength);
BAD_RETURN(s32) SkelAnime_InitFlex(struct PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount);
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 tableLength);
BAD_RETURN(s32) SkelAnime_InitSkin(struct PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation);

View file

@ -1440,7 +1440,7 @@ s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) {
* Initializes a normal skeleton to a looping animation, dynamically allocating the frame tables if not provided.
*/
BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 tableLength) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->limbCount + 1;
@ -1451,7 +1451,7 @@ BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHe
skelAnime->morphTable =
ZELDA_ARENA_MALLOC(skelAnime->limbCount * sizeof(*skelAnime->morphTable), "../z_skelanime.c", 2969);
} else {
ASSERT(limbCount == skelAnime->limbCount, "joint_buff_num == this->joint_num", "../z_skelanime.c", 2973);
ASSERT(tableLength == skelAnime->limbCount, "joint_buff_num == this->joint_num", "../z_skelanime.c", 2973);
skelAnime->jointTable = jointTable;
skelAnime->morphTable = morphTable;
}
@ -1470,7 +1470,7 @@ BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHe
* Initializes a flex skeleton to a looping animation, dynamically allocating the frame tables if not given.
*/
BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 tableLength) {
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->sh.limbCount + 1;
@ -1484,7 +1484,7 @@ BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSk
skelAnime->morphTable =
ZELDA_ARENA_MALLOC(skelAnime->limbCount * sizeof(*skelAnime->morphTable), "../z_skelanime.c", 3048);
} else {
ASSERT(limbCount == skelAnime->limbCount, "joint_buff_num == this->joint_num", "../z_skelanime.c", 3052);
ASSERT(tableLength == skelAnime->limbCount, "joint_buff_num == this->joint_num", "../z_skelanime.c", 3052);
skelAnime->jointTable = jointTable;
skelAnime->morphTable = morphTable;
}

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "one_point_cutscene.h"
@ -107,7 +108,7 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 大妖精の泉 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Great Fairy Fountain ☆☆☆☆☆ %d\n") VT_RST,
play->spawn);
SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairySittingTransitionAnim,
this->jointTable, this->morphTable, 28);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
#if OOT_VERSION < NTSC_1_1
if (!gSaveContext.save.info.playerData.isMagicAcquired && (this->fountainType != FAIRY_UPGRADE_MAGIC)) {
Actor_Kill(&this->actor);
@ -118,7 +119,7 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 石妖精の泉 ☆☆☆☆☆ %d\n", "☆☆☆☆☆ Stone Fairy Fountain ☆☆☆☆☆ %d\n") VT_RST,
play->spawn);
SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairyLayingDownTransitionAnim,
this->jointTable, this->morphTable, 28);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
#if OOT_VERSION < NTSC_1_1
if (!gSaveContext.save.info.playerData.isMagicAcquired) {
Actor_Kill(&this->actor);

View file

@ -9,6 +9,7 @@
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -303,7 +304,7 @@ void BossSst_Init(Actor* thisx, PlayState* play2) {
sFloor = (BgSstFloor*)Actor_Spawn(&play->actorCtx, play, ACTOR_BG_SST_FLOOR, sRoomCenter.x, sRoomCenter.y,
sRoomCenter.z, 0, 0, 0, BONGOFLOOR_REST);
SkelAnime_InitFlex(play, &this->skelAnime, &gBongoHeadSkel, &gBongoHeadEyeOpenIdleAnim, this->jointTable,
this->morphTable, 45);
this->morphTable, ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 70000.0f, ActorShadow_DrawCircle, 95.0f);
Collider_SetJntSph(play, &this->colliderJntSph, &this->actor, &sJntSphInitHead, this->colliderJntSphElements);
Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInitHead);

View file

@ -193,7 +193,8 @@ void DemoIk_Type1Init(DemoIk* this, PlayState* play) {
}
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, phi_f0);
//! @bug Flex skeleton is used as normal skeleton
SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)skeleton, NULL, this->jointTable, this->morphTable, 2);
SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)skeleton, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
}
@ -329,7 +330,8 @@ void DemoIk_Type2Init(DemoIk* this, PlayState* play) {
animation = &object_ik_Anim_0008DC;
}
SkelAnime_InitFlex(play, &this->skelAnime, skeleton, NULL, this->jointTable, this->morphTable, 2);
SkelAnime_InitFlex(play, &this->skelAnime, skeleton, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
this->actionMode = 3;
this->drawMode = 0;

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
#include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -1140,7 +1141,8 @@ void DemoIm_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
DemoIm_InitCollider(thisx, play);
SkelAnime_InitFlex(play, &this->skelAnime, &gImpaSkel, NULL, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(play, &this->skelAnime, &gImpaSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
thisx->flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
switch (this->actor.params) {

View file

@ -6,6 +6,7 @@
#include "z_door_killer.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -138,7 +139,7 @@ void DoorKiller_Init(Actor* thisx, PlayState* play2) {
// `jointTable` is used for both the `jointTable` and `morphTable` args here. Because this actor doesn't
// play any animations it does not cause problems, but it would need to be changed otherwise.
SkelAnime_InitFlex(play, &this->skelAnime, &object_door_killer_Skel_001BC8, NULL, this->jointTable,
this->jointTable, 9);
this->jointTable, ARRAY_COUNT(this->jointTable));
this->actionFunc = DoorKiller_WaitForObject;
DoorKiller_WaitForObject(this, play);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -226,7 +227,8 @@ void EnAm_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 48.0f);
SkelAnime_Init(play, &this->skelAnime, &gArmosSkel, &gArmosRicochetAnim, this->jointTable, this->morphTable, 14);
SkelAnime_Init(play, &this->skelAnime, &gArmosSkel, &gArmosRicochetAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Actor_SetScale(&this->dyna.actor, 0.01f);
DynaPolyActor_Init(&this->dyna, 0);
Collider_InitCylinder(play, &this->hurtCollider);

View file

@ -6,6 +6,7 @@
#include "z_en_ani.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -86,7 +87,7 @@ void EnAni_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gRoofManSkel, &gRoofManIdleAnim, this->jointTable, this->morphTable,
0x10);
ARRAY_COUNT(this->jointTable));
Animation_PlayOnce(&this->skelAnime, &gRoofManIdleAnim);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -145,7 +145,7 @@ void EnAnubice_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
SkelAnime_Init(play, &this->skelAnime, &gAnubiceSkel, &gAnubiceIdleAnim, this->jointTable, this->morphTable,
ANUBICE_LIMB_MAX);
ARRAY_COUNT(this->jointTable));
PRINTF("\n\n");
PRINTF(VT_FGCOL(YELLOW) T("☆☆☆☆☆ アヌビス発生 ☆☆☆☆☆ \n", "☆☆☆☆☆ Anubis spawn ☆☆☆☆☆ \n") VT_RST);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -56,7 +57,8 @@ void EnAttackNiw_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
if (this->actor.params < 0) {
this->actor.params = 0;
}

View file

@ -7,6 +7,7 @@
#include "z_en_bb.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -331,7 +332,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(thisx, sInitChain);
SkelAnime_Init(play, &this->skelAnime, &object_Bb_Skel_001A30, &object_Bb_Anim_000444, this->jointTable,
this->morphTable, 16);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->unk_254 = 0;
thisx->colChkInfo.health = 4;
Collider_InitJntSph(play, &this->collider);

View file

@ -180,7 +180,7 @@ void EnBigokuta_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &object_bigokuta_Skel_006BC0, &object_bigokuta_Anim_0014B8,
this->jointTable, this->morphTable, 20);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);

View file

@ -7,6 +7,7 @@
#include "z_en_bili.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -134,7 +135,7 @@ void EnBili_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 17.0f);
this->actor.shape.shadowAlpha = 155;
SkelAnime_Init(play, &this->skelAnime, &gBiriSkel, &gBiriDefaultAnim, this->jointTable, this->morphTable,
EN_BILI_LIMB_MAX);
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);

View file

@ -1,6 +1,7 @@
#include "z_en_bom_bowl_man.h"
#include "overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "one_point_cutscene.h"
@ -73,7 +74,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gChuGirlSkel, &gChuGirlNoddingOffAnim, this->jointTable,
this->morphTable, 11);
this->morphTable, ARRAY_COUNT(this->jointTable));
PRINTF(VT_FGCOL(GREEN) T("☆ もー 肩こっちゃうよねぇ〜 \t\t\n", "☆ Man, my shoulders hurt~ \t\t\n") VT_RST);
PRINTF(VT_FGCOL(GREEN) T("☆ もっとラクしてもうかるバイトないかしら? ☆ %d\n",
"☆ Isn't there some sort of job that will pay better and be more relaxing? ☆ %d\n") VT_RST,

View file

@ -2,6 +2,7 @@
#include "overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -192,7 +193,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
//! @bug Flex skeleton is used as normal skeleton
SkelAnime_Init(play, &this->skelanime, (SkeletonHeader*)&gTreasureChestSkel, anim, this->jointTable,
this->morphTable, 5);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
switch (this->type) {

View file

@ -7,6 +7,7 @@
#include "z_en_brob.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
@ -70,7 +71,8 @@ void EnBrob_Init(Actor* thisx, PlayState* play) {
EnBrob* this = (EnBrob*)thisx;
CollisionHeader* colHeader = NULL;
SkelAnime_InitFlex(play, &this->skelAnime, &gBrobSkel, &gBrobMoveUpAnim, this->jointTable, this->morphTable, 10);
SkelAnime_InitFlex(play, &this->skelAnime, &gBrobSkel, &gBrobMoveUpAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gBrobCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -172,7 +173,8 @@ void EnButte_Init(Actor* thisx, PlayState* play) {
this->actor.cullingVolumeScale = 200.0f;
}
SkelAnime_Init(play, &this->skelAnime, &gButterflySkel, &gButterflyAnim, this->jointTable, this->morphTable, 8);
SkelAnime_Init(play, &this->skelAnime, &gButterflySkel, &gButterflyAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);
this->actor.colChkInfo.mass = 0;

View file

@ -8,6 +8,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -151,7 +152,7 @@ void EnBw_Init(Actor* thisx, PlayState* play) {
this->actor.naviEnemyId = NAVI_ENEMY_TORCH_SLUG;
this->actor.gravity = -2.0f;
SkelAnime_Init(play, &this->skelAnime, &gTorchSlugSkel, &gTorchSlugEyestalkWaveAnim, this->jointTable,
this->morphTable, TORCH_SLUG_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
this->actor.colChkInfo.damageTable = &sDamageTable;
this->actor.colChkInfo.health = 6;

View file

@ -6,6 +6,7 @@
#include "z_en_cow.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "rand.h"
@ -128,7 +129,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
switch (COW_GET_TYPE(this)) {
case COW_TYPE_BODY:
SkelAnime_InitFlex(play, &this->skelAnime, &gCowBodySkel, NULL, this->jointTable, this->morphTable,
COW_LIMB_MAX);
ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &gCowBodyChewAnim);
Collider_InitCylinder(play, &this->colliders[COW_COLLIDER_FRONT]);
@ -164,7 +165,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
case COW_TYPE_TAIL:
SkelAnime_InitFlex(play, &this->skelAnime, &gCowTailSkel, NULL, this->jointTable, this->morphTable,
COW_TAIL_LIMB_MAX);
ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &gCowTailIdleAnim);
this->actor.update = EnCow_UpdateTail;
this->actor.draw = EnCow_DrawTail;

View file

@ -1,5 +1,6 @@
#include "z_en_crow.h"
#include "array_count.h"
#include "gfx_setupdl.h"
#include "ichain.h"
#include "rand.h"
@ -122,7 +123,8 @@ void EnCrow_Init(Actor* thisx, PlayState* play) {
EnCrow* this = (EnCrow*)thisx;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, 9);
SkelAnime_InitFlex(play, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->collider.elements[0].dim.worldSphere.radius = sJntSphInit.elements[0].dim.modelSphere.radius;

View file

@ -2,6 +2,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "segmented_address.h"
@ -145,7 +146,8 @@ void EnCs_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGraveyardKidSkel, NULL, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gGraveyardKidSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -3,6 +3,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "segmented_address.h"
@ -191,7 +192,8 @@ void EnDaiku_Init(Actor* thisx, PlayState* play) {
this->actor.shape.rot.z = 0;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_daiku_Skel_007958, NULL, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(play, &this->skelAnime, &object_daiku_Skel_007958, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
if (!noKill) {
Actor_Kill(&this->actor);

View file

@ -8,6 +8,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -178,7 +179,8 @@ void EnDaikuKakariko_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_daiku_Skel_007958, NULL, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(play, &this->skelAnime, &object_daiku_Skel_007958, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -241,7 +241,7 @@ void EnDekubaba_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 22.0f);
SkelAnime_Init(play, &this->skelAnime, &gDekuBabaSkel, &gDekuBabaFastChompAnim, this->jointTable, this->morphTable,
8);
ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);

View file

@ -7,6 +7,7 @@
#include "z_en_dekunuts.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "array_count.h"
#include "ichain.h"
#include "sfx.h"
#include "sys_matrix.h"
@ -124,7 +125,7 @@ void EnDekunuts_Init(Actor* thisx, PlayState* play) {
} else {
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
SkelAnime_Init(play, &this->skelAnime, &gDekuNutsSkel, &gDekuNutsStandAnim, this->jointTable, this->morphTable,
25);
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);

View file

@ -7,6 +7,7 @@
#include "z_en_dh.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -169,7 +170,7 @@ void EnDh_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
this->actor.colChkInfo.damageTable = &D_809EC620;
SkelAnime_InitFlex(play, &this->skelAnime, &object_dh_Skel_007E88, &object_dh_Anim_005880, this->jointTable,
this->limbRotTable, 16);
this->limbRotTable, ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 64.0f);
this->actor.params = ENDH_WAIT_UNDERGROUND;
this->actor.colChkInfo.mass = MASS_HEAVY;

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Dh/z_en_dh.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -171,7 +172,7 @@ void EnDha_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
this->actor.colChkInfo.damageTable = &sDamageTable;
SkelAnime_InitFlex(play, &this->skelAnime, &object_dh_Skel_000BD8, &object_dh_Anim_0015B0, this->jointTable,
this->morphTable, 4);
this->morphTable, ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawFeet, 90.0f);
this->actor.focus.pos = this->actor.world.pos;
this->actor.focus.pos.y += 50.0f;

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -98,7 +99,8 @@ void EnDivingGame_Init(Actor* thisx, PlayState* play) {
this->actor.gravity = -3.0f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable, 20);
SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, &gZoraIdleAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
PRINTF(VT_FGCOL(GREEN) T("☆☆☆☆☆ 素もぐりGO ☆☆☆☆☆ \n", "☆☆☆☆☆ Diving GO ☆☆☆☆☆ \n") VT_RST);

View file

@ -6,6 +6,7 @@
#include "z_en_dns.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -162,7 +163,7 @@ void EnDns_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gBusinessScrubSkel, &gBusinessScrubNervousTransitionAnim,
this->jointTable, this->morphTable, BUSINESS_SCRUB_LIMB_MAX);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinderType1(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -9,6 +9,7 @@
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "libc64/math64.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "one_point_cutscene.h"
@ -95,7 +96,8 @@ void EnDntJiji_Init(Actor* thisx, PlayState* play) {
EnDntJiji* this = (EnDntJiji*)thisx;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
SkelAnime_Init(play, &this->skelAnime, &gDntJijiSkel, &gDntJijiBurrowAnim, this->jointTable, this->morphTable, 13);
SkelAnime_Init(play, &this->skelAnime, &gDntJijiSkel, &gDntJijiBurrowAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->stage = (EnDntDemo*)this->actor.parent;

View file

@ -11,6 +11,7 @@
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "libc64/math64.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "one_point_cutscene.h"
@ -203,7 +204,7 @@ void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) {
this->actor.draw = EnDntNomal_DrawTargetScrub;
} else {
SkelAnime_Init(play, &this->skelAnime, &gDntStageSkel, &gDntStageHideAnim, this->jointTable,
this->morphTable, 11);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.draw = EnDntNomal_DrawStageScrub;
}
this->actionFunc = EnDntNomal_SetFlower;

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
@ -82,7 +83,7 @@ void EnDodojr_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 18.0f);
SkelAnime_Init(play, &this->skelAnime, &object_dodojr_Skel_0020E0, &object_dodojr_Anim_0009D4, this->jointTable,
this->morphTable, 15);
this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(4), &sColChkInit);

View file

@ -3,6 +3,7 @@
#include "overlays/actors/ovl_En_Bombf/z_en_bombf.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -331,7 +332,8 @@ void EnDodongo_Init(Actor* thisx, PlayState* play) {
this->bodyScale.x = this->bodyScale.y = this->bodyScale.z = 1.0f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 48.0f);
Actor_SetScale(&this->actor, 0.01875f);
SkelAnime_Init(play, &this->skelAnime, &gDodongoSkel, &gDodongoWaitAnim, this->jointTable, this->morphTable, 31);
SkelAnime_Init(play, &this->skelAnime, &gDodongoSkel, &gDodongoWaitAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
this->actor.colChkInfo.health = 4;
this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.damageTable = &sDamageTable;

View file

@ -6,6 +6,7 @@
#include "z_en_dog.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
@ -253,7 +254,8 @@ void EnDog_Init(Actor* thisx, PlayState* play) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gDogSkel, NULL, this->jointTable, this->morphTable, 13);
SkelAnime_InitFlex(play, &this->skelAnime, &gDogSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDOG_ANIM_0);
if (!PARAMS_GET_NOSHIFT(this->actor.params, 15, 1)) {

View file

@ -131,7 +131,7 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) {
objectInfo = &sDoorInfo[0];
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_Init(play, &this->skelAnime, &gDoorSkel, &gDoorAdultOpeningLeftAnim, this->jointTable, this->morphTable,
5);
ARRAY_COUNT(this->jointTable));
for (i = 0; i < ARRAY_COUNT(sDoorInfo) - 2; i++, objectInfo++) {
if (play->sceneId == objectInfo->sceneId) {
break;

View file

@ -6,6 +6,7 @@
#include "z_en_ds.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
@ -43,7 +44,7 @@ void EnDs_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gPotionShopLadySkel, &gPotionShopLadyAnim, this->jointTable,
this->morphTable, 6);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayOnce(&this->skelAnime, &gPotionShopLadyAnim);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;

View file

@ -1,6 +1,7 @@
#include "z_en_eiyer.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -133,7 +134,8 @@ void EnEiyer_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 600.0f, ActorShadow_DrawCircle, 65.0f);
SkelAnime_Init(play, &this->skelanime, &gStingerSkel, &gStingerIdleAnim, this->jointTable, this->morphTable, 19);
SkelAnime_Init(play, &this->skelanime, &gStingerSkel, &gStingerIdleAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);

View file

@ -9,6 +9,7 @@
#include "libc64/qrand.h"
#include "libu64/debug.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -341,7 +342,8 @@ void EnElf_Init(Actor* thisx, PlayState* play) {
s32 i;
Actor_ProcessInitChain(thisx, sInitChain);
SkelAnime_Init(play, &this->skelAnime, &gFairySkel, &gFairyAnim, this->jointTable, this->morphTable, 15);
SkelAnime_Init(play, &this->skelAnime, &gFairySkel, &gFairyAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
ActorShape_Init(&thisx->shape, 0.0f, NULL, 15.0f);
thisx->shape.shadowAlpha = 0xFF;

View file

@ -8,6 +8,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "segmented_address.h"
@ -471,7 +472,8 @@ void EnFd_Fade(EnFd* this, PlayState* play) {
void EnFd_Init(Actor* thisx, PlayState* play) {
EnFd* this = (EnFd*)thisx;
SkelAnime_InitFlex(play, &this->skelAnime, &gFlareDancerSkel, NULL, this->jointTable, this->morphTable, 27);
SkelAnime_InitFlex(play, &this->skelAnime, &gFlareDancerSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 32.0f);
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -157,7 +158,8 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_Init(play, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable, 28);
SkelAnime_Init(play, &this->skelAnime, &gKeeseSkeleton, &gKeeseFlyAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);

View file

@ -7,6 +7,7 @@
#include "z_en_fish.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -145,7 +146,8 @@ void EnFish_Init(Actor* thisx, PlayState* play) {
s16 params = this->actor.params;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gFishSkel, &gFishInWaterAnim, this->jointTable, this->morphTable, 7);
SkelAnime_InitFlex(play, &this->skelAnime, &gFishSkel, &gFishInWaterAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements);
this->actor.colChkInfo.mass = 50;

View file

@ -6,6 +6,7 @@
#include "z_en_floormas.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -141,7 +142,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gWallmasterSkel, &gWallmasterWaitAnim, this->jointTable,
this->morphTable, 25);
this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);

View file

@ -309,10 +309,10 @@ void EnFr_Update(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
// frog
SkelAnime_InitFlex(play, &this->skelAnime, &object_fr_Skel_00B498, &object_fr_Anim_001534, this->jointTable,
this->morphTable, 24);
this->morphTable, ARRAY_COUNT(this->jointTable));
// butterfly
SkelAnime_Init(play, &this->skelAnimeButterfly, &gButterflySkel, &gButterflyAnim, this->jointTableButterfly,
this->morphTableButterfly, 8);
this->morphTableButterfly, ARRAY_COUNT(this->jointTableButterfly));
// When playing the song for the HP, the frog with the next note and the butterfly turns on its lightsource
this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo);
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y,

View file

@ -6,6 +6,7 @@
#include "z_en_fu.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "segmented_address.h"
@ -92,7 +93,7 @@ void EnFu_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelanime, &gWindmillManSkel, &gWindmillManPlayStillAnim, this->jointTable,
this->morphTable, FU_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelanime, &gWindmillManPlayStillAnim);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -9,6 +9,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "segmented_address.h"
@ -202,7 +203,8 @@ s32 EnFw_SpawnDust(EnFw* this, u8 timer, f32 scale, f32 scaleStep, s32 dustCnt,
void EnFw_Init(Actor* thisx, PlayState* play) {
EnFw* this = (EnFw*)thisx;
SkelAnime_InitFlex(play, &this->skelAnime, &gFlareDancerCoreSkel, NULL, this->jointTable, this->morphTable, 11);
SkelAnime_InitFlex(play, &this->skelAnime, &gFlareDancerCoreSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENFW_ANIM_0);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
Collider_InitJntSph(play, &this->collider);

View file

@ -177,7 +177,7 @@ void EnGb_Init(Actor* thisx, PlayState* play) {
CollisionHeader_GetVirtual(&gPoeSellerCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
SkelAnime_InitFlex(play, &this->skelAnime, &gPoeSellerSkel, &gPoeSellerIdleAnim, this->jointTable, this->morphTable,
12);
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinderType1(play, &this->collider, &this->dyna.actor, &sCylinderInit);

View file

@ -7,6 +7,7 @@
#include "z_en_ge1.h"
#include "libu64/debug.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -107,7 +108,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoWhiteSkel, &gGerudoWhiteIdleAnim, this->jointTable,
this->morphTable, GE1_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayOnce(&this->skelAnime, &gGerudoWhiteIdleAnim);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_ge2.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -131,7 +132,8 @@ void EnGe2_Init(Actor* thisx, PlayState* play) {
s16 params = this->actor.params;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoPurpleSkel, NULL, this->jointTable, this->morphTable, 22);
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoPurpleSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &gGerudoPurpleWalkingAnim);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_ge3.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -81,7 +82,7 @@ void EnGe3_Init(Actor* thisx, PlayState* play2) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoRedSkel, NULL, this->jointTable, this->morphTable,
GELDB_LIMB_MAX);
ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &gGerudoRedStandAnim);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -7,6 +7,7 @@
#include "z_en_geldb.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -251,7 +252,7 @@ void EnGeldB_Init(Actor* thisx, PlayState* play) {
this->blinkState = 0;
this->unkFloat = 10.0f;
SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoRedSkel, &gGerudoRedNeutralAnim, this->jointTable,
this->morphTable, GELDB_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinder(play, &this->bodyCollider, thisx, &sBodyCylinderInit);
Collider_InitTris(play, &this->blockCollider);

View file

@ -6,6 +6,7 @@
#include "z_en_gm.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -117,7 +118,8 @@ s32 func_80A3D7C8(void) {
void func_80A3D838(EnGm* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->gmObjectSlot)) {
this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->gmObjectSlot].segment);
Animation_Change(&this->skelAnime, &object_gm_Anim_0002B8, 1.0f, 0.0f,
Animation_GetLastFrame(&object_gm_Anim_0002B8), ANIMMODE_LOOP, 0.0f);

View file

@ -1538,7 +1538,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 28.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);

View file

@ -10,6 +10,7 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -160,7 +161,7 @@ void EnGoma_Init(Actor* thisx, PlayState* play) {
} else { // Egg
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
SkelAnime_Init(play, &this->skelanime, &gObjectGolSkel, &gObjectGolStandAnim, this->jointTable,
this->morphTable, GOMA_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelanime, &gObjectGolStandAnim);
this->actor.colChkInfo.health = 2;

View file

@ -6,6 +6,7 @@
#include "z_en_guest.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -93,7 +94,8 @@ void EnGuest_Update(Actor* thisx, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_UPDATE_CULLING_DISABLED;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gHylianMan2Skel, NULL, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gHylianMan2Skel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
Animation_Change(&this->skelAnime, &gObjOsAnim_42AC, 1.0f, 0.0f, Animation_GetLastFrame(&gObjOsAnim_42AC),
ANIMMODE_LOOP, 0.0f);

View file

@ -89,7 +89,8 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play2) {
s32 i;
Actor_SetScale(&this->actor, 0.01f);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable, 17);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
this->type = PARAMS_GET_U(this->actor.params, 8, 8);
this->path = PARAMS_GET_U(this->actor.params, 0, 8);

View file

@ -9,6 +9,7 @@
#include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -133,7 +134,7 @@ void EnHeishi2_Init(Actor* thisx, PlayState* play) {
this->unk_2E0 = 60.0f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable,
17);
ARRAY_COUNT(this->jointTable));
collider = &this->collider;
Collider_InitCylinder(play, collider);
Collider_SetCylinder(play, collider, &this->actor, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_heishi3.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -83,7 +84,8 @@ void EnHeishi3_Init(Actor* thisx, PlayState* play) {
}
Actor_SetScale(&this->actor, 0.01f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable, 17);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
Collider_InitCylinder(play, &this->collider);

View file

@ -1,5 +1,6 @@
#include "z_en_heishi4.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -77,12 +78,12 @@ void EnHeishi4_Init(Actor* thisx, PlayState* play) {
this->height = 30.0f;
ActorShape_Init(&thisx->shape, 0.0f, NULL, 30.0f);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiDyingGuardAnim_00C444, this->jointTable,
this->morphTable, 17);
this->morphTable, ARRAY_COUNT(this->jointTable));
} else {
this->height = 60.0f;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(play, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable,
17);
ARRAY_COUNT(this->jointTable));
}
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_hintnuts.h"
#include "array_count.h"
#include "ichain.h"
#include "sfx.h"
#include "sys_matrix.h"
@ -87,7 +88,7 @@ void EnHintnuts_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0x0, ActorShadow_DrawCircle, 35.0f);
//! @bug Flex skeleton is used as normal skeleton
SkelAnime_Init(play, &this->skelAnime, (SkeletonHeader*)&gHintNutsSkel, &gHintNutsStandAnim, this->jointTable,
this->morphTable, 10);
this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);

View file

@ -6,6 +6,7 @@
#include "z_en_hs.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -72,7 +73,7 @@ void EnHs_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_hs_Skel_006260, &object_hs_Anim_0005C0, this->jointTable,
this->morphTable, 16);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &object_hs_Anim_0005C0);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_hs2.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -64,7 +65,7 @@ void EnHs2_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_hs_Skel_006260, &object_hs_Anim_0005C0, this->jointTable,
this->morphTable, 16);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &object_hs_Anim_0005C0);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_hy.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -1165,7 +1166,7 @@ void EnHy_WaitForObjects(EnHy* this, PlayState* play) {
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime,
sSkeletonInfo[sModelInfo[ENHY_GET_TYPE(&this->actor)].lowerSkelInfoIndex].skeleton, NULL,
this->jointTable, this->morphTable, ENHY_LIMB_MAX);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->objectSlotOsAnime].segment);
Collider_InitCylinder(play, &this->collider);

View file

@ -1218,7 +1218,7 @@ void EnIk_SetupCsAction3(EnIk* this, PlayState* play) {
f32 endFrame = Animation_GetLastFrame(&gIronKnuckleNabooruDeathAnim);
SkelAnime_InitFlex(play, &this->skelAnime, &gIronKnuckleDefeatSkel, NULL, this->jointTable, this->morphTable,
IRON_KNUCKLE_LIMB_MAX);
ARRAY_COUNT(this->jointTable));
Animation_Change(&this->skelAnime, &gIronKnuckleNabooruDeathAnim, 1.0f, 0.0f, endFrame, ANIMMODE_ONCE, 0.0f);
this->csAction = IK_CS_ACTION_3;
this->csDrawMode = IK_CS_DRAW_DEFEAT;
@ -1568,7 +1568,7 @@ void EnIk_Init(Actor* thisx, PlayState* play) {
} else {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gIronKnuckleSkel, &gIronKnuckleNabooruSummonAxeAnim,
this->jointTable, this->morphTable, IRON_KNUCKLE_LIMB_MAX);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
EnIk_InitImpl(&this->actor, play);
EnIk_CsInit(this, play);
}

View file

@ -540,7 +540,8 @@ void EnIn_WaitForObject(EnIn* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->requiredObjectSlot) || this->actor.params <= 0) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gIngoSkel, NULL, this->jointTable, this->morphTable, 20);
SkelAnime_InitFlex(play, &this->skelAnime, &gIngoSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -205,7 +206,8 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) {
type = PARAMS_GET_U(this->actor.params, 0, 2);
SkelAnime_Init(play, &this->skelAnime, &gBugSkel, &gBugCrawlAnim, this->jointTable, this->morphTable, 24);
SkelAnime_Init(play, &this->skelAnime, &gBugSkel, &gBugCrawlAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitJntSph(play, &this->collider);
Collider_SetJntSph(play, &this->collider, &this->actor, &sColliderJntSphInit, this->colliderElements);

View file

@ -7,6 +7,7 @@
#include "z_en_jj.h"
#include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -100,7 +101,7 @@ void EnJj_Init(Actor* thisx, PlayState* play2) {
switch (this->dyna.actor.params) {
case JABUJABU_MAIN:
SkelAnime_InitFlex(play, &this->skelAnime, &gJabuJabuSkel, &gJabuJabuAnim, this->jointTable,
this->morphTable, 22);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &gJabuJabuAnim);
this->unk_30A = 0;
this->eyeIndex = 0;

View file

@ -6,6 +6,7 @@
#include "z_en_js.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "regs.h"
@ -67,7 +68,7 @@ void EnJs_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, NULL, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gCarpetMerchantSkel, &gCarpetMerchantSlappingKneeAnim, this->jointTable,
this->morphTable, 13);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayOnce(&this->skelAnime, &gCarpetMerchantSlappingKneeAnim);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -7,6 +7,7 @@
#include "z_en_karebaba.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -107,7 +108,7 @@ void EnKarebaba_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 22.0f);
SkelAnime_Init(play, &this->skelAnime, &gDekuBabaSkel, &gDekuBabaFastChompAnim, this->jointTable, this->morphTable,
8);
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->bodyCollider);
Collider_SetCylinder(play, &this->bodyCollider, &this->actor, &sBodyColliderInit);
Collider_UpdateCylinder(&this->actor, &this->bodyCollider);

View file

@ -6,6 +6,7 @@
#include "z_en_ko.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "printf.h"
@ -1189,7 +1190,7 @@ void func_80A99048(EnKo* this, PlayState* play) {
this->actor.objectSlot = this->legsObjectSlot;
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->actor.objectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, sSkeleton[sModelInfo[ENKO_TYPE].legsId].flexSkeletonHeader, NULL,
this->jointTable, this->morphTable, 16);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
Collider_InitCylinder(play, &this->collider);

View file

@ -7,6 +7,7 @@
#include "z_en_kz.h"
#include "libc64/math64.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -393,7 +394,8 @@ void EnKz_Init(Actor* thisx, PlayState* play) {
EnKz* this = (EnKz*)thisx;
s32 pad;
SkelAnime_InitFlex(play, &this->skelanime, &gKzSkel, NULL, this->jointTable, this->morphTable, 12);
SkelAnime_InitFlex(play, &this->skelanime, &gKzSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 0.0, NULL, 0.0);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -7,6 +7,7 @@
#include "z_en_mb.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -293,7 +294,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
switch (this->actor.params) {
case ENMB_TYPE_SPEAR_GUARD:
SkelAnime_InitFlex(play, &this->skelAnime, &gEnMbSpearSkel, &gEnMbSpearStandStillAnim, this->jointTable,
this->morphTable, 28);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.colChkInfo.health = 2;
this->actor.colChkInfo.mass = MASS_HEAVY;
this->maxHomeDist = 1000.0f;
@ -302,7 +303,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
break;
case ENMB_TYPE_CLUB:
SkelAnime_InitFlex(play, &this->skelAnime, &gEnMbClubSkel, &gEnMbClubStandStillClubDownAnim,
this->jointTable, this->morphTable, 28);
this->jointTable, this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.colChkInfo.health = 6;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
@ -331,7 +332,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
break;
default: /* Spear Patrol */
SkelAnime_InitFlex(play, &this->skelAnime, &gEnMbSpearSkel, &gEnMbSpearStandStillAnim, this->jointTable,
this->morphTable, 28);
this->morphTable, ARRAY_COUNT(this->jointTable));
Actor_SetScale(&this->actor, 0.014f);
this->path = PARAMS_GET_S(thisx->params, 8, 8);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "libc64/math64.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "segmented_address.h"
@ -687,7 +688,8 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gMidoSkel, NULL, this->jointTable, this->morphTable, ENMD_LIMB_MAX);
SkelAnime_InitFlex(play, &this->skelAnime, &gMidoSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -6,6 +6,7 @@
#include "z_en_mk.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
@ -67,7 +68,7 @@ void EnMk_Init(Actor* thisx, PlayState* play) {
this->actor.gravity = -1.0f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_mk_Skel_005DF0, &object_mk_Anim_000D88, this->jointTable,
this->morphTable, 13);
this->morphTable, ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, &object_mk_Anim_000D88);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -7,6 +7,7 @@
#include "z_en_mm.h"
#include "libc64/math64.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -176,7 +177,8 @@ void EnMm_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 21.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gRunningManSkel, NULL, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gRunningManSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -7,6 +7,7 @@
#include "z_en_mm2.h"
#include "libu64/debug.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -140,7 +141,8 @@ void EnMm2_Init(Actor* thisx, PlayState* play2) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 21.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gRunningManSkel, NULL, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gRunningManSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_Change(&this->skelAnime, sAnimationInfo[RM2_ANIM_SIT_WAIT].animation, 1.0f, 0.0f,
Animation_GetLastFrame(sAnimationInfo[RM2_ANIM_SIT_WAIT].animation),
sAnimationInfo[RM2_ANIM_SIT_WAIT].mode, sAnimationInfo[RM2_ANIM_SIT_WAIT].morphFrames);

View file

@ -6,6 +6,7 @@
#include "z_en_ms.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -87,7 +88,7 @@ void EnMs_Init(Actor* thisx, PlayState* play) {
}
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_InitFlex(play, &this->skelAnime, &gBeanSalesmanSkel, &gBeanSalesmanEatingAnim, this->jointTable,
this->morphTable, 9);
this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinderType1(play, &this->collider, &this->actor, &sCylinderInit);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);

View file

@ -1476,7 +1476,8 @@ void EnNb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
EnNb_SetupCollider(thisx, play);
SkelAnime_InitFlex(play, &this->skelAnime, &gNabooruSkel, NULL, this->jointTable, this->morphTable, NB_LIMB_MAX);
SkelAnime_InitFlex(play, &this->skelAnime, &gNabooruSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
switch (EnNb_GetType(this)) {
case NB_TYPE_DEMO02:

View file

@ -177,7 +177,8 @@ void EnNiw_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
if (play->sceneId == SCENE_KAKARIKO_VILLAGE) {
for (i = 0; i < ARRAY_COUNT(sKakarikoPosList); i++) {

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
#include "libc64/math64.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -73,7 +74,8 @@ void EnNiwGirl_Init(Actor* thisx, PlayState* play) {
Vec3f vec2;
s32 pad2;
SkelAnime_InitFlex(play, &this->skelAnime, &gNiwGirlSkel, &gNiwGirlRunAnim, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(play, &this->skelAnime, &gNiwGirlSkel, &gNiwGirlRunAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->actor.attentionRangeType = ATTENTION_RANGE_6;

View file

@ -1,6 +1,7 @@
#include "z_en_niw_lady.h"
#include "overlays/actors/ovl_En_Niw/z_en_niw.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -174,7 +175,8 @@ void func_80AB9F24(EnNiwLady* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->aneObjectSlot) &&
Object_IsLoaded(&play->objectCtx, this->osAnimeObjectSlot)) {
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->aneObjectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoLadySkel, NULL, this->jointTable, this->morphTable, 16);
SkelAnime_InitFlex(play, &this->skelAnime, &gCuccoLadySkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->osAnimeObjectSlot].segment);
this->unk_27E = 1;
this->actor.gravity = -3.0f;

View file

@ -1,6 +1,7 @@
#include "z_en_okuta.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -139,7 +140,7 @@ void EnOkuta_Init(Actor* thisx, PlayState* play) {
thisx->params &= 0xFF;
if (thisx->params == 0) {
SkelAnime_Init(play, &this->skelAnime, &gOctorokSkel, &gOctorokAppearAnim, this->jointTable, this->morphTable,
38);
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, thisx, &sOctorockColliderInit);
CollisionCheck_SetInfo(&thisx->colChkInfo, &sDamageTable, &sColChkInfoInit);

View file

@ -7,6 +7,7 @@
#include "z_en_owl.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -133,9 +134,10 @@ void EnOwl_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 36.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gOwlFlyingSkel, &gOwlFlyAnim, this->jointTable, this->morphTable, 21);
SkelAnime_InitFlex(play, &this->skelAnime, &gOwlFlyingSkel, &gOwlFlyAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
SkelAnime_InitFlex(play, &this->skelAnime2, &gOwlPerchingSkel, &gOwlPerchAnim, this->jointTable2, this->morphTable2,
16);
ARRAY_COUNT(this->jointTable2));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sOwlCylinderInit);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;

View file

@ -3,6 +3,7 @@
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -210,7 +211,8 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
Actor_SetScale(&this->actor, 36.0f * 0.001f);
SkelAnime_Init(play, &this->skelAnime, &gPeehatSkel, &gPeehatRisingAnim, this->jointTable, this->morphTable, 24);
SkelAnime_Init(play, &this->skelAnime, &gPeehatSkel, &gPeehatRisingAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
ActorShape_Init(&this->actor.shape, 100.0f, ActorShadow_DrawCircle, 27.0f);
this->actor.focus.pos = this->actor.world.pos;
this->unk_2D4 = 0;

View file

@ -7,6 +7,7 @@
#include "z_en_po_desert.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -74,7 +75,8 @@ void EnPoDesert_Init(Actor* thisx, PlayState* play) {
EnPoDesert* this = (EnPoDesert*)thisx;
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_Init(play, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable, 10);
SkelAnime_Init(play, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sColliderCylinderInit);
this->lightColor.r = 255;

View file

@ -7,6 +7,7 @@
#include "z_en_po_field.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -182,7 +183,8 @@ void EnPoField_Init(Actor* thisx, PlayState* play) {
return;
}
Actor_ProcessInitChain(&this->actor, sInitChain);
SkelAnime_Init(play, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable, 10);
SkelAnime_Init(play, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &D_80AD7080);
Collider_InitCylinder(play, &this->flameCollider);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Honotrap/z_en_honotrap.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -109,7 +110,8 @@ void EnPoRelay_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 42.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gDampeSkel, &gDampeFloatAnim, this->jointTable, this->morphTable, 18);
SkelAnime_InitFlex(play, &this->skelAnime, &gDampeSkel, &gDampeFloatAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo);

View file

@ -200,7 +200,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->actor, sInitChain);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f);
SkelAnime_Init(play, &this->skelAnime, &gPoeSistersSkel, &gPoeSistersSwayAnim, this->jointTable, this->morphTable,
12);
ARRAY_COUNT(this->jointTable));
this->unk_22E.r = 255;
this->unk_22E.g = 255;
this->unk_22E.b = 210;

View file

@ -7,6 +7,7 @@
#include "z_en_poh.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -927,7 +928,8 @@ void EnPoh_Update(Actor* thisx, PlayState* play) {
this->actor.update = EnPoh_UpdateLiving;
Actor_SetObjectDependency(play, &this->actor);
if (this->infoIdx == EN_POH_INFO_NORMAL) {
SkelAnime_Init(play, &this->skelAnime, &gPoeSkel, &gPoeFloatAnim, this->jointTable, this->morphTable, 21);
SkelAnime_Init(play, &this->skelAnime, &gPoeSkel, &gPoeFloatAnim, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
this->actor.draw = EnPoh_DrawRegular;
} else {
SkelAnime_InitFlex(play, &this->skelAnime, &gPoeComposerSkel, &gPoeComposerFloatAnim, this->jointTable,

View file

@ -7,6 +7,7 @@
#include "z_en_rd.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -185,11 +186,11 @@ void EnRd_Init(Actor* thisx, PlayState* play) {
if (this->actor.params >= REDEAD_TYPE_DOES_NOT_MOURN) {
SkelAnime_InitFlex(play, &this->skelAnime, &gRedeadSkel, &gGibdoRedeadIdleAnim, this->jointTable,
this->morphTable, REDEAD_GIBDO_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.naviEnemyId = NAVI_ENEMY_REDEAD;
} else {
SkelAnime_InitFlex(play, &this->skelAnime, &gGibdoSkel, &gGibdoRedeadIdleAnim, this->jointTable,
this->morphTable, REDEAD_GIBDO_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.naviEnemyId = NAVI_ENEMY_GIBDO;
}

View file

@ -9,6 +9,7 @@
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -136,7 +137,7 @@ void EnReeba_Init(Actor* thisx, PlayState* play) {
this->actor.gravity = -3.5f;
this->actor.focus.pos = this->actor.world.pos;
SkelAnime_Init(play, &this->skelanime, &object_reeba_Skel_001EE8, &object_reeba_Anim_0001E4, this->jointTable,
this->morphTable, 18);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.health = 4;
Collider_InitCylinder(play, &this->collider);

View file

@ -2307,7 +2307,8 @@ void EnRu1_Init(Actor* thisx, PlayState* play) {
EnRu1* this = (EnRu1*)thisx;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gRutoChildSkel, NULL, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(play, &this->skelAnime, &gRutoChildSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
EnRu1_InitColliders(&this->actor, play);
switch (EnRu1_GetType(this)) {
case ENRU1_TYPE_BOSS_ROOM:

View file

@ -934,7 +934,8 @@ void EnRu2_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
EnRu2_InitCollider(thisx, play);
SkelAnime_InitFlex(play, &this->skelAnime, &gAdultRutoSkel, NULL, this->jointTable, this->morphTable, 23);
SkelAnime_InitFlex(play, &this->skelAnime, &gAdultRutoSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
switch (EnRu2_GetType(this)) {
case 2:

View file

@ -1,6 +1,7 @@
#include "z_en_sa.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "segmented_address.h"
@ -495,7 +496,8 @@ void EnSa_Init(Actor* thisx, PlayState* play) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 12.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gSariaSkel, NULL, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(play, &this->skelAnime, &gSariaSkel, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Dns/z_en_dns.h"
#include "overlays/actors/ovl_En_Nutsball/z_en_nutsball.h"
#include "array_count.h"
#include "gfx.h"
#include "ichain.h"
#include "sfx.h"
@ -80,7 +81,7 @@ void EnShopnuts_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &gBusinessScrubSkel, &gBusinessScrubPeekAnim, this->jointTable,
this->morphTable, BUSINESS_SCRUB_LIMB_MAX);
this->morphTable, ARRAY_COUNT(this->jointTable));
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);

View file

@ -8,6 +8,7 @@
#include "overlays/actors/ovl_En_Encount1/z_en_encount1.h"
#include "libc64/qrand.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -179,7 +180,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.health = 2;
this->actor.shape.yOffset = -8000.0f;
SkelAnime_Init(play, &this->skelAnime, &gStalchildSkel, &gStalchildUncurlingAnim, this->jointTable,
this->morphTable, 20);
this->morphTable, ARRAY_COUNT(this->jointTable));
this->actor.naviEnemyId = NAVI_ENEMY_STALCHILD;
Collider_InitJntSph(play, &this->collider);

View file

@ -1,6 +1,7 @@
#include "z_en_skj.h"
#include "overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "ichain.h"
@ -427,7 +428,7 @@ void EnSkj_Init(Actor* thisx, PlayState* play2) {
EnSkj_SetNaviId(this);
SkelAnime_InitFlex(play, &this->skelAnime, &gSkullKidSkel, &gSkullKidPlayFluteAnim, this->jointTable,
this->morphTable, 19);
this->morphTable, ARRAY_COUNT(this->jointTable));
if ((type >= 0) && (type < 3)) {
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY;

View file

@ -634,7 +634,8 @@ void EnSsh_Init(Actor* thisx, PlayState* play) {
return;
}
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(play, &this->skelAnime, &object_ssh_Skel_0052E0, NULL, this->jointTable, this->morphTable, 30);
SkelAnime_Init(play, &this->skelAnime, &object_ssh_Skel_0052E0, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_Change(&this->skelAnime, &object_ssh_Anim_000304, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, 0.0f);
this->blureIdx = EnSsh_CreateBlureEffect(play);
EnSsh_InitColliders(this, play);

View file

@ -808,7 +808,8 @@ void EnSt_Init(Actor* thisx, PlayState* play) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f);
SkelAnime_Init(play, &this->skelAnime, &object_st_Skel_005298, NULL, this->jointTable, this->morphTable, 30);
SkelAnime_Init(play, &this->skelAnime, &object_st_Skel_005298, NULL, this->jointTable, this->morphTable,
ARRAY_COUNT(this->jointTable));
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENST_ANIM_0);
this->blureIdx = EnSt_CreateBlureEffect(play);
EnSt_InitColliders(this, play);

View file

@ -6,6 +6,7 @@
#include "z_en_sth.h"
#include "array_count.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -160,7 +161,7 @@ void EnSth_SetupAfterObjectLoaded(EnSth* this, PlayState* play) {
EnSth_SetupShapeColliderUpdate2AndDraw(this, play);
gSegments[6] = OS_K0_TO_PHYSICAL(play->objectCtx.slots[this->requiredObjectSlot].segment);
SkelAnime_InitFlex(play, &this->skelAnime, sSkeletons[this->actor.params], NULL, this->jointTable, this->morphTable,
16);
ARRAY_COUNT(this->jointTable));
Animation_PlayLoop(&this->skelAnime, sAnimations[this->actor.params]);
params = &this->actor.params;

Some files were not shown because too many files have changed in this diff Show more