diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml index 360df1ea..ec476ca7 100644 --- a/decompressed.us.v10.yaml +++ b/decompressed.us.v10.yaml @@ -502,7 +502,7 @@ segments: subsegments: - [0xF55960, c, animctrl] #DONE - [0xF56430, c, code_AD0] #DONE - - [0xF56A40, c, code_10E0] #DONE + - [0xF56A40, c, animcache] #DONE - [0xF56EB0, c, code_1550] #DONE - [0xF57290, c, code_1930] #DONE - [0xF57BA0, c, code_2240] #DONE @@ -806,7 +806,7 @@ segments: - [0x1002A70, c, code_AD110] #DONE - [0x1002F10, c, code_AD5B0] #DONE - [0x1003BF0, c, code_AE290] #DONE - - [0x1003F30, c, code_AE5D0] #DONE + - [0x1003F30, c, skeletalanim] #DONE - [0x1004700, c, code_AEDA0] - [0x1006D60, c, modelRender] - [0x1008EE0, c, code_B3580] #DONE @@ -1306,7 +1306,7 @@ segments: - [0x1047840, .rodata, code_A4D00] - [0x1047870, .rodata, code_A5BC0] - [0x1047890, .rodata, code_AD110] - - [0x10478B0, .rodata, code_AE5D0] + - [0x10478B0, .rodata, skeletalanim] - [0x10478C0, .rodata, code_AEDA0] - [0x1047910, .rodata, modelRender] - [0x1047920, .rodata, code_B3A80] @@ -1367,7 +1367,7 @@ segments: - [0x1048460, .rodata, code_DA760] - [0x1048480, .rodata, code_DB010] - [0x1048560, .bss, code_AD0] - - [0x1048560, .bss, code_10E0] + - [0x1048560, .bss, animcache] - [0x1048560, .bss, code_1550] - [0x1048560, .bss, code_1930] - [0x1048560, .bss, ba/anim] diff --git a/include/animation.h b/include/animation.h index 0a40088d..7c0235e7 100644 --- a/include/animation.h +++ b/include/animation.h @@ -2,26 +2,18 @@ #define ANIMATION_H #include "prop.h" -s32 func_80289680(void); +size_t anim_getSize(void); enum asset_e anim_getIndex(Animation *this); f32 anim_getTimer(Animation *this); f32 anim_getDuration(Animation *this); -void func_802896EC(Animation *this, s32 arg1); +void anim_new(Animation *this, bool arg1); void anim_setTimer(Animation *this, f32 arg1); void anim_80289790(Animation* this, void (*arg1)(s32, s32)); void anim_80289798(Animation *this, s32 arg1); void anim_setDuration(Animation *this, f32 arg1); -typedef struct { - f32 unk0[4]; - f32 unk10[3]; - f32 unk1C[3]; -}Struct_B1400; +//represents the transformation on a given model bone -typedef struct struct_B1400_1_s{ - Struct_B1400 *unk0; - s32 unk4; -}Struct_B1400_1; typedef union { @@ -48,11 +40,11 @@ typedef struct animation_file_s{ u8 pad6[2]; } AnimationFile; -typedef struct animation_cache_s{ +typedef struct animation_file_cache_s{ AnimationFile *unk0; u16 unk4_15:15; u16 unk4_0:1; u8 pad6[2]; -}AnimationCache; +}AnimationFileCache; #endif diff --git a/include/core2/animctrl.h b/include/core2/animctrl.h index 3ada9c78..4147a512 100644 --- a/include/core2/animctrl.h +++ b/include/core2/animctrl.h @@ -2,6 +2,7 @@ #define __ANIM_CTRL_H__ #include +#include "generic.h" #ifndef NONMATCHING #define animctrl_start(this, file, line) _animctrl_start(this, file, line) @@ -16,18 +17,24 @@ enum animctrl_playback_e{ ANIMCTRL_SUBRANGE_LOOP = 4 }; +typedef struct{ + Mtx mtx_0; + s32 size_40; + s32 capacity_44; + Mtx data[]; +}AnimMtxList; typedef struct animation_s{ - void (* matrices)(s32, s32); + GenFunction_2 matrices; s32 unk4; u8 unk8; u8 unk9; - s16 unkA[3]; + s16 animcache_index[3]; u32 index; f32 timer; f32 duration; - u8 unk1C; - u8 unk1D; + u8 reset; + u8 triple_buffer; u8 unk1E; u8 unk1F; } Animation; @@ -85,8 +92,8 @@ f32 animctrl_getTransistionDuration(AnimCtrl *this); f32 animctrl_getAnimTimer(AnimCtrl *this); f32 animctrl_getTimer(AnimCtrl *this); void animctrl_setTimer(AnimCtrl *this, f32 arg1); -s32 animctrl_8028780C(AnimCtrl *this, s32 arg1); -s32 func_8028781C(AnimCtrl *this, f32 *arg1, s32 arg2); +s32 animctrl_8028780C(f32 position[3], s32 arg1); +void animctrl_drawSetup(AnimCtrl *this, f32 *arg1, s32 arg2); s32 animctrl_isStopped(AnimCtrl *this); int animctrl_isAt(AnimCtrl *this, f32 arg1); s32 animctrl_isContiguous(AnimCtrl *this); diff --git a/include/core2/bonetransform.h b/include/core2/bonetransform.h new file mode 100644 index 00000000..6e4edf7a --- /dev/null +++ b/include/core2/bonetransform.h @@ -0,0 +1,15 @@ +#ifndef _BONE_TRANSFORMATION_H_ +#define _BONE_TRANSFORMATION_H_ +#include + +typedef struct { + f32 unk0[4]; + f32 scale[3]; + f32 unk1C[3]; +}BoneTransform; + +typedef struct bone_transform_list_s{ + BoneTransform *ptr; + s32 count; +}BoneTransformList; +#endif diff --git a/include/core2/modelRender.h b/include/core2/modelRender.h index d9ef8cb4..8b216dd5 100644 --- a/include/core2/modelRender.h +++ b/include/core2/modelRender.h @@ -17,14 +17,14 @@ BKTextureList *model_getTextureList(BKModelBin *arg0); void modelRender_reset(void); BKModelBin *modelRender_draw(Gfx **gfx, Mtx **mtx, f32 position[3], f32 rotation[3], f32 scale, f32*arg5, BKModelBin* model_bin); -void modelRender_preDraw(GenMethod_1 func, s32 arg); -void modelRender_postDraw(GenMethod_1 func, s32 arg); +void modelRender_preDraw(GenFunction_1 func, s32 arg); +void modelRender_postDraw(GenFunction_1 func, s32 arg); void modelRender_setDisplayList(BKGfxList *gfx_list); void func_8033A308(f32 arg0[3]); void modelRender_setPrimAndEnvColors(s32 env[4], s32 prim[4]); void modelRender_setEnvColor(s32 r, s32 g, s32 b, s32 a); void modelRender_setAlpha(s32 a); -void func_8033A444(struct58s *arg0); +void func_8033A444(AnimMtxList *arg0); void func_8033A450(struct5Bs *arg0); void func_8033A45C(s32 arg0, s32 arg1); void func_8033A470(s32 arg0, s32 arg1); diff --git a/include/core2/skeletalanim.h b/include/core2/skeletalanim.h new file mode 100644 index 00000000..5c39dd63 --- /dev/null +++ b/include/core2/skeletalanim.h @@ -0,0 +1,58 @@ +#ifndef _SKELETAL_ANIMATION_H_ +#define _SKELETAL_ANIMATION_H_ +#include "core2/vla.h" +#include "generic.h" +#include "bonetransform.h" + +enum skeletal_anim_e { + SKELETAL_ANIM_1_LOOP = 1, + SKELETAL_ANIM_2_ONCE, + SKELETAL_ANIM_3_BACKWARDS, + SKELETAL_ANIM_4_STOPPED +}; + +typedef struct { + f32 when; + u8 arg_count; + //u8 pad5[0x3]; + void * callback_fn; + s32 arg; +}SkeletalAnimationCallback; + +typedef struct { + BoneTransformList *bone_transform; + struct animation_file_s *animation_bin; + f32 progress; + f32 duration; + vector(SkeletalAnimationCallback) *callback_list; + u8 unk14; + u8 behavior; + s16 animation_id; + s32 loop_count; + f32 prev_progress; + f32 transition_progress; + BoneTransformList *transition_start; + BoneTransformList *transition_target; + f32 transition_duration; + u8 unk30; + // u8 pad31[3]; +}SkeletalAnimation; + +void skeletalAnim_clearCallbacks(SkeletalAnimation *self); +enum asset_e skeletalAnim_getAnimId(SkeletalAnimation *self); +f32 skeletalAnim_getProgress(SkeletalAnimation *self); +void skeletalAnim_getProgressRange(SkeletalAnimation *self, f32 *prev_progress, f32 *progress); +BoneTransformList *skeletalAnim_getBoneTransformList(SkeletalAnimation *self); +s32 skeletalAnim_getLoopCount(SkeletalAnimation *self); +void skeletalAnim_setCallback_0(SkeletalAnimation *self, f32 when, GenFunction_0 fn); +void skeletalAnim_setCallback_1(SkeletalAnimation *self, f32 when, GenFunction_1 fn, s32 arg); +void skeletalAnim_free(SkeletalAnimation *self); +SkeletalAnimation *skeletalAnim_new(void); +void skeletalAnim_func_80335918(SkeletalAnimation *self); +void skeletalAnim_set(SkeletalAnimation *self, enum asset_e anim_id, f32 transistion_duration, f32 duration); +void skeletalAnim_swap(SkeletalAnimation *self, enum asset_e anim_id, f32 transistion_duration, f32 duration); +void skeletalAnim_setProgress(SkeletalAnimation *self, f32 progress); +void skeletalAnim_setDuration(SkeletalAnimation *self, f32 duration); +void skeletalAnim_setBehavior(SkeletalAnimation *self, enum skeletal_anim_e behavior); +void skeletalAnim_update(SkeletalAnimation *self, f32 dt, s32 arg2); +#endif diff --git a/include/core2/timedfunc.h b/include/core2/timedfunc.h index ec2874d8..169205ba 100644 --- a/include/core2/timedfunc.h +++ b/include/core2/timedfunc.h @@ -7,13 +7,13 @@ #define reinterpret_cast(type, var) (*((type *)&var)) -void timedFunc_set_0(f32 time, GenMethod_0 funcPtr); -void timedFunc_set_1(f32 time, GenMethod_1 funcPtr, s32 arg0); -void timedFunc_set_2(f32 time, GenMethod_2 funcPtr, s32 arg0, s32 arg1); -void timedFunc_set_3(f32 time, GenMethod_3 funcPtr, s32 arg0, s32 arg1, s32 arg2); -void timedFunc_set_4(f32 time, GenMethod_4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3); -void timedFunc_set_5(f32 time, GenMethod_5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); -void timedFunc_set_6(f32 time, GenMethod_6 funcPtr, void* argPtr ); +void timedFunc_set_0(f32 time, GenFunction_0 funcPtr); +void timedFunc_set_1(f32 time, GenFunction_1 funcPtr, s32 arg0); +void timedFunc_set_2(f32 time, GenFunction_2 funcPtr, s32 arg0, s32 arg1); +void timedFunc_set_3(f32 time, GenFunction_3 funcPtr, s32 arg0, s32 arg1, s32 arg2); +void timedFunc_set_4(f32 time, GenFunction_4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3); +void timedFunc_set_5(f32 time, GenFunction_5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); +void timedFunc_set_6(f32 time, GenFunction_6 funcPtr, void* argPtr ); void timedJiggySpawn(f32 time, s32 jiggyId, f32 *position); #endif diff --git a/include/core2/vla.h b/include/core2/vla.h new file mode 100644 index 00000000..46c922dc --- /dev/null +++ b/include/core2/vla.h @@ -0,0 +1,17 @@ +#ifndef _STATIC_LENGTH_ARRAY_H_ +#define _STATIC_LENGTH_ARRAY_H_ + +#include + +typedef struct variable_length_array{ + s32 elem_size; + void * begin; + void * end; + void * mem_end; + u8 data[]; +}VLA; + +#define vector(T) struct variable_length_array +//^defined to keep element type with vla + +#endif diff --git a/include/functions.h b/include/functions.h index f5c57858..468f7507 100644 --- a/include/functions.h +++ b/include/functions.h @@ -225,7 +225,7 @@ void particleEmitter_setSprite(ParticleEmitter *, enum asset_e); void particleEmitter_setPosition(ParticleEmitter *, f32[3]); ParticleEmitter *partEmitMgr_newEmitter(u32); void func_802BB3DC(s32, f32, f32); -void __spawnQueue_add_4(GenMethod_4, s32, s32, s32, s32); +void __spawnQueue_add_4(GenFunction_4, s32, s32, s32, s32); Actor *func_802C4140(enum actor_e actor_id, s32 x, s32 y, s32 z); void func_8030DA44(u8); @@ -446,7 +446,7 @@ u8 func_8030ED2C(enum sfx_e uid, s32 arg1); void fileProgressFlag_setN(s32, s32, s32); Actor *marker_getActorAndRotation(ActorMarker *marker, f32 rotation[3]); Actor *func_80325934(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); -Actor *func_80325E78(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); +Actor *actor_drawFullDepth(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_80326244(Actor *); @@ -477,13 +477,6 @@ void marker_setCollisionScripts(ActorMarker *this, MarkerCollisionFunc ow_func, BKModelBin * func_80330B1C(ActorMarker *marker); BKVertexList *func_80330C74(Actor *actor); BKModelBin * func_80330DE4(ActorMarker *marker); -f32 func_80335684(Struct80s *); -void func_8033568C(Struct80s *, f32 *, f32*); -void func_80335800(Struct80s *, f32, void (*)(ActorMarker *), ActorMarker *); -Struct80s *func_803358B4(void); -void func_80335924(Struct80s *, enum asset_e anim_id, f32, f32); -void func_80335A74(Struct80s *self, f32 arg1); -void func_80335A94(Struct80s *, f32, s32); BKModelBin *modelRender_draw(Gfx**, Mtx**, f32 [3], f32[3], f32, f32*, BKModelBin*); void func_8033A280(f32); @@ -519,7 +512,7 @@ Actor *subaddie_getLinkedActor(Actor *); /* used in RBB */ void ml_vec3f_pitch_rotate_copy(f32 dst[3], f32 src[3], f32 pitch); int ml_timer_update(f32 *arg0, f32 arg1); -Actor *func_80325888(ActorMarker *, Gfx**, Mtx**, Vtx **); +Actor *actor_draw(ActorMarker *, Gfx**, Mtx**, Vtx **); Actor *func_80325340(ActorMarker *, Gfx **, Mtx **, Vtx **); void func_8032AA58(Actor *, f32); @@ -550,7 +543,7 @@ void func_802E4078(enum map_e map, s32 exit, s32 transition); void levelSpecificFlags_set(s32, s32); void func_803228D8(void); -void func_803253A0(Actor *); +void actor_predrawMethod(Actor *); void mapSpecificFlags_set(s32, s32); struct0 *func_8031B9D8(void); @@ -572,8 +565,8 @@ void func_802596AC(f32 a0[3], f32 a1[3], f32 a2[3], f32 a3[3]); void func_8024E55C(s32, s32 [6]); -void __spawnQueue_add_1(GenMethod_1, s32); -#define SPAWNQUEUE_ADD_1(method, arg0) __spawnQueue_add_1((GenMethod_1) (method), reinterpret_cast(s32, (arg0))) +void __spawnQueue_add_1(GenFunction_1, s32); +#define SPAWNQUEUE_ADD_1(method, arg0) __spawnQueue_add_1((GenFunction_1) (method), reinterpret_cast(s32, (arg0))) void func_802FAD64(enum item_e); void nodeprop_getPosition(NodeProp *, f32[3]); diff --git a/include/generic.h b/include/generic.h index 626cd636..2e3ff1c6 100644 --- a/include/generic.h +++ b/include/generic.h @@ -1,12 +1,12 @@ #ifndef _GENERIC_METHODS_H_ #define _GENERIC_METHODS_H_ -typedef void (* GenMethod_0)(void); -typedef void (* GenMethod_1)(s32); -typedef void (* GenMethod_2)(s32, s32); -typedef void (* GenMethod_3)(s32, s32, s32); -typedef void (* GenMethod_4)(s32, s32, s32, s32); -typedef void (* GenMethod_5)(s32, s32, s32, s32, s32); -typedef void (* GenMethod_6)(void *); +typedef void (* GenFunction_0)(void); +typedef void (* GenFunction_1)(s32); +typedef void (* GenFunction_2)(s32, s32); +typedef void (* GenFunction_3)(s32, s32, s32); +typedef void (* GenFunction_4)(s32, s32, s32, s32); +typedef void (* GenFunction_5)(s32, s32, s32, s32, s32); +typedef void (* GenFunction_6)(void *); #endif diff --git a/include/model.h b/include/model.h index f2bc6758..86dd94c0 100644 --- a/include/model.h +++ b/include/model.h @@ -72,8 +72,8 @@ typedef struct { typedef struct { f32 unk0[3]; - s16 unkC; - s16 unkE; + s16 bone_id; + s16 mtx_id; }BKAnimation; typedef struct { @@ -155,8 +155,8 @@ typedef struct{ }BKModelUnk20List; typedef struct{ - s16 unk0[3]; - s8 unk6; + s16 coord[3]; + s8 anim_index; u8 vtx_count; s16 vtx_list[1]; }BKModelUnk28; diff --git a/include/prop.h b/include/prop.h index 6e7f4efc..f285d328 100644 --- a/include/prop.h +++ b/include/prop.h @@ -6,6 +6,7 @@ #include "structs.h" #include "core2/animctrl.h" #include "core2/modelRender.h" +#include "core2/skeletalanim.h" typedef struct sprite_prop_s{ u32 unk0_31:0xC; @@ -267,7 +268,7 @@ typedef struct actor_s{ void (*unk13C)(struct actorMarker_s *);//saved marker->unk30 f32 unk140; f32 unk144; - Struct80s *unk148; + SkeletalAnimation *unk148; void *unk14C[2]; // void *unk150; u32 unk154; diff --git a/include/structs.h b/include/structs.h index 09397920..c3f12473 100644 --- a/include/structs.h +++ b/include/structs.h @@ -3,6 +3,7 @@ #include #include "model.h" +#include "core2/vla.h" #define MERGE(a, b) a ## b #define UNK_TYPE(t) t @@ -37,17 +38,6 @@ typedef struct{ #define KEY_VALUE_PAIR(T1, T2) struct { T1 key; T2 value; } -typedef struct variable_length_array{ - s32 elem_size; - void * begin; - void * end; - void * mem_end; - u8 data[]; -}VLA; - -#define vector(T) struct variable_length_array -//^defined to keep element type with vla - typedef struct freelist_s{ s16 elem_size; s16 elem_cnt; @@ -538,12 +528,7 @@ typedef struct{ f32 unk8[0][3]; } struct56s; -typedef struct{ - Mtx mtx_0; - s32 size_40; - s32 capacity_44; - Mtx data[]; -}struct58s; + typedef struct { f32 (*unk0)[3]; @@ -801,32 +786,9 @@ typedef struct { Struct70s unkC; }Struct6Es; -typedef struct { - f32 unk0; - u8 unk4; - u8 pad5[0x3]; - void (* unk8)(struct actorMarker_s *); - s32 unkC; -}Struct7Fs; -typedef struct { - struct struct_B1400_1_s *unk0; - struct animation_file_s *unk4; - f32 unk8; - f32 unkC; - vector(Struct7Fs) *unk10; - u8 unk14; - u8 unk15; - s16 unk16; - s32 unk18; - f32 unk1C; - f32 unk20; - s32 unk24; - struct struct_B1400_1_s *unk28; - f32 unk2C; - u8 unk30; - // u8 pad31[3]; -}Struct80s; + + typedef struct { diff --git a/src/BGS/ch/bigalligator.c b/src/BGS/ch/bigalligator.c index e78a6e5e..548614af 100644 --- a/src/BGS/ch/bigalligator.c +++ b/src/BGS/ch/bigalligator.c @@ -10,7 +10,7 @@ void func_8038FCB0(Actor *); /* .data */ ActorInfo D_80390D70 = {MARKER_DC_BIG_ALLIGATOR, ACTOR_F6_BIG_ALLIGATOR, ASSET_397_MODEL_BIG_ALLIGATOR, 0x01, NULL, - func_8038FCB0, func_80326224, func_80325888, + func_8038FCB0, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/BGS/ch/code_2270.c b/src/BGS/ch/code_2270.c index 74627173..036df038 100644 --- a/src/BGS/ch/code_2270.c +++ b/src/BGS/ch/code_2270.c @@ -20,12 +20,12 @@ typedef struct ch_bgs_2270_s{ } ActorLocal_BGS_2270; void func_80389080(Actor *this); -Actor *func_80325888(ActorMarker *, Gfx **, Mtx **, Vtx **); +Actor *actor_draw(ActorMarker *, Gfx **, Mtx **, Vtx **); ActorInfo D_80390830 = { MARKER_19A_TIPTUP, ACTOR_27A_TIPTUP, ASSET_3F8_MODEL_TIPTUP, 0, NULL, - func_80389080, NULL, func_80325888, + func_80389080, NULL, actor_draw, 0, 0, 2.5f, 0 }; s16 D_80390854[] = {0, 0xC78, 0xC7A, 0xC7C}; //see again texts @@ -136,11 +136,11 @@ void BGS_func_803888E4(Actor *this, s32 arg1){ this->state = arg1; unqPtr->unkC = 0.0f; if(this->state == 1){ - func_80335924(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f); + skeletalAnim_set(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f); unqPtr->unkC = randf2(5.0f, 15.0f); } if(this->state == 2){ - func_80335924(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f); + skeletalAnim_set(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f); unqPtr->unkC = randf2(5.0f, 15.0f); if(!this->unk138_24){ this->unk138_24 = 1; @@ -167,8 +167,8 @@ void BGS_func_803888E4(Actor *this, s32 arg1){ for(; i < D_80390864[unqPtr->unkA]; i++){ tmpf += randf2(1.0f, 1.5f); while((rand2 = randi2(1,7)) == prev_member); - timedFunc_set_2(tmpf, (GenMethod_2) func_803886B4, reinterpret_cast(s32, this->marker), rand2); - timedFunc_set_2(tmpf + 0.1, (GenMethod_2)func_803886B4, reinterpret_cast(s32, this->marker), 0); + timedFunc_set_2(tmpf, (GenFunction_2) func_803886B4, reinterpret_cast(s32, this->marker), rand2); + timedFunc_set_2(tmpf + 0.1, (GenFunction_2)func_803886B4, reinterpret_cast(s32, this->marker), 0); prev_member = rand2; }//L80388B7C @@ -179,7 +179,7 @@ void BGS_func_803888E4(Actor *this, s32 arg1){ } func_80324E38(sp54 = tmpf + 0.6, 0); if(func_803203FC(2)){ - timedFunc_set_1(sp54, (GenMethod_1)func_803886F4, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(sp54, (GenFunction_1)func_803886F4, reinterpret_cast(s32, this->marker)); }else{ this->state = 0x05; } @@ -194,8 +194,8 @@ void BGS_func_803888E4(Actor *this, s32 arg1){ for(j = 0; j < vector_size(unqPtr->unk4); j++){ s1 = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4,j); tmpf += randf2(1.0f, 1.5f); - timedFunc_set_2(tmpf, (GenMethod_2)func_803886B4, reinterpret_cast(s32, this->marker), s1->unk0); - timedFunc_set_2(tmpf + 0.1, (GenMethod_2)func_803886B4, reinterpret_cast(s32, this->marker), 0); + timedFunc_set_2(tmpf, (GenFunction_2)func_803886B4, reinterpret_cast(s32, this->marker), s1->unk0); + timedFunc_set_2(tmpf + 0.1, (GenFunction_2)func_803886B4, reinterpret_cast(s32, this->marker), 0); } timed_exitStaticCamera(tmpf += 2.5); func_80324E38(tmpf + 0.6,0); @@ -238,7 +238,7 @@ void func_80388E94(ActorMarker *this, s32 arg1){ }else{ tmp = (Struct_BGS_2270_0s *)vector_at(unqPtr->unk4, unqPtr->unk0); if(arg1 == tmp->unk0){ - timedFunc_set_1(0.5f, (GenMethod_1)func_80388848, reinterpret_cast(s32, thisActor->marker)); + timedFunc_set_1(0.5f, (GenFunction_1)func_80388848, reinterpret_cast(s32, thisActor->marker)); } else{ func_8028F55C(1, thisActor->marker); @@ -302,12 +302,12 @@ void func_80389080(Actor *this){ } else{ player_getPosition(player_position); - if(func_8033567C(this->unk148) == ASSET_12C_ANIM_TIPTUP_TAPPING && func_80335794(this->unk148) > 0){ - func_80335924(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f); + if(skeletalAnim_getAnimId(this->unk148) == ASSET_12C_ANIM_TIPTUP_TAPPING && skeletalAnim_getLoopCount(this->unk148) > 0){ + skeletalAnim_set(this->unk148, ASSET_12B_ANIM_TIPTUP_IDLE, 1.0f, 9.0f); unqPtr->unkC = randf2(5.0f, 15.0f); } if(ml_timer_update(&unqPtr->unkC, sp3C)){ - func_80335924(this->unk148, ASSET_12C_ANIM_TIPTUP_TAPPING, 1.0f, 4.0f); + skeletalAnim_set(this->unk148, ASSET_12C_ANIM_TIPTUP_TAPPING, 1.0f, 4.0f); } func_80258A4C(this->position, this->yaw - 90.0f, player_position, &sp38, &sp34, &sp30); this->yaw = this->yaw + 5.0f*sp30; diff --git a/src/BGS/ch/code_8A60.c b/src/BGS/ch/code_8A60.c index 9cc26ab4..670920e1 100644 --- a/src/BGS/ch/code_8A60.c +++ b/src/BGS/ch/code_8A60.c @@ -18,15 +18,15 @@ ActorAnimationInfo D_80390B90[] = { {ASSET_D5_ANIM_SWITCH_UP, 0.5f}, {ASSET_D5_ANIM_SWITCH_UP, 1e+8f} }; -ActorInfo D_80390BD8 = {MARKER_F5_BGS_ELEVATED_WALKWAY_SWITCH, ACTOR_14E_BGS_ELEVATED_WALKWAY_SWITCH, ASSET_3F5_BGS_JIGGY_SWITCH, 1, D_80390B90, func_8038EEA4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80390BFC = {MARKER_FD_BGS_MAZE_SWITCH, ACTOR_1FB_BGS_MAZE_SWITCH, ASSET_3F5_BGS_JIGGY_SWITCH, 1, D_80390B90, func_8038F06C, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_80390BD8 = {MARKER_F5_BGS_ELEVATED_WALKWAY_SWITCH, ACTOR_14E_BGS_ELEVATED_WALKWAY_SWITCH, ASSET_3F5_BGS_JIGGY_SWITCH, 1, D_80390B90, func_8038EEA4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80390BFC = {MARKER_FD_BGS_MAZE_SWITCH, ACTOR_1FB_BGS_MAZE_SWITCH, ASSET_3F5_BGS_JIGGY_SWITCH, 1, D_80390B90, func_8038F06C, func_80326224, actor_draw, 0, 0, 0.0f, 0}; void func_8038EE50(void){ f32 sp24[3]; if(nodeProp_findPositionFromActorId(0x14d, sp24)){ jiggySpawn(JIGGY_20_BGS_ELEVATED_WALKWAY, sp24); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2]) @@ -69,7 +69,7 @@ void func_8038F018(void){ if(nodeProp_findPositionFromActorId(0x1fc, sp24)){ jiggySpawn(JIGGY_25_BGS_MAZE, sp24); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2]) diff --git a/src/BGS/ch/croctus.c b/src/BGS/ch/croctus.c index ce907dc1..238edf02 100644 --- a/src/BGS/ch/croctus.c +++ b/src/BGS/ch/croctus.c @@ -74,7 +74,7 @@ void func_80387E00(s32 arg0){ Actor * this = marker_getActor(marker); func_803262E4(this); - __spawnQueue_add_2((GenMethod_2)func_80387D18, reinterpret_cast(s32, marker), 0x1E); + __spawnQueue_add_2((GenFunction_2)func_80387D18, reinterpret_cast(s32, marker), 0x1E); } void func_80387E40(ActorMarker * arg0){ @@ -95,10 +95,10 @@ void func_80387E68(ActorMarker *caller, enum asset_e text_id, s32 arg2){ func_80328B8C(this, 5, 0.79f, 1); func_80326310(this); bgs_D_803907B8[this->unkF4_8]->propPtr->unk8_4 = TRUE; - timedFunc_set_1(1.1f, (GenMethod_1)func_80387E00, reinterpret_cast(s32, bgs_D_803907B8[this->unkF4_8])); + timedFunc_set_1(1.1f, (GenFunction_1)func_80387E00, reinterpret_cast(s32, bgs_D_803907B8[this->unkF4_8])); timed_setStaticCameraToNode(0.8f, 9); func_80324DBC(3.4f, 0xC87, 0xE, NULL, NULL, func_80387E68, NULL); - __spawnQueue_add_2((GenMethod_2) func_80387D18, reinterpret_cast(s32, this->marker), 0x46); + __spawnQueue_add_2((GenFunction_2) func_80387D18, reinterpret_cast(s32, this->marker), 0x46); } else{ timed_exitStaticCamera(0.0f); @@ -152,18 +152,18 @@ void func_80387FD4(Actor *this){ func_80324D2C(4.5f, COMUSIC_43_ENTER_LEVEL_GLITTER); func_80328B8C(this, 5, 0.79f, 1); if (this->unkF4_8 == 5) { - timedFunc_set_1(0.9f, (GenMethod_1) func_80387E40, (s32) this->marker); + timedFunc_set_1(0.9f, (GenFunction_1) func_80387E40, (s32) this->marker); } else { func_80326310(this); } if (this->unkF4_8 < 5) { bgs_D_803907B8[this->unkF4_8]->propPtr->unk8_4 = TRUE; - timedFunc_set_1(1.1f, (GenMethod_1)func_80387E00, reinterpret_cast(s32, bgs_D_803907B8[this->unkF4_8])); + timedFunc_set_1(1.1f, (GenFunction_1)func_80387E00, reinterpret_cast(s32, bgs_D_803907B8[this->unkF4_8])); func_802BAFE4(D_803907B0[this->unkF4_8-1]); } else { - timedFunc_set_1(0.8f, (GenMethod_1)func_80387D90, (s32) this->marker); + timedFunc_set_1(0.8f, (GenFunction_1)func_80387D90, (s32) this->marker); } - __spawnQueue_add_2((GenMethod_2)func_80387D18, reinterpret_cast(s32, this->marker), 0x46); + __spawnQueue_add_2((GenFunction_2)func_80387D18, reinterpret_cast(s32, this->marker), 0x46); } } }//L80388348 @@ -228,5 +228,5 @@ Actor *func_8038860C(ActorMarker *this, Gfx** gdl, Mtx ** mptr, Vtx **vtx){ Actor *thisActor; thisActor = marker_getActor(this); func_8033A45C(1, thisActor->unkF4_8); - return func_80325888(this, gdl, mptr, vtx); + return actor_draw(this, gdl, mptr, vtx); } diff --git a/src/BGS/ch/flibbit.c b/src/BGS/ch/flibbit.c index d5dc5454..0fd3615d 100644 --- a/src/BGS/ch/flibbit.c +++ b/src/BGS/ch/flibbit.c @@ -47,8 +47,8 @@ bool BGS_func_803863F0(Actor *this, f32 arg1[3], s32 arg2){ local->unk8[2] = arg1[2]; local->unk8[1] = func_80309724(arg1); - func_80335924(this->unk148, 0xdb, 0.2f,(arg2) ? randf2(0.7f, 0.8f) : randf2(0.75f, 0.85f)); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0xdb, 0.2f,(arg2) ? randf2(0.7f, 0.8f) : randf2(0.75f, 0.85f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324D54(0.2f, 0x3f2, randf2(0.7f, 1.3f), randi2(0x61A8, 0x6978), this->position, 500.0f, 2500.0f); return TRUE; } @@ -181,9 +181,9 @@ void func_80386AEC(Actor *this, s32 next_state) { local->unk24 = 0.0f; if (next_state == 1) { - func_80335924(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); - func_80335A74(this->unk148, randf2(0.0f, 0.9f)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 0.9f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); this->position[0] = (f32) local->unkE[0]; this->position[1] = (f32) local->unkE[1]; this->position[2] = (f32) local->unkE[2]; @@ -201,38 +201,38 @@ void func_80386AEC(Actor *this, s32 next_state) { } if (next_state == 3) { - func_80335924(this->unk148, ASSET_FB_ANIM_FLIBBIT_TURN, 0.2f, 1.0f); - func_80335A74(this->unk148, randf2(0.0f, 1.0f)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_FB_ANIM_FLIBBIT_TURN, 0.2f, 1.0f); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 1.0f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); local->unk24 = randf2(1.0f, 3.0f); } if (next_state == 4) { - func_80335924(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); - func_80335A74(this->unk148, randf2(0.0f, 0.9f)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 0.9f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); this->position[1] = func_80309724(this->position); local->unk18 = 1.0f; } if (next_state == 5) { FUNC_8030E8B4(SFX_8E_GRUNTLING_DAMAGE, 1.5f, 32200, this->position, 500, 2500); - func_80335924(this->unk148, ASSET_288_ANIM_FLIBBIT_OW, 0.1f, 0.65f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_288_ANIM_FLIBBIT_OW, 0.1f, 0.65f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); this->position[1] = func_80309724(this->position); local->unk18 = 1.0f; } if (next_state == 6) { - func_80335924(this->unk148, ASSET_112_ANIM_FLIBBIT_DIE, 0.2f, 0.4f); + skeletalAnim_set(this->unk148, ASSET_112_ANIM_FLIBBIT_DIE, 0.2f, 0.4f); FUNC_8030E8B4(SFX_115_BUZZBOMB_DEATH, 1.0f, 32200, this->position, 500, 2500); this->marker->collidable = FALSE; this->unk10_1 = FALSE; local->unk14 = 1000.0f; } if (next_state == 7) { - func_80335924(this->unk148, ASSET_113_ANIM_FLIBBIT_DEAD, 0.2f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_113_ANIM_FLIBBIT_DEAD, 0.2f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); FUNC_8030E8B4(SFX_2F_ORANGE_SPLAT, 0.8f, 32200, this->position, 500, 2500); } if (next_state == 8) { @@ -275,7 +275,7 @@ Actor *chflibbit_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ local = (ActorLocal_Flibbit *)&this->local; if (local->unk0){ if(((this->state == 1)) || (this->state == 3)) { - temp_a0 = func_803356A0(this->unk148); + temp_a0 = skeletalAnim_getBoneTransformList(this->unk148); for(i = 0; i < 2; i++){ if (0.1 <= local->unk1C[i]) { @@ -290,11 +290,11 @@ Actor *chflibbit_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp7C[2] = 1.0f; sp7C[1] = (f32) (((f64) phi_f2 * 0.99) + 0.01); - func_8033A928(temp_a0, (i != 0)?0x2D :0x2E, sp7C); + boneTransformList_setBoneScale(temp_a0, (i != 0)?0x2D :0x2E, sp7C); } } } - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); local->unk0 = marker->unk14_21; return this; @@ -309,8 +309,8 @@ void chflibbit_update(Actor *this){ f32 spA0; f32 sp9C; f32 sp98; - f32 sp94; - f32 sp90; + f32 skel_anim_prev_prog; + f32 skel_anim_progress; f32 sp84[3]; f32 temp_f12; f32 sp7C; @@ -367,11 +367,11 @@ void chflibbit_update(Actor *this){ }//L803873D0 if(this->state == 2){ - func_8033568C(this->unk148, &sp94, &sp90); - if(sp94 < 0.8 && 0.8 <= sp90){ + skeletalAnim_getProgressRange(this->unk148, &skel_anim_prev_prog, &skel_anim_progress); + if(skel_anim_prev_prog < 0.8 && 0.8 <= skel_anim_progress){ func_8030E878(SFX_8_BANJO_LANDING_04, randf2(0.8f, 0.9f), randi2(25000, 27000), this->position, 100.0f, 1500.0f); }//L8038747C - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ sp84[0] = (f32)local->unkE[0]; sp84[1] = (f32)local->unkE[1]; sp84[2] = (f32)local->unkE[2]; @@ -384,17 +384,17 @@ void chflibbit_update(Actor *this){ } } else{//L80387514 - if(0.2 <= sp90 && sp90 <= 0.8){ - temp_f12 = ((sp90 - 0.2) / 0.60000000000000009); + if(0.2 <= skel_anim_progress && skel_anim_progress <= 0.8){ + temp_f12 = ((skel_anim_progress - 0.2) / 0.60000000000000009); this->position_x = local->unk2[0] + (local->unk8[0] - local->unk2[0])*temp_f12; this->position_y = local->unk2[1] + (local->unk8[1] - local->unk2[1])*temp_f12; this->position_z = local->unk2[2] + (local->unk8[2] - local->unk2[2])*temp_f12; if(local->unk1){ - if(sp90 <= 0.5){ - phi_f2 = ((sp90 - 0.2)/0.3) * 70.0; + if(skel_anim_progress <= 0.5){ + phi_f2 = ((skel_anim_progress - 0.2)/0.3) * 70.0; } else{ - phi_f2 = (1.0 - (sp90 - 0.5)/ 0.30000000000000004) *70.0; + phi_f2 = (1.0 - (skel_anim_progress - 0.5)/ 0.30000000000000004) *70.0; } this->position_y += phi_f2; }//L80387684 @@ -446,7 +446,7 @@ void chflibbit_update(Actor *this){ } if(this->state == 7){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) func_80386AEC(this, 8); } } diff --git a/src/BGS/ch/leafboat.c b/src/BGS/ch/leafboat.c index e6bac0f9..cda926a7 100644 --- a/src/BGS/ch/leafboat.c +++ b/src/BGS/ch/leafboat.c @@ -35,7 +35,7 @@ Actor *func_8038FD10(ActorMarker *this, Gfx** gdl, Mtx** mtx, Vtx **vtx){ thisActor = marker_getActor(this); if((thisActor->unk1C_x != 0.0f) && (0x80 < thisActor->alpha_124_19)){ - thisActor = func_80325888(this, gdl, mtx, vtx); + thisActor = actor_draw(this, gdl, mtx, vtx); } return thisActor; } diff --git a/src/BGS/ch/mrvile.c b/src/BGS/ch/mrvile.c index 309b9dcb..a1b4fd9c 100644 --- a/src/BGS/ch/mrvile.c +++ b/src/BGS/ch/mrvile.c @@ -5,11 +5,9 @@ #include "prop.h" #include "core2/modelRender.h" -void func_80335A24(void *, u32, f32, f32); Actor *chvile_draw(ActorMarker*, Gfx **, Mtx **, Vtx **); void chvile_update(Actor *); void func_8038BB40(ActorMarker *); -extern void func_80335A80(void *, f32); extern bool func_80320C94(f32[3], f32[3], f32, f32[3], s32, u32); extern bool chvilegame_find_closest_piece(ActorMarker *, f32[3], f32, f32[3]); @@ -97,19 +95,19 @@ void BGS_func_8038BBA0(Actor *this, s32 arg1){ if(arg1 == 101){ local->unk24 = 0.0f; local->unk28[0] = local->unk28[1] = local->unk28[2] = 0.0f; - func_80335924(this->unk148, 0xe1, 0.10000000149f, 1.0f); //0xe1 = croc_idle + skeletalAnim_set(this->unk148, 0xe1, 0.10000000149f, 1.0f); //0xe1 = croc_idle } if(arg1 == 102){ if(local->unk24 < 100.0f){ local->unk24 = 100.0f; }; - func_80335A24(this->unk148, 0xe0, 0.1f, 0.5f); //0xe1 = croc_walk + skeletalAnim_swap(this->unk148, 0xe0, 0.1f, 0.5f); //0xe1 = croc_walk } if(arg1 == 103){ - func_80335A24(this->unk148, 0x124, 0.1f, 0.5f); //0x124 = croc_munch + skeletalAnim_swap(this->unk148, 0x124, 0.1f, 0.5f); //0x124 = croc_munch if(this->state == 4){ timed_playSfx(0.31f, SFX_4C_LIP_SMACK, 0.90f, 25000); - timedFunc_set_1(0.31f, (GenMethod_1)func_8038BB40, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(0.31f, (GenFunction_1)func_8038BB40, reinterpret_cast(s32, this->marker)); } else{ timed_playSfx(0.31f, SFX_4C_LIP_SMACK, 0.90f, 25000); @@ -179,7 +177,7 @@ void func_8038BDD4(Actor *this) { local->unk24 = (local->unk24 < 10.0f) ? 10.0f : (local->unk10 < local->unk24) ? local->unk10 : local->unk24; - func_80335A80(this->unk148, (200.0f / local->unk24) * 0.5); + skeletalAnim_setDuration(this->unk148, (200.0f / local->unk24) * 0.5); local->unk28[1] = sp50 * 200.0f; temp_f0_3 = func_80309724(this->position); if (temp_f0_3 > 125.0f) { @@ -231,7 +229,7 @@ Actor *chvile_draw(ActorMarker *marker, Gfx **gfx, Mtx** mtx, Vtx **vtx){ f32 position[3]; - this = func_80325888(marker, gfx, mtx, vtx); + this = actor_draw(marker, gfx, mtx, vtx); local = (ActorLocal_MrVile *)&this->local; if ( (local->unkC == 104) && @@ -401,11 +399,11 @@ void chvile_update(Actor *this) { } else { BGS_func_8038BBA0(this, 102); } - } else if (func_80335794(this->unk148) >= 3) { + } else if (skeletalAnim_getLoopCount(this->unk148) >= 3) { BGS_func_8038BBA0(this, 102); } } - if ((local->unkC == 104) && (func_80335794(this->unk148) >= 3)) { + if ((local->unkC == 104) && (skeletalAnim_getLoopCount(this->unk148) >= 3)) { BGS_func_8038BBA0(this, 102); } } @@ -416,7 +414,7 @@ void chvile_update(Actor *this) { if ((local->unkC == 102) && (ml_distance_vec3f(this->position, local->target_position) < 200.0f)) { BGS_func_8038BBA0(this, 103); } - if ((local->unkC == 103) && (func_80335794(this->unk148) >= 2)) { + if ((local->unkC == 103) && (skeletalAnim_getLoopCount(this->unk148) >= 2)) { func_8038C0C8(this, 1); } } diff --git a/src/BGS/ch/mudhut.c b/src/BGS/ch/mudhut.c index 1dd87ae6..775b603f 100644 --- a/src/BGS/ch/mudhut.c +++ b/src/BGS/ch/mudhut.c @@ -54,7 +54,7 @@ Actor *chmudhut_draw(ActorMarker *this, Gfx** gdl, Mtx** mtx, Vtx **vtx){ if(thisActor->state == 3) return thisActor; - return func_80325888(this, gdl, mtx, vtx); + return actor_draw(this, gdl, mtx, vtx); } void func_8038EB4C(ActorMarker *this){ @@ -103,9 +103,9 @@ void chmudhut_update(Actor *this){ if(tmp == 5){ func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); } - __spawnQueue_add_1((GenMethod_1)func_8038EB4C, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_8038EB4C, reinterpret_cast(s32, this->marker)); if(tmp < 5){ - __spawnQueue_add_4((GenMethod_4)func_802C4218, D_80390B50[tmp], + __spawnQueue_add_4((GenFunction_4)func_802C4218, D_80390B50[tmp], reinterpret_cast(s32, diffPos[0]), reinterpret_cast(s32, diffPos[1]), reinterpret_cast(s32, diffPos[2]) diff --git a/src/BGS/ch/pinkegg.c b/src/BGS/ch/pinkegg.c index b767162b..ff10853d 100644 --- a/src/BGS/ch/pinkegg.c +++ b/src/BGS/ch/pinkegg.c @@ -74,7 +74,7 @@ Actor *chpinkegg_draw(ActorMarker *this, Gfx ** gdl, Mtx** mptr, Vtx **arg3){ t7 = marker_getActor(this)->state == 3; func_8033A45C(1, NOT(sp18 = t7)); func_8033A45C(2, sp18); - return func_80325888(this, gdl, mptr, arg3); + return actor_draw(this, gdl, mptr, arg3); } diff --git a/src/BGS/ch/tanktup.c b/src/BGS/ch/tanktup.c index cac039f9..01eddaff 100644 --- a/src/BGS/ch/tanktup.c +++ b/src/BGS/ch/tanktup.c @@ -9,7 +9,7 @@ void timed_exitStaticCamera(f32); void timedFunc_set_2(f32, void(*)(s32, s32), s32, s32); void func_8028E668(f32[3], f32, f32, f32); -extern void __spawnQueue_add_3(GenMethod_3, s32, s32, s32); +extern void __spawnQueue_add_3(GenFunction_3, s32, s32, s32); void func_8038F6A4(Actor *); @@ -29,7 +29,7 @@ ActorAnimationInfo BGS_D_80390C20[] = { }; ActorInfo D_80390C40 = {MARKER_6C_TANKTUP, ACTOR_E8_TANKTUP, ASSET_3EE_TANKTUP, 0x01, BGS_D_80390C20, - func_8038F6A4, func_80326224, func_80325888, + func_8038F6A4, func_80326224, actor_draw, 0, 0x80, 0.0f, 0 }; @@ -124,7 +124,7 @@ void func_8038F6A4(Actor *this) { if (local->unk0[sp44] == 0) { - __spawnQueue_add_3((GenMethod_3)func_8038F470, *((s32 *) (&this->marker)), local->unk0[sp44], sp44); + __spawnQueue_add_3((GenFunction_3)func_8038F470, *((s32 *) (&this->marker)), local->unk0[sp44], sp44); } } diff --git a/src/BGS/ch/yellowflibbit.c b/src/BGS/ch/yellowflibbit.c index 2cc7a973..aa735f74 100644 --- a/src/BGS/ch/yellowflibbit.c +++ b/src/BGS/ch/yellowflibbit.c @@ -61,8 +61,8 @@ s32 func_8038D2F4(Actor *this, f32 *arg1, bool arg2) { local->unkA[1] = (s16) arg1[1]; local->unkA[2] = (s16) arg1[2]; local->unkA[1] = (s16) (s32) func_80309724(arg1); - func_80335924(this->unk148, ASSET_DB_ANIM_FLIBBIT_HOP, 0.2f, (arg2) ? randf2(0.7f, 0.8f) : randf2(0.7f, 0.8f)); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_DB_ANIM_FLIBBIT_HOP, 0.2f, (arg2) ? randf2(0.7f, 0.8f) : randf2(0.7f, 0.8f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324D54(0.2f, SFX_3F2_UNKNOWN, randf2(0.7f, 1.3f), randi2(25000, 27000), this->position, 500.0f, 2500.0f); return TRUE; } @@ -204,9 +204,9 @@ void func_8038D9D0(Actor *this, s32 next_state) { local->unk1C = 0.5f; } if (next_state == 3) { - func_80335924(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); - func_80335A74(this->unk148, randf2(0.0f, 0.9)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 0.9)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); actor_collisionOn(this); this->position[0] = (f32) local->unk10[0]; this->position[1] = (f32) local->unk10[1]; @@ -226,27 +226,27 @@ void func_8038D9D0(Actor *this, s32 next_state) { } } if (next_state == 6) { - func_80335924(this->unk148, ASSET_FB_ANIM_FLIBBIT_TURN, 0.2f, 1.0f); - func_80335A74(this->unk148, randf2(0.0f, 1.0f)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_FB_ANIM_FLIBBIT_TURN, 0.2f, 1.0f); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 1.0f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); local->unk28 = randf2(1.0f, 3.0f); } if (next_state == 7) { - func_80335924(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); - func_80335A74(this->unk148, randf2(0.0f, 0.9)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_FA_ANIM_FLIBBIT_IDLE, 0.2f, randf2(1.0f, 2.0f)); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 0.9)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); this->position[1] = func_80309724(this->position); local->unk1C = 1.0f; } if (next_state == 8) { FUNC_8030E8B4(SFX_8E_GRUNTLING_DAMAGE, 1.5f, 32200, this->position, 500, 2500); - func_80335924(this->unk148, ASSET_288_ANIM_FLIBBIT_OW, 0.1f, 0.65f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_288_ANIM_FLIBBIT_OW, 0.1f, 0.65f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); this->position[1] = func_80309724(this->position); local->unk1C = 1.0f; } if (next_state == 9) { - func_80335924(this->unk148, ASSET_112_ANIM_FLIBBIT_DIE, 0.2f, 0.4f); + skeletalAnim_set(this->unk148, ASSET_112_ANIM_FLIBBIT_DIE, 0.2f, 0.4f); FUNC_8030E8B4(SFX_115_BUZZBOMB_DEATH, 1.0f, 32200, this->position, 500, 2500); this->marker->collidable = FALSE; this->unk10_1 = FALSE; @@ -254,8 +254,8 @@ void func_8038D9D0(Actor *this, s32 next_state) { local->unk18 = 1000.0f; } if (next_state == 0xA) { - func_80335924(this->unk148, ASSET_113_ANIM_FLIBBIT_DEAD, 0.2f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_113_ANIM_FLIBBIT_DEAD, 0.2f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); FUNC_8030E8B4(SFX_2F_ORANGE_SPLAT, 0.8f, 32200, this->position, 500, 2500); } if (next_state == 0xB) { @@ -305,7 +305,7 @@ Actor *func_8038DE5C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { return this; } if (local->unk0 && ((this->state == 3) || (this->state == 6))) { - temp_a0_2 = func_803356A0(this->unk148); + temp_a0_2 = skeletalAnim_getBoneTransformList(this->unk148); for(var_s0 = 0; var_s0 < 2; var_s0++){ if (0.1 <= local->unk20[var_s0]) { var_f2 = (f32) ((local->unk20[var_s0] - 0.1) / 0.1); @@ -317,10 +317,10 @@ Actor *func_8038DE5C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { sp7C[0] = 1.0f; sp7C[1] = var_f2 * 0.99 + 0.01; sp7C[2] = 1.0f; - func_8033A928(temp_a0_2, (var_s0 != 0) ? 0x2D : 0x2E, sp7C); + boneTransformList_setBoneScale(temp_a0_2, (var_s0 != 0) ? 0x2D : 0x2E, sp7C); }; } - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); local->unk0 = marker->unk14_21; return this; } @@ -415,11 +415,11 @@ void BGS_func_8038E034(Actor *this) { } if (this->state == 5) { - func_8033568C(this->unk148, &sp8C, &sp88); + skeletalAnim_getProgressRange(this->unk148, &sp8C, &sp88); if (sp8C < 0.8 && 0.8 <= sp88) { func_8030E878(SFX_8_BANJO_LANDING_04, randf2(0.8f, 0.9f), randi2(0x61A8, 0x6978), this->position, 100.0f, 1500.0f); } - if (func_80335794(this->unk148) > 0) { + if (skeletalAnim_getLoopCount(this->unk148) > 0) { sp7C[0] = (f32) local->unk10[0]; sp7C[1] = (f32) local->unk10[1]; sp7C[2] = (f32) local->unk10[2]; @@ -489,7 +489,7 @@ void BGS_func_8038E034(Actor *this) { } if(this->state == 10){ - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_8038D9D0(this, 11); } } diff --git a/src/BGS/ch/yumblie.c b/src/BGS/ch/yumblie.c index ee847c2d..0ef64071 100644 --- a/src/BGS/ch/yumblie.c +++ b/src/BGS/ch/yumblie.c @@ -3,8 +3,8 @@ #include "variables.h" #include "prop.h" -extern void func_803253A0(Actor *); -extern void func_80325794(ActorMarker *); +extern void actor_predrawMethod(Actor *); +extern void actor_postdrawMethod(ActorMarker *); extern f32 randf (void); extern BKModelBin *chvilegame_get_grumblie_model(ActorMarker *marker); @@ -63,13 +63,13 @@ void chyumblie_set_state(Actor* this, enum chyumblie_state_e next_state){ this->yaw = randf2(0.0f, 360.0f); s0->unk4 = func_8038B160(this); chvilegame_new_piece(s0->game_marker, this->marker, this->position, s0->unk4); - func_80335924(this->unk148, (s0->unk4)? ASSET_128_ANIM_GRUMBLIE_APPEAR : ASSET_125_ANIM_YUMBLIE_APPEAR, 0.0f, 1.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, (s0->unk4)? ASSET_128_ANIM_GRUMBLIE_APPEAR : ASSET_125_ANIM_YUMBLIE_APPEAR, 0.0f, 1.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if(next_state == 3){ s0->unk8 = randf2(5.0f, 10.0f); - func_80335924(this->unk148, (s0->unk4)? ASSET_12A_ANIM_GRUMBLIE_IDLE : ASSET_127_ANIM_YUMBLIE_IDLE, 0.1f, randf2(0.5f, 1.0f)); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, (s0->unk4)? ASSET_12A_ANIM_GRUMBLIE_IDLE : ASSET_127_ANIM_YUMBLIE_IDLE, 0.1f, randf2(0.5f, 1.0f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); if(s0->unk4){ func_8030E6A4(SFX_C4_TWINKLY_MUNCHER_GRR,randf2(1.0f, 1.2), 30000); }else{ @@ -79,8 +79,8 @@ void chyumblie_set_state(Actor* this, enum chyumblie_state_e next_state){ if(next_state == 4){ chvilegame_remove_piece(s0->game_marker, this->marker); - func_80335924(this->unk148, (s0->unk4)? ASSET_129_ANIM_GRUMBLIE_HIDE : ASSET_126_ANIM_YUMBLIE_HIDE, 0.1f, 0.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, (s0->unk4)? ASSET_129_ANIM_GRUMBLIE_HIDE : ASSET_126_ANIM_YUMBLIE_HIDE, 0.1f, 0.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if(next_state == 5){ s0->unk8 = randf2(10.0f, 20.0f); @@ -110,8 +110,8 @@ Actor *chyumblie_draw(ActorMarker *this, Gfx **gfx, Mtx** mtx, Vtx **vtx){ return thisActor; } - modelRender_preDraw((GenMethod_1) func_803253A0, (s32)thisActor); - modelRender_postDraw((GenMethod_1) func_80325794, (s32)this); + modelRender_preDraw((GenFunction_1) actor_predrawMethod, (s32)thisActor); + modelRender_postDraw((GenFunction_1) actor_postdrawMethod, (s32)this); sp44[0] = thisActor->position_x; sp44[1] = thisActor->position_y + sp40->unk0*75.0f; sp44[2] = thisActor->position_z; @@ -160,7 +160,7 @@ void chyumblie_update(Actor *this){ if(s0->game_marker == NULL){ s0->game_marker = actorArray_findClosestActorFromActorId(this->position, ACTOR_138_VILE_GAME_CTRL, -1, &sp48)->marker; } - sp50 = func_80335684(this->unk148); + sp50 = skeletalAnim_getProgress(this->unk148); if(this->state == YUMBLIE_STATE_1_UNDER_GROUND){ if(ml_timer_update(&s0->unk8, sp4C)){ if(mapSpecificFlags_get(6) && (12 > chvilegame_get_piece_count(s0->game_marker))){ @@ -187,7 +187,7 @@ void chyumblie_update(Actor *this){ func_8030E878(SFX_C5_TWINKLY_POP, randf2(1.0f, 1.2f), 30000, this->position, 500.0f, 3000.0f); } - if( 0 < func_80335794(this->unk148)){ + if( 0 < skeletalAnim_getLoopCount(this->unk148)){ s0->unk0 = 1.0f; chyumblie_set_state(this,YUMBLIE_STATE_3_ABOVE_GROUND); } diff --git a/src/BGS/code_3030.c b/src/BGS/code_3030.c index 9129a562..4903e82a 100644 --- a/src/BGS/code_3030.c +++ b/src/BGS/code_3030.c @@ -33,17 +33,17 @@ void func_80389488(Actor *this, s32 next_state) { local = (ActorLocal_BGS_3030 *)&this->local; if (next_state == 1) { - func_80335924(this->unk148, ASSET_12D_ANIM_CHOIR_TURTLE_IDLE, 0.2f, randf2(2.0f, 2.5f)); - func_80335A74(this->unk148, randf2(0.0f, 1.0f)); + skeletalAnim_set(this->unk148, ASSET_12D_ANIM_CHOIR_TURTLE_IDLE, 0.2f, randf2(2.0f, 2.5f)); + skeletalAnim_setProgress(this->unk148, randf2(0.0f, 1.0f)); } if (next_state == 2) { - func_80335924(this->unk148, ASSET_12E_ANIM_CHOIR_TURTLE_SING, 0.1f, 1.6666666f); + skeletalAnim_set(this->unk148, ASSET_12E_ANIM_CHOIR_TURTLE_SING, 0.1f, 1.6666666f); timed_playSfx(0.8333333, SFX_86_TIPTUP_CHORUS_AH, local->unk8, 0x7FFF); } if (next_state == 3) { func_8030E6A4(SFX_86_TIPTUP_CHORUS_AH, local->unk8, 0x7FFF); - func_80335924(this->unk148, ASSET_12F_ANIM_CHOIR_TURTLE_HURT, 0.1f, 1.75f); - func_80335800(this->unk148, 0.9f, func_80389420, this->marker); + skeletalAnim_set(this->unk148, ASSET_12F_ANIM_CHOIR_TURTLE_HURT, 0.1f, 1.75f); + skeletalAnim_setCallback_1(this->unk148, 0.9f, func_80389420, this->marker); if (local->tiptup_marker != NULL) { func_80388E94(local->tiptup_marker, local->unk0); } @@ -62,7 +62,7 @@ void func_803895D0(ActorMarker *marker, ActorMarker *other_marker){ Actor *BGS_func_80389610(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8033A45C(4, marker->unk14_20 - 0x19A); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_80389668(Actor *this) { @@ -99,7 +99,7 @@ void func_80389668(Actor *this) { func_80389488(this, 2); } } - if (((this->state == 2) || (this->state == 3)) && (func_80335794(this->unk148) > 0)) { + if (((this->state == 2) || (this->state == 3)) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { func_80389488(this, 1); } } diff --git a/src/BGS/code_3420.c b/src/BGS/code_3420.c index 0259c0ac..a3ce6840 100644 --- a/src/BGS/code_3420.c +++ b/src/BGS/code_3420.c @@ -305,7 +305,7 @@ void func_8038A068(Actor *this, s32 next_state) { mapSpecificFlags_set(6, TRUE); func_8038C3DC(local->vile_marker); func_8025A58C(0, 4000); - timedFunc_set_2(1.0f, (GenMethod_2)func_8025A6EC, COMUSIC_55_BGS_MR_VILE, 28000); + timedFunc_set_2(1.0f, (GenFunction_2)func_8025A6EC, COMUSIC_55_BGS_MR_VILE, 28000); } } if (this->state == 5) { @@ -321,29 +321,29 @@ void func_8038A068(Actor *this, s32 next_state) { if (next_state == 6) { func_8038C3B0(local->vile_marker); func_80324E38(0.0f, 3); - timedFunc_set_2(1.0f, (GenMethod_2)func_8025A6EC, COMUSIC_3C_MINIGAME_LOSS, 28000); - timedFunc_set_0(4.0f, (GenMethod_0)func_8038A044); - timedFunc_set_1(4.0f, (GenMethod_1)func_80389C58, (s32) this->marker); + timedFunc_set_2(1.0f, (GenFunction_2)func_8025A6EC, COMUSIC_3C_MINIGAME_LOSS, 28000); + timedFunc_set_0(4.0f, (GenFunction_0)func_8038A044); + timedFunc_set_1(4.0f, (GenFunction_1)func_80389C58, (s32) this->marker); } if (next_state == 8) { func_8038C3B0(local->vile_marker); func_80324E38(0.0f, 3); - timedFunc_set_2(1.0f, (GenMethod_2)func_8025A6EC, COMUSIC_3B_MINIGAME_VICTORY, 28000); - timedFunc_set_0(3.0f, (GenMethod_0)func_8038A044); - timedFunc_set_1(3.0f, (GenMethod_1)func_80389D20, (s32) this->marker); + timedFunc_set_2(1.0f, (GenFunction_2)func_8025A6EC, COMUSIC_3B_MINIGAME_VICTORY, 28000); + timedFunc_set_0(3.0f, (GenFunction_0)func_8038A044); + timedFunc_set_1(3.0f, (GenFunction_1)func_80389D20, (s32) this->marker); } if (next_state == 9) { func_8038C3B0(local->vile_marker); func_80324E38(0.0f, 3); - timedFunc_set_2(1.0f, (GenMethod_2)func_8025A6EC, COMUSIC_3B_MINIGAME_VICTORY, 28000); - timedFunc_set_0(3.0f, (GenMethod_0)func_8038A044); - timedFunc_set_1(3.0f, (GenMethod_1)func_80389E40, (s32) this->marker); + timedFunc_set_2(1.0f, (GenFunction_2)func_8025A6EC, COMUSIC_3B_MINIGAME_VICTORY, 28000); + timedFunc_set_0(3.0f, (GenFunction_0)func_8038A044); + timedFunc_set_1(3.0f, (GenFunction_1)func_80389E40, (s32) this->marker); } if (next_state == 0xA) { func_8038C3B0(local->vile_marker); func_80324E38(0.5f, 3); - timedFunc_set_2(1.0f, (GenMethod_2) func_8025A6EC, COMUSIC_3B_MINIGAME_VICTORY, 28000); - timedFunc_set_1(3.0f, (GenMethod_1) func_80389F08, (s32) this->marker); + timedFunc_set_2(1.0f, (GenFunction_2) func_8025A6EC, COMUSIC_3B_MINIGAME_VICTORY, 28000); + timedFunc_set_1(3.0f, (GenFunction_1) func_80389F08, (s32) this->marker); } if (next_state == 7) { func_8038C384(local->vile_marker); @@ -374,9 +374,9 @@ void chvilegame_player_consume_piece(Actor *this) { item_inc(ITEM_16_LIFE); func_8025A6EC(COMUSIC_15_EXTRA_LIFE_COLLECTED, 0x7FF8); } - timedFunc_set_1(0.0f, (GenMethod_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); - timedFunc_set_1(0.5f, (GenMethod_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); - timedFunc_set_1(1.0f, (GenMethod_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); + timedFunc_set_1(0.0f, (GenFunction_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); + timedFunc_set_1(0.5f, (GenFunction_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); + timedFunc_set_1(1.0f, (GenFunction_1)func_802FDCB8, ITEM_1A_PLAYER_VILE_SCORE); } func_8028F6B8(BS_INTR_17, (i_ptr->type != YUMBLIE) ? ASSET_3F7_MODEL_GRUMBLIE : ASSET_3F6_MODEL_YUMBLIE); if (!is_correct_type) { @@ -406,9 +406,9 @@ bool chvilegame_cpu_consume_piece(ActorMarker *marker, f32 position[3]) { for(i_ptr = begin; i_ptr < end; i_ptr++){ if ((ml_distance_vec3f(i_ptr->position, position) < 50.0f) && func_8038B684(i_ptr->marker)) { local->vile_score++; - timedFunc_set_1(0.0f, (GenMethod_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); - timedFunc_set_1(0.5f, (GenMethod_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); - timedFunc_set_1(1.0f, (GenMethod_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); + timedFunc_set_1(0.0f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); + timedFunc_set_1(0.5f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); + timedFunc_set_1(1.0f, (GenFunction_1)func_802FDCB8, ITEM_1B_VILE_VILE_SCORE); return TRUE; } } diff --git a/src/BGS/code_9750.c b/src/BGS/code_9750.c index e957e349..1917e9b6 100644 --- a/src/BGS/code_9750.c +++ b/src/BGS/code_9750.c @@ -17,7 +17,7 @@ ActorAnimationInfo D_80390C70[3] = { }; ActorInfo D_80390C88 = {MARKER_6D_TANKTUP_LEG, ACTOR_E9_TANKTUP_LEG_FL, ASSET_3EF_MODEL_TANKTUP_LEG_FL, 0x01, D_80390C70, - func_8038FBF8, func_80326224, func_80325888, + func_8038FBF8, func_80326224, actor_draw, 0, 0x166, 0.0f, 0 }; u8 pad_80390CCC[4] = {0}; @@ -29,7 +29,7 @@ ActorAnimationInfo BGS_D_80390CB0[3] = { }; ActorInfo D_80390CC8 = {MARKER_6D_TANKTUP_LEG, ACTOR_EA_TANKTUP_LEG_BL, ASSET_3F0_MODEL_TANKTUP_LEG_BL, 0x01, BGS_D_80390CB0, - func_8038FBF8, func_80326224, func_80325888, + func_8038FBF8, func_80326224, actor_draw, 0, 0x166, 0.0f, 0 }; u8 pad_80390CEC[4] = {0}; @@ -41,7 +41,7 @@ ActorAnimationInfo BGS_D_80390CF0[3] = { }; ActorInfo D_80390D08 = {MARKER_6D_TANKTUP_LEG, ACTOR_EB_TANKTUP_LEG_FR, ASSET_3F1_MODEL_TANKTUP_LEG_FR, 0x01, BGS_D_80390CF0, - func_8038FBF8, func_80326224, func_80325888, + func_8038FBF8, func_80326224, actor_draw, 0, 0x166, 0.0f, 0 }; u8 pad_80390C2C[4] = {0}; @@ -53,7 +53,7 @@ ActorAnimationInfo D_80390C30[3] = { }; ActorInfo D_80390D48 = {MARKER_6D_TANKTUP_LEG, ACTOR_EC_TANKTUP_LEG_BR, ASSET_3F2_MODEL_TANKTUP_LEG_BR, 0x01, D_80390C30, - func_8038FBF8, func_80326224, func_80325888, + func_8038FBF8, func_80326224, actor_draw, 0, 0x166, 0.0f, 0 }; @@ -72,7 +72,7 @@ void BGS_func_8038FB84(ActorMarker *this, ActorMarker *other_marker){ thisActor = marker_getActor(this); FUNC_8030E8B4( SFX_87_TANKTUP_OOOHW, 1.0f, 32750, thisActor->position, 1000, 3000); - timedFunc_set_2(0.65f, (GenMethod_2) func_8038FB40, (s32) this, (s32) other_marker); + timedFunc_set_2(0.65f, (GenFunction_2) func_8038FB40, (s32) this, (s32) other_marker); func_8038F51C(thisActor); this->collidable = 0; } diff --git a/src/CC/ch/sawblade.c b/src/CC/ch/sawblade.c index 05a43c98..99d46a5e 100644 --- a/src/CC/ch/sawblade.c +++ b/src/CC/ch/sawblade.c @@ -33,84 +33,84 @@ Struct_CC_3130_0 D_80389C30[] = { ActorInfo D_80389C90 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_3D_CLANKER_SAWBLADE_PROPELLOR_1, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389CB4 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_3E_CLANKER_SAWBLADE_PROPELLOR_2, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389CD8 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_3F_CLANKER_SAWBLADE_PROPELLOR_3, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389CFC = { MARKER_28_CLANKER_SAWBLADE, ACTOR_40_CLANKER_SAWBLADE_PROPELLOR_4, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389D20 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_41_CLANKER_SAWBLADE_PROPELLOR_5, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389D44 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_42_CLANKER_SAWBLADE_PROPELLOR_6, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389D68 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_290_CLANKER_SAWBLADE_PROPELLOR_7, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389D8C = { MARKER_28_CLANKER_SAWBLADE, ACTOR_291_CLANKER_SAWBLADE_PROPELLOR_8, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389DB0 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_292_CLANKER_SAWBLADE_PROPELLOR_9, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389DD4 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_293_CLANKER_SAWBLADE_PROPELLOR_10, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389DF8 = { MARKER_28_CLANKER_SAWBLADE, ACTOR_294_CLANKER_SAWBLADE_PROPELLOR_11, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389E1C = { MARKER_28_CLANKER_SAWBLADE, ACTOR_295_CLANKER_SAWBLADE_PROPELLOR_12, ASSET_43A_MODEL_CLANKER_SAWBLADE_PROPELLOR, 0, NULL, - chSawblade_update, NULL, func_80325888, + chSawblade_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CC/ch/tooth.c b/src/CC/ch/tooth.c index b3dc0756..3fba9968 100644 --- a/src/CC/ch/tooth.c +++ b/src/CC/ch/tooth.c @@ -29,14 +29,14 @@ Struct_CC_1120_0 D_80389B50[] = { ActorInfo D_80389B90 = { 0x4E, ACTOR_101_CLANKER_TOKEN_TOOTH, ASSET_891_MODEL_CLANKER_TOKEN_TOOTH_OPEN, 0, NULL, - chTooth_update, func_80326224, func_80325888, + chTooth_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389BB4 = { 0x4F, ACTOR_102_CLANKER_JIGGY_TOOTH, ASSET_893_MODEL_CLANKER_JIGGY_TOOTH_OPEN, 0, NULL, - chTooth_update, func_80326224, func_80325888, + chTooth_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CC/code_0.c b/src/CC/code_0.c index 24b33f83..2f7f7574 100644 --- a/src/CC/code_0.c +++ b/src/CC/code_0.c @@ -15,7 +15,7 @@ void func_803864D4(Actor *this); /* .data */ ActorInfo D_80389AA0 = { MARKER_4B_CC_SCREW, ACTOR_43_CLACKER_SCREW, ASSET_890_MODEL_SCREW, 0, NULL, - func_803864D4, func_80326224 , func_80325888, + func_803864D4, func_80326224 , actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CC/code_1F70.c b/src/CC/code_1F70.c index 14bee610..d051be8b 100644 --- a/src/CC/code_1F70.c +++ b/src/CC/code_1F70.c @@ -15,13 +15,13 @@ extern void func_802E9118(BKCollisionList *, BKVertexList *, f32[3], s32, f32, s extern void func_802E9DD8(BKCollisionList *, BKVertexList *, f32[3], s32, f32, s32, f32, s32, s32); extern int func_80340020(s32, f32[3], s32, f32, s32, BKVertexList *, f32[3], f32[3]); -extern void func_8033A670(s32, s32, f32[3]); -extern void func_8033A928(s32, s32, f32[3]); +extern void boneTransformList_getBoneScale(s32, s32, f32[3]); +extern void boneTransformList_setBoneScale(s32, s32, f32[3]); extern void func_8033A9A8(s32, s32, f32[3]); extern void viewport_getPosition(f32[3]); extern void ml_vec3f_normalize(f32[3]); extern void func_8033A45C(s32, s32); -extern void func_8033A238(s32); +extern void modelRender_setBoneTransformList(s32); extern void func_8028FAB0(f32[3]); extern void baModel_802921D4(f32[3]); @@ -90,7 +90,7 @@ void func_80388518(s32 arg0){ D_80389FA0.unk21 = arg0; D_80389FA0.unk38 = 0.0f; if(D_80389FA0.unk21 == 1){ - func_80335924(D_80389FA0.unk0, ASSET_C3_ANIM_CLANKER_IDLE, 0.0f, 10.0f); + skeletalAnim_set(D_80389FA0.unk0, ASSET_C3_ANIM_CLANKER_IDLE, 0.0f, 10.0f); } if(D_80389FA0.unk21 == 2){ func_8030DD90(D_80389FA0.unk4, 0); @@ -103,7 +103,7 @@ void func_80388518(s32 arg0){ if(D_80389FA0.unk21 == 3){ if(sp24 != 2){ - func_80335924(D_80389FA0.unk0, ASSET_C3_ANIM_CLANKER_IDLE, 0.0f, 10.0f); + skeletalAnim_set(D_80389FA0.unk0, ASSET_C3_ANIM_CLANKER_IDLE, 0.0f, 10.0f); } D_80389FA0.unk28[1] = 1100.0f; } @@ -151,13 +151,13 @@ void CC_func_80388760(Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(sp98[0] < -2600.0f || 11600.0f < sp98[0]) return; - s1 = func_803356A0(D_80389FA0.unk0); - func_8033A670(s1, 0x40, sp84); + s1 = skeletalAnim_getBoneTransformList(D_80389FA0.unk0); + boneTransformList_getBoneScale(s1, 0x40, sp84); for( i = 0; i < 3; i++){ sp84[i] = sp84[i] + (1.3 - sp84[i])*D_80389FA0.unk8; } - func_8033A928(s1, 0x40, sp84); + boneTransformList_setBoneScale(s1, 0x40, sp84); if(D_80389FA0.unk21 == 1){ func_8033A9A8(s1, 0x44, D_80389C0C); @@ -201,7 +201,7 @@ void CC_func_80388760(Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(2, tmp_s0); func_8033A45C(3, tmp_s0); } - func_8033A238(s1); + modelRender_setBoneTransformList(s1); func_8033A450(D_80389FA0.unk34); modelRender_setVertexList(D_80389FA0.unk40); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); @@ -248,7 +248,7 @@ int CC_func_80388CA0(void){ void func_80388CB4(void){ if(D_80389FA0.unk21){ - func_80335874(D_80389FA0.unk0); + skeletalAnim_free(D_80389FA0.unk0); func_8030DA44(D_80389FA0.unk4); func_80340690(D_80389FA0.unk18); func_8034A2A8(D_80389FA0.unk34); @@ -266,7 +266,7 @@ void func_80388CB4(void){ void func_80388D54(void){ D_80389FA0.unk21 = 0; if(map_get() == MAP_B_CC_CLANKERS_CAVERN){ - D_80389FA0.unk0 = func_803358B4(); + D_80389FA0.unk0 = skeletalAnim_new(); D_80389FA0.unk4 = func_8030D90C(); D_80389FA0.unk8 = 1.0f; D_80389FA0.unk18 = func_803406B0(); @@ -334,9 +334,9 @@ void CC_func_80388F4C(void){ D_80389FA0.unk20 = (ml_distance_vec3f(sp6C, D_80389FA0.unkC) < 200.0f); D_80389FA0.unk38 += sp68; - sp64 = func_80335684(D_80389FA0.unk0); - func_80335A94(D_80389FA0.unk0, sp68, 1); - sp60 = func_80335684(D_80389FA0.unk0); + sp64 = skeletalAnim_getProgress(D_80389FA0.unk0); + skeletalAnim_update(D_80389FA0.unk0, sp68, 1); + sp60 = skeletalAnim_getProgress(D_80389FA0.unk0); if(D_80389FA0.unk21 == 3){ func_8034A174(D_80389FA0.unk34, 5, sp54); if(sp60 < sp64){ @@ -359,16 +359,16 @@ void CC_func_80388F4C(void){ } if(D_80389FA0.unk21 == 1){ - if(D_80389FA0.unk20 && func_8033567C(D_80389FA0.unk0) != ASSET_C4_ANIM_CLANKER_BITE){ - func_80335924(D_80389FA0.unk0, ASSET_C4_ANIM_CLANKER_BITE, 1.0f, 10.0f); + if(D_80389FA0.unk20 && skeletalAnim_getAnimId(D_80389FA0.unk0) != ASSET_C4_ANIM_CLANKER_BITE){ + skeletalAnim_set(D_80389FA0.unk0, ASSET_C4_ANIM_CLANKER_BITE, 1.0f, 10.0f); if(!D_80389FA0.unk48){ func_80311480(0xd2b, 0xE, D_80389FA0.unk28, NULL, NULL, NULL); D_80389FA0.unk48 = TRUE; } }//L8038918C - if(!D_80389FA0.unk20 && func_8033567C(D_80389FA0.unk0) == ASSET_C4_ANIM_CLANKER_BITE){ - func_80335924(D_80389FA0.unk0, ASSET_C3_ANIM_CLANKER_IDLE, 1.0f, 10.0f); + if(!D_80389FA0.unk20 && skeletalAnim_getAnimId(D_80389FA0.unk0) == ASSET_C4_ANIM_CLANKER_BITE){ + skeletalAnim_set(D_80389FA0.unk0, ASSET_C3_ANIM_CLANKER_IDLE, 1.0f, 10.0f); } }//L803891BC diff --git a/src/CC/code_3400.c b/src/CC/code_3400.c index 8bc6de96..aa036f03 100644 --- a/src/CC/code_3400.c +++ b/src/CC/code_3400.c @@ -15,21 +15,21 @@ u8 D_80389E40[] = {3, 3, 2, 0}; ActorInfo D_80389E44 = { 0x1A9, 0x28C, 0x435, 0, NULL, - func_80389900, NULL, func_80325888, + func_80389900, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389E68 = { 0x1A9, 0x28D, 0x436, 0, NULL, - func_80389900, NULL, func_80325888, + func_80389900, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389E8C = { 0x1A9, 0x28E, 0x437, 0, NULL, - func_80389900, NULL, func_80325888, + func_80389900, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CC/code_530.c b/src/CC/code_530.c index 1bac6a15..9a6c701b 100644 --- a/src/CC/code_530.c +++ b/src/CC/code_530.c @@ -23,7 +23,7 @@ void func_80386B28(Actor* this); /* .data */ ActorInfo D_80389AD0 = { MARKER_4A_CC_KEY, ACTOR_3C_CC_KEY, ASSET_429_MODEL_CC_KEY, 0, NULL, - func_80386B28, func_80326224, func_80325888, + func_80386B28, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CC/code_BF0.c b/src/CC/code_BF0.c index df8bc3c1..3012c9d6 100644 --- a/src/CC/code_BF0.c +++ b/src/CC/code_BF0.c @@ -14,14 +14,14 @@ void func_803870F8(Actor *this); extern ActorInfo D_80389B00 = { MARKER_4C_CLANKER_TOKEN_TOOTH_EXT, ACTOR_44_CLANKER_TOKEN_TOOTH_EXTERIOR, ASSET_309_MODEL_CLANKER_TOKEN_TOOTH_EXTERIOR, 0, NULL, - func_803870F8, func_80326224, func_80325888, + func_803870F8, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; extern ActorInfo D_80389B24 = { MARKER_4D_CLANKER_JIGGY_TOOTH_EXT, ACTOR_45_CLANKER_JIGGY_TOOTH_EXTERIOR, ASSET_30A_MODEL_CLANKER_JIGGY_TOOTH_EXTERIOR, 0, NULL, - func_803870F8, func_80326224, func_80325888, + func_803870F8, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CCW/code_0.c b/src/CCW/code_0.c index 7e4c3540..6f31cdaa 100644 --- a/src/CCW/code_0.c +++ b/src/CCW/code_0.c @@ -4,8 +4,8 @@ void func_803864B8(Actor *this); -ActorInfo D_8038EB50 = { 0x1AC, 0x298, 0x444, 0x0, NULL, func_803864B8, NULL, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8038EB74 = { 0x1AC, 0x29A, 0x445, 0x0, NULL, func_803864B8, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038EB50 = { 0x1AC, 0x298, 0x444, 0x0, NULL, func_803864B8, NULL, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038EB74 = { 0x1AC, 0x29A, 0x445, 0x0, NULL, func_803864B8, NULL, actor_draw, 0, 0, 0.0f, 0}; /* .code */ void CCW_func_803863F0(Actor *this, s32 next_state){ diff --git a/src/CCW/code_14B0.c b/src/CCW/code_14B0.c index 16a780bf..b4b49855 100644 --- a/src/CCW/code_14B0.c +++ b/src/CCW/code_14B0.c @@ -30,7 +30,7 @@ Struct_CCW_14B0_0 D_8038EC00[] = { 0 }; -ActorInfo D_8038EC14 = { 0x1AF, 0x29C, 0x446, 0x0, NULL, CCW_func_80387A40, NULL, func_80325888, 0, 0, 1.0f, 0}; +ActorInfo D_8038EC14 = { 0x1AF, 0x29C, 0x446, 0x0, NULL, CCW_func_80387A40, NULL, actor_draw, 0, 0, 1.0f, 0}; /* .code */ void func_803878A0(Actor *this, s32 next_state) { @@ -38,8 +38,8 @@ void func_803878A0(Actor *this, s32 next_state) { int i; if (next_state == 1) { - if (func_8033567C(this->unk148) != 0x16F) { - func_80335924(this->unk148, 0x16F, 0.1f, 0.65f); + if (skeletalAnim_getAnimId(this->unk148) != 0x16F) { + skeletalAnim_set(this->unk148, 0x16F, 0.1f, 0.65f); } for(i = 0; i < 10; i++){ local->unkC[0] = randf2(-500.0f, 500.0f); diff --git a/src/CCW/code_160.c b/src/CCW/code_160.c index e8e8dc71..0c04fc84 100644 --- a/src/CCW/code_160.c +++ b/src/CCW/code_160.c @@ -13,7 +13,7 @@ void func_803865F4(Actor *this, s32 next_state); void func_8038687C(Actor *this); /* .data */ -ActorInfo D_8038EBA0 = { 0x1AD, 0x299, 0x443, 0x0, NULL, func_8038687C, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038EBA0 = { 0x1AD, 0x299, 0x443, 0x0, NULL, func_8038687C, NULL, actor_draw, 0, 0, 0.0f, 0}; /* .code */ void CCW_func_80386550(ActorMarker *marker){ @@ -69,7 +69,7 @@ void func_803865F4(Actor *this, s32 next_state) { func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); func_80324E38(0.0f, 3); timed_setStaticCameraToNode(2.0f, 4); - timedFunc_set_1(2.0f, (GenMethod_1)CCW_func_80386550, (s32) this->marker); + timedFunc_set_1(2.0f, (GenFunction_1)CCW_func_80386550, (s32) this->marker); timed_exitStaticCamera(4.0f); func_80324E38(4.0f, 0); } @@ -192,7 +192,7 @@ void func_8038687C(Actor *this) { break; } - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x29B, reinterpret_cast(s32, sp4C[0]), reinterpret_cast(s32, sp4C[1]), reinterpret_cast(s32, sp4C[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x29B, reinterpret_cast(s32, sp4C[0]), reinterpret_cast(s32, sp4C[1]), reinterpret_cast(s32, sp4C[2])); local->unk4++; } local->unkC = randf2(0.5 - ((local->unk8 / 10) * 0.4), 1.0 - ((local->unk8 / 10) * 0.8)); diff --git a/src/CCW/code_1B20.c b/src/CCW/code_1B20.c index a5c35ca0..990dbc5d 100644 --- a/src/CCW/code_1B20.c +++ b/src/CCW/code_1B20.c @@ -48,16 +48,16 @@ void func_80387F64(Actor *this, s32 next_state){ if (next_state == 1) { this->marker->propPtr->unk8_3 = local->unk0->unk3; - func_80335924(this->unk148, local->unk0->unk0, 0.0f, 5.0f); - func_80335A8C(this->unk148, local->unk0->unk2); + skeletalAnim_set(this->unk148, local->unk0->unk0, 0.0f, 5.0f); + skeletalAnim_setBehavior(this->unk148, local->unk0->unk2); } if (next_state == 2) { if (map_get() == MAP_43_CCW_SPRING) { func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); } fileProgressFlag_set(local->unk0->unk8, TRUE); - func_80335924(this->unk148, local->unk0->unk4, 0.0f, 6.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, local->unk0->unk4, 0.0f, 6.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); if (map_get() == MAP_43_CCW_SPRING) { func_80324E38(0.0f, 3); } @@ -80,8 +80,8 @@ void func_80387F64(Actor *this, s32 next_state){ if (next_state == 3) { this->marker->propPtr->unk8_3 = TRUE; - func_80335924(this->unk148, local->unk0->unk6, 0.1f, 5.0f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, local->unk0->unk6, 0.1f, 5.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } this->state = next_state; } @@ -111,15 +111,15 @@ Actor *CCW_func_803882F4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { return func_80325340(marker, gfx, mtx, vtx); } - if ((func_8033567C(this->unk148) == 0x175) && (0.49 <= func_80335684(this->unk148))) { + if ((skeletalAnim_getAnimId(this->unk148) == 0x175) && (0.49 <= skeletalAnim_getProgress(this->unk148))) { sp18 = 1; } else { sp18 = 0; } - sp18 = (func_8033567C(this->unk148) == 0x183)? 1 : sp18; + sp18 = (skeletalAnim_getAnimId(this->unk148) == 0x183)? 1 : sp18; func_8033A45C(3, sp18); func_8033A45C(4, sp18); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_803883F4() { diff --git a/src/CCW/code_21A0.c b/src/CCW/code_21A0.c index 775c2650..5aa10b97 100644 --- a/src/CCW/code_21A0.c +++ b/src/CCW/code_21A0.c @@ -8,15 +8,15 @@ void func_803885F8(Actor *this); ActorInfo D_8038ECA0 = { 0x1C2, 0x30B, 0x4E3, 0x0, NULL, - func_803885F8, NULL, func_80325888, + func_803885F8, NULL, actor_draw, 0, 0, 1.0f, 0 }; /* .code */ void func_80388590(Actor *this, s32 next_state){ if(next_state == 1){ - func_80335924(this->unk148, 0x219, 0.0f, 1.0f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, 0x219, 0.0f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); } this->state = next_state; } diff --git a/src/CCW/code_2270.c b/src/CCW/code_2270.c index 8a46fac3..62464cb6 100644 --- a/src/CCW/code_2270.c +++ b/src/CCW/code_2270.c @@ -11,7 +11,7 @@ typedef struct{ typedef struct{ Struct_CCW_2270_0 *unk0; - Struct80s *unk4; + SkeletalAnimation *unk4; BKModelBin *spit_model; }ActorLocal_chGobiCCW; @@ -44,30 +44,30 @@ void CCW_func_8038868C(Actor *this, s32 next_state) { local = (ActorLocal_chGobiCCW*)&this->local; if (next_state == 1) { - func_80335924(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f); + skeletalAnim_set(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f); } if (next_state == 2) { if (local->unk0->unk4 != 0) { func_80311480(local->unk0->unk4, 4, NULL, NULL, NULL, NULL); } - func_80335924(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f); - func_80335A8C(this->unk148, 2); - func_80335924(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f); - func_80335A8C(local->unk4, 2); + skeletalAnim_set(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); + skeletalAnim_set(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f); + skeletalAnim_setBehavior(local->unk4, 2); func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, (map_get() == MAP_44_CCW_SUMMER) ? 1 : 2); timed_playSfx(0.05f, SFX_84_GOBI_CRYING, 1.1f, 32000); timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(2.0f, SFX_4B_GULPING, 0.8f, 28000); - timedFunc_set_2(3.2f, (GenMethod_2) CCW_func_80388660, (s32) this->marker, 3); + timedFunc_set_2(3.2f, (GenFunction_2) CCW_func_80388660, (s32) this->marker, 3); } if (next_state == 3) { func_803883F4(); } if (next_state == 4) { - func_80335924(this->unk148, ASSET_176_ANIM_GOBI_YAWN, 0.5f, 4.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_176_ANIM_GOBI_YAWN, 0.5f, 4.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); timed_exitStaticCamera(0.0f); func_80324E38(0.0f, 0); } @@ -75,12 +75,12 @@ void CCW_func_8038868C(Actor *this, s32 next_state) { if (local->unk0->unk6 != 0) { func_80311480((s32) local->unk0->unk6, 4, NULL, NULL, NULL, NULL); } - func_80335924(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.23f, 0.5f); + skeletalAnim_set(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.23f, 0.5f); timed_setStaticCameraToNode(0.0f, 3); } if (next_state == 6) { - func_80335924(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.1f, 0.71f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.1f, 0.71f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if (next_state == 7) { timed_exitStaticCamera(0.0f); @@ -95,7 +95,7 @@ void func_8038894C(ActorMarker* marker, ActorMarker *other_marker) { Actor* actor = marker_getActor(marker); if (actor->state == 1) { actor_collisionOff(actor); - timedFunc_set_2(0.5f, (GenMethod_2)CCW_func_80388660, (s32)actor->marker, 2); + timedFunc_set_2(0.5f, (GenFunction_2)CCW_func_80388660, (s32)actor->marker, 2); } } @@ -112,17 +112,17 @@ Actor *chGobiCCW_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp2C[1] = this->yaw; sp2C[2] = this->roll; - func_8033A238(func_803356A0(local->unk4, local)); + modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(local->unk4)); modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE); modelRender_draw(gfx, mtx, this->position, sp2C, 1.0f, NULL, local->spit_model); } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void chGobiCCW_free(Actor *this){ ActorLocal_chGobiCCW *local = (ActorLocal_chGobiCCW*)&this->local; - func_80335874(local->unk4); + skeletalAnim_free(local->unk4); assetcache_release(local->spit_model); } @@ -138,7 +138,7 @@ void chGobiCCW_update(Actor *this) { this->marker->propPtr->unk8_3 = TRUE; this->marker->unk30 = chGobiCCW_free; this->unk138_24 = FALSE; - local->unk4 = func_803358B4(); + local->unk4 = skeletalAnim_new(); local->spit_model = assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT); marker_setCollisionScripts(this->marker, 0, func_8038894C, 0); if(!jiggyscore_isSpawned(JIGGY_4D_CCW_FLOWER)) { @@ -171,7 +171,7 @@ void chGobiCCW_update(Actor *this) { } if (this->state == 2) { - func_80335A94(local->unk4, time_getDelta(), 1); + skeletalAnim_update(local->unk4, time_getDelta(), 1); } if(this->state == 3){ @@ -185,12 +185,12 @@ void chGobiCCW_update(Actor *this) { } if (this->state == 4) { - if ((func_8033567C(this->unk148) == ASSET_176_ANIM_GOBI_YAWN) && (func_80335794(this->unk148) > 0)) { - func_80335924(this->unk148, ASSET_177_ANIM_GOBI_SLEEP, 0.1f, 4.0f); - func_80335A8C(this->unk148, 1); + if ((skeletalAnim_getAnimId(this->unk148) == ASSET_176_ANIM_GOBI_YAWN) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { + skeletalAnim_set(this->unk148, ASSET_177_ANIM_GOBI_SLEEP, 0.1f, 4.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } - if (func_8033567C(this->unk148) == ASSET_177_ANIM_GOBI_SLEEP) { - func_8033568C(this->unk148, &sp44, &sp40); + if (skeletalAnim_getAnimId(this->unk148) == ASSET_177_ANIM_GOBI_SLEEP) { + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if ((sp44 < 0.1) && (0.1 <= (f64) sp40)) { FUNC_8030E8B4(SFX_5E_BANJO_PHEWWW, 0.8f, 15000, this->position, 500, 1500); } @@ -202,7 +202,7 @@ void chGobiCCW_update(Actor *this) { } if (this->state == 5){ - if(func_80335794(this->unk148) > 0) { + if(skeletalAnim_getLoopCount(this->unk148) > 0) { CCW_func_8038868C(this, 6); } } diff --git a/src/CCW/code_2B00.c b/src/CCW/code_2B00.c index e8d67911..2b13ae23 100644 --- a/src/CCW/code_2B00.c +++ b/src/CCW/code_2B00.c @@ -29,14 +29,14 @@ ActorAnimationInfo D_8038ED20[] = { {ASSET_D4_ANIM_SWITCH_DOWN, 100000000.0f} }; -ActorInfo D_8038ED50 = { 0x133, 0x1E3, 0x52E, 0x1, NULL, func_80389268, func_80326224, func_80325E78, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038ED74 = { 0x132, 0x1E2, 0x4F5, 0x5, D_8038ED20, func_80388FD4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8038ED98 = { 0x131, 0x16D, 0x52E, 0x1, NULL, func_80389268, func_80326224, func_80325E78, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038EDBC = { 0x130, 0x16C, 0x4F6, 0x5, D_8038ED20, func_80388FD4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8038EDE0 = { 0x12F, 0x16B, 0x52E, 0x1, NULL, func_80389268, func_80326224, func_80325E78, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038EE04 = { 0x12E, 0x16A, 0x4F7, 0x5, D_8038ED20, func_80388FD4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8038EE28 = { 0x12D, 0x169, 0x52E, 0x1, NULL, func_80389268, func_80326224, func_80325E78, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038EE4C = { 0x12C, 0x168, 0x4F8, 0x5, D_8038ED20, func_80388FD4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038ED50 = { 0x133, 0x1E3, 0x52E, 0x1, NULL, func_80389268, func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; +ActorInfo D_8038ED74 = { 0x132, 0x1E2, 0x4F5, 0x5, D_8038ED20, func_80388FD4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038ED98 = { 0x131, 0x16D, 0x52E, 0x1, NULL, func_80389268, func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; +ActorInfo D_8038EDBC = { 0x130, 0x16C, 0x4F6, 0x5, D_8038ED20, func_80388FD4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038EDE0 = { 0x12F, 0x16B, 0x52E, 0x1, NULL, func_80389268, func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; +ActorInfo D_8038EE04 = { 0x12E, 0x16A, 0x4F7, 0x5, D_8038ED20, func_80388FD4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038EE28 = { 0x12D, 0x169, 0x52E, 0x1, NULL, func_80389268, func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; +ActorInfo D_8038EE4C = { 0x12C, 0x168, 0x4F8, 0x5, D_8038ED20, func_80388FD4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; /* .code */ s32 func_80388EF0(Actor *this){ diff --git a/src/CCW/code_3050.c b/src/CCW/code_3050.c index f71f4c0e..12698181 100644 --- a/src/CCW/code_3050.c +++ b/src/CCW/code_3050.c @@ -16,8 +16,8 @@ void func_80389440(Actor *this, s32 next_state) { func_8030E510(SFX_AA_BGS_EGG_BREAKING_1, 28000); this->marker->propPtr->unk8_3 = FALSE; fileProgressFlag_set(FILEPROG_E6_SPRING_EYRIE_HATCHED, TRUE); - func_80335924(this->unk148, 0x187, 0.0f, 2.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x187, 0.0f, 2.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, 2); timed_exitStaticCamera(8.0f); @@ -42,7 +42,7 @@ Actor *CCW_func_8038954C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8033A45C(3, (this->state < 2) ? 1 : 0); func_8033A45C(4, (this->state < 2) ? 0 : 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_803895F4(Actor *this) { @@ -61,7 +61,7 @@ void func_803895F4(Actor *this) { } if (this->state == 2) { - func_8033568C(this->unk148, &sp2C, &sp28); + skeletalAnim_getProgressRange(this->unk148, &sp2C, &sp28); if ((sp2C < 0.5) && (sp28 >= 0.5)) { func_80326310(this); } diff --git a/src/CCW/code_3310.c b/src/CCW/code_3310.c index 5bdee665..1a3e9c0d 100644 --- a/src/CCW/code_3310.c +++ b/src/CCW/code_3310.c @@ -2,7 +2,6 @@ #include "functions.h" #include "variables.h" - typedef struct { f32 unk0; s16 unk4; @@ -110,7 +109,7 @@ void func_80389700(ActorMarker *marker, enum asset_e text_id, s32 arg2) { void func_80389740(ActorMarker *marker) { Actor *this = marker_getActor(marker); if (this->marker->unk14_21) { - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x30C, reinterpret_cast(s32, D_8038FDE0[0]), reinterpret_cast(s32, D_8038FDE0[1]), reinterpret_cast(s32, D_8038FDE0[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x30C, reinterpret_cast(s32, D_8038FDE0[0]), reinterpret_cast(s32, D_8038FDE0[1]), reinterpret_cast(s32, D_8038FDE0[2])); } } @@ -125,8 +124,8 @@ void func_803897B8(Actor *this, s32 next_state) { local->unk8 = NULL; if (next_state == 1) { if (local->unk0->unk6 != 0) { - func_80335924(this->unk148, local->unk0->unk6, 0.2f, 6.0f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, local->unk0->unk6, 0.2f, 6.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } local->unk8 = local->unk0->unk8; } @@ -135,14 +134,14 @@ void func_803897B8(Actor *this, s32 next_state) { } if (next_state == 5) { func_8028F784(1); - func_80335924(this->unk148, local->unk0->unk26, 0.2f, 2.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, local->unk0->unk26, 0.2f, 2.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); local->unk8 = &D_8038F060[0]; } if (next_state == 2) { - func_80335924(this->unk148, local->unk0->unkE, 0.2f, 8.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, local->unk0->unkE, 0.2f, 8.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324E38(0.5f, 3); timed_setStaticCameraToNode(0.5f, local->unk0->unk24); timed_exitStaticCamera(16.5f); @@ -151,11 +150,11 @@ void func_803897B8(Actor *this, s32 next_state) { } if (next_state == 3) { actor_collisionOff(this); - func_80335924(this->unk148, local->unk0->unk14, 0.5f, 8.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, local->unk0->unk14, 0.5f, 8.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); if (local->unk0->map_id == MAP_43_CCW_SPRING) { func_80311480(0xCD6, 4, NULL, NULL, NULL, NULL); - func_8033579C(this->unk148, 0x3F266666, &func_80389798); + skeletalAnim_setCallback_0(this->unk148, 0.65f, &func_80389798); } if (local->unk0->map_id == MAP_44_CCW_SUMMER) { func_80311480(0xCD9, 4, NULL, NULL, NULL, NULL); @@ -167,14 +166,14 @@ void func_803897B8(Actor *this, s32 next_state) { } if (next_state == 4) { func_8028F784(0); - func_80335924(this->unk148, local->unk0->unk1C, 0.2f, 6.0f); - func_80335A8C(this->unk148, 1); - func_80335800(this->unk148, 0.2f, func_80389740, this->marker); - func_80335800(this->unk148, 0.3f, func_80389740, this->marker); - func_80335800(this->unk148, 0.4f, func_80389740, this->marker); - func_80335800(this->unk148, 0.72f, func_80389740, this->marker); - func_80335800(this->unk148, 0.82f, func_80389740, this->marker); - func_80335800(this->unk148, 0.92f, func_80389740, this->marker); + skeletalAnim_set(this->unk148, local->unk0->unk1C, 0.2f, 6.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); + skeletalAnim_setCallback_1(this->unk148, 0.2f, func_80389740, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.3f, func_80389740, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.4f, func_80389740, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.72f, func_80389740, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.82f, func_80389740, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.92f, func_80389740, this->marker); local->unk8 = local->unk0->unk20; } this->state = next_state; @@ -192,7 +191,7 @@ Actor *func_80389B24(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ return this; } func_8033A45C(3, (this->state == 4) ? 2 : 1); - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); func_8034A174(func_80329934(), 5, D_8038FDE0); return this; } @@ -245,7 +244,7 @@ void CCW_func_80389BFC(Actor *this) { } if (local->unk8) { - func_8033568C(this->unk148, &sp5C, &sp58); + skeletalAnim_getProgressRange(this->unk148, &sp5C, &sp58); for(iPtr = local->unk8; iPtr->unk0 > 0.0f; iPtr ++){ if ((sp5C < iPtr->unk0) && (iPtr->unk0 <= sp58)) { func_8030E878((s32) iPtr->unk4, randf2(iPtr->unk8 - 0.05, iPtr->unk8 + 0.05), iPtr->unkC, this->position, 500.0f, 2500.0f); @@ -289,13 +288,13 @@ void CCW_func_80389BFC(Actor *this) { func_803897B8(this, local->unk0->unkC); } } - if ((this->state == 2) && (func_80335794(this->unk148) > 0)) { + if ((this->state == 2) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { func_803897B8(this, 3); } - if ((this->state == 3) && (func_80335794(this->unk148) > 0)) { + if ((this->state == 3) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { func_803897B8(this, 4); } - if ((this->state == 5) && (func_80335794(this->unk148) > 0)) { + if ((this->state == 5) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { func_803897B8(this, 1); } } diff --git a/src/CCW/code_3DA0.c b/src/CCW/code_3DA0.c index df0bcc7a..46471686 100644 --- a/src/CCW/code_3DA0.c +++ b/src/CCW/code_3DA0.c @@ -40,14 +40,14 @@ void chcaterpillar_setState(Actor *this, s32 next_state) { ActorLocal_Caterpillar *local = (ActorLocal_Caterpillar *)&this->local; if (next_state == 1) { - func_80335924(this->unk148, 0x18D, 0.0f, randf2(1.9f, 2.1f)); + skeletalAnim_set(this->unk148, 0x18D, 0.0f, randf2(1.9f, 2.1f)); } if (next_state == 2) { func_8028F7D4(-25.0f, 90.0f); - func_80335924(this->unk148, 0x18E, 0.2f, 2.0f); + skeletalAnim_set(this->unk148, 0x18E, 0.2f, 2.0f); } if (next_state == 3) { - func_80335924(this->unk148, 0x18E, 0.2f, 2.0f); + skeletalAnim_set(this->unk148, 0x18E, 0.2f, 2.0f); local->unkC[0] = this->position[0]; local->unkC[1] = this->position[1]; local->unkC[2] = this->position[2]; @@ -68,7 +68,7 @@ Actor* chcaterpillar_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) if(this->state == 5){ return func_80325340(marker, gfx, mtx, vtx); } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void chcaterpillar_update(Actor *this){ @@ -109,7 +109,7 @@ void chcaterpillar_update(Actor *this){ }//L8038A45C if(this->state == 1){ - func_8033568C(this->unk148, &sp64, &sp60); + skeletalAnim_getProgressRange(this->unk148, &sp64, &sp60); player_getPosition(sp74); if(ml_distance_vec3f(this->position, local->unk0) < 10.0f){ for(i = 0; i < 10; i++){ diff --git a/src/CCW/code_4530.c b/src/CCW/code_4530.c index 61aace7e..efe249e0 100644 --- a/src/CCW/code_4530.c +++ b/src/CCW/code_4530.c @@ -41,14 +41,14 @@ void func_8038A920(ActorMarker* marker, enum asset_e text_id, s32 arg2) { void func_8038A950(Actor *this, s32 next_state) { if (next_state == 1) { - func_80335924(this->unk148, 0x199, 0.0f, 6.5f); + skeletalAnim_set(this->unk148, 0x199, 0.0f, 6.5f); } if (next_state == 2) { func_80311480(0xCDC, 0xA, this->position, this->marker, func_8038A920, NULL); } if (next_state == 3) { - func_80335924(this->unk148, 0x19A, 0.0f, 7.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x19A, 0.0f, 7.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, 0); } @@ -65,7 +65,7 @@ Actor *func_8038AA38(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ this = marker_getActor(marker); if(this->state == 0) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038AA8C(Actor *this) { @@ -91,7 +91,7 @@ void func_8038AA8C(Actor *this) { } if (this->state == 1) { - func_8033568C(this->unk148, &sp50, &sp4C); + skeletalAnim_getProgressRange(this->unk148, &sp50, &sp4C); if ((sp50 < 0.21) && (0.21 <= sp4C)) { func_8030E878(0xA5, randf2(0.9f, 1.1f), 32000, this->position, 500.0f, 2500.0f); } @@ -106,13 +106,13 @@ void func_8038AA8C(Actor *this) { } } if (this->state == 3) { - func_8033568C(this->unk148, &sp44, &sp40); + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); for(iPtr = &D_8038F1B4[0]; iPtr->unk0 > 0.0f; iPtr++){ if ((sp44 < iPtr->unk0) && (iPtr->unk0 <= sp40)) { func_8030E878(iPtr->unk8, iPtr->unk4, iPtr->unkA, this->position, 500.0f, 2500.0f); } } - if (func_80335794(this->unk148) > 0) { + if (skeletalAnim_getLoopCount(this->unk148) > 0) { func_8038A950(this, 4); } } diff --git a/src/CCW/code_4960.c b/src/CCW/code_4960.c index e96e5e99..5f8f65a8 100644 --- a/src/CCW/code_4960.c +++ b/src/CCW/code_4960.c @@ -33,12 +33,12 @@ void func_8038AD50(Actor *this, s32 next_state) { mapSpecificFlags_set(6, 0); timed_setStaticCameraToNode(0.0f, 1); } - func_80335924(this->unk148, 0x21D, 0.2f, 0.5f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x21D, 0.2f, 0.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if (next_state == 3) { - func_80335924(this->unk148, 0x21E, 0.2f, 2.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x21E, 0.2f, 2.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if (next_state == 4) { timed_exitStaticCamera(0.0f); @@ -54,7 +54,7 @@ Actor *func_8038AE64(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ this = marker_getActor(marker); if(this->state < 2) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038AEBC(Actor *this) { @@ -77,7 +77,7 @@ void func_8038AEBC(Actor *this) { } if (this->state == 2) { func_80326224(this); - func_8033568C(this->unk148, &sp38, &sp34); + skeletalAnim_getProgressRange(this->unk148, &sp38, &sp34); for(iPtr = &D_8038F254[0]; iPtr->unk0 > 0.0f; iPtr++){ if ((sp38 < iPtr->unk0) && (iPtr->unk0 <= sp34)) { func_8030E878((s32) iPtr->unk8, iPtr->unk4, iPtr->unkA, this->position, 1500.0f, 4500.0f); @@ -93,11 +93,11 @@ void func_8038AEBC(Actor *this) { } if (this->state == 3) { func_80326224(this); - func_8033568C(this->unk148, &sp30, &sp2C); + skeletalAnim_getProgressRange(this->unk148, &sp30, &sp2C); if ((sp30 <= 0.5) && (sp2C >= 0.5)) { jiggySpawn(JIGGY_49_CCW_EYRIE, this->position); } - if (func_80335794(this->unk148) > 0) { + if (skeletalAnim_getLoopCount(this->unk148) > 0) { func_8038AD50(this, 2); } } diff --git a/src/CCW/code_4D00.c b/src/CCW/code_4D00.c index da8ce407..df4a2bcf 100644 --- a/src/CCW/code_4D00.c +++ b/src/CCW/code_4D00.c @@ -2,8 +2,6 @@ #include "functions.h" #include "variables.h" -extern void func_80335A24(void *, s32, f32, f32); - typedef struct { f32 unk0; }ActorLocal_CCW_4D00; @@ -21,7 +19,7 @@ void func_8038B19C(Actor *this); ActorInfo D_8038F270 = { 0x1B9, 0x2A6, 0x502, 0x0, NULL, - func_8038B19C, NULL, func_80325888, + func_8038B19C, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -42,11 +40,11 @@ void func_8038B0F0(Actor *this, s32 next_state) { local->unk0 = 0.0f; if (next_state == 1) { - func_80335A24(this->unk148, 0x1A3, 0.2f, 11.0f); + skeletalAnim_swap(this->unk148, 0x1A3, 0.2f, 11.0f); local->unk0 = randf2(3.0f, 10.0f); } if (next_state == 2) { - func_80335924(this->unk148, 0x1A4, 0.2f, 3.0f); + skeletalAnim_set(this->unk148, 0x1A4, 0.2f, 3.0f); } this->state = next_state; } @@ -72,7 +70,7 @@ void func_8038B19C(Actor *this) { } if (this->state == 2) { - func_8033568C(this->unk148, &sp50, &sp4C); + skeletalAnim_getProgressRange(this->unk148, &sp50, &sp4C); for(iPtr = &D_8038F294[0]; iPtr->unk0 > 0.0f; iPtr++){ if ((sp50 < iPtr->unk0) && (iPtr->unk0 <= sp4C)) { func_8030E878(iPtr->unk8, randf2(iPtr->unk4 - 0.05, iPtr->unk4 + 0.05), randi2(iPtr->unkA - 0x1F4, iPtr->unkA + 0x1F4), this->position, 500.0f, 2500.0f); @@ -86,7 +84,7 @@ void func_8038B19C(Actor *this) { func_8030E878(SFX_4B_GULPING, randf2(1.4f, 1.45f), randi2(24000, 26000), this->position, 500.0f, 2500.0f); } } - if (func_80335794(this->unk148) > 0) { + if (skeletalAnim_getLoopCount(this->unk148) > 0) { func_8038B0F0(this, 1); } } diff --git a/src/CCW/code_50D0.c b/src/CCW/code_50D0.c index 91059ef5..393ae58e 100644 --- a/src/CCW/code_50D0.c +++ b/src/CCW/code_50D0.c @@ -8,7 +8,7 @@ void func_8038B87C(Actor *this); ActorInfo D_8038F300 = { 0x1BA, 0x2A7, 0x503, 0x0, NULL, - func_8038B87C, NULL, func_80325888, + func_8038B87C, NULL, actor_draw, 0, 0, 2.0f, 0 }; @@ -63,22 +63,22 @@ void func_8038B6DC(ActorMarker *marker) { int i; this = marker_getActor(marker); - func_80335650(this->unk148); + skeletalAnim_clearCallbacks(this->unk148); phi_f20 = randf2(0.1f, 0.3f); for(i = 0; i < 3; i++){ - func_80335800(this->unk148, phi_f20, func_8038B610, this->marker); + skeletalAnim_setCallback_1(this->unk148, phi_f20, func_8038B610, this->marker); phi_f20 += randf2(0.15f, 0.3f); if(0.85 < phi_f20) break; } - func_80335800(this->unk148, 0.35f, func_8038B4C0, this->marker); - func_80335800(this->unk148, 0.63f, func_8038B58C, this->marker); - func_80335800(this->unk148, 0.9f, func_8038B6DC, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.35f, func_8038B4C0, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.63f, func_8038B58C, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.9f, func_8038B6DC, this->marker); } void func_8038B814(Actor *this, s32 next_state) { if (next_state == 1) { - func_80335924(this->unk148, 0x22B, 0.2f, 11.0f); + skeletalAnim_set(this->unk148, 0x22B, 0.2f, 11.0f); func_8038B6DC(this->marker); } this->state = next_state; diff --git a/src/CCW/code_5540.c b/src/CCW/code_5540.c index 8d6c1d8f..9b4106cb 100644 --- a/src/CCW/code_5540.c +++ b/src/CCW/code_5540.c @@ -36,31 +36,31 @@ void __chnabnut_setState_method(ActorMarker* marker, s32 next_state) { void chnabnut_setState(Actor *this, s32 next_state) { if (next_state == NABNUT_STATE_1_SAD) { - func_80335924(this->unk148, ASSET_22C_ANIM_NABNUT_CRY, 0.2f, 10.6f); + skeletalAnim_set(this->unk148, ASSET_22C_ANIM_NABNUT_CRY, 0.2f, 10.6f); } if (next_state == NABNUT_STATE_2_WAIT) { - timedFunc_set_2(1.0f, (GenMethod_2)__chnabnut_setState_method, (s32)this->marker, NABNUT_STATE_3_BACKFLIP); + timedFunc_set_2(1.0f, (GenFunction_2)__chnabnut_setState_method, (s32)this->marker, NABNUT_STATE_3_BACKFLIP); } if (next_state == NABNUT_STATE_3_BACKFLIP) { this->marker->propPtr->unk8_3 = FALSE; - func_80335924(this->unk148, ASSET_22D_ANIM_NABNUT_BACKFLIP, 0.2f, 3.13f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_22D_ANIM_NABNUT_BACKFLIP, 0.2f, 3.13f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, 0xB); func_80311480(0xCCC, 0x20, this->position, NULL, NULL, NULL); } if (next_state == NABNUT_STATE_4_THANK_PLAYER) { - func_80335924(this->unk148, ASSET_22E_ANIM_NABNUT_STAND, 0.2f, 3.53f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_22E_ANIM_NABNUT_STAND, 0.2f, 3.53f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); func_802C8F70(this->yaw - 40.0f); jiggySpawn(JIGGY_4A_CCW_NABNUT, this->position); } if (next_state == NABNUT_STATE_5_EXIT) { - func_80335924(this->unk148, ASSET_22F_ANIM_NABNUT_RUN, 0.2f, 0.34f); + skeletalAnim_set(this->unk148, ASSET_22F_ANIM_NABNUT_RUN, 0.2f, 0.34f); } if (next_state == NABNUT_STATE_6_DESPAWN) { @@ -88,17 +88,17 @@ Actor *chnabnut_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8033A45C(9, 0); func_8033A45C(0xA, 1); if (this->state == 1) { - temp_f2 = func_80335684(this->unk148); + temp_f2 = skeletalAnim_getProgress(this->unk148); if ((0.116 <= temp_f2) && (temp_f2 <= 0.32)) { sp24 = this->unk130; this->unk130 = NULL; func_8033A45C(1, 4); - out = func_80325888(marker, gfx, mtx, vtx); + out = actor_draw(marker, gfx, mtx, vtx); out->unk130 = sp24; return out; } } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038BC50(f32 dst[3]){ @@ -154,10 +154,10 @@ void chnabnut_update(Actor *this) { } } } - if ((this->state == NABNUT_STATE_3_BACKFLIP) && (func_80335794(this->unk148) > 0)) { + if ((this->state == NABNUT_STATE_3_BACKFLIP) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { chnabnut_setState(this, NABNUT_STATE_4_THANK_PLAYER); } - if ((this->state == NABNUT_STATE_4_THANK_PLAYER) && (func_80335794(this->unk148) > 0)) { + if ((this->state == NABNUT_STATE_4_THANK_PLAYER) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { chnabnut_setState(this, NABNUT_STATE_5_EXIT); } if (this->state == NABNUT_STATE_5_EXIT) { diff --git a/src/CCW/code_5BF0.c b/src/CCW/code_5BF0.c index efa64e78..f68f0eb6 100644 --- a/src/CCW/code_5BF0.c +++ b/src/CCW/code_5BF0.c @@ -8,11 +8,11 @@ Actor *func_8038C380(ActorMarker* marker, Gfx** gfx, Mtx** mtx, Vtx** vtx); void func_8038C41C(Actor *this); /* .data */ -ActorInfo D_8038F380 = { 0x1C6, 0x310, 0x501, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038F380 = { 0x1C6, 0x310, 0x501, 0x0, NULL, func_8038C41C, NULL, actor_draw, 0, 0, 0.0f, 0}; ActorInfo D_8038F3A4 = { 0x1C7, 0x311, 0x462, 0x0, NULL, func_8038C41C, NULL, func_8038C380, 0, 0, 0.0f, 0}; -ActorInfo D_8038F3C8 = { 0x1C8, 0x312, 0x463, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8038F3EC = { 0x1C9, 0x313, 0x464, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8038F410 = { 0x1CA, 0x314, 0x502, 0x0, NULL, func_8038C41C, NULL, func_80325888, 0, 0, 2.0f, 0}; +ActorInfo D_8038F3C8 = { 0x1C8, 0x312, 0x463, 0x0, NULL, func_8038C41C, NULL, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038F3EC = { 0x1C9, 0x313, 0x464, 0x0, NULL, func_8038C41C, NULL, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038F410 = { 0x1CA, 0x314, 0x502, 0x0, NULL, func_8038C41C, NULL, actor_draw, 0, 0, 2.0f, 0}; ActorInfo D_8038F434 = { 0x1CB, 0x315, 0x48D, 0x0, NULL, func_8038C41C, NULL, func_8038C380, 0, 0, 0.0f, 0}; /* .code */ @@ -46,19 +46,19 @@ void CCW_func_8038C16C(Actor *this, s32 next_state) { if (next_state == 2) { if (this->marker->unk14_20 == 0x1CA) { - func_80335924(this->unk148, 0x22E, 0.2f, 3.53f); - func_80335800(this->unk148, 0.1f, func_8038C0E8, this->marker); + skeletalAnim_set(this->unk148, 0x22E, 0.2f, 3.53f); + skeletalAnim_setCallback_1(this->unk148, 0.1f, func_8038C0E8, this->marker); } if (this->marker->unk14_20 == 0x1C7) { - func_80335924(this->unk148, 0x230, 0.2f, 4.0f); + skeletalAnim_set(this->unk148, 0x230, 0.2f, 4.0f); } if (this->marker->unk14_20 == 0x1CB) { - func_80335924(this->unk148, 0x1A2, 0.2f, 4.0f); - func_80335800(this->unk148, 0.3f, func_8038BFE0, this->marker); - func_80335800(this->unk148, 0.65f, func_8038C064, this->marker); + skeletalAnim_set(this->unk148, 0x1A2, 0.2f, 4.0f); + skeletalAnim_setCallback_1(this->unk148, 0.3f, func_8038BFE0, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.65f, func_8038C064, this->marker); } if (this->marker->unk14_20 == 0x1C8) { - func_80335924(this->unk148, 0x231, 0.2f, 4.0f); + skeletalAnim_set(this->unk148, 0x231, 0.2f, 4.0f); } if ((this->marker->unk14_20 == 0x1C7) || (this->marker->unk14_20 == 0x1CB) || (this->marker->unk14_20 == 0x1C8)) { other = actorArray_findActorFromActorId(0x313); @@ -84,7 +84,7 @@ Actor *func_8038C380(ActorMarker* marker, Gfx** gfx, Mtx** mtx, Vtx** vtx) { func_8033A45C(8, 0); func_8033A45C(9, 0); func_8033A45C(0xA, 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038C41C(Actor *this) { diff --git a/src/CCW/code_61E0.c b/src/CCW/code_61E0.c index 1ba6eb65..a84e9a2e 100644 --- a/src/CCW/code_61E0.c +++ b/src/CCW/code_61E0.c @@ -13,7 +13,7 @@ typedef struct { void func_8038C7A8(Actor *this); /* .data */ -ActorInfo D_8038F460 = { 0x1BC, 0x2A9, 0x48E, 0x0, NULL, func_8038C7A8, NULL, func_80325888, 0, 0, 0.8f, 0}; +ActorInfo D_8038F460 = { 0x1BC, 0x2A9, 0x48E, 0x0, NULL, func_8038C7A8, NULL, actor_draw, 0, 0, 0.8f, 0}; /* .code */ void CCW_func_8038C5D0(ActorMarker* marker) { @@ -31,9 +31,9 @@ void CCW_func_8038C6A0(Actor *this, s32 next_state) { local = (ActorLocal_CCW_61E0 *)&this->local; if (next_state == 1) { - func_80335924(this->unk148, 0x25B, 0.0f, 1.0f); - func_80335800(this->unk148, 0.5f, CCW_func_8038C5D0, this->marker); - func_80335800(this->unk148, 0.7f, CCW_func_8038C638, this->marker); + skeletalAnim_set(this->unk148, 0x25B, 0.0f, 1.0f); + skeletalAnim_setCallback_1(this->unk148, 0.5f, CCW_func_8038C5D0, this->marker); + skeletalAnim_setCallback_1(this->unk148, 0.7f, CCW_func_8038C638, this->marker); } if (next_state == 3) { local->unk0[0] = this->position[0]; diff --git a/src/CCW/code_6620.c b/src/CCW/code_6620.c index f8de0e67..2dcffcc6 100644 --- a/src/CCW/code_6620.c +++ b/src/CCW/code_6620.c @@ -58,9 +58,9 @@ void func_8038CB40(Actor *this, s32 next_state) { int i; if (next_state == 1) { - func_80335924(this->unk148, 0x289, 0.2f, 1.1f); + skeletalAnim_set(this->unk148, 0x289, 0.2f, 1.1f); for(i = 0; i < 10; i++){ - func_80335800(this->unk148, randf(), func_8038CA10, this->marker); + skeletalAnim_setCallback_1(this->unk148, randf(), func_8038CA10, (s32)this->marker); } } this->state = next_state; @@ -71,7 +71,7 @@ Actor *CCW_func_8038CBF0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { Actor *this; ActorLocal_CCW_6620 *local; - this = func_80325888(marker, gfx, mtx, vtx); + this = actor_draw(marker, gfx, mtx, vtx); local = (ActorLocal_CCW_6620 *)&this->local; if (this->marker->unk14_21) { func_8034A174(func_80329934(), 5, local->unk4); diff --git a/src/CCW/code_6AC0.c b/src/CCW/code_6AC0.c index 8dff9f61..4a10d4d4 100644 --- a/src/CCW/code_6AC0.c +++ b/src/CCW/code_6AC0.c @@ -15,7 +15,7 @@ void func_8038CFB4(Actor *this); ActorInfo D_8038F4D0 = { 0x1BE, 0x2AB, 0x48F, 0x0, NULL, - func_8038CFB4, func_8038CFB4, func_80325888, + func_8038CFB4, func_8038CFB4, actor_draw, 0, 0, 2.2f, 0 }; @@ -55,17 +55,17 @@ void func_8038CEB0(Actor *this, s32 next_state) { ActorProp *temp_v0; if (next_state == 1) { - func_80335924(this->unk148, 0x1A6, 0.2f, 4.5f); + skeletalAnim_set(this->unk148, 0x1A6, 0.2f, 4.5f); } if (next_state == 2) { this->marker->propPtr->unk8_3 = FALSE; - func_80335924(this->unk148, 0x1A7, 0.2f, 3.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x1A7, 0.2f, 3.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80311480(0xCD0, 0x24, NULL, NULL, NULL, NULL); } if (next_state == 3) { - func_80335924(this->unk148, 0x1A8, 0.2f, 0.5f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x1A8, 0.2f, 0.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if (next_state == 4) { marker_despawn(this->marker); @@ -104,7 +104,7 @@ void func_8038CFB4(Actor *this) { } if (phi_s0 != NULL) { - func_8033568C(this->unk148, &sp70, &sp6C); + skeletalAnim_getProgressRange(this->unk148, &sp70, &sp6C); while(phi_s0->unk0 > 0.0f){ if (((sp70 < phi_s0->unk0) || (sp6C < sp70)) && (phi_s0->unk0 <= sp6C)) { func_8030E878(phi_s0->unk8, randf2(phi_s0->unk4 - 0.05, phi_s0->unk4 + 0.05), randi2(phi_s0->unkA - 200, phi_s0->unkA + 100), this->position, 500.0f, 1500.0f); @@ -127,7 +127,7 @@ void func_8038CFB4(Actor *this) { } if (this->state == 2){ - if((func_80335794(this->unk148) > 0)) { + if((skeletalAnim_getLoopCount(this->unk148) > 0)) { func_8038CEB0(this, 3); } } diff --git a/src/CCW/code_6EC0.c b/src/CCW/code_6EC0.c index 78b0761e..20de4630 100644 --- a/src/CCW/code_6EC0.c +++ b/src/CCW/code_6EC0.c @@ -32,7 +32,7 @@ ActorInfo D_8038F614 = { /* .code */ void func_8038D2B0(Actor *this, s32 next_state) { if (next_state == 1) { - func_80335924(this->unk148, 0x1A6, 0.2f, 5.5f); + skeletalAnim_set(this->unk148, 0x1A6, 0.2f, 5.5f); } this->state = next_state; @@ -42,7 +42,7 @@ Actor *func_8038D30C(ActorMarker* marker, Gfx** gfx, Mtx** mtx, Vtx** vtx) { if (levelSpecificFlags_get(0x25) == 0) { return func_80325340(marker, gfx, mtx, vtx); } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038D368(Actor *this) { diff --git a/src/CCW/code_7120.c b/src/CCW/code_7120.c index 3fa6743a..51e994ac 100644 --- a/src/CCW/code_7120.c +++ b/src/CCW/code_7120.c @@ -12,7 +12,7 @@ void func_8038D85C(Actor *this); ActorInfo D_8038F640 = { 0x1BF, 0x2AC, 0x490, 0x0, NULL, - func_8038D85C, NULL, func_80325888, + func_8038D85C, NULL, actor_draw, 0, 0, 2.2f, 0 }; diff --git a/src/CCW/code_7570.c b/src/CCW/code_7570.c index 95c431aa..25ce5991 100644 --- a/src/CCW/code_7570.c +++ b/src/CCW/code_7570.c @@ -5,13 +5,13 @@ void func_8038D9E0(Actor *this); /* .data */ -ActorInfo D_8038F6F0 = { 0x1C3, 0x30C, 0x4E4, 0x0, NULL, func_8038D9E0, NULL, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8038F6F0 = { 0x1C3, 0x30C, 0x4E4, 0x0, NULL, func_8038D9E0, NULL, actor_draw, 0, 0, 0.0f, 0}; /* .code */ void func_8038D960(Actor *this, s32 next_state) { if (next_state == 1) { - func_80335924(this->unk148, 0x21C, 0.0f, 6.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x21C, 0.0f, 6.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if (next_state == 2) { func_80326310(this); @@ -32,7 +32,7 @@ void func_8038D9E0(Actor *this) { } if (this->state == 1) { this = this; - func_8033568C(this->unk148, &sp24, &sp20); + skeletalAnim_getProgressRange(this->unk148, &sp24, &sp20); if ((sp24 < 0.25f) && (sp20 >= 0.25f)) { func_8038D960(this, 2); } diff --git a/src/CCW/code_76C0.c b/src/CCW/code_76C0.c index 028b0f6e..27367574 100644 --- a/src/CCW/code_76C0.c +++ b/src/CCW/code_76C0.c @@ -65,16 +65,16 @@ void CCW_func_8038DB0C(Actor *this); void func_8038DAB0(Actor *this); /* .data */ -ActorInfo D_8038F720 = { 0x239, 0x25F, 0x4FC, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F744 = { 0x236, 0x260, 0x4F9, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F768 = { 0x237, 0x261, 0x4FA, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F78C = { 0x238, 0x262, 0x4FB, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F7B0 = { 0x243, 0x2E6, 0x533, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F7D4 = { 0x263, 0x2E7, 0x518, 0x1, NULL, func_8038DAB0, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F7F8 = { 0x21E, 0x233, 0x3B3, 0x1, NULL, func_802D3D74, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F81C = { 0x26B, 0x2DE, 0x531, 0x1, NULL, CCW_func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F840 = { 0x26C, 0x2DD, 0x53E, 0x1, NULL, CCW_func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8038F864 = { 0x26D, 0x2DC, 0x53F, 0x1, NULL, CCW_func_8038DB0C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8038F720 = { 0x239, 0x25F, 0x4FC, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F744 = { 0x236, 0x260, 0x4F9, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F768 = { 0x237, 0x261, 0x4FA, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F78C = { 0x238, 0x262, 0x4FB, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F7B0 = { 0x243, 0x2E6, 0x533, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F7D4 = { 0x263, 0x2E7, 0x518, 0x1, NULL, func_8038DAB0, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F7F8 = { 0x21E, 0x233, 0x3B3, 0x1, NULL, func_802D3D74, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F81C = { 0x26B, 0x2DE, 0x531, 0x1, NULL, CCW_func_8038DB0C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F840 = { 0x26C, 0x2DD, 0x53E, 0x1, NULL, CCW_func_8038DB0C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8038F864 = { 0x26D, 0x2DC, 0x53F, 0x1, NULL, CCW_func_8038DB0C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; ActorInfo D_8038F888 = { 0x1CC, 0x318, 0x0, 0x0, NULL, func_80325F84, NULL, func_80325340, 0, 0, 0.0f, 0}; diff --git a/src/CCW/code_7BC0.c b/src/CCW/code_7BC0.c index 189bc2b3..42bd6e44 100644 --- a/src/CCW/code_7BC0.c +++ b/src/CCW/code_7BC0.c @@ -12,7 +12,7 @@ ActorAnimationInfo D_8038F8B0[] = { ActorInfo D_8038F8C0 = { 0x251, 0x37E, 0x506, 0x1, D_8038F8B0, - func_8038DFB0, func_80326224, func_80325888, + func_8038DFB0, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/CCW/code_7BF0.c b/src/CCW/code_7BF0.c index 4a3340c1..aa24a7f4 100644 --- a/src/CCW/code_7BF0.c +++ b/src/CCW/code_7BF0.c @@ -15,7 +15,7 @@ ActorAnimationInfo D_8038F8F0[] = { ActorInfo D_8038F908 = { MARKER_1F9_SNARE_BEAR, ACTOR_1E9_SNARE_BEAR, ASSET_440_MODEL_SNAREBEAR, 0x1, D_8038F8F0, - func_8038E0C8, func_80326224, func_80325888, + func_8038E0C8, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -44,7 +44,7 @@ void func_8038E060(s32 arg0, ActorMarker *marker){ func_80345C78(sp18, sp28); func_8033A8F0(arg0, 1, sp18); - func_8033A238(arg0); + modelRender_setBoneTransformList(arg0); } } diff --git a/src/CCW/code_8050.c b/src/CCW/code_8050.c index 952b6d84..0708d6ae 100644 --- a/src/CCW/code_8050.c +++ b/src/CCW/code_8050.c @@ -87,7 +87,7 @@ void func_8038E4C0(ActorMarker* marker, s32 arg1) { FUNC_8030E8B4(SFX_C2_GRUBLIN_EGH, 1.0f, 32000, actor->position, 1250, 2500); pCtrl = partEmitMgr_newEmitter(1); func_8038E440(pCtrl, actor, ASSET_52D_MODEL_GRUBLIN_HOOD_HAT); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32,actor->position_x), reinterpret_cast(s32,actor->position_y), reinterpret_cast(s32,actor->position_z)); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32,actor->position_x), reinterpret_cast(s32,actor->position_y), reinterpret_cast(s32,actor->position_z)); actor_collisionOff(actor); actor->unk138_24 = 1; } @@ -110,7 +110,7 @@ Actor *func_8038E56C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(12, (local->season == WINTER) ? 2 : 1); func_8033A45C(13, (local->season == WINTER) ? 1 : 0); func_8033A45C(14, (this->unk138_24)? 0 : 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038E868(Actor *this){ diff --git a/src/CCW/code_950.c b/src/CCW/code_950.c index e39bcc5f..d5c98b88 100644 --- a/src/CCW/code_950.c +++ b/src/CCW/code_950.c @@ -16,7 +16,7 @@ typedef struct{ void chwasp_update(Actor *this); /* .data */ -ActorInfo D_8038EBD0 = { MARKER_1AE_ZUBBA, ACTOR_29B_ZUBBA, ASSET_446_MODEL_ZUBBA, 0x0, NULL, chwasp_update, NULL, func_80325888, 0, 0, 1.0f, 0}; +ActorInfo D_8038EBD0 = { MARKER_1AE_ZUBBA, ACTOR_29B_ZUBBA, ASSET_446_MODEL_ZUBBA, 0x0, NULL, chwasp_update, NULL, actor_draw, 0, 0, 1.0f, 0}; /* .code */ void chwasp_setState(Actor *this, s32 next_state) { @@ -28,10 +28,10 @@ void chwasp_setState(Actor *this, s32 next_state) { local->unk18 = 0.0f; if (next_state == 1) { local->unk18 = 800.0f; - func_80335924(this->unk148, ASSET_16F_ANIM_ZUBBA_FLY_MOVE, 0.0f, 0.65f); + skeletalAnim_set(this->unk148, ASSET_16F_ANIM_ZUBBA_FLY_MOVE, 0.0f, 0.65f); } if (next_state == 2) { - func_80335924(this->unk148, ASSET_170_ANIM_ZUBBA_FLY_IDLE, 0.1f, 0.65f); + skeletalAnim_set(this->unk148, ASSET_170_ANIM_ZUBBA_FLY_IDLE, 0.1f, 0.65f); player_getPosition(sp50); sp50[1] += 50.0f; local->unk8[0] = sp50[0] - this->position[0]; @@ -48,7 +48,7 @@ void chwasp_setState(Actor *this, s32 next_state) { actor_collisionOff(this); } if (next_state == 4) { - func_80335924(this->unk148, ASSET_171_ANIM_ZUBBA_DIE, 0.1f, 0.2f); + skeletalAnim_set(this->unk148, ASSET_171_ANIM_ZUBBA_DIE, 0.1f, 0.2f); FUNC_8030E8B4(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200, this->position, 500, 3000); func_80324D54(0.1f, 0x66, randf2(1.6f, 1.7f), 32000, this->position, 500.0f, 3000.0f); func_803867C8(local->unk4); @@ -65,8 +65,8 @@ void chwasp_setState(Actor *this, s32 next_state) { } if (next_state == 5) { func_8030E878(SFX_A_BANJO_LANDING_05, randf2(0.85f, 0.95f), 18000, this->position, 500.0f, 3000.0f); - func_80335924(this->unk148, ASSET_172_ANIM_ZUBBA_LAND, 0.0f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_172_ANIM_ZUBBA_LAND, 0.0f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if (next_state == 6) { marker_despawn(this->marker); diff --git a/src/FP/ch/bearcub.c b/src/FP/ch/bearcub.c index dd9dcea6..f2cb5468 100644 --- a/src/FP/ch/bearcub.c +++ b/src/FP/ch/bearcub.c @@ -23,19 +23,19 @@ ActorAnimationInfo D_80391DF0[] = { ActorInfo D_80391E08 = { MARKER_1FA_POLAR_BEAR_CUB_BLUE, ACTOR_1EA_POLAR_BEAR_CUB_BLUE, ASSET_44C_MODEL_POLAR_BEAR_CUB_BLUE, 0x1, D_80391DF0, - func_8038A384, func_80326224, func_80325888, + func_8038A384, func_80326224, actor_draw, 2500, 0, 1.2f, 0 }; ActorInfo FP_D_80391E2C = { MARKER_1FB_POLAR_BEAR_CUB_GREEN, ACTOR_1EB_POLAR_BEAR_CUB_GREEN, ASSET_44D_MODEL_POLAR_BEAR_CUB_GREEN, 0x1, D_80391DF0, - func_8038A384, func_80326224, func_80325888, + func_8038A384, func_80326224, actor_draw, 2500, 0, 1.2f, 0 }; ActorInfo D_80391E50 = { MARKER_1FC_POLAR_BEAR_CUB_RED, ACTOR_1EC_POLAR_BEAR_CUB_RED, ASSET_44E_MODEL_POLAR_BEAR_CUB_RED, 0x1, D_80391DF0, - func_8038A384, func_80326224, func_80325888, + func_8038A384, func_80326224, actor_draw, 2500, 0, 1.2f, 0 }; diff --git a/src/FP/ch/boggy1.c b/src/FP/ch/boggy1.c index cad9e803..99fc1ff5 100644 --- a/src/FP/ch/boggy1.c +++ b/src/FP/ch/boggy1.c @@ -39,7 +39,7 @@ Actor *func_803875E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(1, 0); func_8033A45C(3, 1); - this = func_80325888(marker, gfx, mtx, vtx); + this = actor_draw(marker, gfx, mtx, vtx); if(marker->unk14_21){ func_8034A174(func_80329934(), 5, this->velocity); } @@ -125,7 +125,7 @@ void func_8038794C(Actor *this){ if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){ if(!jiggyscore_isCollected(JIGGY_2C_FP_BOGGY_3) && !jiggyscore_isSpawned(JIGGY_2C_FP_BOGGY_3)){ - __spawnQueue_add_1((GenMethod_1)func_80387760, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80387760, reinterpret_cast(s32, this->marker)); } this->unk38_31 = 0; actor_collisionOff(this); @@ -151,7 +151,7 @@ void func_8038794C(Actor *this){ if(!func_8028ECAC() || func_8028ECAC() == BSGROUP_8_TROT){ if(func_80311480(0xbff, 0x2a, this->position, NULL, NULL, NULL)){ for(i = 0; i <5; i++ ){ - timedFunc_set_1(D_80391BEC[i], (GenMethod_1)func_8038787C, (s32)this->marker); + timedFunc_set_1(D_80391BEC[i], (GenFunction_1)func_8038787C, (s32)this->marker); } this->unk138_24 = TRUE; } @@ -195,7 +195,7 @@ void func_8038794C(Actor *this){ case 5://L80387D90 if(jiggyscore_isCollected(JIGGY_2A_FP_BOGGY_1)){ this->unk38_31 = 0; - __spawnQueue_add_1((GenMethod_1)func_80387760, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80387760, reinterpret_cast(s32, this->marker)); } break; } diff --git a/src/FP/ch/boggy2.c b/src/FP/ch/boggy2.c index c38260c4..8358b276 100644 --- a/src/FP/ch/boggy2.c +++ b/src/FP/ch/boggy2.c @@ -62,7 +62,7 @@ Actor *func_80388740(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(1, 1); func_8033A45C(3, 1); - this = func_80325888(marker, gfx, mtx, vtx); + this = actor_draw(marker, gfx, mtx, vtx); if(this->unk16C_4 && marker->unk14_21){ if( this->state == 4 || this->state == 5 @@ -581,7 +581,7 @@ void func_803896FC(Actor *this){ case 1: //L80389F78 if(this->unk38_31 == 2){ if(jiggyscore_isCollected(JIGGY_30_FP_BOGGY_2)){ - __spawnQueue_add_1((GenMethod_1)func_80388F54, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80388F54, reinterpret_cast(s32, this->marker)); func_8038B9BC(); marker_despawn(this->marker); } diff --git a/src/FP/ch/boggy3.c b/src/FP/ch/boggy3.c index dd4fd104..3f2e516c 100644 --- a/src/FP/ch/boggy3.c +++ b/src/FP/ch/boggy3.c @@ -31,7 +31,7 @@ Actor *func_80390290(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ } func_8033A45C(1, 0); func_8033A45C(3, sp18); - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/FP/ch/cavewozza.c b/src/FP/ch/cavewozza.c index 37a2ac58..8d564fad 100644 --- a/src/FP/ch/cavewozza.c +++ b/src/FP/ch/cavewozza.c @@ -14,7 +14,7 @@ extern ActorAnimationInfo D_803926F0[]= { extern ActorInfo D_80392700 = { MARKER_20F_WOZZA_IN_CAVE, ACTOR_33F_WOZZA_IN_CAVE, ASSET_494_MODEL_WOZZA, 0x1, D_803926F0, - func_80390630, func_80326224, func_80325888, + func_80390630, func_80326224, actor_draw, 2500, 0, 1.6f, 0 }; diff --git a/src/FP/ch/present.c b/src/FP/ch/present.c index daef1098..0f3a283c 100644 --- a/src/FP/ch/present.c +++ b/src/FP/ch/present.c @@ -34,7 +34,7 @@ Actor *func_8038F0F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(this->unk38_31) return this; else - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/FP/ch/racesled.c b/src/FP/ch/racesled.c index 4a9400ef..b9ee0a4d 100644 --- a/src/FP/ch/racesled.c +++ b/src/FP/ch/racesled.c @@ -24,7 +24,7 @@ ActorInfo chRaceSled = { Actor *chRaceSled_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); if(this->unk10_12 == FALSE){ - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } return this; } diff --git a/src/FP/ch/scarfsled.c b/src/FP/ch/scarfsled.c index 2712a7e4..5eab7eae 100644 --- a/src/FP/ch/scarfsled.c +++ b/src/FP/ch/scarfsled.c @@ -15,7 +15,7 @@ ActorAnimationInfo chScarfSledAnimations[] ={ ActorInfo chScarfSled = { MARKER_3B_SCARF_SLED, ACTOR_181_SCARF_SLED, ASSET_352_MODEL_SLED, 0, chScarfSledAnimations, - NULL, chScarfSled_update, func_80325888, + NULL, chScarfSled_update, actor_draw, 1000, 0, 0.0f, 0 }; diff --git a/src/FP/ch/snowmanbutton.c b/src/FP/ch/snowmanbutton.c index 605f6765..89d724ff 100644 --- a/src/FP/ch/snowmanbutton.c +++ b/src/FP/ch/snowmanbutton.c @@ -41,7 +41,7 @@ Actor *func_80386B80(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); func_8033A45C(1, this->state == 3); func_8033A45C(2, func_8033A0F0(1) ^ 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/FP/ch/twinkly.c b/src/FP/ch/twinkly.c index b5546d57..9c72cfac 100644 --- a/src/FP/ch/twinkly.c +++ b/src/FP/ch/twinkly.c @@ -73,7 +73,7 @@ Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE sp40[1] = this->unk60; sp40[2] = (f32)marker->roll; sp3C = this->scale; - if(func_802EA190(marker->unk20)){ + if(animMtxList_len(marker->unk20)){ return func_802EBAE0(sp5C, sp4C, sp40, sp3C, NULL, marker->unk20, arg1, arg2, arg3); } else{ @@ -85,7 +85,7 @@ Actor *func_8038C1F8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); func_8033A45C(2, this->unk38_31); func_8033A45C(1, func_8033A0F0(2) ^ 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038C260(f32 position[3], s32 count, enum asset_e model_id){ @@ -243,7 +243,7 @@ void func_8038C94C(ActorMarker *caller, enum asset_e text_id, s32 arg2){ Actor *this = marker_getActor(caller); if(!func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE)){ func_80328A84(this, 6); - __spawnQueue_add_1((GenMethod_1)func_8038C8F0, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_8038C8F0, reinterpret_cast(s32, this->marker)); } } diff --git a/src/FP/ch/twinklybox.c b/src/FP/ch/twinklybox.c index 83d168cd..dc1ed543 100644 --- a/src/FP/ch/twinklybox.c +++ b/src/FP/ch/twinklybox.c @@ -30,7 +30,7 @@ Actor *FP_func_8038CED0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(0.0f == this->velocity[1]) return this; } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038CF54(f32 position[3], s32 count, enum asset_e model_id){ @@ -246,7 +246,7 @@ void func_8038D51C(ActorMarker *marker){ this->unk1C[1] = 1.0f; timed_exitStaticCamera(1.7f); func_80324E38(1.7f, 0); - timedFunc_set_1(2.3f, (GenMethod_1)func_8038D294, (s32)this->marker); + timedFunc_set_1(2.3f, (GenFunction_1)func_8038D294, (s32)this->marker); this->velocity[1] = 1.0f; } @@ -355,7 +355,7 @@ void func_8038D6C8(Actor *this){ func_8038D324(this); if(actor_animationIsAt(this, 0.999f)) - __spawnQueue_add_1((GenMethod_1)func_8038D474, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_8038D474, (s32)this->marker); if(this->velocity[0] != 0.0f) break; @@ -368,7 +368,7 @@ void func_8038D6C8(Actor *this){ item_set(ITEM_6_HOURGLASS, TRUE); this->unk38_31 = 0xA; item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31); - __spawnQueue_add_1((GenMethod_1)func_8038D41C, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_8038D41C, (s32)this->marker); this->unk60 = 0.0f; func_80347A14(0); func_802FAD64(ITEM_14_HEALTH); @@ -385,7 +385,7 @@ void func_8038D6C8(Actor *this){ func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); func_8038D3D8(); func_80324E38(0.0f, 3); - timedFunc_set_1(1.3f, (GenMethod_1)func_8038D51C, (s32)this->marker); + timedFunc_set_1(1.3f, (GenFunction_1)func_8038D51C, (s32)this->marker); timed_setStaticCameraToNode(0.9f, 0xC); item_set(ITEM_24_TWINKLY_SCORE, this->unk38_31); func_80347A14(1); @@ -408,7 +408,7 @@ void func_8038D6C8(Actor *this){ if(0.96 < animctrl_getAnimTimer(this->animctrl)){ if(this->unk60 <= 0.0){ - __spawnQueue_add_1((GenMethod_1)func_8038D474, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_8038D474, (s32)this->marker); this->unk60 = 2.9f; } else{ diff --git a/src/FP/ch/twinklymuncher.c b/src/FP/ch/twinklymuncher.c index 9d07d783..bd3004b7 100644 --- a/src/FP/ch/twinklymuncher.c +++ b/src/FP/ch/twinklymuncher.c @@ -30,7 +30,7 @@ Actor *func_8038DD70(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); if(this->state == 1) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038DDC8(Actor *this){ diff --git a/src/FP/ch/wozza.c b/src/FP/ch/wozza.c index 2ba78c5e..2721abc3 100644 --- a/src/FP/ch/wozza.c +++ b/src/FP/ch/wozza.c @@ -44,7 +44,7 @@ Actor *func_8038F210(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(func_8038BFA0() || this->unk38_31) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } @@ -107,7 +107,7 @@ void func_8038F454(Actor *this){ actor_loopAnimation(this); timed_setStaticCameraToNode(0.0f, 0x2e); func_80324DBC(0.0f, 0xc1b, 0x2a, this->position, this->marker, func_8038F330, NULL); - timedFunc_set_1(2.5f, (GenMethod_1)func_8038F3F4, (s32)this->marker); + timedFunc_set_1(2.5f, (GenFunction_1)func_8038F3F4, (s32)this->marker); } else{ func_8038F2B8(this); @@ -204,7 +204,7 @@ void FP_func_8038F7AC(Actor *this){ this->position[0] = local->unkC[0];\ this->position[1] = local->unkC[1];\ this->position[2] = local->unkC[2]; - __spawnQueue_add_1((GenMethod_1)FP_func_8038F758, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)FP_func_8038F758, reinterpret_cast(s32, this->marker)); local->unk30 = FALSE; } }//L8038F910 diff --git a/src/FP/ch/wozzasjig.c b/src/FP/ch/wozzasjig.c index 2dd056d5..c08acf54 100644 --- a/src/FP/ch/wozzasjig.c +++ b/src/FP/ch/wozzasjig.c @@ -33,7 +33,7 @@ Actor *func_8038FF00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); if(func_8038BFA0()) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038FF54(Actor *this){ diff --git a/src/FP/ch/xmastree.c b/src/FP/ch/xmastree.c index d6da5d02..d79a1bc3 100644 --- a/src/FP/ch/xmastree.c +++ b/src/FP/ch/xmastree.c @@ -19,7 +19,7 @@ Actor *chXmasTree_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); func_8033A45C(5, this->unk38_31); func_8033A45C(6, fileProgressFlag_get(0x13) && !func_8033A0F0(5)); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void __chXmasTree_free(Actor *this){ @@ -99,7 +99,7 @@ void chXmasTree_update(Actor *this){ sfxsource_setSampleRate(this->unk44_31, 28000); } __spawnQueue_add_0(__chXmasTree_spawnSwitch); - __spawnQueue_add_1((GenMethod_1)__chXmasTree_spawnStar, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)__chXmasTree_spawnStar, reinterpret_cast(s32, this->marker)); if(fileProgressFlag_get(0x13)){ __chXmasTree_80386F84(this); mapSpecificFlags_set(2, FALSE); diff --git a/src/FP/ch/xmastreeice.c b/src/FP/ch/xmastreeice.c index 21e70ba8..7afd5695 100644 --- a/src/FP/ch/xmastreeice.c +++ b/src/FP/ch/xmastreeice.c @@ -17,7 +17,7 @@ Actor *func_803908F0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); if(this->unk38_31 != 0) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_80390944(f32 position[3], s32 cnt, enum asset_e model_id){ @@ -79,8 +79,8 @@ void func_80390B2C(ActorMarker *marker){ void func_80390B70(Actor *this){ func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, 0); - timedFunc_set_1(0.6f, (GenMethod_1)func_80390ABC, reinterpret_cast(s32, this->marker)); - timedFunc_set_1(2.5f, (GenMethod_1)func_80390B2C, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(0.6f, (GenFunction_1)func_80390ABC, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(2.5f, (GenFunction_1)func_80390B2C, reinterpret_cast(s32, this->marker)); } void func_80390BDC(Actor *this){ diff --git a/src/FP/ch/xmastreestar.c b/src/FP/ch/xmastreestar.c index 30a814ef..9b86c2e9 100644 --- a/src/FP/ch/xmastreestar.c +++ b/src/FP/ch/xmastreestar.c @@ -28,7 +28,7 @@ f32 D_803935D0[3]; Actor *func_8038EBD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C( 2, mapSpecificFlags_get(0)); func_8033A45C( 1, mapSpecificFlags_get(0) ^ 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8038EC34(ActorMarker *this_marker, ActorMarker *other_marker){ diff --git a/src/FP/ch/xmastreeswitch.c b/src/FP/ch/xmastreeswitch.c index 3d2a4779..b0e44451 100644 --- a/src/FP/ch/xmastreeswitch.c +++ b/src/FP/ch/xmastreeswitch.c @@ -23,7 +23,7 @@ ActorInfo D_80392420 = { 0x206, 0x338, 0x486, Actor *func_8038E720(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(1, 0); func_8033A45C(2, 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/FP/code_19E0.c b/src/FP/code_19E0.c index 521ba8ce..979f2b7f 100644 --- a/src/FP/code_19E0.c +++ b/src/FP/code_19E0.c @@ -36,7 +36,7 @@ Actor *func_80387DD0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(2, this->velocity[0] == 1.0f ? 1 : 0); func_8033A45C(3, this->velocity[0] == 3.0f ? 1 : 0); func_8033A45C(4, this->velocity[0] == 2.0f ? 1 : 0); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } bool func_80387EE4(Actor *this) { diff --git a/src/FP/code_1FF0.c b/src/FP/code_1FF0.c index d190ee9c..fcdeab78 100644 --- a/src/FP/code_1FF0.c +++ b/src/FP/code_1FF0.c @@ -31,7 +31,7 @@ Actor *func_803883E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(2, this->velocity[0] == 1.0f ? 1 : 0); func_8033A45C(3, this->velocity[0] == 3.0f ? 1 : 0); func_8033A45C(4, this->velocity[0] == 2.0f ? 1 : 0); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/FP/code_ABD0.c b/src/FP/code_ABD0.c index c2b4d96c..f63797be 100644 --- a/src/FP/code_ABD0.c +++ b/src/FP/code_ABD0.c @@ -45,24 +45,24 @@ void func_8039180C(Actor *this); void func_80391894(Actor *this); /* .data */ -ActorInfo FP_D_803928E0 = { 0x247, 0x355, 0x4E5, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0}; -ActorInfo D_80392904 = { 0x248, 0x356, 0x4E6, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0}; -ActorInfo D_80392928 = { 0x249, 0x357, 0x4E7, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0}; -ActorInfo D_8039294C = { 0x24A, 0x358, 0x4E8, 0x0, NULL, func_80391040, func_80326224, func_80325888, 3000, 0, 0.0f, 0}; -ActorInfo D_80392970 = { 0x21F, 0x22B, 0x4C4, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392994 = { 0x220, 0x22C, 0x4C5, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_803929B8 = { 0x221, 0x22D, 0x4C6, 0x1, NULL, FP_func_80391254, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_803929DC = { 0x222, 0x22E, 0x4C6, 0x1, NULL, FP_func_80391254, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392A00 = { 0x223, 0x22F, 0x4C6, 0x1, NULL, FP_func_80391254, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392A24 = { 0x24B, 0x35D, 0x4E9, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392A48 = { 0x24C, 0x35E, 0x4EC, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392A6C = { 0x24D, 0x35F, 0x4EA, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392A90 = { 0x24E, 0x360, 0x4EB, 0x1, NULL, func_803912EC, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392AB4 = { 0x23D, 0x253, 0x512, 0x1, NULL, func_8039180C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392AD8 = { 0x23E, 0x254, 0x513, 0x1, NULL, func_80391894, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392AFC = { 0x286, 0x3AE, 0x55B, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392B20 = { 0x21D, 0x229, 0x4C3, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392B44 = { 0x289, 0x3B0, 0x56A, 0x1, NULL, func_80391180, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo FP_D_803928E0 = { 0x247, 0x355, 0x4E5, 0x0, NULL, func_80391040, func_80326224, actor_draw, 3000, 0, 0.0f, 0}; +ActorInfo D_80392904 = { 0x248, 0x356, 0x4E6, 0x0, NULL, func_80391040, func_80326224, actor_draw, 3000, 0, 0.0f, 0}; +ActorInfo D_80392928 = { 0x249, 0x357, 0x4E7, 0x0, NULL, func_80391040, func_80326224, actor_draw, 3000, 0, 0.0f, 0}; +ActorInfo D_8039294C = { 0x24A, 0x358, 0x4E8, 0x0, NULL, func_80391040, func_80326224, actor_draw, 3000, 0, 0.0f, 0}; +ActorInfo D_80392970 = { 0x21F, 0x22B, 0x4C4, 0x1, NULL, func_80391180, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392994 = { 0x220, 0x22C, 0x4C5, 0x1, NULL, func_80391180, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_803929B8 = { 0x221, 0x22D, 0x4C6, 0x1, NULL, FP_func_80391254, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_803929DC = { 0x222, 0x22E, 0x4C6, 0x1, NULL, FP_func_80391254, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392A00 = { 0x223, 0x22F, 0x4C6, 0x1, NULL, FP_func_80391254, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392A24 = { 0x24B, 0x35D, 0x4E9, 0x1, NULL, func_803912EC, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392A48 = { 0x24C, 0x35E, 0x4EC, 0x1, NULL, func_803912EC, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392A6C = { 0x24D, 0x35F, 0x4EA, 0x1, NULL, func_803912EC, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392A90 = { 0x24E, 0x360, 0x4EB, 0x1, NULL, func_803912EC, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392AB4 = { 0x23D, 0x253, 0x512, 0x1, NULL, func_8039180C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392AD8 = { 0x23E, 0x254, 0x513, 0x1, NULL, func_80391894, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392AFC = { 0x286, 0x3AE, 0x55B, 0x1, NULL, func_80391180, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392B20 = { 0x21D, 0x229, 0x4C3, 0x1, NULL, func_80391180, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392B44 = { 0x289, 0x3B0, 0x56A, 0x1, NULL, func_80391180, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; /* .code */ int func_80390FC0(void){ diff --git a/src/FP/racectrl.c b/src/FP/racectrl.c index aaff1e4b..00caaac9 100644 --- a/src/FP/racectrl.c +++ b/src/FP/racectrl.c @@ -117,7 +117,7 @@ void func_8038AC90(s32 indx, s32 arg1){ } void func_8038ADE4(s32 indx, s32 arg1){ - __spawnQueue_add_2((GenMethod_2)func_8038AC90, indx, arg1); + __spawnQueue_add_2((GenFunction_2)func_8038AC90, indx, arg1); } void func_8038AE14(s32 indx){ @@ -166,7 +166,7 @@ void func_8038AEE0(s32 indx){ } void func_8038B00C(s32 indx){ - __spawnQueue_add_1((GenMethod_1)func_8038AEE0, indx); + __spawnQueue_add_1((GenFunction_1)func_8038AEE0, indx); } void func_8038B034(void){ @@ -218,7 +218,7 @@ void func_8038B1D0(enum jiggy_e jiggy_id){ timed_setStaticCameraToNode(0.0f, 3); timedFunc_set_0(0.0f, func_8038AEA0); timedFunc_set_0(0.0f, FP_func_8038B0B8); - timedFunc_set_1(0.1f, (GenMethod_1) func_8038B130, jiggy_id); + timedFunc_set_1(0.1f, (GenFunction_1) func_8038B130, jiggy_id); timedFunc_set_0(5.0f, func_8038B190); timedFunc_set_0(5.0f, func_8038B1C4); timed_exitStaticCamera(5.0f); diff --git a/src/FP/sirslushgame.c b/src/FP/sirslushgame.c index 722e1d20..cf96cafd 100644 --- a/src/FP/sirslushgame.c +++ b/src/FP/sirslushgame.c @@ -54,7 +54,7 @@ void fp_sirslushgame_update(void){ if(D_80392F30.unk1C){ func_802BAFE4(0x12); jiggySpawn(JIGGY_31_FP_SIR_SLUSH, D_80392F30.spawn_pos); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, D_80392F30.spawn_pos[0]), reinterpret_cast(s32, D_80392F30.spawn_pos[1]), reinterpret_cast(s32, D_80392F30.spawn_pos[2]) diff --git a/src/FP/snowmanbuttongame.c b/src/FP/snowmanbuttongame.c index 20a86b13..f3738e61 100644 --- a/src/FP/snowmanbuttongame.c +++ b/src/FP/snowmanbuttongame.c @@ -52,7 +52,7 @@ void fp_snowmanButtonGame_update(void){ if(D_80392F50.unk18){ func_802BAFE4(0x11); jiggySpawn(JIGGY_2D_FP_SNOWMAN_BUTTONS, D_80392F50.spawn_pos); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, D_80392F50.spawn_pos[0]), reinterpret_cast(s32, D_80392F50.spawn_pos[1]), reinterpret_cast(s32, D_80392F50.spawn_pos[2]) diff --git a/src/GV/ch/ancientone.c b/src/GV/ch/ancientone.c index cdf13f91..44caf36b 100644 --- a/src/GV/ch/ancientone.c +++ b/src/GV/ch/ancientone.c @@ -89,7 +89,7 @@ void func_803867F4(void){ func_802BAFE4(4); if(nodeProp_findPositionFromActorId(0x148, sp24)){ jiggySpawn(JIGGY_46_GV_ANCIENT_ONES, sp24); - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x4C, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4C, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); } } @@ -183,10 +183,10 @@ void chAncientOne_update(Actor *this){ this->position_z += (sp38 & 2) ? 0xC : -0xC; if(this->unkF4_8 != 1){ if(sp38 == 6){ - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x4C, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4C, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); } if(sp38 == 4 && this->position_y < LOCAL_CH_ANCIENT_ONE(this)->unk1C - 600.0f){ - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, sp34), reinterpret_cast(s32, this->position_z)); }//L80386D80 } if(LOCAL_CH_ANCIENT_ONE(this)->unk1C <= this->position_y){ @@ -226,7 +226,7 @@ Actor *chAncientOne_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **v sp58 = (this->state == 3) ? 0 : 1; func_8033A45C(3, sp58); func_8033A45C(4, sp58); - func_80325888(this_marker, gfx, mtx, vtx); + actor_draw(this_marker, gfx, mtx, vtx); if( !this->initialized && this_marker->unk14_21){ func_8034A1B4(func_80329934(), 5, sp4C); func_8034A1B4(func_80329934(), 6, sp40); diff --git a/src/GV/ch/buriedpyramid.c b/src/GV/ch/buriedpyramid.c index d0963e0d..704fa498 100644 --- a/src/GV/ch/buriedpyramid.c +++ b/src/GV/ch/buriedpyramid.c @@ -38,7 +38,7 @@ Actor *chBuriedPyramid_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx return func_80325340(this_marker, gfx, mtx, vtx); } else{ - return func_80325888(this_marker, gfx, mtx, vtx); + return actor_draw(this_marker, gfx, mtx, vtx); } } diff --git a/src/GV/ch/gobi1.c b/src/GV/ch/gobi1.c index 26ee5d20..72bc6296 100644 --- a/src/GV/ch/gobi1.c +++ b/src/GV/ch/gobi1.c @@ -41,30 +41,30 @@ void chGobi1_setState(Actor *this, s32 next_state){ GV_D_80391A40.unk1 = FALSE; if(this->state == 1){ - func_80335924(this->unk148, 0xd9, 0.5f, 4.0f); + skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f); local->unk4 = randf2(2.0f, 10.0f); } if(this->state == 2){ - func_80335924(this->unk148, 0xda, 1.0f, 5.0f); + skeletalAnim_set(this->unk148, 0xda, 1.0f, 5.0f); local->unkC = 0.9f; GV_D_80391A40.unk0 = TRUE; } if(this->state == 3){ func_8028F918(2); - func_80335924(this->unk148, 0xf7, 1.0f, 5.33f); + skeletalAnim_set(this->unk148, 0xf7, 1.0f, 5.33f); local->unk14 = 0.01f; GV_D_80391A40.unk1 = TRUE; } if(this->state == 4){ - func_80335924(this->unk148, 0xf8, 0.7f, 0.71f); + skeletalAnim_set(this->unk148, 0xf8, 0.7f, 0.71f); } if(this->state == 6){ FUNC_8030E8B4(SFX_84_GOBI_CRYING, 0.9f, 20000, this->position, 1500, 2500); - func_80335924(this->unk148, 0x241, 0.2f, 0.5f); + skeletalAnim_set(this->unk148, 0x241, 0.2f, 0.5f); } } @@ -74,7 +74,7 @@ Actor *chgobi1_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ return this; } else{ - return func_80325888(this_marker, gfx, mtx, vtx); + return actor_draw(this_marker, gfx, mtx, vtx); } } @@ -171,7 +171,7 @@ void chGobi1_update(Actor *this){ } if(this->state == 2){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) sp6C = 1; } @@ -197,7 +197,7 @@ void chGobi1_update(Actor *this){ }//L80387808 if(this->state == 3){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) sp6C = 4; }//L80387830 @@ -221,7 +221,7 @@ void chGobi1_update(Actor *this){ } if(this->state == 6){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) sp6C = 1; } diff --git a/src/GV/ch/gobi2.c b/src/GV/ch/gobi2.c index 3189ded3..f319e9e5 100644 --- a/src/GV/ch/gobi2.c +++ b/src/GV/ch/gobi2.c @@ -4,7 +4,7 @@ typedef struct { u8 pad0[4]; - Struct80s *unk4; + SkeletalAnimation *unk4; BKModelBin *unk8; }ActorLocal_Gobi2; @@ -49,14 +49,14 @@ void GV_func_80387A00(ActorMarker *this_marker){ void func_80387A2C(ActorMarker *caller, enum asset_e text_id, s32 arg2){ timed_setStaticCameraToNode(0.0f, 0xC); - timedFunc_set_1(0.5f, (GenMethod_1) func_80387984, reinterpret_cast(s32, caller)); + timedFunc_set_1(0.5f, (GenFunction_1) func_80387984, reinterpret_cast(s32, caller)); timed_playSfx(0.5f, SFX_2C_PULLING_NOISE, 0.9f, 32000); timed_playSfx(1.8f, SFX_2C_PULLING_NOISE, 1.0f, 32000); timed_playSfx(2.5f, SFX_2C_PULLING_NOISE, 1.1f, 32000); timed_setStaticCameraToNode(3.0f, 0xd); timedFunc_set_0(3.5f, __chGobi2_spawnJIggy); timed_exitStaticCamera(6.0f); - timedFunc_set_1(6.0f, (GenMethod_1) GV_func_80387A00, reinterpret_cast(s32, caller)); + timedFunc_set_1(6.0f, (GenFunction_1) GV_func_80387A00, reinterpret_cast(s32, caller)); func_80324E38(6.0f, 0); } @@ -73,14 +73,14 @@ void chGobi2_setState(Actor *this, s32 next_state){ if(next_state == 2){ this->marker->propPtr->unk8_3 = TRUE; - func_80335924(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f); + skeletalAnim_set(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f); } if(next_state == 3){ timedFunc_set_0(0.05f, GV_func_80387960); timed_playSfx(0.05f, SFX_84_GOBI_CRYING, 1.1f, 32000); func_80324E38(0.051f, 1); - timedFunc_set_1(0.06f, (GenMethod_1)func_803879D4, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(0.06f, (GenFunction_1)func_803879D4, reinterpret_cast(s32, this->marker)); timed_setStaticCameraToNode(0.86f, 0xb); timed_playSfx(0.8f, SFX_4B_GULPING, 0.8f, 28000); timed_playSfx(1.4f, SFX_4B_GULPING, 0.8f, 28000); @@ -89,18 +89,18 @@ void chGobi2_setState(Actor *this, s32 next_state){ }//L80387C94 if(next_state == 4){ - func_80335924(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f); - func_80335924(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f); + skeletalAnim_set(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 3.0f); + skeletalAnim_set(local->unk4, ASSET_100_ANIM_GOBI_SPIT, 0.0f, 3.0f); } if(next_state == 5){ - func_80335924(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.43f, 0.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_FD_ANIM_GOBI2_GETTING_UP, 0.43f, 0.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if(next_state == 6){ - func_80335924(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.4f, 0.71f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.4f, 0.71f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if(next_state == 7){ @@ -109,7 +109,7 @@ void chGobi2_setState(Actor *this, s32 next_state){ if(next_state == 8){ FUNC_8030E8B4(SFX_84_GOBI_CRYING, 0.9f, 20000, this->position, 1500, 2500); - func_80335924(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f); + skeletalAnim_set(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f); } this->state = next_state; @@ -130,12 +130,12 @@ Actor *chGobi2_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp3C[0] = this->pitch; sp3C[1] = this->yaw; sp3C[2] = this->roll; - func_8033A238(func_803356A0(this->unk148)); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); + modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(this->unk148)); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, func_80330B1C(this_marker)); if(this->state == 4){ - func_8033A238(func_803356A0(local->unk4)); + modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(local->unk4)); modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE); modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL, local->unk8); } @@ -147,7 +147,7 @@ void __chGobi2_80387EFC(Actor *this){ ActorLocal_Gobi2 *local = (ActorLocal_Gobi2 *)&this->local; chGobi2_setState(this, 0); - func_80335874(local->unk4); + skeletalAnim_free(local->unk4); assetcache_release(local->unk8); } @@ -174,7 +174,7 @@ void chGobi2_update(Actor *this){ this->unk16C_4 = TRUE; marker_setCollisionScripts(this->marker, __chGobi2_ow, NULL, NULL); sp34->unk30 = __chGobi2_80387EFC; - local->unk4 = func_803358B4(); + local->unk4 = skeletalAnim_new(); local->unk8 = (BKModelBin*) assetcache_get(ASSET_3F3_MODEL_GOBI_SPIT); D_80391A50 = 0; this->unk1C[0] = 0.0f; @@ -211,14 +211,14 @@ void chGobi2_update(Actor *this){ }//L80388194 if(this->state == 4){ - func_80335A94(local->unk4, sp2C, 1); - if(func_80335794(this->unk148) > 0){ + skeletalAnim_update(local->unk4, sp2C, 1); + if(skeletalAnim_getLoopCount(this->unk148) > 0){ chGobi2_setState(this, 5); } } if(this->state == 5){ - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ chGobi2_setState(this, 6); } } @@ -228,7 +228,7 @@ void chGobi2_update(Actor *this){ } if(this->state == 8){ - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ chGobi2_setState(this, 2); } } diff --git a/src/GV/ch/gobi3.c b/src/GV/ch/gobi3.c index 19b5e06e..6ac343dd 100644 --- a/src/GV/ch/gobi3.c +++ b/src/GV/ch/gobi3.c @@ -58,26 +58,26 @@ void chGobi3_setState(Actor *this, s32 next_state){ if(next_state == 2){ this->marker->propPtr->unk8_3 = TRUE; - func_80335924(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f); + skeletalAnim_set(this->unk148, ASSET_F4_ANIM_GOBI_IDLE, 0.5f, 12.0f); } if(next_state == 3){ func_80324E38(0.0f, 3); - timedFunc_set_1(0.02f, (GenMethod_1)__chGobi3_func_80388270, (s32)this); + timedFunc_set_1(0.02f, (GenFunction_1)__chGobi3_func_80388270, (s32)this); timed_setStaticCameraToNode(0.1f, 0x12); timed_playSfx(0.2f, SFX_4C_LIP_SMACK, 1.0f, 32000); - timedFunc_set_1(0.2f, (GenMethod_1)__chGobi3_spawnHoneyComb, (s32)this); - func_80335924(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 1.0f); + timedFunc_set_1(0.2f, (GenFunction_1)__chGobi3_spawnHoneyComb, (s32)this); + skeletalAnim_set(this->unk148, ASSET_FC_ANIM_GOBI_SPITTING, 0.2f, 1.0f); } if(next_state == 5){ - func_80335924(this->unk148, 0xd9, 0.5f, 4.0f); + skeletalAnim_set(this->unk148, 0xd9, 0.5f, 4.0f); func_80311480(ASSET_A77_TEXT_GOBI3_DONE, 0xe, this->position, this->marker, __chGobi3_runaway, NULL); } if(next_state == 4){ this->marker->propPtr->unk8_3 = FALSE; - func_80335924(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.3f, 0.71f); + skeletalAnim_set(this->unk148, ASSET_F8_ANIM_GOBI_RUNNING, 0.3f, 0.71f); } if(next_state == 6){ @@ -86,7 +86,7 @@ void chGobi3_setState(Actor *this, s32 next_state){ if(next_state == 7){ FUNC_8030E8B4(SFX_84_GOBI_CRYING, 0.9f, 20000, this->position, 1500, 2500); - func_80335924(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f); + skeletalAnim_set(this->unk148, ASSET_242_ANIM_GOBI_RELAXING, 0.2f, 0.5f); } this->state = next_state; @@ -97,7 +97,7 @@ Actor *chGobi3_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(this->state == 0 || this->state == 1) return this; - return func_80325888(this_marker, gfx, mtx, vtx); + return actor_draw(this_marker, gfx, mtx, vtx); } void chGobi3_ow(ActorMarker *this_marker, ActorMarker *other_marker){ @@ -138,7 +138,7 @@ void chGobi3_update(Actor *this){ } if(this->state == 3){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) chGobi3_setState(this, 5); } @@ -149,7 +149,7 @@ void chGobi3_update(Actor *this){ } if(this->state == 7){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) chGobi3_setState(this, 2); } diff --git a/src/GV/ch/gobirock.c b/src/GV/ch/gobirock.c index c34d54fc..9632cbdb 100644 --- a/src/GV/ch/gobirock.c +++ b/src/GV/ch/gobirock.c @@ -69,7 +69,7 @@ Actor *chGobiRock_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx sp3C[0] = this->pitch; sp3C[1] = this->yaw; sp3C[2] = this->roll; - modelRender_preDraw((GenMethod_1)func_803253A0, (s32) this); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32) this); func_8033A450(func_80329934()); modelRender_draw(gfx, mtx, this->position, sp3C, 1.0f, NULL,func_80330B1C(this_marker)); func_8034A174(func_80329934(), 5, local->unk0); diff --git a/src/GV/ch/gobirope.c b/src/GV/ch/gobirope.c index 2cc34071..93b05b34 100644 --- a/src/GV/ch/gobirope.c +++ b/src/GV/ch/gobirope.c @@ -8,7 +8,7 @@ void chGobiRope_update(Actor *this); /* .data */ ActorInfo chGobiRope = { MARKER_BD_GOBI_ROPE, ACTOR_12F_GOBI_ROPE, ASSET_3E3_MODEL_GOBI_ROPE, 0, NULL, - chGobiRope_update, func_80326224, func_80325888, + chGobiRope_update, func_80326224, actor_draw, 0, 0x533, 0.0f, 0 }; @@ -17,16 +17,16 @@ void chGobiRope_setState(Actor *this, s32 next_state){ this->state = next_state; if(this->state == 1){ - func_80335924(this->unk148, ASSET_DD_ANIM_GOBI_ROPE, 0.5f, 4.0f); + skeletalAnim_set(this->unk148, ASSET_DD_ANIM_GOBI_ROPE, 0.5f, 4.0f); } if(this->state == 2){ - func_80335924(this->unk148, ASSET_DC_ANIM_GOBI_ROPE_PULLING, 1.0f, 5.0f); + skeletalAnim_set(this->unk148, ASSET_DC_ANIM_GOBI_ROPE_PULLING, 1.0f, 5.0f); } if(this->state == 3){ - func_80335924(this->unk148, 0xF5, 0.1f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0xF5, 0.1f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if(this->state == 4){ @@ -65,11 +65,11 @@ void chGobiRope_update(Actor *this){ } }//L80388AB4 if(this->state == 2){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) chGobiRope_setState(this, 1); } if(this->state == 3){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) chGobiRope_setState(this, 4); } } diff --git a/src/GV/ch/histup.c b/src/GV/ch/histup.c index fb9b8aa5..81460532 100644 --- a/src/GV/ch/histup.c +++ b/src/GV/ch/histup.c @@ -50,7 +50,7 @@ Actor *func_8038DA18(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ f32 sp38[3]; f32 sp2C[3]; - this = func_80325888(this_marker, gfx, mtx, vtx); + this = actor_draw(this_marker, gfx, mtx, vtx); if(!this_marker->unk14_21) return this; diff --git a/src/GV/ch/mazectrl.c b/src/GV/ch/mazectrl.c index 4133d80e..664515de 100644 --- a/src/GV/ch/mazectrl.c +++ b/src/GV/ch/mazectrl.c @@ -98,9 +98,9 @@ void __chMazeCtrl_setState(Actor *this, s32 next_state){ if(next_state == 3){ func_80324E38(0.0f, 3); - timedFunc_set_2(0.0f, (GenMethod_2)func_8025A6EC, COMUSIC_3E_SANDYBUTT_FAILURE, 0x7FFF); - timedFunc_set_2(1.0f, (GenMethod_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 6); - timedFunc_set_2(2.0f, (GenMethod_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 4); + timedFunc_set_2(0.0f, (GenFunction_2)func_8025A6EC, COMUSIC_3E_SANDYBUTT_FAILURE, 0x7FFF); + timedFunc_set_2(1.0f, (GenFunction_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 6); + timedFunc_set_2(2.0f, (GenFunction_2)__chMazeCtrl_markerSetState, reinterpret_cast(s32, this->marker), 4); }//L8038F850 if(next_state == 4){ diff --git a/src/GV/ch/sarcophagus.c b/src/GV/ch/sarcophagus.c index 0b7f3f33..82f5a3dd 100644 --- a/src/GV/ch/sarcophagus.c +++ b/src/GV/ch/sarcophagus.c @@ -20,13 +20,13 @@ ActorAnimationInfo chSarcophagusAnimations[] = { ActorInfo chSarcophagus = { MARKER_A8_GV_MAZE_SARCOPHAGUS, ACTOR_11A_GV_MAZE_SARCOPHAGUS, ASSET_33D_MODEL_SARCOPHAGUS, 0x1, chSarcophagusAnimations, - chSarcophagus_update, func_80326224, func_80325888, + chSarcophagus_update, func_80326224, actor_draw, 2500, 0, 0.0f, 0 }; ActorInfo chSNSSarcophagus = { MARKER_23B_GV_SNS_SARCOPHAGUS, ACTOR_244_GV_SNS_SARCOPHAGUS, ASSET_33D_MODEL_SARCOPHAGUS, 0x1, chSarcophagusAnimations, - chSarcophagus_updateSNS, func_80326224, func_80325888, + chSarcophagus_updateSNS, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/GV/ch/toots.c b/src/GV/ch/toots.c index 8b091765..6804e711 100644 --- a/src/GV/ch/toots.c +++ b/src/GV/ch/toots.c @@ -14,7 +14,7 @@ ActorAnimationInfo chTootsAnimations[] = { ActorInfo chToots = { MARKER_1F4_TOOTS, ACTOR_1E4_TOOTS, ASSET_434_MODEL_TOOTS, 0x1, chTootsAnimations, - chtoots_update, func_80326224, func_80325888, + chtoots_update, func_80326224, actor_draw, 2000, 0, 0.5f, 0 }; diff --git a/src/GV/ch/trunker.c b/src/GV/ch/trunker.c index 6ba52acf..9c4ba2b7 100644 --- a/src/GV/ch/trunker.c +++ b/src/GV/ch/trunker.c @@ -18,18 +18,18 @@ ActorInfo chTrunker = { void __chTrucker_setState(Actor *this, s32 next_state){ this->state = next_state; if(this->state == 1){ - func_80335924(this->unk148, ASSET_FE_ANIM_TRUCKER_SHORT, 0.1f, 2.5f); + skeletalAnim_set(this->unk148, ASSET_FE_ANIM_TRUCKER_SHORT, 0.1f, 2.5f); } if(this->state == 2){ - func_80335924(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.1f, 2.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.1f, 2.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } if(this->state == 3){ - func_80335924(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.0f, 2.5f); - func_80335A74(this->unk148, 0.999f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_FF_ANIM_TRUCKER_GROW, 0.0f, 2.5f); + skeletalAnim_setProgress(this->unk148, 0.999f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } } @@ -40,7 +40,7 @@ Actor *chTrucker_draw(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) if(this->state == 0) return this; - this = func_80325888(this_marker, gfx, mtx, vtx); + this = actor_draw(this_marker, gfx, mtx, vtx); sp38[0] = this->position_x - 150.0f; sp38[1] = this->position_y + 2.0f; sp38[2] = this->position_z - 170.0f; @@ -82,7 +82,7 @@ void chTrucker_update(Actor *this){ sp28 = 2; } - if(this->state == 2 && func_80335794(this->unk148) > 0){ + if(this->state == 2 && skeletalAnim_getLoopCount(this->unk148) > 0){ sp28 = 3; } diff --git a/src/GV/code_2EE0.c b/src/GV/code_2EE0.c index a5783d98..fa7b6831 100644 --- a/src/GV/code_2EE0.c +++ b/src/GV/code_2EE0.c @@ -29,7 +29,7 @@ Actor *func_803892D0(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ position[1] = this->position_y; position[2] = this->position_z; position[1] += 8.0f; - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); modelRender_draw(gfx, mtx, position, rotation, this->unk1C[0], NULL, func_80330B1C(this_marker)); } return this; diff --git a/src/GV/code_3630.c b/src/GV/code_3630.c index cf1c9a9f..10cc369f 100644 --- a/src/GV/code_3630.c +++ b/src/GV/code_3630.c @@ -16,7 +16,7 @@ ActorAnimationInfo D_80390EA0[] = { ActorInfo D_80390ED0 = { MARKER_A9_RUBEE, ACTOR_11B_RUBEE, ASSET_3DD_MODEL_RUBEE, 0x2, D_80390EA0, - func_80389B1C, func_80326224, func_80325888, + func_80389B1C, func_80326224, actor_draw, 2500, 0, 1.6f, 0 }; diff --git a/src/GV/code_3AA0.c b/src/GV/code_3AA0.c index 2ced6b0e..8085ea12 100644 --- a/src/GV/code_3AA0.c +++ b/src/GV/code_3AA0.c @@ -8,7 +8,7 @@ void GV_func_80389EA8(Actor *this); /* .data */ ActorInfo D_80390F00 = { MARKER_AB_RUBEES_EGG_POT, ACTOR_11D_RUBEES_EGG_POT, ASSET_3E1_MODEL_RUBEES_EGG_POT, 0x1, NULL, - GV_func_80389E90, GV_func_80389EA8, func_80325888, + GV_func_80389E90, GV_func_80389EA8, actor_draw, 2500, 0, 0.9f, 0 }; diff --git a/src/GV/code_3D90.c b/src/GV/code_3D90.c index 23826d4e..d4b191f3 100644 --- a/src/GV/code_3D90.c +++ b/src/GV/code_3D90.c @@ -30,7 +30,7 @@ Actor *func_8038A180(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor * this = marker_getActor(this_marker); if(this->unk1C[0] != 0.0f){ - this = func_80325888(this_marker, gfx, mtx, vtx); + this = actor_draw(this_marker, gfx, mtx, vtx); if( this->unk54 == 0.0f && this->unk48 != this->unk1C[1] @@ -70,7 +70,7 @@ void func_8038A31C(Actor *this){ if(!this->unk16C_4){ this->unk16C_4 = TRUE; actor_collisionOff(this); - __spawnQueue_add_1((GenMethod_1)func_8038A2C0, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_8038A2C0, reinterpret_cast(s32, this->marker)); this->velocity[0] = 0.0f; } diff --git a/src/GV/code_43B0.c b/src/GV/code_43B0.c index 71b31287..41b810ef 100644 --- a/src/GV/code_43B0.c +++ b/src/GV/code_43B0.c @@ -27,7 +27,7 @@ ActorInfo D_80391010 = { MARKER_A7_MAGIC_CARPET_1, ACTOR_119_MAGIC_CARPET_1, ASS Actor *func_8038A7A0(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor * this; - this = func_80325888(this_marker, gfx, mtx, vtx); + this = actor_draw(this_marker, gfx, mtx, vtx); if( this->velocity_y != 0.0f && this_marker->unk14_21 @@ -68,7 +68,7 @@ void func_8038A948(Actor *this){ this->initialized = TRUE; this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); - __spawnQueue_add_1((GenMethod_1)func_8038A8CC, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_8038A8CC, (s32)this->marker); this->velocity_y = 0.0f; } } @@ -84,7 +84,7 @@ void GV_func_8038A9C0(Actor *this){ this->unk16C_4 = TRUE; this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); - __spawnQueue_add_1((GenMethod_1)func_8038A8CC, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_8038A8CC, (s32)this->marker); sp24 = subaddie_getLinkedActor(this); this->unk1C[1] = this->unk48; this->pitch = 0.0f; diff --git a/src/GV/code_4740.c b/src/GV/code_4740.c index f709ceeb..8628b582 100644 --- a/src/GV/code_4740.c +++ b/src/GV/code_4740.c @@ -22,7 +22,7 @@ ActorAnimationInfo D_80391040[] ={ ActorInfo D_80391098 = { MARKER_AD_SLAPPA, ACTOR_120_SLAPPA, ASSET_376_MODEL_SLAPPA, 0x1, D_80391040, - func_8038B124, func_80326224, func_80325888, + func_8038B124, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; s32 D_803910BC[3] = {175, 100, 0}; diff --git a/src/GV/code_5570.c b/src/GV/code_5570.c index 3ffde009..16634b8f 100644 --- a/src/GV/code_5570.c +++ b/src/GV/code_5570.c @@ -26,7 +26,7 @@ ActorAnimationInfo D_80391120[] ={ ActorInfo D_80391158 = { MARKER_A6_GRABBA, ACTOR_118_GRABBA, ASSET_371_MODEL_GRABBA, 0x1, D_80391120, - GV_func_8038BEA0, func_80326224, func_80325888, + GV_func_8038BEA0, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -200,7 +200,7 @@ void GV_func_8038BEA0(Actor *this){ this->unk38_31 = 0; D_80391A80 = this->state; func_802BB3DC(0, 14.0f, 0.92f); - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x11f, + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x11f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z) ); } diff --git a/src/GV/code_61E0.c b/src/GV/code_61E0.c index 4b45fd97..491905d0 100644 --- a/src/GV/code_61E0.c +++ b/src/GV/code_61E0.c @@ -33,7 +33,7 @@ Actor *GV_func_8038C5D0(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vt || this->state == 5 ){ if(!GV_D_80391A90) - return func_80325888(this_marker, gfx, mtx, vtx); + return actor_draw(this_marker, gfx, mtx, vtx); } return this; } diff --git a/src/GV/code_6370.c b/src/GV/code_6370.c index fd22ede0..d726653f 100644 --- a/src/GV/code_6370.c +++ b/src/GV/code_6370.c @@ -50,13 +50,13 @@ void func_8038C760(Actor *this, s32 arg1){ timed_setStaticCameraToNode(0.0f, 8); if(arg1 < 3){ timed_setStaticCameraToNode(3.5f, arg1 + 0x15); - timedFunc_set_3(3.5f, (GenMethod_3)fileProgressFlag_setN, FILEPROG_F8_KING_SANDYBUTT_PYRAMID_STATE, arg1, 2); + timedFunc_set_3(3.5f, (GenFunction_3)fileProgressFlag_setN, FILEPROG_F8_KING_SANDYBUTT_PYRAMID_STATE, arg1, 2); timed_exitStaticCamera(6.5f); func_80324E38(6.5f, 0); } else{ - timedFunc_set_2(3.5f, (GenMethod_2)func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7fff); - timedFunc_set_3(3.5f, (GenMethod_3)fileProgressFlag_setN, FILEPROG_F8_KING_SANDYBUTT_PYRAMID_STATE, arg1, 2); + timedFunc_set_2(3.5f, (GenFunction_2)func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7fff); + timedFunc_set_3(3.5f, (GenFunction_3)fileProgressFlag_setN, FILEPROG_F8_KING_SANDYBUTT_PYRAMID_STATE, arg1, 2); timed_exitStaticCamera(6.0f); func_80324E38(6.0f, 0); } @@ -86,9 +86,9 @@ void func_8038C8A0(Actor *this, s32 next_state){ }//L8038C9B8 if(next_state == 2){ - func_80335924(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 1.0f, 3.0f); - func_80335A74(this->unk148, 0.27f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 1.0f, 3.0f); + skeletalAnim_setProgress(this->unk148, 0.27f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); local->unkC = 0.0f; local->unk18[0] = this->position_x; local->unk18[1] = this->position_y; @@ -101,22 +101,22 @@ void func_8038C8A0(Actor *this, s32 next_state){ if(next_state == 3){ local->unk24 = 3.0f; - func_80335924(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 1.0f, 3.0f); - func_80335A74(this->unk148, 0.27f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 1.0f, 3.0f); + skeletalAnim_setProgress(this->unk148, 0.27f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); }//L8038CAB4 if(this->state == 3){ - func_80335924(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 0.5f, 3.0f); - func_80335A74(this->unk148, 0.99f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 0.5f, 3.0f); + skeletalAnim_setProgress(this->unk148, 0.99f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); if(next_state == 4 || next_state == 5) FUNC_8030E8B4(SFX_DE_WOOD_SQUEAK, 1.0f, 32675, this->position, 500, 1500); }//L8038CB20 if(next_state == 6){ func_80324E38(0.0f, 3); - func_80335924(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 0.0f, 3.0f); + skeletalAnim_set(this->unk148, ASSET_F0_ANIM_MINI_SHPYNX_EATING, 0.0f, 3.0f); func_8025A6EC(COMUSIC_2B_DING_B, 28000); } @@ -142,7 +142,7 @@ void func_8038C8A0(Actor *this, s32 next_state){ Actor *func_8038CC40(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(this_marker); if(this->state == 1) return this; - return func_80325888(this_marker, gfx, mtx, vtx); + return actor_draw(this_marker, gfx, mtx, vtx); } void func_8038CC98(Actor *this){ @@ -250,7 +250,7 @@ void func_8038CC98(Actor *this){ }//L8038D110 if(this->state == 6){ - func_8033568C(this->unk148, &sp58, &sp54); + skeletalAnim_getProgressRange(this->unk148, &sp58, &sp54); if(sp58 < 0.28 && 0.28 <= sp54){ FUNC_8030E624(SFX_4C_LIP_SMACK, 1.0f, 28000); } diff --git a/src/GV/code_7060.c b/src/GV/code_7060.c index 5e2b5737..43643980 100644 --- a/src/GV/code_7060.c +++ b/src/GV/code_7060.c @@ -16,7 +16,7 @@ ActorAnimationInfo D_80391290[] = { }; ActorInfo D_803912B8 = { MARKER_F9_JINXY, ACTOR_1F7_JINXY, ASSET_422_MODEL_JINXY, 0x1, D_80391290, - func_8038D47C, func_80326224, func_80325888, + func_8038D47C, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -65,7 +65,7 @@ void func_8038D47C(Actor *this){ mapSpecificFlags_set(0x10, 0); this->unk16C_4 = TRUE; if(func_803203FC(UNKFLAGS1_C1_IN_FINAL_CHARACTER_PARADE) && gcparade_8031B4F4() == -3){ - timedFunc_set_1(1.5f, (GenMethod_1)func_8038D450, reinterpret_cast(s32, this->marker)); + timedFunc_set_1(1.5f, (GenFunction_1)func_8038D450, reinterpret_cast(s32, this->marker)); } }//L8038D5EC diff --git a/src/GV/code_7DB0.c b/src/GV/code_7DB0.c index 510928b6..a9af74ef 100644 --- a/src/GV/code_7DB0.c +++ b/src/GV/code_7DB0.c @@ -15,7 +15,7 @@ ActorAnimationInfo D_80391340[] ={ ActorInfo D_80391358 = { 0xAE, 0x121, 0x3E6, 0x1, D_80391340, - func_8038E1A0, func_8038E1A8, func_80325888, + func_8038E1A0, func_8038E1A8, actor_draw, 2500, 0, 0.0f, 0 }; diff --git a/src/GV/code_7FC0.c b/src/GV/code_7FC0.c index fa19ec6f..cdeb2ec1 100644 --- a/src/GV/code_7FC0.c +++ b/src/GV/code_7FC0.c @@ -11,13 +11,13 @@ ActorAnimationInfo GV_D_80391380[] = { }; ActorInfo GV_D_80391390 = { 0xFA, 0x1F8, 0x423, 0x1, GV_D_80391380, - func_8038E3B0, func_80326224, func_80325888, + func_8038E3B0, func_80326224, actor_draw, 0, 0x100, 0.0f, 0 }; ActorInfo D_803913B4 = { 0xFB, 0x1F9, 0x424, 0x1, GV_D_80391380, - func_8038E3B0, func_80326224, func_80325888, + func_8038E3B0, func_80326224, actor_draw, 0, 0x100, 0.0f, 0 }; diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index ce8eab65..99d410e0 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -82,25 +82,25 @@ ActorAnimationInfo D_803913E0[] = { ActorInfo D_80391428 = { MARKER_EC_GV_SUN_SWITCH, ACTOR_13F_GV_SUN_SWITCH, ASSET_400_MODEL_SUN_SWITCH, 0x1, D_803913E0, - chSunSwitch_update, func_80326224, func_80325888, + chSunSwitch_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_8039144C = { MARKER_F1_GV_STAR_SWITCH, ACTOR_144_GV_STAR_SWITCH, ASSET_3D7_MODEL_STAR_SWITCH, 0x1, D_803913E0, - chStarSwitch_update, func_80326224, func_80325888, + chStarSwitch_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80391470 = { MARKER_F2_HONEYCOMB_SWITCH, ACTOR_145_HONEYCOMB_SWITCH, ASSET_438_MODEL_HONEYCOMB_SWITCH, 0x1, D_803913E0, - chHoneycombSwitch_update, func_80326224, func_80325888, + chHoneycombSwitch_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80391494 = { MARKER_23C_GV_SNS_SWITCH, ACTOR_245_GV_SNS_SWITCH, ASSET_515_MODEL_GV_SNS_SWITCH, 0x1, D_803913E0, - func_8038EF14, func_80326224, func_80325888, + func_8038EF14, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -130,7 +130,7 @@ ActorInfo GV_D_80391524 = { MARKER_EF_GV_STAR_HATCH, ACTOR_142_GV_STAR_HATCH, AS ActorInfo D_80391548 = { MARKER_F3_GV_KAZOOIE_TARGET, ACTOR_146_GV_KAZOOIE_TARGET, ASSET_3E2_MODEL_GV_KAZOOIE_TARGET, 0x1, 0x0, - chKazooieTarget_update, func_80326224, func_80325E78, + chKazooieTarget_update, func_80326224, actor_drawFullDepth, 0, 0x400, 0.0f, 0 }; @@ -448,7 +448,7 @@ void func_8038F028(UNK_TYPE(s32) arg0, ActorMarker *arg1, s32 arg2, s32 arg3){ sp24[0] = (f32)arg1->propPtr->x; sp24[1] = (f32)arg1->propPtr->y; sp24[2] = (f32)arg1->propPtr->z; - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x4e, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x4e, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); func_8025A6EC(COMUSIC_2B_DING_B, 22000); if(mapSpecificFlags_get(arg3)){ timedFunc_set_0(2.0f, func_8038F004); diff --git a/src/MM/ch/chimpystump.c b/src/MM/ch/chimpystump.c index 4d2eb198..47ea0ffb 100644 --- a/src/MM/ch/chimpystump.c +++ b/src/MM/ch/chimpystump.c @@ -16,7 +16,7 @@ void chchimpystump_update(Actor *this); /* .data */ ActorInfo chchimpystump = { MARKER_95_CHIMPY_STUMP, ACTOR_C5_CHIMPY_STUMP, ASSET_3C8_MODEL_CHIMPY_STUMP, 1, NULL, - chchimpystump_update, func_80326224, func_80325E78, + chchimpystump_update, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; diff --git a/src/MM/ch/conga.c b/src/MM/ch/conga.c index c2517d94..7f62feeb 100644 --- a/src/MM/ch/conga.c +++ b/src/MM/ch/conga.c @@ -50,7 +50,7 @@ ActorAnimationInfo chCongaAnimations[9] = { ActorInfo chcongaInfo = { MARKER_7_CONGA, ACTOR_8_CONGA, ASSET_35C_MODEL_CONGA, 1, chCongaAnimations, - func_803876D0, func_80326224, func_80325888, + func_803876D0, func_80326224, actor_draw, 0, 0x333, 0.0f, 0 }; @@ -228,7 +228,7 @@ void func_803876D0(Actor *this){ if(0.0f != this->velocity_x){ this->velocity_x -= 1.0f; if(0.0f == this->velocity_x){ - __spawnQueue_add_1((GenMethod_1)func_80387100, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_80387100, (s32)this->marker); } } marker_setCollisionScripts(this->marker, NULL, NULL, func_80387168); @@ -369,6 +369,6 @@ void func_803876D0(Actor *this){ || (this->state == 7 && actor_animationIsAt(this, 0.468f)) ){ func_8034A1B4(this->marker->unk44, 5, &this->local); - __spawnQueue_add_1((GenMethod_1)func_803873C8, (s32)this->marker); //spawn orange + __spawnQueue_add_1((GenFunction_1)func_803873C8, (s32)this->marker); //spawn orange } } diff --git a/src/MM/ch/grublin.c b/src/MM/ch/grublin.c index 13acdf18..724119c9 100644 --- a/src/MM/ch/grublin.c +++ b/src/MM/ch/grublin.c @@ -42,7 +42,7 @@ ActorAnimationInfo chGrublinAnimations[11] = { ActorInfo chgrublinInfo = { MARKER_5_GRUBLIN, ACTOR_6_GRUBLIN, ASSET_3C5_MODEL_GRUBLIN, 1, chGrublinAnimations, - func_80388A80, func_80326224, func_80325888, + func_80388A80, func_80326224, actor_draw, 2500, 0, 1.0f, 0 }; diff --git a/src/MM/ch/hut.c b/src/MM/ch/hut.c index 9afbbe46..dfa36681 100644 --- a/src/MM/ch/hut.c +++ b/src/MM/ch/hut.c @@ -40,7 +40,7 @@ Actor *chhut_draw(ActorMarker *this, Gfx **arg1, Mtx **arg2, Vtx **arg3){ this->propPtr->unk8_3 = temp_a2; func_8033A45C(1, temp_a1); - return func_80325888(this, arg1, arg2, arg3); + return actor_draw(this, arg1, arg2, arg3); } void func_803869EC(ActorMarker *this){ @@ -84,10 +84,10 @@ void chhut_update(Actor *this){ func_8030E484(SFX_5B_HEAVY_STUFF_FALLING); func_80328A84(this, 1); actor_playAnimationOnce(this); - __spawnQueue_add_1((GenMethod_1)func_803869EC, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_803869EC, (s32)this->marker); func_802C8F70(this->yaw); if(D_8037DCB0 < 5){ - __spawnQueue_add_4((GenMethod_4)func_802C4218, D_803898D8[D_8037DCB0], *(s32*)(&sp3C[0]),*(s32*)(&sp3C[1]),*(s32*)(&sp3C[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4218, D_803898D8[D_8037DCB0], *(s32*)(&sp3C[0]),*(s32*)(&sp3C[1]),*(s32*)(&sp3C[2])); } else{ jiggySpawn(JIGGY_5_MM_HUTS, sp3C); diff --git a/src/MM/ch/juju.c b/src/MM/ch/juju.c index a49ac7f0..bedb8c5b 100644 --- a/src/MM/ch/juju.c +++ b/src/MM/ch/juju.c @@ -93,7 +93,7 @@ void func_803891E8(s32 x, s32 y, s32 z, s32 yaw){ } void func_80389244(s32 x, s32 y, s32 z, s32 yaw){ - __spawnQueue_add_4((GenMethod_4)func_803891E8, x, y, z, yaw); + __spawnQueue_add_4((GenFunction_4)func_803891E8, x, y, z, yaw); func_802BB3DC(0, 10.0f, 0.8f); gcpausemenu_80314AC8(1); } diff --git a/src/MM/ch/jujuhitbox.c b/src/MM/ch/jujuhitbox.c index 5c3080ec..c3fc717e 100644 --- a/src/MM/ch/jujuhitbox.c +++ b/src/MM/ch/jujuhitbox.c @@ -71,7 +71,7 @@ void func_80388BEC(NodeProp *arg0, ActorMarker *arg1){ ((ActorLocal_JujuHitbox *)&sp30->local)->unk4++; func_803892A8(((ActorLocal_JujuHitbox *)&sp30->local)->unk8); func_80353580(arg1); - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x58, *(s32 *)&sp20[0], *(s32 *)&sp20[1], *(s32 *)&sp20[2]); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x58, *(s32 *)&sp20[0], *(s32 *)&sp20[1], *(s32 *)&sp20[2]); } } } @@ -123,7 +123,7 @@ void func_80388E20(Actor *this){ } if(!this->unk16C_4){ this->unk16C_4 = 1; - __spawnQueue_add_2((GenMethod_2)func_80388DFC,this->marker, jujuCtlPtr->unk4); + __spawnQueue_add_2((GenFunction_2)func_80388DFC,this->marker, jujuCtlPtr->unk4); func_80388D14(this); }else{ if( func_80329530(this, 0xfa) diff --git a/src/MM/ch/lmonkey.c b/src/MM/ch/lmonkey.c index eec70d05..65d92f67 100644 --- a/src/MM/ch/lmonkey.c +++ b/src/MM/ch/lmonkey.c @@ -25,7 +25,7 @@ ActorAnimationInfo chlmonkeyAnimations[5] = { ActorInfo chlmonkeyInfo = { MARKER_A_CHIMPY, ACTOR_F_CHIMPY, ASSET_35D_MODEL_CHIMPY, 1, chlmonkeyAnimations, - NULL, chLMonkey_update, func_80325888, + NULL, chLMonkey_update, actor_draw, 2500, 0, 0.8f, 0 }; diff --git a/src/MM/ch/orange.c b/src/MM/ch/orange.c index aac3d0d2..3ea5775f 100644 --- a/src/MM/ch/orange.c +++ b/src/MM/ch/orange.c @@ -76,7 +76,7 @@ void MM_func_80387FF4(Actor * this){ } Actor *func_80388188(ActorMarker *this, Gfx **dl, Mtx **mptr, Vtx **vtx){ - Actor* actorPtr = func_80325E78(this, dl, mptr, vtx); + Actor* actorPtr = actor_drawFullDepth(this, dl, mptr, vtx); f32 sp60[3] = D_803899F4; f32 sp54[3] = D_80389A00; f32 sp48[3]; diff --git a/src/MM/ch/orangepad.c b/src/MM/ch/orangepad.c index ace3f098..a1178cf5 100644 --- a/src/MM/ch/orangepad.c +++ b/src/MM/ch/orangepad.c @@ -14,7 +14,7 @@ void func_80386768(Actor *); /* .data */ ActorInfo chorangepadInfo = { MARKER_66_ORANGE_PAD, ACTOR_57_ORANGE_PAD, ASSET_2EB_MODEL_ORANGE_PAD, 0, NULL, - func_80386768, func_80326224, func_80325888, + func_80386768, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -51,7 +51,7 @@ void func_80386444(ActorMarker *arg0){ func_802BAFE4(temp_a0); sp44[1] += 50.0f; - timedFunc_set_3(0.6f, (GenMethod_3) MM_func_803863F0, (s32)sp44[0], (s32)sp44[1], (s32)sp44[2]); + timedFunc_set_3(0.6f, (GenFunction_3) MM_func_803863F0, (s32)sp44[0], (s32)sp44[1], (s32)sp44[2]); func_8025A6EC(COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 0x7FFF); if(!jiggyscore_isCollected(JIGGY_8_MM_ORANGE_PADS)){ func_80311480(0xB3B, 4, NULL, NULL, NULL, NULL); diff --git a/src/MMM/ch/loggo.c b/src/MMM/ch/loggo.c index 3c46b334..41e14839 100644 --- a/src/MMM/ch/loggo.c +++ b/src/MMM/ch/loggo.c @@ -16,7 +16,7 @@ ActorAnimationInfo chLoggoAnimations[] = { ActorInfo chLoggo = { MARKER_252_LOGGO, ACTOR_37F_LOGGO, ASSET_519_MODEL_LOGGO, 0x1, chLoggoAnimations, - chLoggo_update, func_80326224, func_80325888, + chLoggo_update, func_80326224, actor_draw, 1000, 0, 0.0f, 0 }; diff --git a/src/MMM/ch/motzhand.c b/src/MMM/ch/motzhand.c index 2ce9a176..a9147255 100644 --- a/src/MMM/ch/motzhand.c +++ b/src/MMM/ch/motzhand.c @@ -35,16 +35,16 @@ void chMotzhand_setState(Actor *this, s32 next_state){ ActorLocal_Motzhand * local = (ActorLocal_Motzhand *) &this->local; if(next_state == 1 && this->state == 0){ - func_80335924(this->unk148, ASSET_A7_ANIM_MOTZHAND_IDLE, 0.0f, 1.8f); + skeletalAnim_set(this->unk148, ASSET_A7_ANIM_MOTZHAND_IDLE, 0.0f, 1.8f); func_80387410(this->position); } if(next_state == 2){ - func_80335924(this->unk148, ASSET_A7_ANIM_MOTZHAND_IDLE, 0.9f, 1.8f); + skeletalAnim_set(this->unk148, ASSET_A7_ANIM_MOTZHAND_IDLE, 0.9f, 1.8f); } if(next_state == 3){ - func_80335924(this->unk148, ASSET_A8_ANIM_MOTZHAND_PLAY, 0.9f, 1.8f); + skeletalAnim_set(this->unk148, ASSET_A8_ANIM_MOTZHAND_PLAY, 0.9f, 1.8f); } if(next_state == 4){ @@ -66,7 +66,7 @@ Actor *chMotzhand_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(this->state == 0 || this->state == 5) return this; - func_8033A238(func_803356A0(this->unk148)); + modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(this->unk148)); if(this->state == 4){ modelRender_setAlpha((s32) (local->alpha * 255.0f)); @@ -178,7 +178,7 @@ void chmotzhand_update(Actor *this){ }//L803879A4 if(this->state == 3){ - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_80389D9C(*local->pattern_ptr); if(local->unk9){ while(*local->pattern_ptr != 0xff){ diff --git a/src/MMM/ch/napper.c b/src/MMM/ch/napper.c index 91ee5530..7f7f6f17 100644 --- a/src/MMM/ch/napper.c +++ b/src/MMM/ch/napper.c @@ -29,18 +29,18 @@ void __chnapper_setState(Actor *this, s32 next_state){ local->unk4 = 0.0f; actor_collisionOff(this); if(next_state == 1) - func_80335924(this->unk148, ASSET_A3_ANIM_NAPPER_ASLEEP, 0.2f, 2.5f); + skeletalAnim_set(this->unk148, ASSET_A3_ANIM_NAPPER_ASLEEP, 0.2f, 2.5f); if(next_state == 2){ - func_80335924(this->unk148, ASSET_A4_ANIM_NAPPER_AWAKE, 0.2f, 5.0f); + skeletalAnim_set(this->unk148, ASSET_A4_ANIM_NAPPER_AWAKE, 0.2f, 5.0f); actor_collisionOn(this); local->jiggy_marker->collidable = FALSE; local->unk8 = randf2(2.0f, 6.0f); } if(next_state == 3){ - func_80335924(this->unk148, ASSET_A5_ANIM_NAPPER_WALK, 0.2f, 1.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_A5_ANIM_NAPPER_WALK, 0.2f, 1.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_8030E484(SFX_41_MUMBO_ERGHHH); } @@ -50,7 +50,7 @@ void __chnapper_setState(Actor *this, s32 next_state){ } if(next_state == 5){ - func_80335924(this->unk148, ASSET_A6_ANIM_NAPPER_ALERT, 2.0f, 4.0f); + skeletalAnim_set(this->unk148, ASSET_A6_ANIM_NAPPER_ALERT, 2.0f, 4.0f); actor_collisionOn(this); local->jiggy_marker->collidable = FALSE; } @@ -90,7 +90,7 @@ Actor *chnapper_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ modelRender_setAlpha(0xdc); } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void chnapper_update(Actor *this){ @@ -135,7 +135,7 @@ void chnapper_update(Actor *this){ return; } - func_8033568C(this->unk148, &sp70, &sp74); + skeletalAnim_getProgressRange(this->unk148, &sp70, &sp74); local->unk4 += sp68; if(this->state != 1){ @@ -208,9 +208,9 @@ void chnapper_update(Actor *this){ }//L803870F8 if(this->state == 3){ - if(func_80335794(this->unk148) > 0){ - func_80335924(this->unk148, ASSET_A4_ANIM_NAPPER_AWAKE, 1.0f, 5.0f); - func_80335A8C(this->unk148, 1); + if(skeletalAnim_getLoopCount(this->unk148) > 0){ + skeletalAnim_set(this->unk148, ASSET_A4_ANIM_NAPPER_AWAKE, 1.0f, 5.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if(func_80389524()) diff --git a/src/MMM/code_16B0.c b/src/MMM/code_16B0.c index 0e29d7e3..ca0a4929 100644 --- a/src/MMM/code_16B0.c +++ b/src/MMM/code_16B0.c @@ -25,7 +25,7 @@ Actor *func_80387AA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { if ((actor->state == 0) || (actor->state == 1) || (actor->state == 6) || (actor->state == 2)) { return actor; } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_80387B14(Actor *this, s32 next_state){ @@ -34,9 +34,9 @@ void func_80387B14(Actor *this, s32 next_state){ this->marker->unk14_20 = 0x1d1; if(next_state == 1 || next_state == 2){ - func_80335924(this->unk148, 0x23e, 0.0f, 2.5f); - func_80335A74(this->unk148, 0.99f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, 0x23e, 0.0f, 2.5f); + skeletalAnim_setProgress(this->unk148, 0.99f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); if(this->state == 4){ local->unk0 = randf2(0.5f, 1.0f); } @@ -55,8 +55,8 @@ void func_80387B14(Actor *this, s32 next_state){ if(next_state == 4){ this->marker->unk14_20 = MARKER_254_PORTRAIT_CHOMPA_A; - func_80335924(this->unk148, 0x23e, 0.0f, 2.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x23e, 0.0f, 2.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); if(this->unk100){ func_80389484(this->unk100, tmp + 0.55); } @@ -184,7 +184,7 @@ void func_80388028(Actor *this){ this->unk16C_4 = TRUE; this->unk16C_0 = TRUE; marker_setCollisionScripts(this->marker, NULL, MMM_func_80387CF4, func_80387D1C); - __spawnQueue_add_1((GenMethod_1)func_80387D48, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80387D48, reinterpret_cast(s32, this->marker)); func_80387B14(this, (this->state < 5) ? 1 : 6); }//L803880B4 @@ -220,7 +220,7 @@ void func_80388028(Actor *this){ } if(this->state == 4){ - func_8033568C(this->unk148, &sp44, &sp40); + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if(sp44 < 0.56 && 0.56 <= sp40){ this->marker->unk14_20 = 0x1d1; } @@ -239,7 +239,7 @@ void func_80388028(Actor *this){ if(sp44 < 0.9 && 0.9 <= sp40){ func_8030E6D4(SFX_2_CLAW_SWIPE); } - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_80387B14(this, 2); } } diff --git a/src/MMM/code_2040.c b/src/MMM/code_2040.c index 4a9c2b22..7bdc6491 100644 --- a/src/MMM/code_2040.c +++ b/src/MMM/code_2040.c @@ -62,77 +62,77 @@ ActorAnimationInfo D_8038BBE0[] = { ActorInfo D_8038BC28 = { 0x9C, 0x109, 0x3CD, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BC4C = { 0x9E, 0x10B, 0x3CF, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BC70 = { 0x9A, 0xCB, 0x3CC, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BC94 = { 0xA2, 0x114, 0x3D3, 0x1, NULL, - func_80388BDC, func_80326224, func_80325E78, + func_80388BDC, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BCB8 = { 0xE7, 0x265, 0x4DA, 0x1, NULL, - func_80389004, func_80326224, func_80325E78, + func_80389004, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BCDC = { 0x9D, 0x10A, 0x3CE, 0x1, NULL, - func_80389004, func_80326224, func_80325E78, + func_80389004, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BD00 = { 0xD3, 0x191, 0x50B, 0x1, NULL, - func_80389060, func_80326224, func_80325E78, + func_80389060, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BD24 = { 0x123, 0x2E8, 0x4C0, 0x1, NULL, - func_803890B8, func_80326224, func_80325E78, + func_803890B8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BD48 = { 0x1F2, 0x2E9, 0x4C1, 0x1, NULL, - func_803890B8, func_80326224, func_80325E78, + func_803890B8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BD6C = { 0x1F3, 0x2EA, 0x4C2, 0x1, NULL, - func_803890B8, func_80326224, func_80325E78, + func_803890B8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038BD90 = { 0xFE, 0x1FD, 0x43D, 0x1, D_8038BBE0, - func_80388FE4, func_80326224, func_80325888, + func_80388FE4, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -253,7 +253,7 @@ Actor *func_80388994(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 sp78[3]; f32 sp6C[3]; - this = func_80325E78(marker, gfx, mtx, vtx); + this = actor_drawFullDepth(marker, gfx, mtx, vtx); if (marker->unk14_21 && (this->unk60 != 0.0f)) { func_8034A174((struct5Bs *) marker->unk44, 5, &sp84); func_8034A174((struct5Bs *) marker->unk44, 6, &sp78); diff --git a/src/MMM/code_2F60.c b/src/MMM/code_2F60.c index da92d0de..ef12dfd3 100644 --- a/src/MMM/code_2F60.c +++ b/src/MMM/code_2F60.c @@ -58,7 +58,7 @@ ActorInfo D_8038BEFC = { /* .code */ Actor *func_80389350(ActorMarker* marker, Gfx** graphics, Mtx** matrix, Vtx** vertex) { func_8033A45C(3, marker_getActor(marker)->unk38_31); - return func_80325888(marker, graphics, matrix, vertex); + return actor_draw(marker, graphics, matrix, vertex); } void func_803893A4(Actor *this){ diff --git a/src/MMM/code_3420.c b/src/MMM/code_3420.c index 04d9ddae..8b796ea4 100644 --- a/src/MMM/code_3420.c +++ b/src/MMM/code_3420.c @@ -186,7 +186,7 @@ void func_80389910() { void func_803899BC(void){ func_80324E38(0.0f, 3); - timedFunc_set_2(0.0f, (GenMethod_2)func_8025A6EC, COMUSIC_38_MOTZAND_BEATEN, 0x7fff); + timedFunc_set_2(0.0f, (GenFunction_2)func_8025A6EC, COMUSIC_38_MOTZAND_BEATEN, 0x7fff); timedFunc_set_0(2.25f, func_80389910); } diff --git a/src/MMM/code_DC0.c b/src/MMM/code_DC0.c index 3a7c646d..988d2e75 100644 --- a/src/MMM/code_DC0.c +++ b/src/MMM/code_DC0.c @@ -14,7 +14,7 @@ ActorAnimationInfo D_8038BA50[] = { ActorInfo D_8038BA68 = { MARKER_34_CEMETARY_POT, ACTOR_25_CEMETARY_POT, ASSET_3AE_MODEL_GRAVE_FLOWER_POT, 0x1, D_8038BA50, - func_80387280, func_80326224, func_80325888, + func_80387280, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/anchor.c b/src/RBB/ch/anchor.c index c7a6097b..367b7b50 100644 --- a/src/RBB/ch/anchor.c +++ b/src/RBB/ch/anchor.c @@ -7,18 +7,18 @@ void func_8038BF28(Actor *this); /* .data */ ActorInfo RBB_D_80390AE0 = { 0x31, 0x1C9, 0x41D, 0x0, NULL, - func_8038BF28, NULL, func_80325888, + func_8038BF28, NULL, actor_draw, 0, 0, 0.0f, 0 }; /* .code */ void RBB_func_8038BEA0(Actor *this, s32 arg1){ if(arg1 == 1) - func_80335924(this->unk148, ASSET_141_ANIM_ANCHOR_LOWERED, 0.0f, 5.5f); + skeletalAnim_set(this->unk148, ASSET_141_ANIM_ANCHOR_LOWERED, 0.0f, 5.5f); if(arg1 == 2){ - func_80335924(this->unk148, ASSET_142_ANIM_ANCHOR_RISING, 0.0f, 8.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_142_ANIM_ANCHOR_RISING, 0.0f, 8.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } this->state = arg1; } diff --git a/src/RBB/ch/anchorctrl.c b/src/RBB/ch/anchorctrl.c index 603878bf..825aacd1 100644 --- a/src/RBB/ch/anchorctrl.c +++ b/src/RBB/ch/anchorctrl.c @@ -41,9 +41,9 @@ void __chAnchorCtrl_setState(Actor *this, s32 new_state){ ncStaticCamera_setToNode(0xC); func_80324E38(0.0f, 3); timedFunc_set_0(1.0f, func_8038C000); - timedFunc_set_2(1.0f, (GenMethod_2)mapSpecificFlags_set, 8, TRUE); + timedFunc_set_2(1.0f, (GenFunction_2)mapSpecificFlags_set, 8, TRUE); timed_playSfx(2.1f, SFX_3F6_UNKNOWN, 0.6f, 32700); - timedFunc_set_2(2.7f, (GenMethod_2)mapSpecificFlags_set, 4, TRUE); + timedFunc_set_2(2.7f, (GenFunction_2)mapSpecificFlags_set, 4, TRUE); timedFunc_set_0(3.0f, func_8038C058); func_80324DBC(3.0f, 0xb9C, 7, NULL, this->marker, __chAnchorCtrl_spawnJiggy, NULL); }//L8038C1D8 @@ -66,6 +66,6 @@ void chAnchorCtrl_update(Actor *this){ timed_exitStaticCamera(0.0f); func_80324E38(0.0f, 0); timedFunc_set_0(0.0f, func_803228D8); - timedFunc_set_3(0.0f, (GenMethod_3)func_802E4078, MAP_8B_RBB_ANCHOR_ROOM, 2, 0); + timedFunc_set_3(0.0f, (GenFunction_3)func_802E4078, MAP_8B_RBB_ANCHOR_ROOM, 2, 0); }//L8038C2E4 } diff --git a/src/RBB/ch/anchorswitch.c b/src/RBB/ch/anchorswitch.c index 08dc1ebe..4b93ed84 100644 --- a/src/RBB/ch/anchorswitch.c +++ b/src/RBB/ch/anchorswitch.c @@ -7,7 +7,7 @@ void chAnchorSwitch_update(Actor *this); /* .data */ ActorInfo D_80390A80 = { 0x2F, 0x1C7, 0x41B, 0x0, NULL, - chAnchorSwitch_update, NULL, func_80325888, + chAnchorSwitch_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -23,7 +23,7 @@ void __chAnchorSwitch_setState(Actor *this, s32 arg1){ levelSpecificFlags_set(0x30, TRUE); func_803204E4(0xe, 1); timedFunc_set_0(1.0f, func_803228D8); - timedFunc_set_3(1.0f, (GenMethod_3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0); + timedFunc_set_3(1.0f, (GenFunction_3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0); } } this->state = arg1; diff --git a/src/RBB/ch/axle.c b/src/RBB/ch/axle.c index 5ab34648..55c5a9a0 100644 --- a/src/RBB/ch/axle.c +++ b/src/RBB/ch/axle.c @@ -32,19 +32,19 @@ ActorLocal_RBB_2A70_0 D_80390430[] = { ActorInfo D_803904C0 = { 0x188, 0x178, 0x40C, 0x0, NULL, - func_803890BC, NULL, func_80325888, + func_803890BC, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_803904E4 = { 0x189, 0x179, 0x40D, 0x0, NULL, - func_803890BC, NULL, func_80325888, + func_803890BC, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80390508 = { 0x18A, 0x17A, 0x40E, 0x0, NULL, - func_803890BC, NULL, func_80325888, + func_803890BC, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/bellbuoy.c b/src/RBB/ch/bellbuoy.c index 63581433..6f1a96fd 100644 --- a/src/RBB/ch/bellbuoy.c +++ b/src/RBB/ch/bellbuoy.c @@ -18,7 +18,7 @@ void func_8038DF6C(Actor* this); /* .data */ ActorInfo D_80390D20 = { 0x1AA, 0x296, 0x43B, 0x0, NULL, - func_8038DF6C, NULL, func_80325888, + func_8038DF6C, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -26,7 +26,7 @@ ActorInfo D_80390D20 = { /*.code */ void func_8038DF10(Actor *this, int arg1){ if(arg1 == 1){ - func_80335924(this->unk148, 0x16a, 0, 1.2f); + skeletalAnim_set(this->unk148, 0x16a, 0, 1.2f); } this->state = arg1; } diff --git a/src/RBB/ch/boombox.c b/src/RBB/ch/boombox.c index 20c5b994..d658660a 100644 --- a/src/RBB/ch/boombox.c +++ b/src/RBB/ch/boombox.c @@ -202,8 +202,8 @@ int func_8038EF08(Actor *this, f32 (*position)[3], f32 arg2){ local->unk20[2] = this->position_z; } } - func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.1f, randf2(-0.1f, 0.1f) + (1.0/arg2)*0.4); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.1f, randf2(-0.1f, 0.1f) + (1.0/arg2)*0.4); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); local->unk14[0] = this->position_x; local->unk14[1] = this->position_y; local->unk14[2] = this->position_z; @@ -222,8 +222,8 @@ void func_8038F190(Actor *this, s32 arg1){ } if(arg1 == 1){ - func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2f, 1.0f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); }//L8038F204 if(arg1 == 2){ @@ -247,8 +247,8 @@ void func_8038F190(Actor *this, s32 arg1){ func_8038FB6C(); actor_collisionOff(this); func_80324D54(0.0f, SFX_1B_EXPLOSION_1, 1.0f, 0x7d00, &this->position, 1000.0f, 2000.0f); - func_80335924(this->unk148, ASSET_148_ANIM_BOOMBOX_DIE, 0.2f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_148_ANIM_BOOMBOX_DIE, 0.2f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_8038EAB4(this); func_8038EC14(this); func_8038ED3C(this, 0x53a); @@ -309,7 +309,7 @@ Actor * func_8038F4B0(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){ D_803912A0[2] = actor->roll; modelRender_setPrimAndEnvColors(sp28, &D_80390DDC); }//L8038F5F8 - return func_80325888(marker, gdl, mptr, arg3); + return actor_draw(marker, gdl, mptr, arg3); } void func_8038F618(Actor *this){ @@ -369,7 +369,7 @@ void func_8038F618(Actor *this){ if(0.0f == local->unk30 && sp78) func_8038E910(this); - func_8033568C(this->unk148, &sp6C, &sp68); + skeletalAnim_getProgressRange(this->unk148, &sp6C, &sp68); if(0.1 <= sp68 && sp68 <= 0.6) ml_interpolate_vec3f(this->position, &local->unk14, &local->unk20, (sp68 - 0.1) /0.5 ); @@ -386,7 +386,7 @@ void func_8038F618(Actor *this){ func_80258A4C(&D_80390DEC,this->yaw - 90.0f, &sp50, &sp4C, &sp48, &sp44); this->yaw += (sp44*400.0f)*sp70; - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ if(ml_distance_vec3f(&this->position, &local->unk8) < 10.0f){ func_8038F190(this, 1); }else{ diff --git a/src/RBB/ch/bossboombox.c b/src/RBB/ch/bossboombox.c index 784926d6..b4a3417d 100644 --- a/src/RBB/ch/bossboombox.c +++ b/src/RBB/ch/bossboombox.c @@ -2,8 +2,8 @@ #include "functions.h" #include "variables.h" -extern void func_803253A0(Actor *); -extern void func_80325794(ActorMarker *); +extern void actor_predrawMethod(Actor *); +extern void actor_postdrawMethod(ActorMarker *); extern void func_8030E394(u8); extern void func_80326310(Actor *); extern int func_803342AC(f32 (*)[3], f32(*)[3], f32); @@ -229,7 +229,7 @@ void func_8038CB68(ActorMarker *marker, s32 arg1, s32 arg2){ Actor *actor = marker_getActor(marker); timed_exitStaticCamera(0.0f); func_80324E38(0.0f, 0); - timedFunc_set_2(0.0f, (GenMethod_2)RBB_func_8038C370, actor->marker, 3); + timedFunc_set_2(0.0f, (GenFunction_2)RBB_func_8038C370, actor->marker, 3); } void chbossboombox_hideJiggy(void){ @@ -298,16 +298,16 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){ } if(this->state == 1){ - func_80335924(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.0f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); } if(this->state == 2){ func_8025A58C(0, 0xfa0); func_8025A6EC(COMUSIC_62_RBB_BOOMBOX, -1); func_8025AABC(COMUSIC_62_RBB_BOOMBOX); - func_80335924(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.4f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.4f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, 0); timed_playSfx(0.5f, SFX_3F5_UNKNOWN, 1.0f, 0x7fc6); @@ -319,18 +319,18 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){ item_set(ITEM_0_HOURGLASS_TIMER, 0x1067); timed_exitStaticCamera(2.4f); func_80324E38(2.4f, 0); - timedFunc_set_2(2.4f, (GenMethod_2)RBB_func_8038C370, (s32)this->marker, 3); + timedFunc_set_2(2.4f, (GenFunction_2)RBB_func_8038C370, (s32)this->marker, 3); } else{//L8038CEFC - timedFunc_set_3(2.4f, (GenMethod_3)comusic_8025AB44, COMUSIC_62_RBB_BOOMBOX, 0x1f40, 0x12C); + timedFunc_set_3(2.4f, (GenFunction_3)comusic_8025AB44, COMUSIC_62_RBB_BOOMBOX, 0x1f40, 0x12C); func_80324DBC(2.4f, 0xb9e, 4, NULL, this->marker, func_8038CB34, func_8038CB68); } }//L8038CF60 if(this->state == 3 || this->state == 4){ func_8030E878(0x3f2, local->unk0->unk14, 0x6d60, &this->position, 500.0f, 1000.0f); - func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2f, (1.0/(local->unk0->unk8)*randf2(1.0f, 1.1f))); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2f, (1.0/(local->unk0->unk8)*randf2(1.0f, 1.1f))); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); ml_vec3f_set_length(sp80, (this->state == 4)? -0x32*(2 + func_80326218()) : 300.0f/local->unk0->unk8); local->unk14[0] = sp80[0] + this->position_x; local->unk14[1] = sp80[1] + this->position_y; @@ -342,8 +342,8 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){ if(this->state == 5){ actor_collisionOff(this); timed_playSfx(0.2f, SFX_D9_WOODEN_CRATE_BREAKING_1, 0.9f, 0x7530); - func_80335924(this->unk148, ASSET_148_ANIM_BOOMBOX_DIE, 0.2f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_148_ANIM_BOOMBOX_DIE, 0.2f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); ml_vec3f_set_length(sp80, -300.f); local->unk14[0] = sp80[0] + this->position_x; local->unk14[1] = sp80[1] + this->position_y; @@ -367,7 +367,7 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){ func_803204E4(5, 1); } else{//L8038D220 - timedFunc_set_3(0.0f, (GenMethod_3)chbossboombox_respawnJiggy, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z); + timedFunc_set_3(0.0f, (GenFunction_3)chbossboombox_respawnJiggy, (s32)this->position_x, (s32)this->position_y, (s32)this->position_z); func_80311480(0xb9f, 4, 0, 0, 0, 0); } }//L8038D278 @@ -376,20 +376,20 @@ void RBB_func_8038CC9C(Actor *this, s32 new_state){ sp68[0] = this->position_x + 200.0f*local->unk0->unk4; sp68[1] = this->position_y + 80.0f*local->unk0->unk4; sp68[2] = this->position_z; - __spawnQueue_add_4((GenMethod_4)func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); sp68[0] = this->position_x - 200.0f*local->unk0->unk4; sp68[1] = this->position_y + 80.0f*local->unk0->unk4; sp68[2] = this->position_z; - __spawnQueue_add_4((GenMethod_4)func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, local->unk0->unk0 + 1, reinterpret_cast(s32, sp68[0]), reinterpret_cast(s32, sp68[1]), reinterpret_cast(s32, sp68[2])); } }//L8038D378 if(this->state == 7){ actor_collisionOff(this); func_803262E4(this); - func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.0f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.0f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); local->unk8[0] = this->position_x; local->unk8[1] = this->position_y; local->unk8[2] = this->position_z; @@ -464,8 +464,8 @@ Actor *func_8038D638(ActorMarker *marker, Gfx **gdl, Mtx ** mptr, s32 arg3){ func_8033A45C(6, (actor->state == 4)? 2: 1); func_8033A45C(7, (actor->state == 4)? 2: 1); } - modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)actor); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)actor); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gdl, mptr, actor->position, sp3C, actor->scale, NULL, func_80330B1C(marker)); return actor; @@ -532,8 +532,8 @@ void func_8038D8BC(Actor *this){ if(func_803203FC(UNKFLAGS1_1F_IN_CHARACTER_PARADE)){ chbossboombox_hideJiggy(); - func_80335924(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.4f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR, 0.0f, 2.4f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); this->state = 2; } return; @@ -554,15 +554,15 @@ void func_8038D8BC(Actor *this){ }//L8038DAD8 if(this->state == 2){ - if(func_8033567C(this->unk148) == ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR && func_80335794(this->unk148) > 0){ - func_80335924(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2, 1.0f); - func_80335A8C(this->unk148, 1); + if(skeletalAnim_getAnimId(this->unk148) == ASSET_146_ANIM_BOSS_BOOMBOX_APPEAR && skeletalAnim_getLoopCount(this->unk148) > 0){ + skeletalAnim_set(this->unk148, ASSET_147_ANIM_BOOMBOX_MOVE, 0.2, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } }//L8038DB30 if( this->state == 2 || this->state == 3 || this->state == 4){ - if(func_8033567C(this->unk148) == ASSET_147_ANIM_BOOMBOX_MOVE){ - func_8033568C(this->unk148, &sp5C, &sp58); + if(skeletalAnim_getAnimId(this->unk148) == ASSET_147_ANIM_BOOMBOX_MOVE){ + skeletalAnim_getProgressRange(this->unk148, &sp5C, &sp58); if(sp5C < 0.6 && 0.6 <= sp58){ func_8030E878(SFX_6C_LOCKUP_CLOSING, randf2(-0.05f, 0.05f) + local->unk0->unk14, 20000, this->position, 500.0f, 1000.0f); }//L8038DC04 @@ -580,23 +580,23 @@ void func_8038D8BC(Actor *this){ RBB_func_8038CC9C(this, 8); } } - func_8033568C(this->unk148, &sp54, &sp50); + skeletalAnim_getProgressRange(this->unk148, &sp54, &sp50); if(0.1 <= sp50 && sp50 <= 0.6){ sp4C = (sp50 - 0.1)/0.5; ml_interpolate_vec3f(this->position, local->unk8, local->unk14, sp4C); this->yaw = local->unk24 + sp4C*(local->unk28 - local->unk24); } - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) RBB_func_8038CC9C(this, 3); }//L8038DD64 if(this->state == 5){ - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ RBB_func_8038CC9C(this, 6); }else{ - tmp_f2 = func_80335684(this->unk148); + tmp_f2 = skeletalAnim_getProgress(this->unk148); if(tmp_f2 <= 0.3) tmp_f2 = tmp_f2/0.3; else @@ -606,7 +606,7 @@ void func_8038D8BC(Actor *this){ }//L8038DE10 if(this->state == 7){ - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) RBB_func_8038CC9C(this, 3); } } diff --git a/src/RBB/ch/bossboomboxctrl.c b/src/RBB/ch/bossboomboxctrl.c index c69450b8..7d285fdc 100644 --- a/src/RBB/ch/bossboomboxctrl.c +++ b/src/RBB/ch/bossboomboxctrl.c @@ -24,7 +24,7 @@ void chBossBoomBoxCtrl_update(Actor *this){ if(jiggyscore_isSpawned(JIGGY_56_RBB_BOSS_BOOM_BOX) && !func_803203FC(2)){ marker_despawn(this->marker); }else{ - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_281_BOSS_BOOM_BOX_LARGEST, reinterpret_cast(s32,this->position_x), reinterpret_cast(s32,this->position_y), reinterpret_cast(s32,this->position_z)); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_281_BOSS_BOOM_BOX_LARGEST, reinterpret_cast(s32,this->position_x), reinterpret_cast(s32,this->position_y), reinterpret_cast(s32,this->position_z)); __chBossBoomBoxCtrl_setState(this, 1); } }//L8038DEF4 diff --git a/src/RBB/ch/cog.c b/src/RBB/ch/cog.c index 939ec8b6..4ab3b568 100644 --- a/src/RBB/ch/cog.c +++ b/src/RBB/ch/cog.c @@ -12,19 +12,19 @@ void func_80388C20(Actor *this); /* .data */ ActorInfo D_803903B0 = { 0x18B, 0x17B, 0x409, 0x0, NULL, - func_80388C20, NULL, func_80325888, + func_80388C20, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_803903D4 = { 0x18C, 0x17C, 0x40A, 0x0, NULL, - func_80388C20, NULL, func_80325888, + func_80388C20, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_803903F8 = { 0x18D, 0x17D, 0x40B, 0x0, NULL, - func_80388C20, NULL, func_80325888, + func_80388C20, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/dolphin.c b/src/RBB/ch/dolphin.c index 23a80d48..a308f533 100644 --- a/src/RBB/ch/dolphin.c +++ b/src/RBB/ch/dolphin.c @@ -2,7 +2,6 @@ #include "functions.h" #include "variables.h" -extern void func_80335A24(void *, s32, f32, f32); extern s32 func_802EDD8C(f32 (*)[3], f32, f32); void func_8038B900(Actor *this); @@ -10,17 +9,17 @@ void func_8038B900(Actor *this); /* .data */ ActorInfo RBB_D_80390AB0 = { 0x30, 0x1C8, 0x41C, 0x0, NULL, - NULL, func_8038B900, func_80325888, + NULL, func_8038B900, actor_draw, 0, 0, 0.0f, 0 }; /* .code */ void func_8038B880(Actor *this, s32 new_state){ if(new_state == 1) - func_80335924(this->unk148, ASSET_13F_ANIM_SNORKEL_STUCK, 0.0f, 5.5f); + skeletalAnim_set(this->unk148, ASSET_13F_ANIM_SNORKEL_STUCK, 0.0f, 5.5f); if(new_state == 2) - func_80335A24(this->unk148, ASSET_13E_ANIM_SNORKEL_SWIM, 1.0f, 0.65f); + skeletalAnim_swap(this->unk148, ASSET_13E_ANIM_SNORKEL_SWIM, 1.0f, 0.65f); this->state = new_state; } @@ -34,7 +33,7 @@ void func_8038B900(Actor *this){ this->marker->propPtr->unk8_3 = 1; if(this->marker->unk14_21){ - sp54 = func_80335684(this->unk148); + sp54 = skeletalAnim_getProgress(this->unk148); if( ( func_8023DB5C() & (1 << 4) ) && ( func_8023DB5C() & (1 << 2) ) && ( randf() < 0.90 ) @@ -53,7 +52,7 @@ void func_8038B900(Actor *this){ ) ) ){//L8038BB24 - func_8034A174(this->marker->unk44, 5, &sp48); + func_8034A174(this->marker->unk44, 5, sp48); other = func_802EDD8C(&sp48, 0.0f, -1300.0f); func_802EFB70(other, 0.04f, 0.04f); func_802EFB84(other, 0.18f, 0.18f); @@ -76,13 +75,13 @@ void func_8038B900(Actor *this){ } } else{//L8038BC74 - func_8033568C(this->unk148, &sp5C, &sp58); + skeletalAnim_getProgressRange(this->unk148, &sp5C, &sp58); if( sp5C < 0.22 && 0.22 <= sp58 ){ - func_8030E988(SFX_D1_SNORKEL_WAH, randf2(0.8f, 0.9f), 0x3a98, &this->position, 1500.0f, 2000.0f); + func_8030E988(SFX_D1_SNORKEL_WAH, randf2(0.8f, 0.9f), 15000, this->position, 1500.0f, 2000.0f); } if( sp5C < 0.54 && 0.54 <= sp58 ){ - func_8030E988(SFX_D1_SNORKEL_WAH, randf2(0.9f, 1.0f), 0x4a38, &this->position, 1500.0f, 2000.0f); + func_8030E988(SFX_D1_SNORKEL_WAH, randf2(0.9f, 1.0f), 19000, this->position, 1500.0f, 2000.0f); } if(this->state == 1){ diff --git a/src/RBB/ch/eggtoll1.c b/src/RBB/ch/eggtoll1.c index ae2552b6..d61d35b9 100644 --- a/src/RBB/ch/eggtoll1.c +++ b/src/RBB/ch/eggtoll1.c @@ -94,7 +94,7 @@ void func_803865D0(ActorMarker *marker){ ActorLocal_RBB_0 * local = (ActorLocal_RBB_0 *) &actor->local; RBB_func_803863F0(actor, 1); timed_setStaticCameraToNode(0.0f, D_80390074[local->unk4].unk0); - timedFunc_set_2(0.75*D_80390074[local->unk4].unk4, (GenMethod_2) func_803865A4, actor->marker, 4); + timedFunc_set_2(0.75*D_80390074[local->unk4].unk4, (GenFunction_2) func_803865A4, actor->marker, 4); timed_exitStaticCamera(0.75*D_80390074[local->unk4].unk4); func_80324E38(0.75*D_80390074[local->unk4].unk4, 0); timed_playSfx(D_80390074[local->unk4].unk4, SFX_7F_HEAVYDOOR_SLAM, 0.8f, 0x7fd0); @@ -113,8 +113,8 @@ void func_803866F4(Actor *this, s32 arg1){ local->unk8++; func_8025A6EC(COMUSIC_2B_DING_B, 28000); func_80324E38(0.0f, 3); - timedFunc_set_2(0.5f, (GenMethod_2) func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); - timedFunc_set_1(1.0f, (GenMethod_1) func_803865D0, this->marker); + timedFunc_set_2(0.5f, (GenFunction_2) func_8025A6EC, COMUSIC_2D_PUZZLE_SOLVED_FANFARE, 28000); + timedFunc_set_1(1.0f, (GenFunction_1) func_803865D0, this->marker); }//L803867D4 if(arg1 == 4){ if(local->unk8 == 1 && D_80390074[local->unk4].unk2 > 0){ diff --git a/src/RBB/ch/enginefan.c b/src/RBB/ch/enginefan.c index eea4b0d8..c0a62a32 100644 --- a/src/RBB/ch/enginefan.c +++ b/src/RBB/ch/enginefan.c @@ -58,19 +58,19 @@ Struct_RBB_2E90_0 D_80390530[] = { ActorInfo D_80390640 = { MARKER_191_ENGINE_ROOM_PROPELLOR_1, ACTOR_1BB_ENGINE_ROOM_PROPELLOR_1, ASSET_40F_MODEL_ENGINE_ROOM_PROPELLER_1, 0x0, NULL, - func_8038944C, NULL, func_80325888, + func_8038944C, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80390664 = { MARKER_192_ENGINE_ROOM_PROPELLOR_2, ACTOR_1BC_ENGINE_ROOM_PROPELLOR_2, ASSET_410_MODEL_ENGINE_ROOM_PROPELLER_2, 0x0, NULL, - func_8038944C, NULL, func_80325888, + func_8038944C, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80390688 = { MARKER_193_ENGINE_ROOM_PROPELLOR_3, ACTOR_1BD_ENGINE_ROOM_PROPELLOR_3, ASSET_411_MODEL_ENGINE_ROOM_PROPELLER_3, 0x0, NULL, - func_8038944C, NULL, func_80325888, + func_8038944C, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/enginefanswitch.c b/src/RBB/ch/enginefanswitch.c index 6110f4db..a08d5d57 100644 --- a/src/RBB/ch/enginefanswitch.c +++ b/src/RBB/ch/enginefanswitch.c @@ -7,7 +7,7 @@ void chEngineFanSwitch_update(Actor *this); /* .data */ ActorInfo D_803906B0 = { 0x194, 0x1BE, 0x412, 0x0, NULL, - chEngineFanSwitch_update, NULL, func_80325888, + chEngineFanSwitch_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/engineparts.c b/src/RBB/ch/engineparts.c index 95aa6767..8c0d90cd 100644 --- a/src/RBB/ch/engineparts.c +++ b/src/RBB/ch/engineparts.c @@ -33,25 +33,25 @@ Struct_RBB_40F0 D_80390760[4] = { ActorInfo D_803907D0 = { 0x187, 0x177, 0x406, 0x0, NULL, - func_8038A724, NULL, func_80325888, + func_8038A724, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_803907F4 = { 0x18E, 0x17E, 0x406, 0x0, NULL, - func_8038A724, NULL, func_80325888, + func_8038A724, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80390818 = { 0x18F, 0x17F, 0x407, 0x0, NULL, - func_8038A724, NULL, func_80325888, + func_8038A724, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_8039083C = { 0x190, 0x180, 0x408, 0x0, NULL, - func_8038A724, NULL, func_80325888, + func_8038A724, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/grimlet.c b/src/RBB/ch/grimlet.c index f61fb10d..1be543b8 100644 --- a/src/RBB/ch/grimlet.c +++ b/src/RBB/ch/grimlet.c @@ -30,8 +30,8 @@ void func_803883B0(Actor *this, s32 arg1){ local->unk5 = 0; if(arg1 == 2){ FUNC_8030E624(SFX_66_BIRD_AUUGHH, 0.6f, 32675); - func_80335924(this->unk148, 0x137, 0.0f, 0.8f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x137, 0.0f, 0.8f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } this->state = arg1; } @@ -57,7 +57,7 @@ Actor *func_8038846C(ActorMarker * marker, Gfx **gdl, Mtx **mptr, Vtx **vtx){ } if(local->unk4){ - sp5C = func_803356A0(actor->unk148); + sp5C = skeletalAnim_getBoneTransformList(actor->unk148); sp40[0] = 0.0f; sp40[1] = local->unk0; sp40[2] = 0.0f; @@ -74,11 +74,11 @@ Actor *func_8038846C(ActorMarker * marker, Gfx **gdl, Mtx **mptr, Vtx **vtx){ sp34[1] = 0.0f; sp34[2] = local->unkC/200.0f; func_8033A968(sp5C, 0x12, sp34); - func_80335918(actor->unk148); + skeletalAnim_func_80335918(actor->unk148); } func_8033A45C(3, (0.0f < local->unk8)? 1 : 0); func_8033A45C(4, (0.0f < local->unk8)? 1 : 0); - func_80325888(marker, gdl, mptr, vtx); + actor_draw(marker, gdl, mptr, vtx); local->unk4 = actor->marker->unk14_21; return actor; } @@ -162,7 +162,7 @@ void func_80388620(Actor *this){ }//L80388AB8 if(this->state == 2){ - func_8033568C(this->unk148, &sp4C, &sp48); + skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48); if(0.6 <= sp48) tmp_f2 = 1.0 - 2*(sp48 - 0.6); else @@ -177,7 +177,7 @@ void func_80388620(Actor *this){ FUNC_8030E8B4(SFX_20_METAL_CLANK_1, 1.0f, 32000, this->position, 500, 2500); } - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) func_803883B0(this, 1); }//L80388BB0 } diff --git a/src/RBB/ch/propellor.c b/src/RBB/ch/propellor.c index 313bc667..7454494b 100644 --- a/src/RBB/ch/propellor.c +++ b/src/RBB/ch/propellor.c @@ -16,7 +16,7 @@ void chPropellor_update(Actor *this); ActorInfo D_803906E0 = { MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ACTOR_175_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER, 0x0, NULL, - chPropellor_update, NULL, func_80325888, + chPropellor_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -93,11 +93,11 @@ void chPropellor_update(Actor *this){ if(levelSpecificFlags_get(local->unk8 ? 4 : 3)){ ncStaticCamera_setToNode(9); func_80324E38(0.0f, 3); - timedFunc_set_2(0.1f, (GenMethod_2)levelSpecificFlags_set, local->unk8 ? 0x28 : 0x27, 1); + timedFunc_set_2(0.1f, (GenFunction_2)levelSpecificFlags_set, local->unk8 ? 0x28 : 0x27, 1); timed_exitStaticCamera(4.5f); func_80324E38(4.5f, 0); - timedFunc_set_2(4.5f, (GenMethod_2)levelSpecificFlags_set, local->unk8 ? 0x4 : 0x3, 0); - timedFunc_set_3(4.5f, (GenMethod_3)func_802E4078, MAP_34_RBB_ENGINE_ROOM, !local->unk8 ? 3 : 2, 0); + timedFunc_set_2(4.5f, (GenFunction_2)levelSpecificFlags_set, local->unk8 ? 0x4 : 0x3, 0); + timedFunc_set_3(4.5f, (GenFunction_3)func_802E4078, MAP_34_RBB_ENGINE_ROOM, !local->unk8 ? 3 : 2, 0); func_803228D8(); } }//L80389EA8 diff --git a/src/RBB/ch/propellorswitch.c b/src/RBB/ch/propellorswitch.c index 90f7f144..d45e0984 100644 --- a/src/RBB/ch/propellorswitch.c +++ b/src/RBB/ch/propellorswitch.c @@ -3,7 +3,7 @@ #include "variables.h" extern void func_8028F9DC(s32); -extern void func_803253A0(Actor *); +extern void actor_predrawMethod(Actor *); /* typedefs and declarations */ typedef struct { @@ -48,8 +48,8 @@ void __chPropellorSwitch_setState(Actor *this, s32 arg1){ if(this->state == 1){ levelSpecificFlags_set(local->unk0->unk8, 1); func_803228D8(); - timedFunc_set_1(1.1f, (GenMethod_1)func_8028F9DC, 2); - timedFunc_set_3(1.1f, (GenMethod_3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0); + timedFunc_set_1(1.1f, (GenFunction_1)func_8028F9DC, 2); + timedFunc_set_3(1.1f, (GenFunction_3)func_802E4078, MAP_31_RBB_RUSTY_BUCKET_BAY, 0, 0); }else{ levelSpecificFlags_set(local->unk0->unkA, 1); } @@ -76,7 +76,7 @@ Actor *chPropellorSwitch_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 ar return actor; } - modelRender_preDraw(func_803253A0, actor); + modelRender_preDraw(actor_predrawMethod, actor); if(local->unk4){ modelRender_draw(gdl, mptr, &actor->position, NULL, 1.0f, NULL, local->unk4); } diff --git a/src/RBB/ch/rarewareflag.c b/src/RBB/ch/rarewareflag.c index 500df05d..b7827bad 100644 --- a/src/RBB/ch/rarewareflag.c +++ b/src/RBB/ch/rarewareflag.c @@ -6,7 +6,7 @@ void func_8038C300(Actor *this); ActorInfo D_80390B40 = { 0x198, 0x1ca, 0x41e, 0x0, NULL, - func_8038C300, NULL, func_80325888, + func_8038C300, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -14,6 +14,6 @@ void func_8038C300(Actor *this){ if(!this->unk16C_4){ this->marker->propPtr->unk8_3 = 1; this->unk16C_4 = 1; - func_80335924(this->unk148, 0x140, 0.0f, 1.0f); + skeletalAnim_set(this->unk148, 0x140, 0.0f, 1.0f); } } diff --git a/src/RBB/ch/rowboat.c b/src/RBB/ch/rowboat.c index 3e72451b..1a48207e 100644 --- a/src/RBB/ch/rowboat.c +++ b/src/RBB/ch/rowboat.c @@ -17,7 +17,7 @@ void func_8038E3D8(Actor *this); /* .data */ ActorInfo D_80390D50 = { 0x1ab, 0x297, 0x43C, 0x0, NULL, - func_8038E3D8, NULL, func_80325888, + func_8038E3D8, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/whistle.c b/src/RBB/ch/whistle.c index 0a03b506..835679c8 100644 --- a/src/RBB/ch/whistle.c +++ b/src/RBB/ch/whistle.c @@ -72,8 +72,8 @@ void RBB_func_8038B0B8(Actor *this, s32 arg1){ this->state = arg1; if(this->state == 2){ - func_80335924(this->unk148, local->unk0->unk12, 0.0f, 0.5f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, local->unk0->unk12, 0.0f, 0.5f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); timed_playSfx(0.1f, local->unk0->unk14, 1.0f, 0x7d00); other = partEmitMgr_newEmitter(0xa); particleEmitter_setSprite(other, ASSET_70E_SPRITE_SMOKE_2); @@ -105,13 +105,13 @@ Actor *func_8038B230(ActorMarker *marker, Gfx** gdl, Mtx** mptr, s32 arg3){ return actor; if(actor->state == 2){ - func_8033A238(func_803356A0(actor->unk148)); + modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(actor->unk148)); } sp3C[0] = actor->pitch; sp3C[1] = actor->yaw; sp3C[2] = actor->roll; - modelRender_preDraw(&func_803253A0, actor); + modelRender_preDraw(&actor_predrawMethod, actor); func_8033A450(func_80329934()); modelRender_draw(gdl, mptr, &actor->position, &sp3C, actor->scale, NULL, func_80330B1C(marker)); func_8034A174(func_80329934(), 5, &local->unk4); @@ -146,7 +146,7 @@ void func_8038B340(Actor * this){ } if(this->state == 2){ - if( func_80335794(this->unk148) > 0 ) + if( skeletalAnim_getLoopCount(this->unk148) > 0 ) RBB_func_8038B0B8(this, 1); } } diff --git a/src/RBB/ch/whistleswitch.c b/src/RBB/ch/whistleswitch.c index 04244c29..f57b760c 100644 --- a/src/RBB/ch/whistleswitch.c +++ b/src/RBB/ch/whistleswitch.c @@ -121,7 +121,7 @@ Actor *func_8038AD9C(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){ ); modelRender_setVertexList(local->unkC); } - return func_80325888(marker, gdl, mptr, arg3); + return actor_draw(marker, gdl, mptr, arg3); } void func_8038AEB8(Actor *this){ diff --git a/src/RBB/code_1570.c b/src/RBB/code_1570.c index e71f1867..4dbbbe2d 100644 --- a/src/RBB/code_1570.c +++ b/src/RBB/code_1570.c @@ -188,28 +188,28 @@ void func_80387F88(ActorMarker *marker){ timed_playSfx(3.0f, SFX_1A_BIG_THINGS_FALL_OVER, 0.6f, 22000); timed_exitStaticCamera(4.0f); func_80324E38(4.0f, 0); - timedFunc_set_2(4.0f, (GenMethod_2) RBB_func_80387F18, (s32) actor->marker, 3); + timedFunc_set_2(4.0f, (GenFunction_2) RBB_func_80387F18, (s32) actor->marker, 3); } void func_80388154(ActorMarker *marker){ Actor *actor = marker_getActor(marker); func_803879F0(); - timedFunc_set_0(0.0f, (GenMethod_0) RBB_func_80387F44); + timedFunc_set_0(0.0f, (GenFunction_0) RBB_func_80387F44); timed_playSfx(0.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 0x7fc6); - timedFunc_set_2(1.2f, (GenMethod_2) func_80387B8C, 0x19f, 0); + timedFunc_set_2(1.2f, (GenFunction_2) func_80387B8C, 0x19f, 0); timed_setStaticCameraToNode(1.2f, 8); - timedFunc_set_1(1.5f, (GenMethod_1) func_80387F88, (s32) actor->marker); + timedFunc_set_1(1.5f, (GenFunction_1) func_80387F88, (s32) actor->marker); } void func_803881E8(Actor *this, s32 arg1){ this->state = arg1; if(this->state == 2){ RBB_func_80387960(0.05f); - timedFunc_set_2(0.05f, (GenMethod_2)func_80387BEC, 0x19f, 0x1f4); - timedFunc_set_2(0.1f, (GenMethod_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); + timedFunc_set_2(0.05f, (GenFunction_2)func_80387BEC, 0x19f, 0x1f4); + timedFunc_set_2(0.1f, (GenFunction_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); func_80324E38(0.2f, 3); timed_setStaticCameraToNode(1.1f, 7); - timedFunc_set_1(1.6f, (GenMethod_1)func_80388154, (s32)this->marker); + timedFunc_set_1(1.6f, (GenFunction_1)func_80388154, (s32)this->marker); levelSpecificFlags_set(0x2D, 1); } } diff --git a/src/RBB/code_640.c b/src/RBB/code_640.c index 3df80c2a..54b459ac 100644 --- a/src/RBB/code_640.c +++ b/src/RBB/code_640.c @@ -76,37 +76,37 @@ ActorAnimationInfo D_803900C0[4] = { ActorInfo D_803900E0 = { 0x107, 0x21D, 0x493, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390104 = { 0x108, 0x21C, 0x492, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390128 = { 0x22D, 0x266, 0x4BA, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8039014C = { 0x22E, 0x267, 0x4BB, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390170 = { 0x235, 0x23F, 0x4E2, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390194 = { 0x15F, 0x18F, 0x42F, 0x1, D_803900C0, - func_80386BF8, func_80326224, func_80325888, + func_80386BF8, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -159,7 +159,7 @@ void func_80386A7C(Actor *this){ Actor *func_80386B9C(ActorMarker *marker, Gfx **gdl, Mtx **mptr, s32 arg3){ Actor *actor = marker_getActor(marker); - return (actor->unk38_0) ? func_80325E78(marker, gdl, mptr, arg3): NULL; + return (actor->unk38_0) ? actor_drawFullDepth(marker, gdl, mptr, arg3): NULL; } void func_80386BF8(Actor *arg0){ diff --git a/src/RBB/code_9670.c b/src/RBB/code_9670.c index b95943a4..c9398c1f 100644 --- a/src/RBB/code_9670.c +++ b/src/RBB/code_9670.c @@ -26,9 +26,9 @@ void RBB_func_8038FA60(ActorMarker *marker){ void func_8038FA9C(Actor *this, s32 arg1){ if(arg1 == 3){ func_80324E38(0.0f, 3); - timedFunc_set_2(1.0f, (GenMethod_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); + timedFunc_set_2(1.0f, (GenFunction_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); timed_setStaticCameraToNode(1.8f, 1); - timedFunc_set_1(2.0f, (GenMethod_1) RBB_func_8038FA60, (s32)this->marker); + timedFunc_set_1(2.0f, (GenFunction_1) RBB_func_8038FA60, (s32)this->marker); timed_exitStaticCamera(5.0f); func_80324E38(5.0f, 0); } diff --git a/src/RBB/code_CA0.c b/src/RBB/code_CA0.c index 5260af4e..8cfe978f 100644 --- a/src/RBB/code_CA0.c +++ b/src/RBB/code_CA0.c @@ -64,7 +64,7 @@ void func_8038718C(ActorMarker *marker){ timed_playSfx(4.0f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 19000);\ timed_exitStaticCamera(5.0f); func_80324E38(5.0f, 0); - timedFunc_set_2(5.0f, (GenMethod_2) func_80387090, (s32) marker, 3); + timedFunc_set_2(5.0f, (GenFunction_2) func_80387090, (s32) marker, 3); } void func_80387308(ActorMarker *marker){ @@ -86,9 +86,9 @@ void func_80387308(ActorMarker *marker){ timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.8f, 19000); timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 0.9f, 19000); timed_playSfx(0.5f, SFX_7F_HEAVYDOOR_SLAM, 1.0f, 19000); - timedFunc_set_2(0.5f, (GenMethod_2) func_80387090, (s32) actor->marker, 1); + timedFunc_set_2(0.5f, (GenFunction_2) func_80387090, (s32) actor->marker, 1); - timedFunc_set_2(1.5f, (GenMethod_2) func_803870BC, 0x19d, 0x1f4); + timedFunc_set_2(1.5f, (GenFunction_2) func_803870BC, 0x19d, 0x1f4); timed_exitStaticCamera(1.5f); func_80324E38(1.5f, 0); @@ -102,13 +102,13 @@ void func_80387488(ActorMarker *marker){ if(-50.0f < sp1C[1] && sp1C[1] < 600.0f){ sp1C[1] = 0; if(ml_distance_vec3f(&sp1C, &D_80390264) < 500.0f){ - timedFunc_set_1(1.0f, (GenMethod_1) func_80387488, (s32)actor->marker); + timedFunc_set_1(1.0f, (GenFunction_1) func_80387488, (s32)actor->marker); return; } } func_80324E38(0.0f, 3); timed_setStaticCameraToNode(0.0f, 6); - timedFunc_set_1(0.5f, (GenMethod_1) func_80387308, (s32) actor->marker); + timedFunc_set_1(0.5f, (GenFunction_1) func_80387308, (s32) actor->marker); } void func_8038756C(Actor *this, s32 arg1){ diff --git a/src/RBB/propellorctrl.c b/src/RBB/propellorctrl.c index f18cbfe0..cfa06f82 100644 --- a/src/RBB/propellorctrl.c +++ b/src/RBB/propellorctrl.c @@ -23,7 +23,7 @@ void __propellorCtrl_setState(s32 arg0){ levelSpecificFlags_set(0x28, FALSE); item_set(ITEM_9_PROPELLOR,0); if(arg0 == 3 && !jiggyscore_isCollected(JIGGY_57_RBB_PROPELLOR)){ - timedFunc_set_1(0.5f, (GenMethod_1)func_802FAD64, 3); + timedFunc_set_1(0.5f, (GenFunction_1)func_802FAD64, 3); func_80324DBC(1.0f, 0xb9d, 4, NULL, NULL, NULL, NULL); } else{ diff --git a/src/SM/ch/vegetables.c b/src/SM/ch/vegetables.c index 9723dabe..4a895e08 100644 --- a/src/SM/ch/vegetables.c +++ b/src/SM/ch/vegetables.c @@ -203,7 +203,7 @@ void func_80387C28(Actor * this){ if(this->unk38_31){ this->position_y += 100.0f; func_802CA1CC(HONEYCOMB_17_SM_COLIWOBBLE); - __spawnQueue_add_4((GenMethod_4)func_802C4218, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z)); + __spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1f, reinterpret_cast(s32, this->position_x), reinterpret_cast(s32, this->position_y), reinterpret_cast(s32, this->position_z)); }//L80387D64 func_803252D0(1.5f, 7); actor_collisionOff(this); @@ -228,7 +228,7 @@ Actor *func_80387DF4(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **arg3){ else func_8033A45C(3, 0); - return func_80325888(marker, gdl, mptr, arg3); + return actor_draw(marker, gdl, mptr, arg3); } void func_80387E64(Actor *this){ diff --git a/src/SM/code_2990.c b/src/SM/code_2990.c index 89075caa..d6c19034 100644 --- a/src/SM/code_2990.c +++ b/src/SM/code_2990.c @@ -407,7 +407,7 @@ void func_803899B0(Actor * this){ }//L80389B20 if(!this->unk16C_4){ - __spawnQueue_add_1((GenMethod_1)func_80389948, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80389948, reinterpret_cast(s32, this->marker)); this->unk16C_4 = 1; }//L80389B4C diff --git a/src/SM/code_3FC0.c b/src/SM/code_3FC0.c index f97e5174..46e26ed5 100644 --- a/src/SM/code_3FC0.c +++ b/src/SM/code_3FC0.c @@ -17,7 +17,7 @@ ActorAnimationInfo D_8038AFF0[] = { ActorInfo D_8038B008 = { 0xE1, 0x198, 0x530, 2, D_8038AFF0, - func_8038A3B0, func_80326224, func_80325888, + func_8038A3B0, func_80326224, actor_draw, 0, 0, 0.0f, 0 };//chBanjosBed @@ -30,7 +30,7 @@ ActorAnimationInfo D_8038B02C[] = { ActorInfo D_8038B044 ={ 0xE2, 0x199, 0x52F, 2, D_8038B02C, - func_8038A3B0, func_80326224, func_80325888, + func_8038A3B0, func_80326224, actor_draw, 0, 0, 0.0f, 0 };//chBanjosChair @@ -43,7 +43,7 @@ ActorAnimationInfo D_8038B068[] = { ActorInfo D_8038B080 ={ 0xE3, 0x19A, 0x337, 2, D_8038B068, - func_8038A3B0, func_80326224, func_80325888, + func_8038A3B0, func_80326224, actor_draw, 0, 0, 0.0f, 0 };//chBanjosStove diff --git a/src/SM/code_5B0.c b/src/SM/code_5B0.c index c6a61fa6..10c7194a 100644 --- a/src/SM/code_5B0.c +++ b/src/SM/code_5B0.c @@ -18,14 +18,14 @@ ActorAnimationInfo D_8038AAF0[] = { ActorInfo D_8038AB00 = { MARKER_135_QUARRIE, ACTOR_16F_QUARRIE, ASSET_42D_MODEL_QUARRIE, 1, NULL, - SM_func_80386EF4, func_80326224, func_80325E78, + SM_func_80386EF4, func_80326224, actor_drawFullDepth, 2000, 0, 5.0f, 0 }; ActorInfo D_8038AB24 = { MARKER_29D_ROCK_TRAPPING_GRUNTY, ACTOR_3CA_ROCK_TRAPPING_GRUNTY, ASSET_47B_MODEL_ROCK, 1, D_8038AAF0, - SM_func_80386A00, func_80326224, func_80325E78, + SM_func_80386A00, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; @@ -113,7 +113,7 @@ void SM_func_80386D68(Actor *this){ if(this->unk100 && func_803870E8(this->unk100)){ func_802CA1CC(HONEYCOMB_18_SM_QUARRIES); - __spawnQueue_add_4((GenMethod_4)func_802C4218, 0x1F, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4218, 0x1F, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); } marker_despawn(this->marker); } diff --git a/src/TTC/ch/blubber.c b/src/TTC/ch/blubber.c index 049ecd52..36271de3 100644 --- a/src/TTC/ch/blubber.c +++ b/src/TTC/ch/blubber.c @@ -69,7 +69,7 @@ void func_80387574(ActorMarker *caller, enum asset_e text_id, s32 arg1){ if(nodeProp_findPositionFromActorId(0x14b, sp24)){ jiggySpawn(JIGGY_14_TTC_BLUBBER, sp24); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); } } @@ -96,7 +96,7 @@ void func_80387678(Actor *this){ mapSpecificFlags_set(3, TRUE); func_8028F918(2); timed_setStaticCameraToNode(0.0f, 4); - timedFunc_set_1(1.0f, (GenMethod_1)func_803875D4, (s32)this->marker); + timedFunc_set_1(1.0f, (GenFunction_1)func_803875D4, (s32)this->marker); func_80328B8C(this, 1, 0.0f, 1); } @@ -249,5 +249,5 @@ void TTC_func_80387CF4(Actor *this){ Actor *func_80387D6C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(4, 0); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/TTC/ch/clam.c b/src/TTC/ch/clam.c index 0a2a83ad..a0d7b507 100644 --- a/src/TTC/ch/clam.c +++ b/src/TTC/ch/clam.c @@ -19,7 +19,7 @@ ActorAnimationInfo chClamAnimations[] = { ActorInfo chClam = { MARKER_15_CLAM, ACTOR_69_CLAM, ASSET_351_MODEL_CLAM, 0x1, chClamAnimations, - chClam_update, func_80326224, func_80325888, + chClam_update, func_80326224, actor_draw, 4500, 0x366, 1.6f, 0 }; @@ -241,7 +241,7 @@ void __chClam_playerDropsItem(s32 index, enum item_e item_id){ player_getPosition(position); func_802C8F70(randf2(0.0f, 359.0f)); - __spawnQueue_add_4((GenMethod_4)func_802C4218, index, reinterpret_cast(s32, position[0]), reinterpret_cast(s32, position[1]), reinterpret_cast(s32, position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4218, index, reinterpret_cast(s32, position[0]), reinterpret_cast(s32, position[1]), reinterpret_cast(s32, position[2])); item_dec(item_id); } diff --git a/src/TTC/ch/leaky.c b/src/TTC/ch/leaky.c index 1f10d54e..e29c461f 100644 --- a/src/TTC/ch/leaky.c +++ b/src/TTC/ch/leaky.c @@ -18,7 +18,7 @@ ActorAnimationInfo D_8038C700[] = { ActorInfo D_8038C718 = { MARKER_33_LEAKY, ACTOR_1E_LEAKY, ASSET_51A_MODEL_LEAKY, 0x1, D_8038C700, - chLeaky_update, func_80326224, func_80325888, + chLeaky_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -41,7 +41,7 @@ void chLeaky_update(Actor *this) { this->marker->propPtr->unk8_3 = FALSE; if (levelSpecificFlags_get(5) != 0) { levelSpecificFlags_set(5, FALSE); - timedFunc_set_1(0.5f, (GenMethod_1)func_8025A70C, COMUSIC_2D_PUZZLE_SOLVED_FANFARE); + timedFunc_set_1(0.5f, (GenFunction_1)func_8025A70C, COMUSIC_2D_PUZZLE_SOLVED_FANFARE); } if (levelSpecificFlags_get(2) != 0) { temp_v0_2 = func_8034C5AC(300); @@ -94,7 +94,7 @@ void __chLeaky_startCutscene(ActorMarker *caller, enum asset_e text_id, s32 arg2 timedFunc_set_0(1.0f, func_80388F88); func_80324E38(2.5f, 0); timedFunc_set_1(2.5f, func_8028F9DC, 2); - timedFunc_set_3(2.5f, (GenMethod_3)func_802E4078, MAP_A_TTC_SANDCASTLE, 0, 0); + timedFunc_set_3(2.5f, (GenFunction_3)func_802E4078, MAP_A_TTC_SANDCASTLE, 0, 0); func_803228D8(); } diff --git a/src/TTC/ch/lockup.c b/src/TTC/ch/lockup.c index ab792630..86fd9f64 100644 --- a/src/TTC/ch/lockup.c +++ b/src/TTC/ch/lockup.c @@ -51,7 +51,7 @@ Actor *func_803894C0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor * actor = marker_getActor(marker); func_8033A45C(3, actor->unk38_31); func_8033A45C(4, actor->unk38_31); - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/TTC/ch/nipper.c b/src/TTC/ch/nipper.c index 467c0592..f28364c6 100644 --- a/src/TTC/ch/nipper.c +++ b/src/TTC/ch/nipper.c @@ -62,7 +62,7 @@ Actor *func_80387EB0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { this = marker_getActor(marker); func_8033A45C(3, (this->state == 7)? 0 : 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void TTC_func_80387F18(Actor *this) { diff --git a/src/TTC/ch/treasure.c b/src/TTC/ch/treasure.c index d1bd3b05..498ff08c 100644 --- a/src/TTC/ch/treasure.c +++ b/src/TTC/ch/treasure.c @@ -15,14 +15,14 @@ ActorAnimationInfo gChTreasureAnim[]={ ActorInfo gChTreasureInfo = { MARKER_DB_BURIED_TREASURE, ACTOR_F4_BURIED_TREASURE, ASSET_42C_MODEL_BURIED_TREASURE, 1, gChTreasureAnim, - chtreasure_update, func_80326224, func_80325888, + chtreasure_update, func_80326224, actor_draw, 0, 0, 1.7f, 0 }; /* .code */ void __chtreasure_die(ActorMarker *marker, ActorMarker *otherMarker){ Actor *this = marker_getActor(marker); - __spawnQueue_add_4((GenMethod_4) func_802C4140, 0x4C, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4) func_802C4140, 0x4C, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); func_802EE278(this, 3, 0xf, 0x3C, 0.2f, 1.2f); func_803115C4(0xA19); jiggySpawn(JIGGY_11_TTC_RED_X, this->position); diff --git a/src/TTC/ch/treasurehunt.c b/src/TTC/ch/treasurehunt.c index bf6e161f..abd9a40d 100644 --- a/src/TTC/ch/treasurehunt.c +++ b/src/TTC/ch/treasurehunt.c @@ -157,7 +157,7 @@ void func_80389CC4(s16 arg0[3], s32 arg1){ D_8038D708[1] = (f32)arg0[1]; D_8038D708[2] = (f32)arg0[2]; D_8038D708[1] = func_80309724(D_8038D708); - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0xF4, reinterpret_cast(s32, D_8038D708[0]), reinterpret_cast(s32, D_8038D708[1]), reinterpret_cast(s32, D_8038D708[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0xF4, reinterpret_cast(s32, D_8038D708[0]), reinterpret_cast(s32, D_8038D708[1]), reinterpret_cast(s32, D_8038D708[2])); D_8038D700 = partEmitMgr_newEmitter(3); particleEmitter_setRGB(D_8038D700, D_8038C91C); particleEmitter_setSprite(D_8038D700, ASSET_700_SPRITE_DUST); @@ -168,8 +168,8 @@ void func_80389CC4(s16 arg0[3], s32 arg1){ particleEmitter_emitN(D_8038D700, 5); D_8038D708[2] += 300.0f; gcpausemenu_80314AC8(0); - timedFunc_set_2(0.1f, (GenMethod_2) func_8028F45C, 9, (s32)&D_8038D708); - timedFunc_set_1(0.1f, (GenMethod_1) gcpausemenu_80314AC8, 1); + timedFunc_set_2(0.1f, (GenFunction_2) func_8028F45C, 9, (s32)&D_8038D708); + timedFunc_set_1(0.1f, (GenFunction_1) gcpausemenu_80314AC8, 1); func_80311480(ASSET_A17_TEXT_BURIED_TREASURE_SPAWNED, 4, NULL, NULL, NULL, NULL); D_8037DCB4++; }//L80389E70 @@ -239,7 +239,7 @@ Actor *func_8038A0D0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp40[2] = actor->position[2]; func_8032AA58(actor, sp3C); - modelRender_preDraw(func_803253A0, actor); + modelRender_preDraw(actor_predrawMethod, actor); modelRender_draw(gfx, mtx, sp40, sp4C, sp3C, NULL, func_80330B1C(marker)); return actor; } diff --git a/src/TTC/code_26D0.c b/src/TTC/code_26D0.c index e37167f5..d06b3381 100644 --- a/src/TTC/code_26D0.c +++ b/src/TTC/code_26D0.c @@ -34,56 +34,56 @@ void func_80388D8C(Actor *this); ActorInfo D_8038C5E0 = { 0xA1, 0x10E, 0x3D2, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C604 = { MARKER_EA_LIGHTHOUSE_DOOR, ACTOR_13E_LIGHTHOUSE_DOOR, ASSET_3D6_MODEL_LIGHTHOUSE_DOOR, 0x1, NULL, - func_802D3D54, func_80326224, func_80325E78, + func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C628 = { MARKER_167_SHARKFOOD_ISLAND, ACTOR_25C_SHARKFOOD_ISLAND, ASSET_50A_MODEL_SHARKFOOD_ISLAND, 0x1, NULL, - func_80388D8C, func_80326224, func_80325E78, + func_80388D8C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C64C = { 0x267, 0x2E2, 0x3BD, 0x1, NULL, - func_80388D34, func_80326224, func_80325E78, + func_80388D34, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C670 = { 0x26A, 0x2DF, 0x3BE, 0x1, NULL, - TTC_func_80388C78, func_80326224, func_80325E78, + TTC_func_80388C78, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C694 = { 0x268, 0x2E0, 0x3B6, 0x1, NULL, - TTC_func_80388C78, func_80326224, func_80325E78, + TTC_func_80388C78, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C6B8 = { 0x269, 0x2E1, 0x3B7, 0x1, NULL, - TTC_func_80388C78, func_80326224, func_80325E78, + TTC_func_80388C78, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8038C6DC = { MARKER_1D5_PALM_TREE, ACTOR_31E_PALM_TREE, ASSET_3A9_MODEL_PALM_TREE, 0x1, NULL, - func_80388CB8, func_80326224, func_80325E78, + func_80388CB8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; @@ -135,7 +135,7 @@ void func_80388D04(s32 arg0){ void func_80388D34(Actor *this){ TTC_func_80388C78(this); if(!this->unk16C_4){ - __spawnQueue_add_1((GenMethod_1)func_80388D04, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)func_80388D04, (s32)this->marker); this->unk16C_4 = TRUE; } } diff --git a/src/TTC/code_3E30.c b/src/TTC/code_3E30.c index 7ebd8704..b3d243fe 100644 --- a/src/TTC/code_3E30.c +++ b/src/TTC/code_3E30.c @@ -408,7 +408,7 @@ void func_8038B094(void){ timed_exitStaticCamera(2.0f); func_80324E38(2.0f, 0); func_803228D8(); - timedFunc_set_3(2.0f, (GenMethod_3) func_802E4078, MAP_7_TTC_TREASURE_TROVE_COVE, 1, 0); + timedFunc_set_3(2.0f, (GenFunction_3) func_802E4078, MAP_7_TTC_TREASURE_TROVE_COVE, 1, 0); } else if(levelSpecificFlags_get(2) || func_803203FC(2)){ func_8034E71C(sp2C, -500, 0.0f); diff --git a/src/core1/code_13990.c b/src/core1/code_13990.c index 7b6304a3..1df9f7b8 100644 --- a/src/core1/code_13990.c +++ b/src/core1/code_13990.c @@ -188,7 +188,7 @@ void func_80251B5C(f32 arg0, f32 arg1, f32 arg2){ *(var_v0++) = arg0; *(var_v0++) = arg1; *(var_v0++) = arg2; *(var_v0++) = 1.0f; } -void func_80251BCC(Mtx* arg0) { +void mlMtxSet(Mtx* arg0) { s32 i, j; f32 *v0; diff --git a/src/core1/code_1BE90.c b/src/core1/code_1BE90.c index 98a0b648..418796bf 100644 --- a/src/core1/code_1BE90.c +++ b/src/core1/code_1BE90.c @@ -423,8 +423,8 @@ void func_8025A70C(enum comusic_e track_id){ } void func_8025A788(enum comusic_e comusic_id, f32 delay1, f32 delay2){ - timedFunc_set_1(delay1, (GenMethod_1) func_8025A70C, comusic_id); - timedFunc_set_1(delay1 + delay2, (GenMethod_1) func_8025A7DC, comusic_id); + timedFunc_set_1(delay1, (GenFunction_1) func_8025A70C, comusic_id); + timedFunc_set_1(delay1 + delay2, (GenFunction_1) func_8025A7DC, comusic_id); } void func_8025A7DC(enum comusic_e track_id){ @@ -594,12 +594,12 @@ s32 func_8025ADD4(enum comusic_e id){ void func_8025AE0C(s32 arg0, f32 arg1){ func_8025A58C(0, arg0); - timedFunc_set_2(arg1, (GenMethod_2)func_8025A58C, -1, arg0); + timedFunc_set_2(arg1, (GenFunction_2)func_8025A58C, -1, arg0); } void func_8025AE50(s32 arg0, f32 arg1){ func_8025A430(0, arg0, 6); - timedFunc_set_3(arg1, (GenMethod_3)func_8025A430, -1, arg0, 6); + timedFunc_set_3(arg1, (GenFunction_3)func_8025A430, -1, arg0, 6); } void func_8025AEA0(enum comusic_e track_id, s32 arg1){ diff --git a/src/core1/memory.c b/src/core1/memory.c index f46a8b76..31ae19cf 100644 --- a/src/core1/memory.c +++ b/src/core1/memory.c @@ -353,7 +353,7 @@ void *malloc(s32 size){ func_8030A850(2); if(!func_80254B84(0)) - func_80288120(); + animCache_flushStale(); if(!func_80254B84(0)) func_8028873C(0); @@ -377,7 +377,7 @@ void *malloc(s32 size){ func_802F1294(); //particleEmitters if(!func_80254B84(0)) - func_8028873C(1); //animationCache + func_8028873C(1); //AnimationFileCache if(v1 = func_80254B84(0)){} else diff --git a/src/core1/rumblemanager.c b/src/core1/rumblemanager.c index cfcc6174..dd6af1e6 100644 --- a/src/core1/rumblemanager.c +++ b/src/core1/rumblemanager.c @@ -148,10 +148,10 @@ void rumbleManager_80250E6C(f32 arg0, f32 arg1){ void rumbleManager_80250E94(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5){ if(D_802823AC){ - timedFunc_set_3(0.0f, (GenMethod_3) __rumbleManager_80250BA4, 0, (s32) (arg0 * 524288.0f), (s32) (arg2*524288.0f)); - timedFunc_set_3(arg2, (GenMethod_3) __rumbleManager_80250BA4, (s32) (arg0 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg3*524288.0f)); - timedFunc_set_3(arg2 + arg3, (GenMethod_3) __rumbleManager_80250BA4, (s32) (arg1 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg4*524288.0f)); - timedFunc_set_3(arg2 + arg3 + arg4, (GenMethod_3) __rumbleManager_80250BA4, (s32) (arg1 * 524288.0f), 0, (s32) (arg5*524288.0f)); + timedFunc_set_3(0.0f, (GenFunction_3) __rumbleManager_80250BA4, 0, (s32) (arg0 * 524288.0f), (s32) (arg2*524288.0f)); + timedFunc_set_3(arg2, (GenFunction_3) __rumbleManager_80250BA4, (s32) (arg0 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg3*524288.0f)); + timedFunc_set_3(arg2 + arg3, (GenFunction_3) __rumbleManager_80250BA4, (s32) (arg1 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg4*524288.0f)); + timedFunc_set_3(arg2 + arg3 + arg4, (GenFunction_3) __rumbleManager_80250BA4, (s32) (arg1 * 524288.0f), 0, (s32) (arg5*524288.0f)); } } diff --git a/src/core2/animcache.c b/src/core2/animcache.c new file mode 100644 index 00000000..5c008111 --- /dev/null +++ b/src/core2/animcache.c @@ -0,0 +1,133 @@ +#include +#include "functions.h" +#include "variables.h" +#include "core2/bonetransform.h" + +typedef struct { + BoneTransformList *bone_xform; + s16 life; + u8 alive; + // u8 pad7[1]; +}struct10E0s; + +/* .bss */ +struct10E0s D_80379E20[340]; + +/* .code */ +void animCache_init(void){ + int i; + + for(i = 0; i<340; i++){ + D_80379E20[i].alive = FALSE; + D_80379E20[i].bone_xform = NULL; + D_80379E20[i].life = 0; + } +} + +void animCache_free(void){ + int i; + + for(i = 0; i<340; i++){ + if(D_80379E20[i].alive){ + if(D_80379E20[i].bone_xform){ + boneTransformList_free(D_80379E20[i].bone_xform); + } + } + } +} + +void animCache_flushStale(void){ + int i; + + for(i = 0; i<340; i++){ + if(D_80379E20[i].alive == TRUE && D_80379E20[i].bone_xform != NULL){ + if(D_80379E20[i].life < 0x3b){ + boneTransformList_free(D_80379E20[i].bone_xform); + D_80379E20[i].bone_xform = 0; + if(func_80254BC4(1)){ + break; + } + } + } + } +} + +void animCache_flushAll(void){ + int i; + + for(i = 0; i<340; i++){ + if(D_80379E20[i].alive){ + func_803203FC(0); + D_80379E20[i].life = 0; + boneTransformList_free(D_80379E20[i].bone_xform); + D_80379E20[i].bone_xform = NULL; + } + } +} + +void animCache_update(void){ + int i; + + for(i = 0; i<340; i++){ + if(D_80379E20[i].alive == TRUE && D_80379E20[i].bone_xform){ + if(--D_80379E20[i].life <= 0){ + boneTransformList_free(D_80379E20[i].bone_xform); + D_80379E20[i].bone_xform = 0; + } + } + } +} + +s16 animCache_getNextFree(void){ + int i; + + for(i = 0; i<340; i++){ + if(!D_80379E20[i].alive){ + return i; + } + } + return -1; +} + +s16 animCache_getNew(void){ + int indx = animCache_getNextFree(); + D_80379E20[indx].alive = TRUE; + D_80379E20[indx].life = 0; + D_80379E20[indx].bone_xform = 0; + return indx; +} + +bool animCache_inUse(s16 index){ + return (D_80379E20[index].bone_xform) ? 1 : 0; +} + +void animCache_release(s16 index){ + if(D_80379E20[index].bone_xform){ + boneTransformList_free(D_80379E20[index].bone_xform); + } + D_80379E20[index].alive = 0; + D_80379E20[index].bone_xform = 0; + D_80379E20[index].life = 0; + +} + +int animCache_getBoneTransformList(s16 index, BoneTransformList **arg1){ + D_80379E20[index].life = 0x3C; + if(D_80379E20[index].bone_xform){ + *arg1 = D_80379E20[index].bone_xform; + return FALSE; + }else{ + D_80379E20[index].bone_xform = boneTransformList_new(); + *arg1 = D_80379E20[index].bone_xform; + return TRUE; + } +} + +void animCache_defrag(void){ + int i; + for(i = 0; i < 340; i++){ + if(D_80379E20[i].alive == TRUE && D_80379E20[i].bone_xform){ + D_80379E20[i].bone_xform = boneTransformList_defrag(D_80379E20[i].bone_xform); + } + } +} diff --git a/src/core2/animctrl.c b/src/core2/animctrl.c index 483ee903..a18da493 100644 --- a/src/core2/animctrl.c +++ b/src/core2/animctrl.c @@ -101,9 +101,9 @@ void func_802871A4(AnimCtrl *this){ AnimCtrl *animctrl_new(s32 arg0){ //new ActorAnimCtrl *this; - this = (ActorAnimCtrl *)malloc( func_80289680() + 0x28); + this = (ActorAnimCtrl *)malloc( anim_getSize() + 0x28); this->animctrl.animation = &this->animation; - func_802896EC(&this->animation, 1); + anim_new(&this->animation, 1); this->animctrl.playback_type = 0; this->animctrl.index = 0; this->animctrl.default_start = TRUE; @@ -119,7 +119,7 @@ AnimCtrl *animctrl_new(s32 arg0){ //new } void animctrl_free(AnimCtrl * this){ //free - func_802896A0(this->animation); + anim_release(this->animation); free(this); } @@ -193,12 +193,12 @@ void __animctrl_gotoStart(AnimCtrl *this){ void _animctrl_start(AnimCtrl * this, char *file, s32 line){ if(this->smooth_transition && anim_getIndex(this->animation) != 0){ - func_80289674(this->animation); + anim_resetSmooth(this->animation); anim_setIndex(this->animation, this->index); __animctrl_gotoStart(this); anim_setDuration(this->animation, 0.0f); } else{ - anim_8028980C(this->animation); + anim_resetNow(this->animation); anim_setIndex(this->animation, this->index); __animctrl_gotoStart(this); anim_setDuration(this->animation, 1.0f); @@ -292,29 +292,29 @@ void animctrl_setTimer(AnimCtrl *this, f32 arg1){ this->timer = arg1; } -s32 animctrl_8028780C(AnimCtrl *this, s32 arg1){ +s32 animctrl_8028780C(f32 position[3], s32 arg1){ return 0; } -s32 func_8028781C(AnimCtrl *this, f32 *arg1, s32 arg2){ +void animctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){ s32 map; map = map_get(); if( map != MAP_1E_CS_START_NINTENDO && map != MAP_1F_CS_START_RAREWARE && map != MAP_20_CS_END_NOT_100 && this->unk23 !=0 - && arg1 != NULL + && position != NULL ){ this->unk24 = this->unk24 -1; if(this->unk24 == 0xFF){ - this->unk24 = animctrl_8028780C(arg1, arg2); + this->unk24 = animctrl_8028780C(position, arg2); } else{ - anim_802897A0(this->animation); + anim_drawSetup(this->animation); return; } } - func_802895F8(this->animation); + anim_update(this->animation); } s32 animctrl_isStopped(AnimCtrl *this){ diff --git a/src/core2/ba/anim.c b/src/core2/ba/anim.c index 47660d90..cb89b56a 100644 --- a/src/core2/ba/anim.c +++ b/src/core2/ba/anim.c @@ -92,33 +92,33 @@ void __baanim_applyBottlesBonus(s32 arg0, s32 arg1) { } if ((D_8037BF4C & 1)) {//either big hands or big feet __baanim_oscillateScale(scale, sp28, 2.0f, 1.0f); - func_8033A928(arg0, 6, scale); - func_8033A928(arg0, 0x14, scale); + boneTransformList_setBoneScale(arg0, 6, scale); + boneTransformList_setBoneScale(arg0, 0x14, scale); } if (D_8037BF4C & 2) {//either big hands or big feet __baanim_oscillateScale(scale, sp28, 2.0f, 1.0f); - func_8033A928(arg0, 0x10, scale); - func_8033A928(arg0, 0x1E, scale); + boneTransformList_setBoneScale(arg0, 0x10, scale); + boneTransformList_setBoneScale(arg0, 0x1E, scale); } if (D_8037BF4C & BAANIM_BIGHEAD) { __baanim_oscillateScale(scale, sp28, 2.0f, 1.0f); - func_8033A928(arg0, 0x12, scale); + boneTransformList_setBoneScale(arg0, 0x12, scale); } if (D_8037BF4C & BAANIM_SMALLHEAD) { __baanim_oscillateScale(scale, sp28, 0.2f, 0.5f); - func_8033A928(arg0, 0x12, scale); + boneTransformList_setBoneScale(arg0, 0x12, scale); } if (D_8037BF4C & BAANIM_LONGBODY) { func_8033A968(arg0, 1, &D_803635E0); } if (D_8037BF4C & BAANIM_BIGKAZOOIEHEAD) { __baanim_oscillateScale(scale, sp28, 2.0f, 1.0f); - func_8033A928(arg0, 0x6C, scale); + boneTransformList_setBoneScale(arg0, 0x6C, scale); } if (D_8037BF4C & BAANIM_BIGWINGS) { __baanim_oscillateScale(scale, sp28, 2.0f, 1.0f); - func_8033A928(arg0, 0x64, scale); - func_8033A928(arg0, 0x67, scale); + boneTransformList_setBoneScale(arg0, 0x64, scale); + boneTransformList_setBoneScale(arg0, 0x67, scale); } if (map_get() == MAP_A_TTC_SANDCASTLE) { if ((D_8037BF4C & BAANIM_WISHYWASHY) && (player_getTransformation() != TRANSFORM_7_WISHWASHY)) { @@ -209,7 +209,7 @@ void baanim_80289F30(void){ f32 sp1C[3]; _player_getPosition(sp1C); - func_8028781C(playerAnimCtrl, sp1C, 1); + animctrl_drawSetup(playerAnimCtrl, sp1C, 1); } AnimCtrl *baanim_getAnimCtrlPtr(void){ diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index fd9d674f..e00a61aa 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -166,7 +166,7 @@ void __baMarker_8028B9A8(s32 arg0){ } void __baMarker_8028BA00(s32 arg0){ - __spawnQueue_add_1((GenMethod_1)__baMarker_8028B9A8, reinterpret_cast(s32, arg0)); + __spawnQueue_add_1((GenFunction_1)__baMarker_8028B9A8, reinterpret_cast(s32, arg0)); } @@ -543,7 +543,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ __baMarker_8028B8DC(); } - __spawnQueue_add_4((GenMethod_4)__baMarker_8028B904, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z), jiggy_id); + __spawnQueue_add_4((GenFunction_4)__baMarker_8028B904, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z), jiggy_id); marker_despawn(marker); } } @@ -573,7 +573,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ case 0x54: //L8028C820 func_8025A6EC(COMUSIC_19_LOW_PITCH_FLUTES, 28000); func_803012F8(); - __spawnQueue_add_4((GenMethod_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); marker_despawn(marker); break; @@ -746,7 +746,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ miscflag_set(MISC_FLAG_E_TOUCHING_WADING_BOOTS); func_802A6388(chwadingboots_802D6E4C(actor)); bs_checkInterrupt(BS_INTR_1B); - __spawnQueue_add_4((GenMethod_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); chwadingboots_802D6E54(actor); break; @@ -770,7 +770,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ miscflag_set(MISC_FLAG_10_TOUCHING_TURBO_TRAINERS); set_turbo_duration(chtrainers_getDuration(actor)); bs_checkInterrupt(BS_INTR_1A); - __spawnQueue_add_4((GenMethod_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)func_802C418C, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); chtrainers_pickup(actor); break; diff --git a/src/core2/ba/model.c b/src/core2/ba/model.c index 687fd2dd..f4c49e14 100644 --- a/src/core2/ba/model.c +++ b/src/core2/ba/model.c @@ -98,7 +98,7 @@ void baModel_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8029DD6C(); modelRender_setEnvColor(env_color[0], env_color[1], env_color[2], baModelEnvAlpha); func_8033A280(2.0f); - modelRender_preDraw((GenMethod_1)_baModel_preDraw, 0); + modelRender_preDraw((GenFunction_1)_baModel_preDraw, 0); func_8033A450(D_80363780); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); if(D_8037C150.unk0){ @@ -144,7 +144,7 @@ void baModel_reset(void){ if(!func_8028ADB4()) baModel_updateModel(); player_getPosition(plyr_pos); - __spawnQueue_add_4((GenMethod_4)func_802C4140, + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_17_PLAYER_SHADOW, reinterpret_cast(s32, plyr_pos[0]), reinterpret_cast(s32, plyr_pos[1]), diff --git a/src/core2/bs/dronexform.c b/src/core2/bs/dronexform.c index 7a8c121b..8f3987c5 100644 --- a/src/core2/bs/dronexform.c +++ b/src/core2/bs/dronexform.c @@ -219,7 +219,7 @@ void func_802B0060(UNK_TYPE(s32) arg0, UNK_TYPE(s32) arg1){ for(i = 0; i < 3; i++){ sp4C[i] = func_80257AD4(D_8037D470.unk20 + ((f32)i/3.0)*0.5, 0.5f)*(D_8037D470.unk24*D_8037D470.unk28) + D_8037D470.unk24; } - func_8033A928(arg0, 3, sp4C); + boneTransformList_setBoneScale(arg0, 3, sp4C); } diff --git a/src/core2/ch/badShad.c b/src/core2/ch/badShad.c index 97a25916..4c1a8c7f 100644 --- a/src/core2/ch/badShad.c +++ b/src/core2/ch/badShad.c @@ -136,7 +136,7 @@ void func_802D729C(Actor *actor, f32 arg1){ return; } if(!actor->unk104){ - __spawnQueue_add_2((GenMethod_2)func_802D71A0, (s32) actor->marker, reinterpret_cast(s32, arg1)); + __spawnQueue_add_2((GenFunction_2)func_802D71A0, (s32) actor->marker, reinterpret_cast(s32, arg1)); return; } diff --git a/src/core2/ch/beehive.c b/src/core2/ch/beehive.c index 29c6ab4d..98e2a206 100644 --- a/src/core2/ch/beehive.c +++ b/src/core2/ch/beehive.c @@ -14,7 +14,7 @@ ActorAnimationInfo D_803672C0[] ={ ActorInfo D_803672E0 = {0x50, ACTOR_12_BEEHIVE, ASSET_364_MODEL_BEEHIVE, 1, D_803672C0, - func_802CE8D4, func_80326224, func_80325888, + func_802CE8D4, func_80326224, actor_draw, 0, 0x333, 0.0f, 0 }; @@ -27,8 +27,8 @@ void func_802CE7E0(ActorMarker *marker, ActorMarker *other){ actor_playAnimationOnce(actor); marker->collidable = FALSE; actor->unk138_27 = 3; - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4A_WOOD_EXPLOSION, reinterpret_cast(s32, actor->position[0]), reinterpret_cast(s32, actor->position[1]), reinterpret_cast(s32, actor->position[2])); actor->marker->propPtr->unk8_3 = 0; func_803115C4(ASSET_D96_DIALOG_BEEHIVE_MEET); func_803115C4(ASSET_DA6_TEXT_BEEHIVE_WITH_BEES); diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 5cd6761a..d6270bc8 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -341,7 +341,7 @@ Actor *func_802C6E84(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ f32 sp40[3]; - actor = func_80325888(marker, gfx, mtx, vtx); + actor = actor_draw(marker, gfx, mtx, vtx); if(marker->unk14_21){ f32 sp34[3] = {0.0f, 4.0f, -15.0f}; f32 sp28[3]; diff --git a/src/core2/ch/bottlesbonus.c b/src/core2/ch/bottlesbonus.c index cb4b7d8b..dfaca5fd 100644 --- a/src/core2/ch/bottlesbonus.c +++ b/src/core2/ch/bottlesbonus.c @@ -45,7 +45,7 @@ typedef struct{ }Struct_core2_560F0_2; extern void item_set(enum item_e, s32); -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); extern void func_8024CE60(f32, f32); Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); @@ -171,8 +171,8 @@ Actor *chBottlesBonus_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) gDPSetTextureFilter((*gfx)++, G_TF_POINT); gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp50)); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)sp6C); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)sp6C); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gfx, mtx, sp60, NULL, D_80368250, sp54, func_80330B1C(marker)); gDPSetTextureFilter((*gfx)++, G_TF_BILERP); @@ -269,7 +269,7 @@ f32 chBottlesBonus_func_802DD804(f32 arg0) { return sinf(M_PI * arg0 / 2); } -void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) { +void chBottlesBonus_func_802DD8AC(BoneTransformList *arg0, s32 arg1) { s32 i; f32 spD8[3]; f32 spD4; @@ -289,7 +289,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) { D_8037DEB0 = 1; for(i = 0; i < 20; i++){ func_8033A57C(arg0, D_80368254[i], D_8037DEC4[i].unkC); - func_8033A670(arg0, D_80368254[i], D_8037DEC4[i].unk1C); + boneTransformList_getBoneScale(arg0, D_80368254[i], D_8037DEC4[i].unk1C); chBottlesBonus_func_802DD778(arg0, i, D_8037DEC4[i].unk0); chBottlesBonusCursor_func_802DF460(i + 20, chBottlesBonusMarker, D_8037DEC4[i].unk0); } @@ -300,9 +300,9 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) { D_8037DEB4 = 1; for(i = 0; i < 20; i++){ func_8033A57C(arg0, D_80368254[i], D_8037DEB8[i].unkC); - func_8033A670(arg0, D_80368254[i], D_8037DEB8[i].unk1C); + boneTransformList_getBoneScale(arg0, D_80368254[i], D_8037DEB8[i].unk1C); chBottlesBonus_func_802DD778(arg0, i, D_8037DEB8[i].unk0); - func_80345250(D_8037DEC0[i].unkC, D_8037DEB8[i].unkC); + vec4f_clone(D_8037DEC0[i].unkC, D_8037DEB8[i].unkC); D_8037DEC0[i].unk0[0] = D_8037DEB8[i].unk0[0]; D_8037DEC0[i].unk0[1] = D_8037DEB8[i].unk0[1]; D_8037DEC0[i].unk0[2] = D_8037DEB8[i].unk0[2]; @@ -337,7 +337,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) { D_8037DEC0[i].unk1C[1] = D_8037DEBC[i].unk1C[1]; D_8037DEC0[i].unk1C[2] = D_8037DEBC[i].unk1C[2]; - func_80345250(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC); + vec4f_clone(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC); break; case 2://L802DDD9C chBottlesBonus_func_802DD484(spD8, spD4, 1.0f, 0.2); @@ -352,7 +352,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) { D_8037DEC0[i].unk1C[0] = D_8037DEBC[i].unk1C[0]; D_8037DEC0[i].unk1C[1] = D_8037DEBC[i].unk1C[1]; D_8037DEC0[i].unk1C[2] = D_8037DEBC[i].unk1C[2]; - func_80345250(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC); + vec4f_clone(D_8037DEC0[i].unkC, D_8037DEBC[i].unkC); chBottlesBonusCursor_func_802DF460(40 + i, chBottlesBonusMarker, D_803681A0); break; @@ -375,7 +375,7 @@ void chBottlesBonus_func_802DD8AC(s32 arg0, s32 arg1) { spD8[0] = spD8[0] * D_8037DEBC[i].unk1C[0]; spD8[1] = spD8[1] * D_8037DEBC[i].unk1C[1]; spD8[2] = spD8[2] * D_8037DEBC[i].unk1C[2]; - func_8033A928(arg0, D_80368254[i], spD8); + boneTransformList_setBoneScale(arg0, D_80368254[i], spD8); chBottlesBonus_func_802DD6E0(arg0, i, D_8037DEBC[i].unk0); D_8037DEC8[i] += spD0; D_8037DF18[i] += spD0; diff --git a/src/core2/ch/bottlesbonuscursor.c b/src/core2/ch/bottlesbonuscursor.c index fd1edbf2..de2ee35f 100644 --- a/src/core2/ch/bottlesbonuscursor.c +++ b/src/core2/ch/bottlesbonuscursor.c @@ -15,7 +15,7 @@ extern void func_8025AABC(enum comusic_e); extern f32 func_8024E420(s32, s32, s32); extern f32 func_8033DDB8(void); extern void chBottlesBonus_func_802DEA50(s32); -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); extern void chBottlesBonus_completedPuzzle(void); @@ -124,7 +124,7 @@ bool chBottlesBonusCursor_checkPuzzleCompletion(void) { for(i = 0; i < 20 && D_8037E5C0.is_completed != 0; i++){ if((D_8037E248[i].state != 3) || (i != D_8037E248[i].piece_id) - || !func_803454D0(chBottlesBonus_func_802DEAF8(i)) + || !vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(i)) ) { D_8037E5C0.is_completed = FALSE; } @@ -146,8 +146,8 @@ void chBottlesBonusCursor_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 sp3C; this = marker_getActorAndRotation(chBottlesBonusSursorMarker, &rotation); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)chBottlesBonusSursorMarker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)chBottlesBonusSursorMarker); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); actor_setOpacity(this, 0xB9); func_8024E030(this->position, D_8037E5C0.unk18); @@ -177,7 +177,7 @@ ActorMarker *chBottlesBonusCursor_spawn(void){ void chBottlesBonusCursor_func_802DF928(s32 indx) { f32 rotation_3d[3]; - func_80345250(D_8037E248[indx].unk1C, D_8037E248[indx].unkC); + vec4f_clone(D_8037E248[indx].unk1C, D_8037E248[indx].unkC); rotation_3d[0] = D_8037E248[indx].rotation; rotation_3d[1] = 0.0f; rotation_3d[2] = 0.0f; @@ -312,7 +312,7 @@ void chBottlesBonusCursor_update(Actor *this) { ) { if (D_8037E248[D_8037E5B8 - 41].state == 3) { if( D_8037E5B8 - 41 != D_8037E248[D_8037E5B8 - 41].piece_id - || !func_803454D0(chBottlesBonus_func_802DEAF8(D_8037E5B8 - 41)) + || !vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(D_8037E5B8 - 41)) ) { D_8037E5C0.unk0 = D_8037E5B8 - 41; chBottlesBonus_func_802DEA50(D_8037E5C0.unk0); @@ -341,7 +341,7 @@ void chBottlesBonusCursor_update(Actor *this) { if ((D_8037E5B8 >= 21) && (D_8037E5B8 < 41)) { held_piece->state = 3; held_piece->piece_id = D_8037E5B8 - 21; - if ((D_8037E5C0.unk0 == held_piece->piece_id) && func_803454D0(chBottlesBonus_func_802DEAF8(D_8037E5C0.unk0))) { + if ((D_8037E5C0.unk0 == held_piece->piece_id) && vec4f_isAlmostZero(chBottlesBonus_func_802DEAF8(D_8037E5C0.unk0))) { sp44 = COMUSIC_2B_DING_B; func_80328B8C(this, 6, 0.0f, 1); actor_playAnimationOnce(this); diff --git a/src/core2/ch/clankerwhipcrack.c b/src/core2/ch/clankerwhipcrack.c index 2999a2ae..d410e7ef 100644 --- a/src/core2/ch/clankerwhipcrack.c +++ b/src/core2/ch/clankerwhipcrack.c @@ -8,17 +8,17 @@ void func_803567EC(Actor *this); ActorInfo D_80372810 = { MARKER_1A7_CLANKER_WHIPCRACK, ACTOR_28A_CLANKER_WHIPCRACK, ASSET_432_MODEL_CLANKER_WHIPCRACK, 0, NULL, - func_803567EC, NULL, func_80325888, + func_803567EC, NULL, actor_draw, 0, 0, 0.0f, 0 }; /* .code */ void func_80356770(Actor *this, s32 next_state){ if(next_state == 1) - func_80335924(this->unk148, ASSET_15C_ANIM_CLANKER_WHIPCRACK_IDLE, 0.5f, 1.0f); + skeletalAnim_set(this->unk148, ASSET_15C_ANIM_CLANKER_WHIPCRACK_IDLE, 0.5f, 1.0f); if(next_state == 2) - func_80335924(this->unk148, ASSET_15D_ANIM_CLANKER_WHIPCRACK_ATTACK, 0.5f, 1.0f); + skeletalAnim_set(this->unk148, ASSET_15D_ANIM_CLANKER_WHIPCRACK_ATTACK, 0.5f, 1.0f); this->state = next_state; } @@ -44,7 +44,7 @@ void func_803567EC(Actor *this){ } if(this->state == 2){ - func_8033568C(this->unk148, &sp44, &sp40); + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if(sp44 < 0.13 && 0.13 <= sp40) func_8030E9C4(SFX_6A_FLAGPOLE_WOBBLE, randf2(0.9f, 1.0f), 14000, this->position, 500.0f, 1000.0f); diff --git a/src/core2/ch/clucker.c b/src/core2/ch/clucker.c index 7b070e9b..2eccf9ed 100644 --- a/src/core2/ch/clucker.c +++ b/src/core2/ch/clucker.c @@ -55,9 +55,9 @@ void func_80357264(Actor *this, s32 next_state){ this->marker->unk14_20 = MARKER_1D0_CLUCKER_B; actor_collisionOff(this); if(next_state == 1 || next_state == 2){ - func_80335924(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, 2.5f); - func_80335A74(this->unk148, 0.99f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, 2.5f); + skeletalAnim_setProgress(this->unk148, 0.99f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); if(this->state == 4){ if(local->unk0 == 2){ local->unk4 = randf2(0.5f, 0.75f); @@ -82,10 +82,10 @@ void func_80357264(Actor *this, s32 next_state){ actor_collisionOn(this); local->unk0 = (local->unk0 + 1) % 3; if(local->unk0 < 2) - func_80335924(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, randf2( 0.6f, 1.0f)); + skeletalAnim_set(this->unk148, ASSET_184_ANIM_CLUCKER_ATTACK_SHORT, 0.0f, randf2( 0.6f, 1.0f)); else - func_80335924(this->unk148, ASSET_185_ANIM_CLUCKER_ATTACK_LONG, 0.0f, randf2( 2.3f, 2.7f)); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_185_ANIM_CLUCKER_ATTACK_LONG, 0.0f, randf2( 2.3f, 2.7f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_8030E6A4(SFX_4A_CLUCKER_AHH, randf2(0.85f, 0.95f), 32000); } @@ -100,7 +100,7 @@ void func_80357264(Actor *this, s32 next_state){ func_80324E38(2.0f, 0); }//L80357518 func_8030E6D4(SFX_1E_HITTING_AN_ENEMY_2); - func_80335924(this->unk148, ASSET_186_ANIM_CLUCKER_DIE, 0.05f, 2.0f); + skeletalAnim_set(this->unk148, ASSET_186_ANIM_CLUCKER_DIE, 0.05f, 2.0f); }//L80357540 this->state = next_state; @@ -120,7 +120,7 @@ Actor *func_803575B8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(3, (this->state == 5)? 1 : 0); func_8033A45C(4, (this->state == 0 || this->state == 1 || this->state == 6)? 0 : 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_8035765C(Actor *this){ @@ -174,8 +174,8 @@ void func_8035765C(Actor *this){ } if(this->state == 4){ - func_8033568C(this->unk148, &sp4C, &sp48); - if(func_8033567C(this->unk148) == 0x185){ + skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48); + if(skeletalAnim_getAnimId(this->unk148) == 0x185){ if(sp4C < 0.58 && 0.58 <= sp48){ this->marker->unk14_20 = MARKER_1D0_CLUCKER_B; } @@ -206,13 +206,13 @@ void func_8035765C(Actor *this){ func_8030E6D4(SFX_2_CLAW_SWIPE); } }//L80357B30 - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_80357264(this, 2); } }//L80357B48 if(this->state == 5){ - func_8033568C(this->unk148, &sp44, &sp40); + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if(sp44 < 0.1 && 0.1 <= sp40){ func_8030E6A4(SFX_68_CLUCKER_AAEEGHH, randf2(1.0f, 1.1f), 32000); } @@ -220,7 +220,7 @@ void func_8035765C(Actor *this){ if(sp44 < 0.7 && 0.7 <= sp40){ func_8030E6D4(SFX_61_CARTOONY_FALL); } - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_80357264(this, 6); } } diff --git a/src/core2/ch/code_CFA60.c b/src/core2/ch/code_CFA60.c index 3fa1d637..1e076be4 100644 --- a/src/core2/ch/code_CFA60.c +++ b/src/core2/ch/code_CFA60.c @@ -25,9 +25,9 @@ void func_803569F0(Actor *this, s32 next_state){ this->marker->unk14_20 = 0x1cf; actor_collisionOff(this); if(next_state == 1 || next_state == 2){ - func_80335924(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, 2.5f); - func_80335A74(this->unk148, 0.99f); - func_80335A8C(this->unk148, 4); + skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, 2.5f); + skeletalAnim_setProgress(this->unk148, 0.99f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_4_STOPPED); if(this->state == 4){ local->unk0 = randf2(0.5f, 1.0f); } @@ -44,15 +44,15 @@ void func_803569F0(Actor *this, s32 next_state){ if(next_state == 4){ this->marker->unk14_20 = 0x29; actor_collisionOn(this); - func_80335924(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, randf2(2.3f, 2.7f)); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, randf2(2.3f, 2.7f)); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); func_8030E760(0x3ef, 1.1f, 25000); func_8030E760(0x3ef, 1.1f, 25000); }//L80356B90 if(next_state == 5){ func_8030E760(SFX_1E_HITTING_AN_ENEMY_2, 1.0f, 32000); - func_80335924(this->unk148, ASSET_15B_ANIM_GRILL_CHOMPA_DIE, 0.05f, 2.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_15B_ANIM_GRILL_CHOMPA_DIE, 0.05f, 2.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); } this->state = next_state; } @@ -73,7 +73,7 @@ Actor *func_80356C50(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ } else{ func_8033A45C(3, (actor->state == 1 || actor->state == 6)? 0:1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } } @@ -121,7 +121,7 @@ void func_80356CCC(Actor *this){ } }//L80356EAC if(this->state == 4){ - func_8033568C(this->unk148, &sp4C, &sp48); + skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48); if(sp4C < 0.59 && 0.59 <= sp48){ this->marker->unk14_20 = 0x1cf; } @@ -137,19 +137,19 @@ void func_80356CCC(Actor *this){ if(sp4C < 0.9 && 0.9 <= sp48){ func_8030E760(SFX_2_CLAW_SWIPE, 1.0f, 32000); } - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_803569F0(this, 2); } }//L80357078 if(this->state == 5){ - func_8033568C(this->unk148, &sp44, &sp40); + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if(sp44 < 0.1 && 0.1 <= sp40){ func_8030E760(SFX_D7_GRABBA_DEATH, 1.0f, 32000); } if(sp44 < 0.7 && 0.7 <= sp40){ func_8030E760(SFX_A_BANJO_LANDING_05, 0.8f, 32000); } - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ func_803569F0(this, 6); } }//L8035713C diff --git a/src/core2/ch/collectible.c b/src/core2/ch/collectible.c index 7446f677..d3dfe0a2 100644 --- a/src/core2/ch/collectible.c +++ b/src/core2/ch/collectible.c @@ -78,7 +78,7 @@ void func_802D8C98(Actor *this, s32 arg1) { bool chCollectible_collectItem(Actor* actor, enum file_progress_e arg1, enum asset_e dialogId, enum comusic_e sfxId, enum item_e itemId, f32 arg5){ func_8025A6EC(sfxId,32000); - timedFunc_set_1(0.75f, (GenMethod_1)func_8035644C, arg1); + timedFunc_set_1(0.75f, (GenFunction_1)func_8035644C, arg1); if(!func_802FADD4(0x1b)){ item_inc(itemId); } else { diff --git a/src/core2/ch/crab.c b/src/core2/ch/crab.c index d8c06e3b..40ff6efe 100644 --- a/src/core2/ch/crab.c +++ b/src/core2/ch/crab.c @@ -179,7 +179,7 @@ void __chCrab_die(ActorMarker *marker, ActorMarker *other){ is_black_snippet = this->modelCacheIndex == ACTOR_F2_BLACK_SNIPPET; FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 32750, this->position, 950, 1900); FUNC_8030E8B4(SFX_79_TICKER_DEATH, 1.0f, 28000, this->position, 950, 1900); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); this->unk60 = 5.0f; marker->collidable = FALSE; this->unk138_27 = 1; @@ -399,6 +399,6 @@ void chCrab_update(Actor *this) { } /* .data */ -ActorInfo D_803670B8 = { MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0}; -ActorInfo D_803670DC = { MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0}; -ActorInfo D_80367100 = { MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, 0x1, chCrabMutantAnimations, chCrab_update, func_80326224, func_80325888, 1900, 0, 0.8f, 0}; +ActorInfo D_803670B8 = { MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, actor_draw, 1900, 0, 0.8f, 0}; +ActorInfo D_803670DC = { MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, 0x1, chCrabAnimations, chCrab_update, func_80326224, actor_draw, 1900, 0, 0.8f, 0}; +ActorInfo D_80367100 = { MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, 0x1, chCrabMutantAnimations, chCrab_update, func_80326224, actor_draw, 1900, 0, 0.8f, 0}; diff --git a/src/core2/ch/firefx.c b/src/core2/ch/firefx.c index c9509ea0..6747fc5d 100644 --- a/src/core2/ch/firefx.c +++ b/src/core2/ch/firefx.c @@ -10,7 +10,7 @@ void chfirefx_update(Actor *this); ActorInfo gChFireFxInfo = { MARKER_256_FIRE_FX, ACTOR_383_FIRE_FX, ASSET_526_SPRITE_FIRE, 0, NULL, - chfirefx_update, func_80326224, func_80325888, + chfirefx_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/core2/ch/flotsam.c b/src/core2/ch/flotsam.c index 2febb3ba..405bcaff 100644 --- a/src/core2/ch/flotsam.c +++ b/src/core2/ch/flotsam.c @@ -58,7 +58,7 @@ void func_8035C080(Actor *this, s32 next_state){ local->unkD = next_state; if(next_state == 1){ - func_80335924(this->unk148, 0, 0.0f, 0.0f); + skeletalAnim_set(this->unk148, 0, 0.0f, 0.0f); this->yaw = local->unk34[0]; } if( next_state == 3 @@ -66,7 +66,7 @@ void func_8035C080(Actor *this, s32 next_state){ || next_state == 7 || next_state == 6 ){ - func_80335924(this->unk148, ASSET_132_ANIM_FLOTSAM_MOVE, 0.1f, 0.7f); + skeletalAnim_set(this->unk148, ASSET_132_ANIM_FLOTSAM_MOVE, 0.1f, 0.7f); local->unk10[0] = this->position_x; local->unk10[1] = this->position_y; local->unk10[2] = this->position_z; @@ -176,8 +176,8 @@ void func_8035C080(Actor *this, s32 next_state){ func_802F9EC4(sp38, this->position, 0x5dc, 0x9c4); func_802F9F80(sp38, 0.0f, 2.0f, 2.0f); func_802FA060(sp38, 0x6590, 0x6d60, 500.0f); - func_80335924(this->unk148, ASSET_189_ANIM_FLOTSAM_DIE, 0.1f, 4.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, ASSET_189_ANIM_FLOTSAM_DIE, 0.1f, 4.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); local->pCtrl_8 = particleEmitter_new(20); particleEmitter_setSprite(local->pCtrl_8, ASSET_70E_SPRITE_SMOKE_2); particleEmitter_setStartingFrameRange(local->pCtrl_8, 0, 7); @@ -214,7 +214,7 @@ Actor* func_8035C71C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(this->state == 0) return this; if(this->state == 8){ - sp5C = func_803356A0(this->unk148); + sp5C = skeletalAnim_getBoneTransformList(this->unk148); if(sp5C){ sp40[0] = 0.0f; sp40[1] = 0.0f; @@ -224,7 +224,7 @@ Actor* func_8035C71C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ sp34[0] = 1.0 - local->unk0*0.5; sp34[1] = 1.0 - local->unk0*0.5; sp34[2] = 1.0 - local->unk0*0.5; - func_8033A928(sp5C, 3, sp34); + boneTransformList_setBoneScale(sp5C, 3, sp34); } } @@ -232,7 +232,7 @@ Actor* func_8035C71C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A450(func_80329934()); } - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); if(local->pCtrl_8 && this->marker->unk14_21){ func_8034A174(func_80329934(), 5, sp28); @@ -296,7 +296,7 @@ void func_8035C8F4(Actor *this){ ml_interpolate_vec3f(this->position, local->unk10, local->unk1C, local->unk0); this->position_y += 100.0f*sinf(local->unk0*3.141592654); this->yaw = local->unk0*(local->unk34[2] - local->unk34[1]) + local->unk34[1]; - if(func_80335794(this->unk148) > 0){ + if(skeletalAnim_getLoopCount(this->unk148) > 0){ if(ml_distance_vec3f(this->position, local->unk28) < 10.0f){ func_8035C080(this, 1); } @@ -326,7 +326,7 @@ void func_8035C8F4(Actor *this){ if(this->state == 8){ local->unk0 += 0.25*sp34; - if(func_80335794(this->unk148) > 0) + if(skeletalAnim_getLoopCount(this->unk148) > 0) marker_despawn(this->marker); } } diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index 960939b2..0586c154 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -118,7 +118,7 @@ Actor *func_802C4360(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ else{ modelRender_setEnvColor(0x64, 0x64, 0x64, 0xFF); } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } Actor *func_802C4464(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ @@ -302,7 +302,7 @@ void func_802C4C14(Actor *this){ return; if(!this->initialized){ - __spawnQueue_add_1((GenMethod_1)func_802C4BB4, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_802C4BB4, reinterpret_cast(s32, this->marker)); func_802C7318(this); this->unk130 = func_802C71F0; if(sp84 == 0){ @@ -352,7 +352,7 @@ void func_802C4C14(Actor *this){ case 1://L802C4F10 if(sp84 == 1){ func_8030E510(SFX_136_GAMEBOY_STARTUP, 15000); - timedFunc_set_3(0.25f, (GenMethod_3)comusic_8025AB44, COMUSIC_73_GAMEBOY, -1, 2000); + timedFunc_set_3(0.25f, (GenFunction_3)comusic_8025AB44, COMUSIC_73_GAMEBOY, -1, 2000); func_8025A58C(0, 2000); } else{ @@ -394,19 +394,19 @@ void func_802C4C14(Actor *this){ if(animctrl_isStopped(this->animctrl)){ chBottlesBonus_func_802DEB80(); if(!gameFile_isNotEmpty(sp84)){ - timedFunc_set_3(0.0f, (GenMethod_3)func_802E4078, MAP_85_CS_SPIRAL_MOUNTAIN_3, 0, 1); + timedFunc_set_3(0.0f, (GenFunction_3)func_802E4078, MAP_85_CS_SPIRAL_MOUNTAIN_3, 0, 1); } else{//L802C511C sp44 = 0.0f; if(this->state == 4 && (sp84 == 0 || sp84 == 1)) sp44 = 0.25f; if(func_802DA498() && fileProgressFlag_get(FILEPROG_BD_ENTER_LAIR_CUTSCENE)){ - timedFunc_set_2(sp44, (GenMethod_2)func_8031FB14, 0, 0); + timedFunc_set_2(sp44, (GenFunction_2)func_8031FB14, 0, 0); } else{//L802C5188 - timedFunc_set_2(sp44, (GenMethod_2)func_8031F678, 0, 0); + timedFunc_set_2(sp44, (GenFunction_2)func_8031F678, 0, 0); }//L802C51A0 - timedFunc_set_1(sp44, (GenMethod_1)func_80335110, 1); + timedFunc_set_1(sp44, (GenFunction_1)func_80335110, 1); }//L802C51B8 this->state = 6; } @@ -430,17 +430,17 @@ void func_802C4C14(Actor *this){ case 0://L802C52B8 func_8030E510(SFX_31_BANJO_OHHWAAOOO, 28000); func_8030E540(SFX_135_CARTOONY_SPRING); - timedFunc_set_2(0.4f, (GenMethod_2)func_8030E510, SFX_13A_GLASS_BREAKING_7, 0x7fff); - timedFunc_set_2(0.9f, (GenMethod_2)func_8030E510, SFX_150_PORCELAIN_CRASH, 0x7fff); - timedFunc_set_2(1.0f, (GenMethod_2)func_8030E510, SFX_151_CAT_MEOW, 0x7fff); + timedFunc_set_2(0.4f, (GenFunction_2)func_8030E510, SFX_13A_GLASS_BREAKING_7, 0x7fff); + timedFunc_set_2(0.9f, (GenFunction_2)func_8030E510, SFX_150_PORCELAIN_CRASH, 0x7fff); + timedFunc_set_2(1.0f, (GenFunction_2)func_8030E510, SFX_151_CAT_MEOW, 0x7fff); break; case 1://L802C5320 - timedFunc_set_2(0.4f, (GenMethod_2)func_8030E510, SFX_31_BANJO_OHHWAAOOO, 28000); - timedFunc_set_2(0.2f, (GenMethod_2)func_8030E510, SFX_E_SHOCKSPRING_BOING, 28000); + timedFunc_set_2(0.4f, (GenFunction_2)func_8030E510, SFX_31_BANJO_OHHWAAOOO, 28000); + timedFunc_set_2(0.2f, (GenFunction_2)func_8030E510, SFX_E_SHOCKSPRING_BOING, 28000); func_8030E540(SFX_2D_KABOING); break; case 2://L802C5364 - timedFunc_set_2(0.15f, (GenMethod_2)func_8030E510, SFX_32_BANJO_EGHEE, 28000); + timedFunc_set_2(0.15f, (GenFunction_2)func_8030E510, SFX_32_BANJO_EGHEE, 28000); func_8030E510(SFX_3F6_UNKNOWN, 28000); func_8030E540(SFX_8F_SNOWBALL_FLYING); break; diff --git a/src/core2/ch/ghost.c b/src/core2/ch/ghost.c index bf566c6b..ee74e1dd 100644 --- a/src/core2/ch/ghost.c +++ b/src/core2/ch/ghost.c @@ -26,14 +26,14 @@ ActorAnimationInfo D_80372BE0[] ={ ActorInfo D_80372C18 = { //TEEHEE MARKER_99_TEEHEE, ACTOR_CA_TEEHEE, ASSET_3CB_MODEL_TEEHEE, 0x1, D_80372BE0, - func_8035B900, func_80326224, func_80325888, + func_8035B900, func_80326224, actor_draw, 6500, 0, 0.9f, 0 }; ActorInfo D_80372C3C = { //PURPLE_TEEHEE (inside tumblar) MARKER_296_TEEHEE_PURPLE, ACTOR_3C1_PURPLE_TEEHEE, ASSET_564_MODEL_PURPLE_TEEHEE, 0x1, D_80372BE0, - func_8035B900, func_8035BD48, func_80325888, + func_8035B900, func_8035BD48, actor_draw, 6500, 0, 0.9f, 0 }; diff --git a/src/core2/ch/gloop.c b/src/core2/ch/gloop.c index 76e7f664..fbe1722b 100644 --- a/src/core2/ch/gloop.c +++ b/src/core2/ch/gloop.c @@ -25,7 +25,7 @@ ActorInfo chGloop = { /* .code */ Actor *chgloop_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ - Actor *this = func_80325888(marker, gfx, mtx, vtx); + Actor *this = actor_draw(marker, gfx, mtx, vtx); if(!marker->unk14_21) return this; diff --git a/src/core2/ch/gravestone.c b/src/core2/ch/gravestone.c index 8991fb5a..cb360cdf 100644 --- a/src/core2/ch/gravestone.c +++ b/src/core2/ch/gravestone.c @@ -6,7 +6,7 @@ Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_8035F138(Actor *this); -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); extern f32 func_80257204(f32, f32, f32, f32); typedef struct { @@ -50,8 +50,8 @@ Actor *func_8035ECA0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { local = (ActorLocal_core2_D7D10 *)&this->local; func_8033A45C(3, (s32) this->velocity[1]); func_8033A45C(4, local->unk0); - modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gfx, mtx, this->position, rotation, this->scale, D_80373008, func_803257B4(marker)); return this; } diff --git a/src/core2/ch/icecube.c b/src/core2/ch/icecube.c index e8b63a68..023b82f8 100644 --- a/src/core2/ch/icecube.c +++ b/src/core2/ch/icecube.c @@ -42,7 +42,7 @@ s32 D_80372BD4[3] = {200, 200, 255}; Actor *chicecube_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *actor = marker_getActor(marker); func_8033A45C(3, actor->unk38_31); - actor = func_80325888(marker, gfx, mtx, vtx); + actor = actor_draw(marker, gfx, mtx, vtx); return actor; } @@ -226,7 +226,7 @@ void __chicecube_die(ActorMarker *marker, ActorMarker *other_marker){ func_8035A04C(actor->position, 12, ASSET_505_MODEL_ICECUBE_CHUNK, actor->scale); func_8035A228(actor->position, 6, ASSET_700_SPRITE_DUST, actor->scale); if(actor->unkF4_8 != 1){ - __spawnQueue_add_1((GenMethod_1)__chicecube_spawnHalfCubes, reinterpret_cast(s32, actor->marker)); + __spawnQueue_add_1((GenFunction_1)__chicecube_spawnHalfCubes, reinterpret_cast(s32, actor->marker)); } marker_despawn(actor->marker); } diff --git a/src/core2/ch/jiggy.c b/src/core2/ch/jiggy.c index 9c508028..f1dfc3ce 100644 --- a/src/core2/ch/jiggy.c +++ b/src/core2/ch/jiggy.c @@ -62,8 +62,8 @@ void func_802C7AB0(ActorMarker * arg0, u32 arg1){ } void func_802C7AF8(u32 x, u32 y, u32 z, u32 arg3){ - __spawnQueue_add_4((GenMethod_4)func_802C41D8, ACTOR_4C_STEAM, x, y, z); - __spawnQueue_add_4((GenMethod_4)func_802C41D8, ACTOR_14F_DESTROYED_JIGGY, x, y, z); + __spawnQueue_add_4((GenFunction_4)func_802C41D8, ACTOR_4C_STEAM, x, y, z); + __spawnQueue_add_4((GenFunction_4)func_802C41D8, ACTOR_14F_DESTROYED_JIGGY, x, y, z); mapSpecificFlags_set(arg3, 1); } @@ -80,10 +80,10 @@ void func_802C7B8C(Actor *this, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5 actor_collisionOff(this); func_802BAFE4(arg3); func_80356520(arg6); - timedFunc_set_4(0.6f, (GenMethod_4)func_802C7AF8, (s32)this->position[0], (s32)this->position[1], (s32)this->position[2], arg4); - timedFunc_set_2(0.6f, (GenMethod_2)func_802C7AB0, (s32)this->marker, arg5); - timedFunc_set_0(1.0f, (GenMethod_0)func_802BE720); - timedFunc_set_1(3.9f, (GenMethod_1)func_802C7B6C, arg4); + timedFunc_set_4(0.6f, (GenFunction_4)func_802C7AF8, (s32)this->position[0], (s32)this->position[1], (s32)this->position[2], arg4); + timedFunc_set_2(0.6f, (GenFunction_2)func_802C7AB0, (s32)this->marker, arg5); + timedFunc_set_0(1.0f, (GenFunction_0)func_802BE720); + timedFunc_set_1(3.9f, (GenFunction_1)func_802C7B6C, arg4); mapSpecificFlags_set(arg1, 1); } } @@ -109,7 +109,7 @@ Actor *chjiggy_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3){ func_8033A280(10.0f); func_8033A244(30000.0f); } - thisActor = func_80325888(this, gdl, mptr, arg3); + thisActor = actor_draw(this, gdl, mptr, arg3); } return thisActor; } diff --git a/src/core2/ch/jigsawdance.c b/src/core2/ch/jigsawdance.c index a802000b..00848b70 100644 --- a/src/core2/ch/jigsawdance.c +++ b/src/core2/ch/jigsawdance.c @@ -34,7 +34,7 @@ Actor *__chJigsawDance_draw(ActorMarker *this, Gfx **gdl, Mtx **mptr, Vtx **arg3 return thisActor; } else{ - return func_80325888(this, gdl, mptr, arg3); + return actor_draw(this, gdl, mptr, arg3); } } diff --git a/src/core2/ch/jinjo.c b/src/core2/ch/jinjo.c index 5f4a8e21..f2188fae 100644 --- a/src/core2/ch/jinjo.c +++ b/src/core2/ch/jinjo.c @@ -24,11 +24,11 @@ ActorAnimationInfo chJinjoAnimations[] = { {ASSET_31_ANIM_JINJO_JUMP, 0.75f} }; -ActorInfo chJinjoBlue = { MARKER_5A_JINJO_BLUE, ACTOR_60_JINJO_BLUE, ASSET_3C0_MODEL_JINJO_BLUE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo chJinjoGreen = { MARKER_5B_JINJO_GREEN, ACTOR_62_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo chJinjoYellow = { MARKER_5E_JINJO_YELLOW, ACTOR_5E_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo chJinjoPink = { MARKER_5D_JINJO_PINK, ACTOR_61_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo chJinjoOrange = { MARKER_5C_JINJO_ORANGE, ACTOR_5F_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo chJinjoBlue = { MARKER_5A_JINJO_BLUE, ACTOR_60_JINJO_BLUE, ASSET_3C0_MODEL_JINJO_BLUE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo chJinjoGreen = { MARKER_5B_JINJO_GREEN, ACTOR_62_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo chJinjoYellow = { MARKER_5E_JINJO_YELLOW, ACTOR_5E_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo chJinjoPink = { MARKER_5D_JINJO_PINK, ACTOR_61_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo chJinjoOrange = { MARKER_5C_JINJO_ORANGE, ACTOR_5F_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 0x1, chJinjoAnimations, chJinjo_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; enum asset_e __chJinjo_getMeetDialogId(enum marker_e marker_id){ switch(marker_id){ diff --git a/src/core2/ch/mole.c b/src/core2/ch/mole.c index f041fd61..3bb1fa56 100644 --- a/src/core2/ch/mole.c +++ b/src/core2/ch/mole.c @@ -107,7 +107,7 @@ Actor *func_802D94B4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(actor->state != 1 && actor->state != 5){ func_8033A45C(3, 0); func_8033A45C(4, 0); - actor = func_80325888(marker, gfx, mtx, vtx); + actor = actor_draw(marker, gfx, mtx, vtx); } return actor; @@ -325,7 +325,7 @@ void func_802D9D60(Actor *this){ this->unk38_0 = TRUE; nodeprop_getPosition(node_prop, this->unk1C); } - __spawnQueue_add_1((GenMethod_1)func_802D9C54, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_802D9C54, reinterpret_cast(s32, this->marker)); this->marker->propPtr->unk8_3 = FALSE; this->marker->collidable = FALSE; this->initialized = TRUE; diff --git a/src/core2/ch/molehill.c b/src/core2/ch/molehill.c index 09de7cac..dba736f6 100644 --- a/src/core2/ch/molehill.c +++ b/src/core2/ch/molehill.c @@ -42,7 +42,7 @@ Actor *func_802DA560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *actor = marker_getActor(marker); ActorLocal_MoleHill * local = (ActorLocal_MoleHill *) &actor->local; if(actor->unk16C_4){ - actor = func_80325888(marker, gfx, mtx, vtx); + actor = actor_draw(marker, gfx, mtx, vtx); func_8034A174(actor->marker->unk44, 5, actor->velocity); func_8034A174(actor->marker->unk44, 6, actor->unk1C); func_8034A174(actor->marker->unk44, 7, local->unk4); diff --git a/src/core2/ch/overlaynocontroller.c b/src/core2/ch/overlaynocontroller.c index f455dac3..e409da22 100644 --- a/src/core2/ch/overlaynocontroller.c +++ b/src/core2/ch/overlaynocontroller.c @@ -3,7 +3,7 @@ #include "variables.h" extern Actor *func_8032813C(enum actor_e, f32[3], s32); -extern void func_80325794(ActorMarker *marker); +extern void actor_postdrawMethod(ActorMarker *marker); Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void chOverlayNoController_update(Actor *this); @@ -35,8 +35,8 @@ Actor *chOverlayNoController_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vt actor = marker_getActor(marker); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)actor); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); func_8024E258(); {sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;}; {sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;}; diff --git a/src/core2/ch/overlaypressstart.c b/src/core2/ch/overlaypressstart.c index c63550e3..69971614 100644 --- a/src/core2/ch/overlaypressstart.c +++ b/src/core2/ch/overlaypressstart.c @@ -3,8 +3,8 @@ #include "variables.h" extern void func_80328B8C(Actor *, s32, f32, s32); -extern void func_803253A0(Actor *); -extern void func_80325794(ActorMarker *); +extern void actor_predrawMethod(Actor *); +extern void actor_postdrawMethod(ActorMarker *); extern Actor *func_8032813C(enum actor_e id, f32[3], s32); @@ -45,8 +45,8 @@ Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx if(D_8037DE84) return actor; - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)actor); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); func_8024E258(); {sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;}; {sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;}; diff --git a/src/core2/ch/shrapnel.c b/src/core2/ch/shrapnel.c index e20e121a..3361715d 100644 --- a/src/core2/ch/shrapnel.c +++ b/src/core2/ch/shrapnel.c @@ -112,7 +112,7 @@ void chShrapnel_explode(ActorMarker *marker, ActorMarker *other_marker) { this = marker_getActor(marker); FUNC_8030E8B4(SFX_1B_EXPLOSION_1, 1.0f, 32736, this->position, 1250, 2500); - __spawnQueue_add_1((GenMethod_1)chShrapnel_spawnExplodeActor, reinterpret_cast(s32, this)); + __spawnQueue_add_1((GenFunction_1)chShrapnel_spawnExplodeActor, reinterpret_cast(s32, this)); chShrapnel_emitExplosion(this); chShrapnel_emitSmoke(this); chShrapnel_emitBodyParts(this, ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE, 2); @@ -194,6 +194,6 @@ void chshrapnel_update(Actor *this) { ActorInfo chShrapnelDescription = { MARKER_65_SHRAPNEL, ACTOR_56_SHRAPNEL, ASSET_3EC_MODEL_SHRAPNEL, 0x1, chShrapnelAnimations, - chshrapnel_update, func_80326224, func_80325888, + chshrapnel_update, func_80326224, actor_draw, 2500, 0x333, 0.0f, 0 }; diff --git a/src/core2/ch/snowball.c b/src/core2/ch/snowball.c index c0ae08d5..dc6b679c 100644 --- a/src/core2/ch/snowball.c +++ b/src/core2/ch/snowball.c @@ -29,7 +29,7 @@ f32 D_8037E640[3]; Actor *chSnowball_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { Actor *this; - this = func_80325888(marker, gfx, mtx, vtx); + this = actor_draw(marker, gfx, mtx, vtx); if (marker->unk14_21 && this->state != 2) { func_8033E73C(marker, 5, func_80329904); func_8033E3F0(0xD, marker->unk14_21); diff --git a/src/core2/ch/snowman.c b/src/core2/ch/snowman.c index 9f2974fb..69f3a3e8 100644 --- a/src/core2/ch/snowman.c +++ b/src/core2/ch/snowman.c @@ -51,7 +51,7 @@ Actor *chSnowman_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ local = (ActorLocal_chSirSlush *)&actor->local; func_8033A45C(1, local->unk9); func_8033A45C(2, local->unkA); - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); } void __chSnowman_spawnSnowball(ActorMarker *marker){ @@ -186,7 +186,7 @@ void __chSnowman_deathCallback(ActorMarker *marker, ActorMarker *other_marker){ FUNC_8030E8B4(SFX_3EA_UNKNOWN, 1.0f, 30000, actor->position, 1500, 4500); FUNC_8030E8B4(SFX_2F_ORANGE_SPLAT, 1.0f, 30000, actor->position, 1500, 4500); - __spawnQueue_add_1((GenMethod_1)__chSnowman_spawnHat, (s32)actor->marker); + __spawnQueue_add_1((GenFunction_1)__chSnowman_spawnHat, (s32)actor->marker); if(map_get() == MAP_27_FP_FREEZEEZY_PEAK) fp_sirslushgame_decRemaining(); __chSnowman_spawnSnowballParticles(actor->position, 0xC); @@ -312,7 +312,7 @@ void chSnowman_update(Actor *this){ && local->unkB ){ func_8030E878(SFX_8F_SNOWBALL_FLYING, randf2(0.95f, 1.05f), 30000, this->position, 800.0f, 3050.0f); - __spawnQueue_add_1((GenMethod_1)__chSnowman_spawnSnowball, (s32)this->marker); + __spawnQueue_add_1((GenFunction_1)__chSnowman_spawnSnowball, (s32)this->marker); local->unk9 = FALSE; } diff --git a/src/core2/ch/snowmanhat.c b/src/core2/ch/snowmanhat.c index aa3196ff..aee78e6e 100644 --- a/src/core2/ch/snowmanhat.c +++ b/src/core2/ch/snowmanhat.c @@ -8,7 +8,7 @@ void chSnowmanHat_update(Actor *this); ActorInfo chSnowmanHat = { MARKER_B3_SIR_SLUSH_HAT, ACTOR_126_SIR_SLUSH_HAT, ASSET_379_MODEL_SIRSLUSH_HAT, 0x1, NULL, - chSnowmanHat_update, func_80326224, func_80325888, + chSnowmanHat_update, func_80326224, actor_draw, 4500, 0, 1.0f, 0 }; diff --git a/src/core2/ch/soundsource.c b/src/core2/ch/soundsource.c index 99f3f55e..7a2477b3 100644 --- a/src/core2/ch/soundsource.c +++ b/src/core2/ch/soundsource.c @@ -115,7 +115,7 @@ void func_802D096C(s32 arg0, s32 arg1, s32 arg2, s32 arg3){ } void func_802D09B8(Actor *this, s32 arg1){ - __spawnQueue_add_4((GenMethod_4)func_802D096C, + __spawnQueue_add_4((GenFunction_4)func_802D096C, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2]), diff --git a/src/core2/ch/termite.c b/src/core2/ch/termite.c index 66f63737..df22c6d9 100644 --- a/src/core2/ch/termite.c +++ b/src/core2/ch/termite.c @@ -237,6 +237,6 @@ void chTermite_update(Actor *this) { ActorInfo chTermite = { MARKER_4_TERMITE, ACTOR_5_TERMITE, ASSET_350_MODEL_TERMITE, 0x1, chTermiteAnimations, - chTermite_update, func_80326224, func_80325888, + chTermite_update, func_80326224, actor_draw, 2000, 0, 0.0f, 0 }; diff --git a/src/core2/ch/trainers.c b/src/core2/ch/trainers.c index 72b69c7b..4f6082e7 100644 --- a/src/core2/ch/trainers.c +++ b/src/core2/ch/trainers.c @@ -28,7 +28,7 @@ Actor *chtrainers_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this = marker_getActor(marker); if( !this->unk10_12 ) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } diff --git a/src/core2/ch/wadingboots.c b/src/core2/ch/wadingboots.c index 7743442d..713cac16 100644 --- a/src/core2/ch/wadingboots.c +++ b/src/core2/ch/wadingboots.c @@ -29,7 +29,7 @@ Actor *chwadingboots_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ if(!this->unk10_12) return this; - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void chwadingboots_update(Actor *this){ diff --git a/src/core2/ch/whipcrack.c b/src/core2/ch/whipcrack.c index 0cbbfff7..bed46ae7 100644 --- a/src/core2/ch/whipcrack.c +++ b/src/core2/ch/whipcrack.c @@ -8,7 +8,7 @@ void chwhipcrack_update(Actor *this); ActorInfo D_80373100 = { MARKER_1C5_WHIPCRACK, ACTOR_30F_WHIPCRACK, ASSET_4FD_MODEL_WHIPCRACK, 0, NULL, - chwhipcrack_update, NULL, func_80325888, + chwhipcrack_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -69,10 +69,10 @@ void __chwhipcrack_spawnSmoke(Actor *this, s32 cnt){ void __chwhipcrack_setState(Actor *this, s32 next_state){ if(next_state == 1) - func_80335924(this->unk148, ASSET_22A_ANIM_WHIPCRACK_IDLE, 0.5f, 1.0f); + skeletalAnim_set(this->unk148, ASSET_22A_ANIM_WHIPCRACK_IDLE, 0.5f, 1.0f); if(next_state == 2) - func_80335924(this->unk148, ASSET_229_ANIM_WHIPCRACK_ATTACK, 0.5f, 1.0f); + skeletalAnim_set(this->unk148, ASSET_229_ANIM_WHIPCRACK_ATTACK, 0.5f, 1.0f); if(next_state == 3){ __chwhipcrack_spawnPieces(this, ASSET_4FE_MODEL_WHIPCRACK_PART_1, 4); @@ -113,7 +113,7 @@ void chwhipcrack_update(Actor *this){ } if(this->state == 2){ - func_8033568C(this->unk148, &sp44, &sp40); + skeletalAnim_getProgressRange(this->unk148, &sp44, &sp40); if((sp44 < 0.13) && (0.13 <= sp40)){ func_8030E878(SFX_69_WHIPCRACK_CREAKING, randf2(1.05f, 1.1f), 15000, this->position, 500.0f, 1000.0f); } diff --git a/src/core2/code_10E0.c b/src/core2/code_10E0.c deleted file mode 100644 index f9989800..00000000 --- a/src/core2/code_10E0.c +++ /dev/null @@ -1,132 +0,0 @@ -#include -#include "functions.h" -#include "variables.h" - -typedef struct { - s32 unk0; - s16 unk4; - u8 unk6; - u8 pad7[1]; -}struct10E0s; - -/* .bss */ -struct10E0s D_80379E20[340]; - -/* .code */ -void func_80288070(void){ - int i; - - for(i = 0; i<340; i++){ - D_80379E20[i].unk6 = 0; - D_80379E20[i].unk0 = 0; - D_80379E20[i].unk4 = 0; - } -} - -void func_802880C0(void){ - int i; - - for(i = 0; i<340; i++){ - if(D_80379E20[i].unk6){ - if(D_80379E20[i].unk0){ - func_8033A6F0(D_80379E20[i].unk0); - } - } - } -} - -void func_80288120(void){ - int i; - - for(i = 0; i<340; i++){ - if(D_80379E20[i].unk6 == 1 && D_80379E20[i].unk0){ - if(D_80379E20[i].unk4 < 0x3b){ - func_8033A6F0(D_80379E20[i].unk0); - D_80379E20[i].unk0 = 0; - if(func_80254BC4(1)){ - break; - } - } - } - } -} - -void func_802881AC(void){ - int i; - - for(i = 0; i<340; i++){ - if(D_80379E20[i].unk6){ - func_803203FC(0); - D_80379E20[i].unk4 = 0; - func_8033A6F0(D_80379E20[i].unk0); - D_80379E20[i].unk0 = 0; - } - } -} - -void func_80288210(void){ - int i; - - for(i = 0; i<340; i++){ - if(D_80379E20[i].unk6 == 1 && D_80379E20[i].unk0){ - if(--D_80379E20[i].unk4 <= 0){ - func_8033A6F0(D_80379E20[i].unk0); - D_80379E20[i].unk0 = 0; - } - } - } -} - -s16 func_80288298(void){ - int i; - - for(i = 0; i<340; i++){ - if(!D_80379E20[i].unk6){ - return i; - } - } - return -1; -} - -s16 func_80288330(void){ - int indx = func_80288298(); - D_80379E20[indx].unk6 = 1; - D_80379E20[indx].unk4 = 0; - D_80379E20[indx].unk0 = 0; - return indx; -} - -int func_80288374(s16 arg0){ - return (D_80379E20[arg0].unk0) ? 1 : 0; -} - -void func_802883AC(s16 arg0){ - if(D_80379E20[arg0].unk0){ - func_8033A6F0(D_80379E20[arg0].unk0); - } - D_80379E20[arg0].unk6 = 0; - D_80379E20[arg0].unk0 = 0; - D_80379E20[arg0].unk4 = 0; - -} - -int func_80288400(s16 arg0, s32 *arg1){ - D_80379E20[arg0].unk4 = 0x3C; - if(D_80379E20[arg0].unk0){ - *arg1 = D_80379E20[arg0].unk0; - return FALSE; - }else{ - D_80379E20[arg0].unk0 = func_8033A710(); - *arg1 = D_80379E20[arg0].unk0; - return TRUE; - } -} - -void func_80288470(void){ - int i; - for(i = 0; i < 340; i++){ - if(D_80379E20[i].unk6 == 1 && D_80379E20[i].unk0){ - D_80379E20[i].unk0 = func_8033A9E4(D_80379E20[i].unk0); - } - } -} diff --git a/src/core2/code_14420.c b/src/core2/code_14420.c index 4d04aa83..98e06cd1 100644 --- a/src/core2/code_14420.c +++ b/src/core2/code_14420.c @@ -889,7 +889,7 @@ void func_8029CBC4(void){ void func_8029CBF4(void){ if(item_getCount(ITEM_E_JIGGY) == 10){ if( jiggyscore_total() == 100 && fileProgressFlag_get(FILEPROG_FC_DEFEAT_GRUNTY)){ - timedFunc_set_3(4.1f, (GenMethod_3)func_802E4078, MAP_95_CS_END_ALL_100, 0, 1); + timedFunc_set_3(4.1f, (GenFunction_3)func_802E4078, MAP_95_CS_END_ALL_100, 0, 1); }//L8029CC58 timedFunc_set_0(4.0f, func_8029CBC4); diff --git a/src/core2/code_1550.c b/src/core2/code_1550.c index 6e79577b..2cdb5de2 100644 --- a/src/core2/code_1550.c +++ b/src/core2/code_1550.c @@ -4,13 +4,13 @@ #include "animation.h" -AnimationFile *animcache_get(enum asset_e assest_id); +AnimationFile *animBinCache_get(enum asset_e assest_id); /* .data */ s16 D_803635C0[] = {0x1, 0x3, 0x5, 0xC, 0xE, 0x17, 0x18, 0x19, 0x1A, 0x1C, 0x1D, 0}; /* .bss */ -AnimationCache D_8037A8C0[0x2CA]; +AnimationFileCache D_8037A8C0[0x2CA]; /* .code */ void func_802884E0(void){ @@ -22,16 +22,16 @@ void func_802884E0(void){ } } -void animcache_loadAll(void){ +void animBinCache_loadAll(void){ s32 i; for(i = 0; i < 0x2CA; i++){ if(D_8037A8C0[i].unk4_0){ - animcache_get(i); + animBinCache_get(i); } } } -AnimationFile *animcache_get(enum asset_e asset_id){ +AnimationFile *animBinCache_get(enum asset_e asset_id){ if(!D_8037A8C0[asset_id].unk0){ D_8037A8C0[asset_id].unk0 = (AnimationFile *) assetcache_get(asset_id); } @@ -39,7 +39,7 @@ AnimationFile *animcache_get(enum asset_e asset_id){ return D_8037A8C0[asset_id].unk0; } -void animcache_free(void){ +void animBinCache_free(void){ s32 i; for(i = 0; i < 0x2CA; i++){ if(D_8037A8C0[i].unk0){ @@ -48,7 +48,7 @@ void animcache_free(void){ } } -void animcache_init(void){ +void animBinCache_init(void){ s32 i = 0; for(i = 0; i < 0x2CA; i++){ D_8037A8C0[i].unk0 = NULL; @@ -56,7 +56,7 @@ void animcache_init(void){ D_8037A8C0[i].unk4_0 = 0; } func_802884E0(); - animcache_loadAll(); + animBinCache_loadAll(); } void func_8028873C(s32 arg0){ diff --git a/src/core2/code_2240.c b/src/core2/code_2240.c index 420ee9be..8e43c8af 100644 --- a/src/core2/code_2240.c +++ b/src/core2/code_2240.c @@ -6,116 +6,117 @@ //function declarations void anim_setIndex(Animation *this, enum asset_e arg1); -s32 anim_802897A0(Animation *this); -s32 func_802892FC(Animation *this); -void func_8033AA50(s32, f32, s32); -void func_8033A750(s32, s32, s32, f32); +void anim_drawSetup(Animation *this); +void animationFile_getBoneTransformList(s32, f32, s32); +void boneTransformList_interpolate(s32, s32, s32, f32); //function definitions -void func_802891D0(Animation *this, s32 arg1){ +static void __anim_resetTransform(Animation *this, s32 arg1){ s32 *tmp; - if(func_80288400(this->unkA[arg1], &tmp) == 0){ - func_8033A510(tmp); + if(animCache_getBoneTransformList(this->animcache_index[arg1], &tmp) == 0){ + boneTransformList_reset(tmp); }; } -void func_8028920C(Animation *this){ - func_802891D0(this, this->unk8); +void __anim_resetCurrentTransform(Animation *this){ + __anim_resetTransform(this, this->unk8); } -void func_8028922C(Animation *this){ - func_802891D0(this, 2); +void __anim_resetTargetTransform(Animation *this){ + __anim_resetTransform(this, 2); } -s32 func_8028924C(Animation *this, s32 arg1){ - return func_80288374(this->unkA[arg1]); +s32 __anim_transformInUse(Animation *this, s32 arg1){ + return animCache_inUse(this->animcache_index[arg1]); } -s32 func_80289274(Animation *this){ - return func_8028924C(this, this->unk8); +s32 __anim_currentTransformInUse(Animation *this){ + return __anim_transformInUse(this, this->unk8); } -s32 func_80289294(Animation *this){ - return func_8028924C(this, (this->unk8 != 0)? 0: 1); +s32 __anim_startTransformInUse(Animation *this){ + return __anim_transformInUse(this, (this->unk8 != 0)? 0: 1); } -s32 func_802892CC(Animation *this, s32 arg1){ - s32 tmp; - func_80288400(this->unkA[arg1], &tmp); +BoneTransformList *anim_getTransform(Animation *this, s32 index){ + BoneTransformList *tmp; + animCache_getBoneTransformList(this->animcache_index[index], &tmp); return tmp; } -s32 func_802892FC(Animation *this){ - return func_802892CC(this, this->unk8); +BoneTransformList *animcache_getCurrentTransform(Animation *this){ + return anim_getTransform(this, this->unk8); } -s32 func_8028931C(Animation *this){ - return func_802892CC(this, (this->unk8 != 0)? 0: 1); +BoneTransformList *anim_getStartTransform(Animation *this){ + return anim_getTransform(this, (this->unk8 != 0)? 0: 1); } -s32 func_80289354(Animation *this){ - return func_802892CC(this, 2); +BoneTransformList *anim_getTargetTransform(Animation *this){ + return anim_getTransform(this, 2); } -void func_80289374(Animation *this){ - if(this->unk1C == 1 && func_80289274(this)){ - this->unk8 = (this->unk8)? 0 : 1; +void __anim_update_doubleBuffer(Animation *this){ + if(this->reset == 1 && __anim_currentTransformInUse(this)){ + this->unk8 = (this->unk8)? 0 : 1; //swap current transform and start transfrom } - this->unk1C = 0; - if( this->duration < 1.0f && func_80289294(this)){ - func_8033AA50(animcache_get(this->index), this->timer, func_802892FC(this)); - func_8033A750(func_802892FC(this), func_8028931C(this), func_802892FC(this), this->duration); + this->reset = 0; + if( this->duration < 1.0f && __anim_startTransformInUse(this)){ + animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, animcache_getCurrentTransform(this)); + boneTransformList_interpolate(animcache_getCurrentTransform(this), anim_getStartTransform(this), animcache_getCurrentTransform(this), this->duration); } else{ - func_8033AA50(animcache_get(this->index), this->timer, func_802892FC(this)); + animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, animcache_getCurrentTransform(this)); } } -void func_8028948C(Animation *this){ - if(this->unk1C == 1 && this->unk1E == 0){ - if(func_80289274(this)){ - this->unk8 = (this->unk8)? 0 : 1; - func_8028922C(this); +void __anim_update_tripleBuffer(Animation *this){ + if(this->reset == 1 && this->unk1E == 0){ + //smooth a current Xfrom become startXform + if(__anim_currentTransformInUse(this)){ + this->unk8 = (this->unk8)? 0 : 1;//swap current transform and start transfrom + __anim_resetTargetTransform(this); } } else{ - if(this->unk1C == 2) - func_8028920C(this); + //not smooth + if(this->reset == 2) + __anim_resetCurrentTransform(this); } - this->unk1C = 0; - if( this->duration < 1.0f && func_80289294(this) && !this->unk1E){ - func_8033AA50(animcache_get(this->index), this->timer, func_80289354(this)); - func_8033A750(func_802892FC(this), func_8028931C(this), func_80289354(this), this->duration); + this->reset = 0; + if( this->duration < 1.0f && __anim_startTransformInUse(this) && !this->unk1E){ + animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, anim_getTargetTransform(this)); + boneTransformList_interpolate(animcache_getCurrentTransform(this), anim_getStartTransform(this), anim_getTargetTransform(this), this->duration); } else{ - func_8033AA50(animcache_get(this->index), this->timer, func_802892FC(this)); + animationFile_getBoneTransformList(animBinCache_get(this->index), this->timer, animcache_getCurrentTransform(this)); if(this->unk1E && this->index) this->unk1E = 0; } } -void func_802895F8(Animation *this){ - if(this->unk1D == 1){ - func_8028948C(this); +void anim_update(Animation *this){ + if(this->triple_buffer == 1){ + __anim_update_tripleBuffer(this); } else{ - func_80289374(this); + __anim_update_doubleBuffer(this); } if(this->matrices){ - (*(this->matrices))(func_802892FC(this), this->unk4); + (*(this->matrices))(animcache_getCurrentTransform(this), this->unk4); } - anim_802897A0(this); + anim_drawSetup(this); } -void func_80289674(Animation *this){ - this->unk1C = 1; +void anim_resetSmooth(Animation *this){ + this->reset = 1; } -s32 func_80289680(void){ - return 0x20; +size_t anim_getSize(void){ + return sizeof(Animation); } enum asset_e anim_getIndex(Animation *this){ @@ -130,27 +131,27 @@ f32 anim_getDuration(Animation *this){ return this->duration; } -void func_802896A0(Animation *this){ - func_802883AC(this->unkA[0]); - func_802883AC(this->unkA[1]); - if(this->unk1D == 1){ - func_802883AC(this->unkA[2]); +void anim_release(Animation *this){ + animCache_release(this->animcache_index[0]); + animCache_release(this->animcache_index[1]); + if(this->triple_buffer == 1){ + animCache_release(this->animcache_index[2]); } } -void func_802896EC(Animation *this, s32 arg1){ - this->unk1D = arg1; +void anim_new(Animation *this, bool triple_buffer){ + this->triple_buffer = triple_buffer; anim_setIndex(this,0); anim_setTimer(this, 0.0f); anim_setDuration(this, 1.0f); anim_80289790(this, NULL); - this->unk1C = 0; + this->reset = 0; this->unk1E = 1; this->unk8 = 0; - this->unkA[0] = func_80288330(); - this->unkA[1] = func_80288330(); - if(this->unk1D == 1){ - this->unkA[2] = func_80288330(); + this->animcache_index[0] = animCache_getNew(); + this->animcache_index[1] = animCache_getNew(); + if(this->triple_buffer == 1){ + this->animcache_index[2] = animCache_getNew(); //target_bone_transform_list } } @@ -170,18 +171,18 @@ void anim_80289798(Animation *this, s32 arg1){ this->unk4 = arg1; } -s32 anim_802897A0(Animation *this){ - return func_8033A238(func_802892FC(this)); +void anim_drawSetup(Animation *this){ + modelRender_setBoneTransformList(animcache_getCurrentTransform(this)); } void anim_setDuration(Animation *this, f32 arg1){ this->duration = arg1; } -void anim_802897D4(Animation *this, BKAnimationList *arg0, Animation *dst){ - func_802EA1A8(this, arg0, func_802892FC(dst)); +void anim_802897D4(AnimMtxList *this, BKAnimationList *arg0, Animation *dst){ + animMtxList_setBoned(this, arg0, animcache_getCurrentTransform(dst)); } -void anim_8028980C(Animation *this){ - this->unk1C = 2; +void anim_resetNow(Animation *this){ + this->reset = 2; } diff --git a/src/core2/code_33F90.c b/src/core2/code_33F90.c index 29a3a49e..daa931d8 100644 --- a/src/core2/code_33F90.c +++ b/src/core2/code_33F90.c @@ -422,7 +422,7 @@ void func_802BAFE4(s32 arg0) { temp_f0 = func_802BAFA0(arg0, phi_s1); switch(D_803654B8[arg0][phi_s1 + 1]){ case -5: - timedFunc_set_6(temp_f0, (GenMethod_6) func_802BAF80, NULL); + timedFunc_set_6(temp_f0, (GenFunction_6) func_802BAF80, NULL); phi_s0++; break; diff --git a/src/core2/code_34790.c b/src/core2/code_34790.c index 9a1351d3..bc703d97 100644 --- a/src/core2/code_34790.c +++ b/src/core2/code_34790.c @@ -355,7 +355,7 @@ void func_802BC2CC(s32 arg0) { viewport_setPosition(D_8037D908); viewport_setRotation(D_8037D918); viewport_update(); - __spawnQueue_add_2((GenMethod_2)func_802BC2A0, reinterpret_cast(s32, sp24), reinterpret_cast(s32, sp20)); + __spawnQueue_add_2((GenFunction_2)func_802BC2A0, reinterpret_cast(s32, sp24), reinterpret_cast(s32, sp20)); if (ncCameraType == CAMERA_TYPE_2_DYNAMIC) { func_802BE720(); if (sp1C != 0x63) { diff --git a/src/core2/code_42CB0.c b/src/core2/code_42CB0.c index 14707abb..c72b9462 100644 --- a/src/core2/code_42CB0.c +++ b/src/core2/code_42CB0.c @@ -14,13 +14,13 @@ void chHoneycomb_update(Actor *this); /* .data */ ActorInfo D_80366C80 = { MARKER_53_EMPTY_HONEYCOMB, ACTOR_47_EMPTY_HONEYCOMB, ASSET_361_MODEL_EMPTY_HONEYCOMB, 0, NULL, - chHoneycomb_update, func_80326224, func_80325888, + chHoneycomb_update, func_80326224, actor_draw, 0, 0, 0.8f, 0 }; ActorInfo D_80366CA4 = { MARKER_55_HONEYCOMB, ACTOR_50_HONEYCOMB, ASSET_363_MODEL_HONEYCOMB, 0, NULL, - chHoneycomb_update, func_80326224, func_80325888, + chHoneycomb_update, func_80326224, actor_draw, 0, 0, 0.8f, 0 }; diff --git a/src/core2/code_43800.c b/src/core2/code_43800.c index afc28825..f83efc26 100644 --- a/src/core2/code_43800.c +++ b/src/core2/code_43800.c @@ -52,7 +52,7 @@ Actor *func_802CA7BC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ rotation[1] = this->yaw; rotation[2] = this->roll; sp44 = ml_map_f(sp54[1] - sp40, 0.0f, 300.0f, 0.43f, 0.28f); - modelRender_preDraw((GenMethod_1)func_802CA790, (s32)this); + modelRender_preDraw((GenFunction_1)func_802CA790, (s32)this); modelRender_draw(gfx, mtx, this->position, rotation, sp44, NULL, func_80330B1C(marker)); return this; } diff --git a/src/core2/code_43A40.c b/src/core2/code_43A40.c index fb541a40..f0d9ef38 100644 --- a/src/core2/code_43A40.c +++ b/src/core2/code_43A40.c @@ -10,21 +10,21 @@ void func_802CAB70(Actor *this); extern ActorInfo D_80366F20 = { 0x0D4, ACTOR_B_SHOCKSPRING_PAD, ASSET_489_MODEL_SHOCKSPRING_PAD, 0, NULL, - func_802CA9D0, func_80326224, func_80325888, + func_802CA9D0, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; extern ActorInfo D_80366F44 = { MARKER_45_FLIGHT_PAD, ACTOR_E4_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD, 0, NULL, - func_802CAA44, func_80326224, func_80325888, + func_802CAA44, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; extern ActorInfo D_80366F68 = { MARKER_261_FIGHT_FLIGHT_PAD, ACTOR_39F_FIGHT_FLIGHT_PAD, ASSET_48A_MODEL_FLIGHT_PAD, 0, NULL, - func_802CAB70, func_80326224, func_80325888, + func_802CAB70, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/core2/code_45310.c b/src/core2/code_45310.c index fe4e7a2f..379ace82 100644 --- a/src/core2/code_45310.c +++ b/src/core2/code_45310.c @@ -7,7 +7,6 @@ extern f32 func_802575BC(f32); extern f32 func_80309B24(f32[3]); extern void func_8030DBB4(u8, f32); extern void func_802CC340(Actor *, f32[3]); -extern void func_80335A8C(void *, s32); extern bool func_80320DB0(f32[3], f32, f32[3], u32); typedef struct { @@ -148,8 +147,8 @@ void func_802CC640(Actor *this, s32 next_state) { local = (ActorLocal_Core2_45310 *)&this->local; if (this->state == 0) { - func_80335924(this->unk148, 0xF9, 0.0f, 0.45f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0xF9, 0.0f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } this->state = next_state; local->unk36 = 0; @@ -160,8 +159,8 @@ void func_802CC640(Actor *this, s32 next_state) { } if (this->state == 2) { - func_80335924(this->unk148, 0xF9, 0.3f, 0.45f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0xF9, 0.3f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); for(phi_s0 = 0; phi_s0 < 10; phi_s0++){ sp54[0] = this->position[0]; sp54[1] = (f32) local->unk30[1]; @@ -190,8 +189,8 @@ void func_802CC640(Actor *this, s32 next_state) { if (this->state == 5) { func_8028F55C(1, this->marker); FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200); - func_80335924(this->unk148, 0xF9, 0.4f, 1.0f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0xF9, 0.4f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); timed_playSfx(0.8f, 0x3FC, randf2(0.97f, 1.05f), 32000); local->unk3A = 0; local->unk28 = 2.0f; @@ -206,8 +205,8 @@ void func_802CC640(Actor *this, s32 next_state) { this->marker->collidable = FALSE; this->unk10_1 = FALSE; FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200); - func_80335924(this->unk148, 0x110, 0.3f, 0.45f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x110, 0.3f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); local->unk36 = 0x3E8; local->unk3A = 0; } @@ -254,7 +253,7 @@ Actor *func_802CCA7C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { } else { this->alpha_124_19 = 0xff; } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_802CCBC8(Actor *this) { @@ -379,10 +378,10 @@ void func_802CCC5C(Actor *this) { if (this->state == 2) { local->unk3A = 1; } else if (this->state == 3) { - if (func_8033567C(this->unk148) != 0x10E) { - func_80335924(this->unk148, 0x10E, 0.2f, 0.75f); - func_80335A8C(this->unk148, 2); - } else if (0.575 <= func_80335684(this->unk148)) { + if (skeletalAnim_getAnimId(this->unk148) != 0x10E) { + skeletalAnim_set(this->unk148, 0x10E, 0.2f, 0.75f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); + } else if (0.575 <= skeletalAnim_getProgress(this->unk148)) { local->unk3A = 1; } } @@ -413,14 +412,14 @@ void func_802CCC5C(Actor *this) { sp9C = func_802575BC(local->unk4); ml_interpolate_vec3f(this->position, local->unk8, local->unk18, sp9C); this->yaw = local->unk14 + (sp9C * (local->unk24 - local->unk14)); - if ((func_8033567C(this->unk148) == 0x10E) && (func_80335794(this->unk148) > 0)) { - func_80335924(this->unk148, 0x10F, 0.1f, 0.45f); - func_80335A8C(this->unk148, 1); + if ((skeletalAnim_getAnimId(this->unk148) == 0x10E) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { + skeletalAnim_set(this->unk148, 0x10F, 0.1f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if( (local->unk3A == 0) - || ((func_8033567C(this->unk148) == 0x10F) && (0.7 <= local->unk4))) { - func_80335924(this->unk148, 0xF9, 0.3f, 0.45f); - func_80335A8C(this->unk148, 1); + || ((skeletalAnim_getAnimId(this->unk148) == 0x10F) && (0.7 <= local->unk4))) { + skeletalAnim_set(this->unk148, 0xF9, 0.3f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if (this->state == 3) { if (0.2 <= local->unk4) { @@ -490,7 +489,7 @@ void func_802CCC5C(Actor *this) { this->yaw += 10.0f * spB8; } if (this->state == 6) { - if (func_8033567C(this->unk148) == 0x110) { + if (skeletalAnim_getAnimId(this->unk148) == 0x110) { sp40[0] = this->position[0] - spC4[0]; sp40[1] = this->position[1] - spC4[1]; sp40[2] = this->position[2] - spC4[2]; @@ -503,12 +502,12 @@ void func_802CCC5C(Actor *this) { local->unk36 -= 3000.0f * spB8; if (this->position[1] < func_80309724(this->position)) { this->position[1] = func_80309724(this->position); - func_80335924(this->unk148, 0x111, 0.1f, 1.0f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x111, 0.1f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200); timed_playSfx(0.1f, SFX_66_BIRD_AUUGHH, 1.6f, 32000); } - } else if (func_80335794(this->unk148) > 0) { + } else if (skeletalAnim_getLoopCount(this->unk148) > 0) { spBC = 7; } } diff --git a/src/core2/code_4A6F0.c b/src/core2/code_4A6F0.c index 8a49a3b5..d0904dc0 100644 --- a/src/core2/code_4A6F0.c +++ b/src/core2/code_4A6F0.c @@ -489,7 +489,7 @@ Actor *chMumbo_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8033A45C(7, (this->unk60 == 1.0f)); func_8033A45C(8, (this->unk60 == 2.0f)); func_8033A45C(9, 0); - out = func_80325888(marker, gfx, mtx, vtx); + out = actor_draw(marker, gfx, mtx, vtx); if( marker->unk14_21 && out->state == 8){ if( actor_animationIsAt(out, 0.2f) || actor_animationIsAt(out, 0.28f) diff --git a/src/core2/code_4BD70.c b/src/core2/code_4BD70.c index 9135f532..6a9edc67 100644 --- a/src/core2/code_4BD70.c +++ b/src/core2/code_4BD70.c @@ -5,11 +5,11 @@ void chMumboSign_update(Actor *this); /* .data */ -ActorInfo D_80367530 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_368_5_MUMBO_TOKEN_SIGN, ASSET_301_MODEL_5_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80367554 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36B_10_MUMBO_TOKEN_SIGN, ASSET_302_MODEL_10_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80367578 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36A_15_MUMBO_TOKEN_SIGN, ASSET_303_MODEL_15_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8036759C = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_369_20_MUMBO_TOKEN_SIGN, ASSET_304_MODEL_20_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_803675C0 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36C_25_MUMBO_TOKEN_SIGN, ASSET_305_MODEL_25_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_80367530 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_368_5_MUMBO_TOKEN_SIGN, ASSET_301_MODEL_5_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80367554 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36B_10_MUMBO_TOKEN_SIGN, ASSET_302_MODEL_10_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80367578 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36A_15_MUMBO_TOKEN_SIGN, ASSET_303_MODEL_15_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8036759C = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_369_20_MUMBO_TOKEN_SIGN, ASSET_304_MODEL_20_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_803675C0 = { MARKER_1E9_MUMBO_COST_SIGN, ACTOR_36C_25_MUMBO_TOKEN_SIGN, ASSET_305_MODEL_25_MUMBO_TOKEN_SIGN, 0x0, 0x0, chMumboSign_update, func_80326224, actor_draw, 0, 0, 0.0f, 0}; void chMumboSign_update(Actor *this) { if (!this->unk16C_4) { diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index f203942c..9de5b232 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -82,22 +82,22 @@ ActorAnimationInfo D_803676B0[] = { {0x217, 0.3f} }; -ActorInfo D_80367760 = { 0x26E, 0x2D9, 0x3B4, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80367784 = { 0x26F, 0x2DA, 0x3B5, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_803677A8 = { MARKER_168_ICE_KEY, ACTOR_25D_ICE_KEY, ASSET_50C_MODEL_ICE_KEY, 0x1, NULL, func_802D4250, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_80367760 = { 0x26E, 0x2D9, 0x3B4, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80367784 = { 0x26F, 0x2DA, 0x3B5, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_803677A8 = { MARKER_168_ICE_KEY, ACTOR_25D_ICE_KEY, ASSET_50C_MODEL_ICE_KEY, 0x1, NULL, func_802D4250, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; ActorInfo D_803677CC = { 0x233, 0x23D, 0x4DD, 0x12, D_803676B0, func_802D4388, func_80326224, func_802D4588, 0, 0, 0.0f, 0}; ActorInfo D_803677F0 = { 0x16A, 0x242, 0x0, 0x0, NULL, func_802D4680, NULL, func_80325340, 0, 0, 0.0f, 0}; ActorInfo D_80367814 = { MARKER_169_SNS_EGG, ACTOR_25E_SNS_EGG, ASSET_50D_MODEL_SNS_EGG, 0x1, NULL, func_802D3FD4, NULL, func_802D41C4, 0, 0, 0.0f, 0}; ActorInfo D_80367838 = { 0x265, 0x2E4, 0x55A, 0x1, NULL, func_802D3DA4, NULL, func_802D3F48, 0, 0, 0.0f, 0}; -ActorInfo D_8036785C = { MARKER_103_MM_WITCH_SWITCH, ACTOR_204_MM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4B94, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80367880 = { MARKER_104_MMM_WITCH_SWITCH, ACTOR_206_MMM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C34, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_803678A4 = { MARKER_105_TTC_WITCH_SWITCH, ACTOR_208_TTC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C5C, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_803678C8 = { MARKER_106_RBB_WITCH_SWITCH, ACTOR_20B_RBB_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C84, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_803678EC = { MARKER_22A_CCW_WITCH_SWITCH, ACTOR_237_CCW_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CAC, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80367910 = { MARKER_22B_FP_WITCH_SWITCH, ACTOR_239_FP_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CD4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80367934 = { MARKER_166_CC_WITCH_SWITCH, ACTOR_25B_CC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BBC, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80367958 = { MARKER_162_BGS_WITCH_SWITCH, ACTOR_257_BGS_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BE4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_8036797C = { MARKER_161_GV_WITCH_SWITCH, ACTOR_256_GV_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C0C, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_8036785C = { MARKER_103_MM_WITCH_SWITCH, ACTOR_204_MM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4B94, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80367880 = { MARKER_104_MMM_WITCH_SWITCH, ACTOR_206_MMM_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C34, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_803678A4 = { MARKER_105_TTC_WITCH_SWITCH, ACTOR_208_TTC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C5C, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_803678C8 = { MARKER_106_RBB_WITCH_SWITCH, ACTOR_20B_RBB_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C84, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_803678EC = { MARKER_22A_CCW_WITCH_SWITCH, ACTOR_237_CCW_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CAC, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80367910 = { MARKER_22B_FP_WITCH_SWITCH, ACTOR_239_FP_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4CD4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80367934 = { MARKER_166_CC_WITCH_SWITCH, ACTOR_25B_CC_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BBC, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80367958 = { MARKER_162_BGS_WITCH_SWITCH, ACTOR_257_BGS_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4BE4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8036797C = { MARKER_161_GV_WITCH_SWITCH, ACTOR_256_GV_WITCH_SWITCH, ASSET_4DC_MODEL_WITCH_SWITCH, 0x1, D_803676B0, func_802D4C0C, func_80326224, actor_draw, 0, 0, 0.0f, 0}; s32 D_803679A0[4] = {0x87, 0x87, 0x87, 0xA0}; s16 D_803679B0[] = {0x5, 0x90, 0xA, 0x93, 0xF,0x92, 0x14, 0x91, 0x19, 0x94, -1}; @@ -400,7 +400,7 @@ Actor *func_802D3F48(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ for(i = 0; i < 9; i++){ func_8033A45C(i + 1, i+1 == phi_s2); } - return func_80325E78(marker, gfx, mtx, vtx); + return actor_drawFullDepth(marker, gfx, mtx, vtx); } void func_802D3FD4(Actor *this){ @@ -466,7 +466,7 @@ Actor *func_802D41C4(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(i+1, FALSE); } func_8033A45C(sp2C, TRUE); - return func_80325E78(marker, gfx, mtx, vtx); + return actor_drawFullDepth(marker, gfx, mtx, vtx); } void func_802D4250(Actor *this){ @@ -541,7 +541,7 @@ Actor *func_802D4588(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { phi_a1 = (marker_getActor(marker)->unk38_0) ? ((func_8023DB5C() & 4) != 0) ? 1 : 2 : 2; func_8033A45C(1, phi_a1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } bool func_802D4608(void){ @@ -554,7 +554,7 @@ void func_802D4614(enum map_e map_id){ D_803676AC = TRUE; func_8028F918(2); func_8025A788(COMUSIC_69_FF_WARP, 0.0f, 1.7f); - timedFunc_set_2(1.0f, (GenMethod_2) func_8031CC40, map_id, 2); + timedFunc_set_2(1.0f, (GenFunction_2) func_8031CC40, map_id, 2); } void func_802D4680(Actor *this){ @@ -744,7 +744,7 @@ void func_802D4D3C(enum actor_e arg0, enum actor_e arg1) { func_8030E6D4(SFX_1B_EXPLOSION_1); } else{ - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, sp5C[0]), reinterpret_cast(s32, sp5C[1]), reinterpret_cast(s32, sp5C[2]) @@ -775,7 +775,7 @@ void func_802D5058(enum map_e map_id, s32 arg1, bool arg2) { D_8036769C = 0; D_803676A0 = 0; if (map_id != D_80367694) { - timedFunc_set_1(0.25f, (GenMethod_1)func_802D5000, map_id); + timedFunc_set_1(0.25f, (GenFunction_1)func_802D5000, map_id); } else { timedFunc_set_0(0.25f, func_802D63D4); } @@ -913,21 +913,21 @@ void func_802D5628(void){ switch(D_8036768C){ case 0x1: // L802D57C8 if(!D_80367690){ - timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x34, 0x205); + timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x34, 0x205); D_80367690++; } break; case 0x2: // L802D5808 if(!D_80367690){ - timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x39, 0x207); + timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x39, 0x207); D_80367690++; } break; case 0x3: // L802D5848 if(!D_80367690){ - timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x36, 0x20a); + timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x36, 0x20a); D_80367690++; } break; @@ -935,14 +935,14 @@ void func_802D5628(void){ case 0x4: // L802D5888 func_802D5260(); if(!D_80367690){ - timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x3b, 0x20c); + timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x3b, 0x20c); D_80367690++; } break; case 0x12: // L802D58D0 if(!D_80367690){ - timedFunc_set_2(0.4f, (GenMethod_2) func_802D4D3C, 0x3c, 0x238); + timedFunc_set_2(0.4f, (GenFunction_2) func_802D4D3C, 0x3c, 0x238); D_80367690++; } break; @@ -1141,7 +1141,7 @@ void func_802D6264(f32 delay, enum map_e map_id, s32 arg2, s32 arg3, s32 arg4, e D_803676A0 = 0; if(map_id != D_80367694){ - timedFunc_set_1(delay, (GenMethod_1) func_802D61FC, map_id); + timedFunc_set_1(delay, (GenFunction_1) func_802D61FC, map_id); } else{ timedFunc_set_0(delay, func_802D63D4); diff --git a/src/core2/code_509D0.c b/src/core2/code_509D0.c index 40e888d6..fa476cba 100644 --- a/src/core2/code_509D0.c +++ b/src/core2/code_509D0.c @@ -21,35 +21,35 @@ ActorAnimationInfo D_80367B50[] = { ActorInfo D_80367B80 = { MARKER_36_ORANGE_COLLECTIBLE, ACTOR_29_ORANGE_COLLECTIBLE, ASSET_2D2_MODEL_ORANGE, 0x5, NULL, - chLevelCollectible_update, func_80326224, func_80325888, + chLevelCollectible_update, func_80326224, actor_draw, 0, 0, 0.6f,0 }; ActorInfo D_80367BA4 = { MARKER_37_GOLD_BULLION, ACTOR_2A_GOLD_BULLION, ASSET_3C7_MODEL_GOLD_BULLION, 0x5, NULL, - chLevelCollectible_update, func_80326224, func_80325888, + chLevelCollectible_update, func_80326224, actor_draw, 0, 0, 0.6f, 0 }; ActorInfo D_80367BC8 = { MARKER_1FD_BLUE_PRESENT_COLLECTIBLE, ACTOR_1ED_BLUE_PRESENT_COLLECTIBLE, ASSET_47F_MODEL_XMAS_GIFT_BLUE, 0x5, D_80367B50, - chLevelCollectible_update, func_80326224, func_80325888, + chLevelCollectible_update, func_80326224, actor_draw, 0, 0, 1.8f, 0 }; ActorInfo D_80367BEC = { MARKER_1FE_GREEN_PRESENT_COLLECTIBLE, ACTOR_1EF_GREEN_PRESENT_COLLECTIBLE, ASSET_480_MODEL_XMAS_GIFT_GREEN, 0x5, D_80367B50, - chLevelCollectible_update, func_80326224, func_80325888, + chLevelCollectible_update, func_80326224, actor_draw, 0, 0, 1.4f, 0 }; ActorInfo D_80367C10 = { MARKER_1FF_RED_PRESENT_COLLECTIBLE, ACTOR_1F1_RED_PRESENT_COLLECTIBLE, ASSET_481_MODEL_XMAS_GIFT_RED, 0x5, D_80367B50, - chLevelCollectible_update, func_80326224, func_80325888, + chLevelCollectible_update, func_80326224, actor_draw, 0, 0, 1.4f, 0 }; @@ -145,7 +145,7 @@ void __chLevelCollectible_collide(ActorMarker *marker, ActorMarker *other_marker break; } if (dialog_id != 0) { - timedFunc_set_1(0.5f, (GenMethod_1)__chLevelCollectible_callDialog, dialog_id); + timedFunc_set_1(0.5f, (GenFunction_1)__chLevelCollectible_callDialog, dialog_id); } func_8028F030(this->modelCacheIndex); marker_despawn(marker); diff --git a/src/core2/code_51950.c b/src/core2/code_51950.c index 883cc315..f9c2bd63 100644 --- a/src/core2/code_51950.c +++ b/src/core2/code_51950.c @@ -89,5 +89,5 @@ void func_802D8B20(enum actor_e actor_id){ } void func_802D8BE4(bool gold_feather){ - __spawnQueue_add_1((GenMethod_1)func_802D8B20, (!gold_feather) ? 0x1FF : 0x200); + __spawnQueue_add_1((GenFunction_1)func_802D8B20, (!gold_feather) ? 0x1FF : 0x200); } diff --git a/src/core2/code_55390.c b/src/core2/code_55390.c index 4e25999d..7106828c 100644 --- a/src/core2/code_55390.c +++ b/src/core2/code_55390.c @@ -3,7 +3,7 @@ #include "variables.h" -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); Actor *func_802DC320(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_802DC45C(Actor *this); @@ -29,8 +29,8 @@ Actor *func_802DC320(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ f32 sp34[3]; this = marker_getActor(marker); - modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); func_8024E258(); vp_position[0] = 0.0f; vp_position[1] = 0.0f; diff --git a/src/core2/code_55850.c b/src/core2/code_55850.c index 84e1c57f..f234651c 100644 --- a/src/core2/code_55850.c +++ b/src/core2/code_55850.c @@ -2,7 +2,7 @@ #include "functions.h" #include "variables.h" -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); Actor *func_802DC7E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_802DC900(Actor *this); @@ -28,8 +28,8 @@ Actor *func_802DC7E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ f32 sp34[3]; this = marker_getActor(marker); - modelRender_preDraw( (GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); func_8024E258(); sp58[0] = 0.0f; sp58[1] = 0.0f; diff --git a/src/core2/code_57C70.c b/src/core2/code_57C70.c index 9d839a2e..de3b0dc1 100644 --- a/src/core2/code_57C70.c +++ b/src/core2/code_57C70.c @@ -2,7 +2,7 @@ #include "functions.h" #include "variables.h" -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); extern void chBottlesBonus_func_802DD080(Gfx **, Mtx **); extern void func_80311714(s32); @@ -65,8 +65,8 @@ Actor *func_802DEC00(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ gDPSetColorDither((*gfx)++, G_CD_DISABLE); func_80253190(gfx); gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp48)); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gfx, mtx, this->position, NULL, 4.5f, sp4C, func_80330B1C(marker)); gDPSetTextureFilter((*gfx)++, G_TF_BILERP); gDPSetColorDither((*gfx)++, G_CD_MAGICSQ); diff --git a/src/core2/code_581D0.c b/src/core2/code_581D0.c index 19cff21e..ed008aee 100644 --- a/src/core2/code_581D0.c +++ b/src/core2/code_581D0.c @@ -2,7 +2,7 @@ #include "functions.h" #include "variables.h" -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); void func_802DF2C4(Actor *this); @@ -31,8 +31,8 @@ Actor *func_802DF160(Gfx **gfx, Mtx **mtx, Vtx **vtx) { modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); gDPSetTextureFilter((*gfx)++, G_TF_POINT); gSPSegment((*gfx)++, 0x04, osVirtualToPhysical(sp38)); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)D_8037E000); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)D_8037E000); modelRender_draw(gfx, mtx, &D_80368360, NULL, 1.0f, NULL, func_80330B1C(D_8037E000)); gDPSetTextureFilter((*gfx)++, G_TF_BILERP); return this; diff --git a/src/core2/code_59780.c b/src/core2/code_59780.c index d1059b9f..913cf71e 100644 --- a/src/core2/code_59780.c +++ b/src/core2/code_59780.c @@ -3,7 +3,7 @@ #include "variables.h" extern void func_802C71F0(Actor *); -extern void func_80325794(ActorMarker *); +extern void actor_postdrawMethod(ActorMarker *); Actor *func_802E0738(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_802E07E0(Actor *this); @@ -18,7 +18,7 @@ ActorAnimationInfo D_80368440[] = { ActorInfo D_80368450 = { MARKER_72_FIRE_SPARKLE, ACTOR_A2_FIRE_SPARKLE, ASSET_3AD_FIRE_SPARKLE, 0x1, D_80368440, - func_802E08F0, func_80326224, func_80325888, + func_802E08F0, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; @@ -80,7 +80,7 @@ ActorInfo D_80368570 = { /* .code */ void func_802E0710(Actor *this){ - func_803253A0(this); + actor_predrawMethod(this); func_80361E9C(this); } @@ -89,8 +89,8 @@ Actor *func_802E0738(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ Actor *this; this = marker_getActorAndRotation(marker, &sp34); - modelRender_preDraw( (GenMethod_1)func_802E0710, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw( (GenFunction_1)func_802E0710, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gfx, mtx, this->position, sp34, this->scale, NULL, func_80330B1C(marker)); return this; } diff --git a/src/core2/code_59D40.c b/src/core2/code_59D40.c index da6fd39d..304c9856 100644 --- a/src/core2/code_59D40.c +++ b/src/core2/code_59D40.c @@ -33,7 +33,7 @@ ActorAnimationInfo D_803685D0[] ={ ActorInfo D_80368620 = { 0x14, 0x68, 0x3B0, 0x1, D_803685D0, - chsnacker_update, func_80326224, func_80325888, + chsnacker_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/core2/code_5C870.c b/src/core2/code_5C870.c index 32bbb7ce..15b277c3 100644 --- a/src/core2/code_5C870.c +++ b/src/core2/code_5C870.c @@ -363,13 +363,13 @@ void func_802E4170(void){ func_802F4F64(); timedFuncQueue_free(); func_802F9C48(); - func_8033A17C(); + modelRender_free(); func_80253420(); func_802E398C(0); func_8030AFD8(0); func_80321854(); func_8031FBF8(); - func_802880C0(); + animCache_free(); comusicPlayer_free(); func_8030D8DC(); } @@ -393,9 +393,9 @@ void func_802E4214(enum map_e map_id){ func_802F51B8(); func_802E5F38(); defragManager_init(); - func_8033A1A4(); + modelRender_init(); func_80253428(1); - func_80288070(); + animCache_init(); func_8024CCC4(); func_8024CE60(1.0f, 10000.0f); func_8034A6B4(); @@ -585,7 +585,7 @@ s32 game_defrag(void){ return NULL; glspline_defrag(); - func_80288470(); + animCache_defrag(); func_802F1320(); ncCameraNodeList_defrag(); modelRender_defrag(); diff --git a/src/core2/code_5FB00.c b/src/core2/code_5FB00.c index 2caba084..86e4951a 100644 --- a/src/core2/code_5FB00.c +++ b/src/core2/code_5FB00.c @@ -26,32 +26,32 @@ void func_802E6A90(BKModelUnk28List *arg0, BKVertexList *arg1, s32 arg2, f32 arg } } -void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, struct58s *arg2) { - Vtx *vtx_list; +void func_802E6BD0(BKModelUnk28List *arg0, BKVertexList *arg1, AnimMtxList *mtx_list) { + Vtx *vtx; Vtx *i_vtx; s32 i; - BKModelUnk28 *var_s1; + BKModelUnk28 *i_ptr; s16 sp50[3]; s32 temp_v0; - s32 var_s3; + s32 mtx_index; s32 var_s4; - vtx_list = vtxList_getVertices(arg1); - var_s1 = (BKModelUnk28 *)(arg0 + 1); - var_s3 = -2; + vtx = vtxList_getVertices(arg1); + i_ptr = (BKModelUnk28 *)(arg0 + 1); + mtx_index = -2; for(var_s4 = 0; var_s4 < arg0->count; var_s4++){ - if (var_s3 != var_s1->unk6) { - var_s3 = var_s1->unk6; - func_80251BCC(func_802EA110(arg2, var_s3)); + if (mtx_index != i_ptr->anim_index) { + mtx_index = i_ptr->anim_index; + mlMtxSet(animMtxList_get(mtx_list, mtx_index)); } - mlMtx_apply_vec3s(sp50, var_s1->unk0); - for(i = 0; i < var_s1->vtx_count; i++){ - i_vtx = &vtx_list[var_s1->vtx_list[i]]; + mlMtx_apply_vec3s(sp50, i_ptr->coord); + for(i = 0; i < i_ptr->vtx_count; i++){ + i_vtx = &vtx[i_ptr->vtx_list[i]]; i_vtx->v.ob[0] = sp50[0]; i_vtx->v.ob[1] = sp50[1]; i_vtx->v.ob[2] = sp50[2]; } - var_s1 = (BKModelUnk28 *)((s16*)(var_s1 + 1) + (var_s1->vtx_count - 1)); + i_ptr = (BKModelUnk28 *)((s16*)(i_ptr + 1) + (i_ptr->vtx_count - 1)); } - osWritebackDCache(vtx_list, vtxList_getVtxCount(arg1) * sizeof(Vtx)); + osWritebackDCache(vtx, vtxList_getVtxCount(arg1) * sizeof(Vtx)); } diff --git a/src/core2/code_630D0.c b/src/core2/code_630D0.c index 5cbe9df2..f8b1279d 100644 --- a/src/core2/code_630D0.c +++ b/src/core2/code_630D0.c @@ -1,28 +1,29 @@ #include #include "functions.h" #include "variables.h" +#include "animation.h" -void func_802EA060(struct58s **arg0, BKAnimationList *anim_list){ - struct58s * sp24; +void animMtxList_setBoneless(AnimMtxList **this_ptr, BKAnimationList *anim_list){ + AnimMtxList * this; Mtx *end_ptr; Mtx *i_ptr; - sp24 = *arg0; - if(sp24->capacity_44 < anim_list->cnt_4){ - sp24 = (struct58s *)realloc(sp24, anim_list->cnt_4 * sizeof(Mtx) + sizeof(struct58s)); - sp24->capacity_44 = anim_list->cnt_4; - (*arg0) = sp24; + this = *this_ptr; + if(this->capacity_44 < anim_list->cnt_4){ + this = (AnimMtxList *)realloc(this, anim_list->cnt_4 * sizeof(Mtx) + sizeof(AnimMtxList)); + this->capacity_44 = anim_list->cnt_4; + (*this_ptr) = this; } - sp24->size_40 = anim_list->cnt_4; - end_ptr = (Mtx *)(sp24->size_40*sizeof(Mtx) + (s32)sp24 +sizeof(struct58s)); + this->size_40 = anim_list->cnt_4; + end_ptr = (Mtx *)(this->size_40*sizeof(Mtx) + (s32)this +sizeof(AnimMtxList)); mlMtxIdent(); - for(i_ptr = sp24->data; i_ptr < end_ptr; i_ptr++){ + for(i_ptr = this->data; i_ptr < end_ptr; i_ptr++){ mlMtxGet(i_ptr); } } -Mtx *func_802EA110(struct58s *this, s32 arg1){ +Mtx *animMtxList_get(AnimMtxList *this, s32 arg1){ if (arg1 == -1){ return &this->mtx_0; } @@ -30,12 +31,12 @@ Mtx *func_802EA110(struct58s *this, s32 arg1){ } -void func_802EA134(struct58s *this){ +void animMtxList_free(AnimMtxList *this){ free(this); } -struct58s *func_802EA154(void){ - struct58s *this = malloc(sizeof(struct58s)); +AnimMtxList *animMtxList_new(void){ + AnimMtxList *this = malloc(sizeof(AnimMtxList)); this->size_40 = 0; this->capacity_44 = 0; mlMtxIdent(); @@ -43,17 +44,17 @@ struct58s *func_802EA154(void){ return this; } -s32 func_802EA190(struct58s* this){ +s32 animMtxList_len(AnimMtxList* this){ if(this) return this->size_40; return 1; } -void func_80251BCC(Mtx*); -void func_8033A5B8(s32, s32, f32[3],f32[3], f32[3]); +void mlMtxSet(Mtx*); +void func_8033A5B8(s32, s32, f32[4],f32[3], f32[3]); -void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){ - struct58s * this; +void animMtxList_setBoned(AnimMtxList **this_ptr, BKAnimationList *anim_list, BoneTransformList *arg2){ + AnimMtxList * this; Mtx *start_ptr; Mtx *end_ptr; Mtx *i_ptr; @@ -61,18 +62,18 @@ void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){ f32 tmp_f0; s32 pad94[1]; f32 sp88[3]; - s32 pad80[2]; - f32 sp74[3]; + s32 pad80[1]; + f32 sp74[4]; f32 sp68[3]; f32 sp5C[3]; s32 sp50[3]; //resize animation matrices - this = *arg0; + this = *this_ptr; if(this->capacity_44 < anim_list->cnt_4){ - this = (struct58s *)realloc(this, anim_list->cnt_4 * sizeof(Mtx) + sizeof(struct58s)); + this = (AnimMtxList *)realloc(this, anim_list->cnt_4 * sizeof(Mtx) + sizeof(AnimMtxList)); this->capacity_44 = anim_list->cnt_4; - (*arg0) = this; + (*this_ptr) = this; } this->size_40 = anim_list->cnt_4; @@ -80,15 +81,15 @@ void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){ end_ptr = &start_ptr[this->size_40]; s0 = anim_list->anim; for(i_ptr = start_ptr; i_ptr < end_ptr; s0++, i_ptr++){ - func_8033A5B8(arg2, s0->unkC, sp74, sp68, sp5C); - if(s0->unkE == -1) + func_8033A5B8(arg2, s0->bone_id, sp74, sp68, sp5C); + if(s0->mtx_id == -1) mlMtxIdent(); - else if(s0->unkE + 1 != i_ptr - start_ptr) - func_80251BCC(&start_ptr[s0->unkE]); + else if(s0->mtx_id + 1 != i_ptr - start_ptr) + mlMtxSet(&start_ptr[s0->mtx_id]); tmp_f0 = anim_list->unk0; mlMtxTranslate(s0->unk0[0] + tmp_f0*sp5C[0], s0->unk0[1] + tmp_f0*sp5C[1], s0->unk0[2] + tmp_f0*sp5C[2] ); - if(!func_80345434(sp74)){ + if(!vec4f_isZero(sp74)){ func_80345274(sp74, sp88); func_802515D4(sp88); } @@ -99,6 +100,6 @@ void func_802EA1A8(struct58s **arg0, BKAnimationList *anim_list, s32 arg2){ } } -struct58s *func_802EA374(struct58s *this){ +AnimMtxList *animMtxList_defrag(AnimMtxList *this){ return defrag(this); } diff --git a/src/core2/code_637D0.c b/src/core2/code_637D0.c index 085ad027..5d730a15 100644 --- a/src/core2/code_637D0.c +++ b/src/core2/code_637D0.c @@ -153,7 +153,7 @@ s32 func_802EAD5C(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 return 0; } -s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, struct58s *arg5, f32 arg6[3], f32 arg7) { +s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 scale, s32 arg4, AnimMtxList *arg5, f32 arg6[3], f32 arg7) { f32 spF4[3]; f32 spE8[3]; f32 spDC[3]; @@ -191,7 +191,7 @@ s32 func_802EAED4(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 spD0[0] *= 2; spD0[1] *= 2; spD0[2] *= 2; - func_802519C8(&D_80380880, func_802EA110(arg5, i_ptr->unk16)); + func_802519C8(&D_80380880, animMtxList_get(arg5, i_ptr->unk16)); func_80252E4C(spF4, spD0); func_802524F0(spB0, spE8[0], spE8[1], spE8[2]); func_802524F0(sp98, spE8[0], spE8[1], spDC[2]); @@ -270,7 +270,7 @@ s32 func_802EB458(BKModelUnk14List *arg0, f32 position[3], f32 rotation[3], f32 spAC[0] = (f32) (i_ptr->unkA[0] * 2); spAC[1] = (f32) (i_ptr->unkA[1] * 2); spAC[2] = (f32) (i_ptr->unkA[2] * 2); - func_802519C8(&D_80380880, func_802EA110(arg5, i_ptr->unkE)); + func_802519C8(&D_80380880, animMtxList_get(arg5, i_ptr->unkE)); func_80252D8C(spB8, spAC); func_802524F0(sp98, 0.0f, 0.0f, (f32) ((-i_ptr->unk2) / 2)); func_802524F0(sp8C, 0.0f, 0.0f, (f32) (i_ptr->unk2 / 2)); @@ -339,7 +339,7 @@ s32 func_802EB8A0(BKModelUnk14List *arg0, f32 *position, f32 *rotation, f32 scal sp5C[0] = sp68[0] + (f32) i_ptr->unk0; sp5C[1] = sp68[1]; sp5C[2] = sp68[2]; - func_80251BCC(func_802EA110(arg5, i_ptr->unk9)); + mlMtxSet(animMtxList_get(arg5, i_ptr->unk9)); func_8025235C(sp68, sp68); func_8025235C(sp5C, sp5C); sp44[0] = sp5C[0] - sp68[0]; diff --git a/src/core2/code_6B030.c b/src/core2/code_6B030.c index ac530c4b..43dfdd6c 100644 --- a/src/core2/code_6B030.c +++ b/src/core2/code_6B030.c @@ -71,7 +71,7 @@ void func_802F1FC0(Struct65s *self, Gfx **gfx, Mtx **mtx, Vtx **vtx) { spD0[0] = self->unk0[0] - spDC[0]; spD0[1] = self->unk0[1] - spDC[1]; spD0[2] = self->unk0[2] - spDC[2]; - func_80251BCC(func_8024DD90()); + mlMtxSet(func_8024DD90()); func_80252330(spD0[0], spD0[1], spD0[2]); mlMtxApply(*mtx); gSPMatrix((*gfx)++, OS_K0_TO_PHYSICAL((*mtx)++), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -79,7 +79,7 @@ void func_802F1FC0(Struct65s *self, Gfx **gfx, Mtx **mtx, Vtx **vtx) { temp_f2 = D_80380A10[self->unk26] * (self->unk25 / 255.0f); spBC = (s32) ((f32)self->unk20 * (1.0f + temp_f2)); temp_s5 = (s32) ((f32)self->unk20 * ((1.0f - (self->unk25 / 255.0f)) + ((self->unk25 / 255.0f) - temp_f2))); - func_80251BCC(&D_80380A18); + mlMtxSet(&D_80380A18); func_8025235C(spD0, spD0); spD0[0] = (-297.0f * spD0[0]) / spD0[2]; spD0[1] = (297.0f * spD0[1]) / spD0[2]; diff --git a/src/core2/code_6B30.c b/src/core2/code_6B30.c index d70fa9e2..cbdaec95 100644 --- a/src/core2/code_6B30.c +++ b/src/core2/code_6B30.c @@ -133,7 +133,7 @@ void func_8028DE6C(enum actor_e actor_id){ func_802948F8(marker); } else{ - __spawnQueue_add_1((GenMethod_1)func_8028DE0C, baMarker_getCarriedObjectActorId()); + __spawnQueue_add_1((GenFunction_1)func_8028DE0C, baMarker_getCarriedObjectActorId()); } } diff --git a/src/core2/code_935F0.c b/src/core2/code_935F0.c index 0495d645..6342de71 100644 --- a/src/core2/code_935F0.c +++ b/src/core2/code_935F0.c @@ -139,7 +139,7 @@ void __chMinigame_setState(Actor *this, u32 arg1) { func_8025A70C((func_803203FC(5)) ? COMUSIC_3B_MINIGAME_VICTORY : COMUSIC_3C_MINIGAME_LOSS); func_802E4A70(); func_803204E4(0x21, TRUE); - timedFunc_set_3(2.0f, (GenMethod_3)func_802E4078, MAP_8E_GL_FURNACE_FUN, 1, 1); + timedFunc_set_3(2.0f, (GenFunction_3)func_802E4078, MAP_8E_GL_FURNACE_FUN, 1, 1); break; } func_80328A84(this, arg1); diff --git a/src/core2/code_956B0.c b/src/core2/code_956B0.c index b00aa834..1aaf0a7c 100644 --- a/src/core2/code_956B0.c +++ b/src/core2/code_956B0.c @@ -63,8 +63,8 @@ bool func_8031C6E4(void) { if (!mapSpecificFlags_get(0xC)) { mapSpecificFlags_set(0xC, TRUE); func_802DC528(0, 0); - timedFunc_set_2(11.0f, (GenMethod_2)func_802DC560, 0, 0); - timedFunc_set_3(12.0f, (GenMethod_3)func_802E4078, MAP_1F_CS_START_RAREWARE, 0, 1); + timedFunc_set_2(11.0f, (GenFunction_2)func_802DC560, 0, 0); + timedFunc_set_3(12.0f, (GenFunction_3)func_802E4078, MAP_1F_CS_START_RAREWARE, 0, 1); } else { timedFuncQueue_flush(); } diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index cd7e08c5..097e7ae9 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -21,9 +21,9 @@ f32 player_getYaw(void); extern void func_8032FFF4(ActorMarker *, ActorMarker *, s32); extern void func_802C9334(s32, Actor *); extern void func_8032B3A0(Actor *, ActorMarker *); -extern void func_8032EE0C(GenMethod_2, s32); +extern void func_8032EE0C(GenFunction_2, s32); extern void func_8032EE20(void); -extern void __spawnQueue_add_5(GenMethod_5, s32, s32, s32, s32, s32); +extern void __spawnQueue_add_5(GenFunction_5, s32, s32, s32, s32, s32); void func_8032A6A8(Actor *arg0); @@ -84,7 +84,7 @@ Actor *func_80325340(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ return NULL; } -void func_803253A0(Actor *this){ +void actor_predrawMethod(Actor *this){ s32 pad4C; BKModelBin *sp48; bool sp44; @@ -94,13 +94,13 @@ void func_803253A0(Actor *this){ sp48 = func_80330B1C(this->marker); func_80330534(this); if(this->animctrl != NULL){ - func_8028781C(this->animctrl, this->position, 1); + animctrl_drawSetup(this->animctrl, this->position, 1); } if(this->marker->unk20 != NULL){ sp44 = FALSE; if(this->unk148 != NULL){ - func_802EA1A8(&this->marker->unk20, model_getAnimationList(sp48), func_803356A0(this->unk148)); + animMtxList_setBoned(&this->marker->unk20, model_getAnimationList(sp48), skeletalAnim_getBoneTransformList(this->unk148)); sp44 = TRUE; }//L8032542C else if(this->animctrl != NULL && model_getAnimationList(sp48)){ @@ -144,7 +144,7 @@ void func_803253A0(Actor *this){ } if(this->unk148 && !this->marker->unk20){ - func_8033A238(func_803356A0(this->unk148)); + modelRender_setBoneTransformList(skeletalAnim_getBoneTransformList(this->unk148)); } func_8033056C(this); @@ -186,7 +186,7 @@ void func_80325760(Actor *this) { func_8033A45C(2, 4); } -void func_80325794(ActorMarker *marker){ +void actor_postdrawMethod(ActorMarker *marker){ marker->unk14_21 = TRUE; } @@ -212,13 +212,13 @@ bool func_803257B4(ActorMarker *marker) { } -Actor *func_80325888(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { +Actor *actor_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 sp3C[3]; Actor *this; this = marker_getActorAndRotation(marker, sp3C); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gfx, mtx, this->position, sp3C, this->scale, (this->unk104 != NULL) ? D_8036E580 : NULL, func_803257B4(marker)); return this; } @@ -333,14 +333,14 @@ Actor *func_80325CAC(ActorMarker *marker, Gfx **gfx, Gfx **mtx, Vtx **vtx) { return this; } -Actor *func_80325E78(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { +Actor *actor_drawFullDepth(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { f32 rotation[3]; Actor *this; this = marker_getActorAndRotation(marker, rotation); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); - modelRender_preDraw((GenMethod_1)func_803253A0, (s32)this); - modelRender_postDraw((GenMethod_1)func_80325794, (s32)marker); + modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)this); + modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker); modelRender_draw(gfx, mtx, this->position, rotation, this->scale, (this->unk104 != NULL) ? D_8036E580 : NULL, func_803257B4(marker)); return this; } @@ -348,7 +348,7 @@ Actor *func_80325E78(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { Actor *func_80325F2C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { func_8033A244(30000.0f); func_8033A280(2.0f); - return func_80325E78(marker, gfx, mtx, vtx); + return actor_drawFullDepth(marker, gfx, mtx, vtx); } void func_80325F84(Actor *this){} @@ -401,7 +401,7 @@ void func_80325FE8(Actor *this) { marker->unk48 = 0; } if (this->unk148 != NULL) { - func_80335874(this->unk148); + skeletalAnim_free(this->unk148); this->unk148 = NULL; } if (marker->unk50 != 0) { @@ -579,9 +579,9 @@ void func_803268B4(void) { } if (actor->unk148) { if (!actor->despawn_flag) { - func_80335A94(actor->unk148, time_getDelta(), marker->unk14_21); + skeletalAnim_update(actor->unk148, time_getDelta(), marker->unk14_21); } else { - func_80335924(actor->unk148, 0, 0.0f, 0.0f); + skeletalAnim_set(actor->unk148, 0, 0.0f, 0.0f); } } if ((actor_info->shadow_scale != 0.0f) && actor->unk124_6 && marker->unk14_21) { @@ -941,7 +941,7 @@ Actor *actor_new(s32 (* position)[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ D_80383390->unk148 = 0; if(flags & 0x800){ - D_80383390->unk148 = func_803358B4(); + D_80383390->unk148 = skeletalAnim_new(); } if(flags & 0x4000){ @@ -2013,7 +2013,7 @@ void func_8032AB84(Actor *arg0) { } if (marker->unk20 == NULL && arg0->unk3C & 0x20) { - marker->unk20 = func_802EA154(); + marker->unk20 = animMtxList_new(); } } @@ -2039,7 +2039,7 @@ void func_8032ACA8(Actor *arg0) { } if (sp30->unk20 != NULL) { - func_802EA134(sp30->unk20); + animMtxList_free(sp30->unk20); sp30->unk20 = 0; } } @@ -2116,11 +2116,11 @@ void actorArray_defrag(void) { } if (i_actor->marker->unk20 != NULL) { - i_actor->marker->unk20 = func_802EA374(i_actor->marker->unk20); + i_actor->marker->unk20 = animMtxList_defrag(i_actor->marker->unk20); } if (i_actor->unk148 != NULL) { - i_actor->unk148 = (Struct80s*)defrag(i_actor->unk148); + i_actor->unk148 = (SkeletalAnimation*)defrag(i_actor->unk148); } if (i_actor->marker->unk50 != NULL) { @@ -2169,12 +2169,12 @@ void func_8032B258(Actor *this, enum collision_e arg1) { func_8034A174( this->marker->unk44, 0x20, sp38); } if (((s32)this->marker->unk44 < 0) && ((sp38[0] != 0.0f) || (sp38[1] != 0.0f) || (sp38[2] != 0.0f))) { - __spawnQueue_add_5((GenMethod_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,sp38[0]), reinterpret_cast(s32,sp38[1]), reinterpret_cast(s32,sp38[2]), reinterpret_cast(s32,sp44)); + __spawnQueue_add_5((GenFunction_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,sp38[0]), reinterpret_cast(s32,sp38[1]), reinterpret_cast(s32,sp38[2]), reinterpret_cast(s32,sp44)); return; } else{ sp34 = this->position[1] + 50.0f; - __spawnQueue_add_5((GenMethod_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,this->position[0]), reinterpret_cast(s32,sp34), reinterpret_cast(s32,this->position[2]), reinterpret_cast(s32,sp44)); + __spawnQueue_add_5((GenFunction_5)func_802C4260, this->unk138_27 + 0x15, reinterpret_cast(s32,this->position[0]), reinterpret_cast(s32,sp34), reinterpret_cast(s32,this->position[2]), reinterpret_cast(s32,sp44)); } } } @@ -2290,15 +2290,15 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { } func_8032EE0C(func_8032B38C, this); if (((s32)arg0->unk44 < 0) && ((sp50[0] != 0.0f) || (sp50[1] != 0.0f) || (sp50[2] != 0.0f))) { - __spawnQueue_add_5((GenMethod_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C)); + __spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C)); } else if (this->unk16C_3 && func_803048E0(sp3C, &sp4C, &sp48, 3, (s32) (func_8033229C(arg0) * 4.0f))) { sp50[0] = (f32) sp48->x; sp50[1] = (f32) sp48->y; sp50[2] = (f32) sp48->z; - __spawnQueue_add_5((GenMethod_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C)); + __spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, sp5C)); } else { sp38 = this->position[1] + func_8033229C(arg0); - __spawnQueue_add_5((GenMethod_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, sp5C)); + __spawnQueue_add_5((GenFunction_5)func_802C4260, sp70 + 0x15, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, sp5C)); } func_8032EE20(); } diff --git a/src/core2/code_A5BC0.c b/src/core2/code_A5BC0.c index 52a7d759..c7601348 100644 --- a/src/core2/code_A5BC0.c +++ b/src/core2/code_A5BC0.c @@ -1476,7 +1476,7 @@ s32 func_80330974(ActorMarker *marker, s32 arg1, f32 arg2, s32 arg3) { rotation[2] = (f32)marker->roll; scale = (marker->unk3E_0) ? marker_getActor(marker)->scale : 1.0f; - if (func_802EA190(marker->unk20)) { + if (animMtxList_len(marker->unk20)) { return func_802EBAE0(sp58, position, rotation, scale, 0, marker->unk20, arg1, arg2, arg3); } return 0; diff --git a/src/core2/code_AD5B0.c b/src/core2/code_AD5B0.c index bbe7f627..9c4917bb 100644 --- a/src/core2/code_AD5B0.c +++ b/src/core2/code_AD5B0.c @@ -145,7 +145,7 @@ void func_80334910(void) { func_8033FA24(); func_80344C80(); func_80287D70(); - animcache_free(); + animBinCache_free(); func_802BC10C(); ncCameraNodeList_free(); func_802F1388(); @@ -184,7 +184,7 @@ void func_80334910(void) { func_80322FDC(); func_8033BD6C(); func_80255198();//heap_flush_free_queue - func_802881AC(); + animCache_flushAll(); } void func_80334B20(enum map_e arg0, s32 arg1, s32 arg2) { @@ -221,7 +221,7 @@ void func_80334B20(enum map_e arg0, s32 arg1, s32 arg2) { func_8031F9E8(); func_80323230(); commonParticleType_init(); - animcache_init(); + animBinCache_init(); func_80287C58(); func_80344C50(); func_8033F9C0(); @@ -327,7 +327,7 @@ s32 func_80334ECC(void) { } func_8033E1E0(); func_802F11E8(); - func_80288210(); + animCache_update(); func_80288834(); ncCamera_update(); func_803045D8(); diff --git a/src/core2/code_AE5D0.c b/src/core2/code_AE5D0.c deleted file mode 100644 index 415d4b5c..00000000 --- a/src/core2/code_AE5D0.c +++ /dev/null @@ -1,272 +0,0 @@ -#include -#include "functions.h" -#include "variables.h" - -#include "animation.h" - -extern void func_8033AA50(void *, f32, Struct_B1400_1 *); -extern void func_8033A750(s32, s32, Struct_B1400_1 *, f32); - -/* .code */ -void func_80335560(Struct80s *self){ - if(self->unk0 != NULL){ - func_8033A6F0(self->unk0); - self->unk0 = NULL; - } - - if(self->unk4 != NULL){ - assetcache_release(self->unk4); - self->unk4 = NULL; - } - - if(self->unk24 != NULL){ - func_8033A6F0(self->unk24); - self->unk24 = NULL; - } - - if(self->unk28 != NULL){ - func_8033A6F0(self->unk28); - self->unk28 = NULL; - } - - self->unk2C = 0.0f; -} - -void func_803355F8(Struct7Fs* arg0){ - if(arg0->unk4 == 0){ - ((void(*)(void))(arg0->unk8))(); - } - else if(arg0->unk4 == 1){ - ((void(*)(s32))(arg0->unk8))(arg0->unkC); - } -} - -void func_80335650(Struct80s *self){ - if(self->unk10 != NULL){ - vector_clear(self->unk10); - } -} - -enum asset_e func_8033567C(Struct80s *self){ - return self->unk16; -} - -f32 func_80335684(Struct80s *self){ - return self->unk8; -} - -void func_8033568C(Struct80s *self, f32 *arg1, f32 *arg2){ - *arg1 = self->unk1C; - *arg2 = self->unk8; -} - -s32 func_803356A0(Struct80s *self){ - self->unk14 = 0; - if(self->unk0 == 0){ - self->unk0 = func_8033A710(); - } - - if(self->unk30 != 0){ - self->unk30 = 0; - return self->unk0; - } - - if(self->unk16 == 0){ - return self->unk0; - } - - if(self->unk4 == NULL){ - self->unk4 = (AnimationFile *)assetcache_get(self->unk16); - } - - if(0.0f == self->unk2C){ - func_8033AA50(self->unk4, self->unk8, self->unk0); - return self->unk0; - } - - if(self->unk28 == 0){ - self->unk28 = (Struct_B1400_1 *) func_8033A710(); - } - func_8033AA50(self->unk4, self->unk8, self->unk28); - func_8033A750(self->unk0, self->unk24, self->unk28, self->unk20); - return self->unk0; -} - -s32 func_80335794(Struct80s *self){ - return self->unk18; -} - -void func_8033579C(Struct80s *self, f32 arg1, void(*arg2)(void)){ - Struct7Fs *ptr; - if(self->unk10 == NULL){ - self->unk10 = vector_new(sizeof(Struct7Fs), 8); - } - ptr = (Struct7Fs *)vector_pushBackNew(&self->unk10); - ptr->unk0 = arg1; - ptr->unk4 = 0; - ptr->unk8 = arg2; - ptr->unkC = 0; -} - -void func_80335800(Struct80s *self, f32 arg1, void(*arg2)(ActorMarker *), ActorMarker *arg3){ - Struct7Fs *ptr; - if(self->unk10 == NULL){ - self->unk10 = vector_new(sizeof(Struct7Fs), 8); - } - ptr = (Struct7Fs *)vector_pushBackNew(&self->unk10); - ptr->unk0 = arg1; - ptr->unk4 = 1; - ptr->unk8 = arg2; - ptr->unkC = arg3; -} - -void func_80335874(Struct80s *self){ - VLA * temp_a0; - func_80335560(self); - temp_a0 = self->unk10; - if(temp_a0 != NULL){ - vector_free(temp_a0); - } - free(self); -} - -Struct80s *func_803358B4(void){ - Struct80s *self; - - self = (Struct80s *)malloc(sizeof(Struct80s)); - self->unk0 = 0; - self->unk4 = NULL; - self->unk10 = 0; - self->unk14 = 0; - self->unk15 = 1; - self->unk18 = 0; - self->unk16 = 0; - self->unk30 = 0; - self->unk24 = 0; - self->unk28 = 0; - self->unk8 = 0.0f; - self->unkC = 0.0f; - self->unk1C = 0.0f; - self->unk20 = 0.0f; - self->unk2C = 0.0f; - - return self; -} - -void func_80335918(Struct80s *self){ - self->unk30 = 1; -} - -void func_80335924(Struct80s *self, enum asset_e anim_id, f32 arg2, f32 arg3){ - if(self->unk4 != NULL && anim_id != self->unk16){ - assetcache_release(self->unk4); - self->unk4 = NULL; - } - - if(self->unk10 != NULL && anim_id != self->unk16){ - vector_free(self->unk10); - self->unk10 = NULL; - } - - self->unk8 = 0.0f; - self->unkC = arg3; - self->unk18 = 0; - self->unk16 = anim_id; - self->unk1C = 0.0f; - self->unk20 = 0.0f; - self->unk2C = arg2; - if(0.0f < arg2){ - if(self->unk0 != 0 ){ - s32 tmp; - tmp = self->unk24; - self->unk24 = self->unk0; - self->unk0 = tmp; - if(self->unk28 != 0){ - func_8033A510(self->unk28); - } - } else { - self->unk2C = 0.0f; - } - } -} - -void func_80335A24(Struct80s *self, enum asset_e anim_id, f32 arg2, f32 arg3){ - f32 sp1C; - sp1C = func_80335684(self); - func_80335924(self, anim_id, arg2, arg3); - func_80335A74(self, sp1C); -} - -void func_80335A74(Struct80s *self, f32 arg1){ - self->unk8 = arg1; -} - -void func_80335A80(Struct80s *self, f32 arg1){ - self->unkC = arg1; -} - -void func_80335A8C(Struct80s *self, s32 arg1){ - self->unk15 = arg1; -} - -void func_80335A94(Struct80s *self, f32 arg1, s32 arg2) { - f32 pad2C; - Struct7Fs *begin_ptr; - Struct7Fs *end_ptr; - Struct7Fs *i_ptr; - - if (arg2 == 0) { - if (self->unk14 < 10) { - self->unk14++; - if (self->unk14 == 0xA) { - func_80335560(self); - } - } - } - if (self->unk16 != 0) { - self->unk1C = self->unk8; - if ( self->unkC > 0.0f) { - if (self->unk15 == 1) { - self->unk8 += arg1 / self->unkC; - while (self->unk8 >= 1.0f) { - self->unk8 -= 1.0f; - self->unk18++; - } - } else if ((self->unk15 == 2) && (self->unk18 == 0)) { - self->unk8 += (arg1 / self->unkC); - if (self->unk8 >= 1.0f) { - self->unk8 = 0.99999f; - self->unk18++; - } - } else if ((self->unk15 == 3) && (self->unk8 > 0.0f)) { - self->unk8 -= (arg1 / self->unkC); - if (self->unk8 < 0.0f) { - self->unk8 = 0.0f; - } - } - } - - if (self->unk10 != NULL) { - begin_ptr = vector_getBegin(self->unk10); - end_ptr = vector_getEnd(self->unk10); - for(i_ptr = begin_ptr; i_ptr < end_ptr; i_ptr++) { - if (((self->unk1C < i_ptr->unk0) || (self->unk8 < self->unk1C)) && ( i_ptr->unk0 <= self->unk8)) { - func_803355F8(i_ptr); - } - } - } - if (self->unk2C > 0.0f) { - if (self->unk20 < 1.0f) { - self->unk20 += arg1 / self->unk2C; - if (self->unk20 >= 1.0f) { - self->unk20 = 1.0f; - } - } else { - self->unk2C = 0.0f; - if (self->unk0 != 0) { - func_8033A510(self->unk0); - } - } - } - } -} diff --git a/src/core2/code_AEDA0.c b/src/core2/code_AEDA0.c index f27d90f6..bff463de 100644 --- a/src/core2/code_AEDA0.c +++ b/src/core2/code_AEDA0.c @@ -3,7 +3,7 @@ #include "variables.h" Mtx *func_8024DD9C(void); -void func_80251BCC(Mtx *); +void mlMtxSet(Mtx *); void func_80252330(f32, f32, f32); void mlMtxApply(Mtx *); void func_803382D8(s32 arg0); @@ -447,7 +447,7 @@ void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]) { sp20[0] = arg2[0] - sp2C[0]; sp20[1] = arg2[1] - sp2C[1]; sp20[2] = arg2[2] - sp2C[2]; - func_80251BCC(func_8024DD90()); + mlMtxSet(func_8024DD90()); func_80252330(sp20[0], sp20[1], sp20[2]); mlMtxApply(*mtx); gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -461,7 +461,7 @@ void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]) { sp20[0] = arg2[0] - sp2C[0]; sp20[1] = arg2[1] - sp2C[1]; sp20[2] = arg2[2] - sp2C[2]; - func_80251BCC(func_8024DD9C()); + mlMtxSet(func_8024DD9C()); func_80252330(sp20[0], sp20[1], sp20[2]); mlMtxApply(*mtx); gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/core2/code_B3580.c b/src/core2/code_B3580.c index c33798bd..49a6d867 100644 --- a/src/core2/code_B3580.c +++ b/src/core2/code_B3580.c @@ -6,123 +6,122 @@ extern void func_803458E4(f32[4], f32[4], f32[4], f32); -void func_8033A510(Struct_B1400_1 *arg0) { - Struct_B1400 *end_ptr; - Struct_B1400 *i_ptr; +void boneTransformList_reset(BoneTransformList *this) { + BoneTransform *end_ptr; + BoneTransform *i_ptr; - i_ptr = arg0->unk0; - end_ptr = i_ptr + arg0->unk4; + i_ptr = this->ptr; + end_ptr = i_ptr + this->count; for(i_ptr = i_ptr; i_ptr < end_ptr; i_ptr++){ i_ptr->unk0[0] = i_ptr->unk0[1] = i_ptr->unk0[2] = 0.0f; i_ptr->unk0[3] = 1.0f; - i_ptr->unk10[0] = i_ptr->unk10[1] = i_ptr->unk10[2] = 1.0f; + i_ptr->scale[0] = i_ptr->scale[1] = i_ptr->scale[2] = 1.0f; i_ptr->unk1C[0] = i_ptr->unk1C[1] = i_ptr->unk1C[2] = 0.0f; } } -void func_8033A57C(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4]) { - func_80345250(arg2, arg0->unk0[arg1].unk0); +void func_8033A57C(BoneTransformList *this, s32 bone_id, f32 arg2[4]) { + vec4f_clone(arg2, this->ptr[bone_id].unk0); } -void func_8033A5B8(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4], f32 arg3[3], f32 arg4[3]) { - func_80345250(arg2, arg0->unk0[arg1].unk0); - arg3[0] = arg0->unk0[arg1].unk10[0]; - arg3[1] = arg0->unk0[arg1].unk10[1]; - arg3[2] = arg0->unk0[arg1].unk10[2]; - arg4[0] = arg0->unk0[arg1].unk1C[0]; - arg4[1] = arg0->unk0[arg1].unk1C[1]; - arg4[2] = arg0->unk0[arg1].unk1C[2]; +void func_8033A5B8(BoneTransformList *this, s32 bone_id, f32 arg2[4], f32 scale[3], f32 arg4[3]) { + vec4f_clone(arg2, this->ptr[bone_id].unk0); + scale[0] = this->ptr[bone_id].scale[0]; + scale[1] = this->ptr[bone_id].scale[1]; + scale[2] = this->ptr[bone_id].scale[2]; + arg4[0] = this->ptr[bone_id].unk1C[0]; + arg4[1] = this->ptr[bone_id].unk1C[1]; + arg4[2] = this->ptr[bone_id].unk1C[2]; } -void func_8033A670(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[3]) { - arg2[0] = arg0->unk0[arg1].unk10[0]; - arg2[1] = arg0->unk0[arg1].unk10[1]; - arg2[2] = arg0->unk0[arg1].unk10[2]; +void boneTransformList_getBoneScale(BoneTransformList *this, s32 bone_id, f32 scale[3]) { + scale[0] = this->ptr[bone_id].scale[0]; + scale[1] = this->ptr[bone_id].scale[1]; + scale[2] = this->ptr[bone_id].scale[2]; } -void func_8033A6B0(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[3]) { - arg2[0] = arg0->unk0[arg1].unk1C[0]; - arg2[1] = arg0->unk0[arg1].unk1C[1]; - arg2[2] = arg0->unk0[arg1].unk1C[2]; +void func_8033A6B0(BoneTransformList *this, s32 bone_id, f32 arg2[3]) { + arg2[0] = this->ptr[bone_id].unk1C[0]; + arg2[1] = this->ptr[bone_id].unk1C[1]; + arg2[2] = this->ptr[bone_id].unk1C[2]; } -void func_8033A6F0(Struct_B1400_1 *arg0){ - free(arg0); +void boneTransformList_free(BoneTransformList *this){ + free(this); } -Struct_B1400_1 *func_8033A710(void) { - Struct_B1400_1 *sp1C; +BoneTransformList *boneTransformList_new(void) { + BoneTransformList *this; - sp1C = (Struct_B1400_1 *)malloc(sizeof(Struct_B1400_1) + 0x6D*sizeof(Struct_B1400)); - sp1C->unk0 = (Struct_B1400 *) (sp1C + 1); - sp1C->unk4 = 0x6D; - func_8033A510(sp1C); - return sp1C; + this = (BoneTransformList *)malloc(sizeof(BoneTransformList) + 0x6D*sizeof(BoneTransform)); + this->ptr = (BoneTransform *) (this + 1); + this->count = 0x6D; + boneTransformList_reset(this); + return this; } -//interpolates animation structs? -void func_8033A750(Struct_B1400_1 *arg0, Struct_B1400_1 *arg1, Struct_B1400_1 *arg2, f32 arg3) { +void boneTransformList_interpolate(BoneTransformList *this, BoneTransformList *start_xform_list, BoneTransformList *end_xform_list, f32 arg3) { s32 i; s32 cnt; - Struct_B1400 *start_ptr; - Struct_B1400 *end_ptr; - Struct_B1400 *i_ptr; - Struct_B1400 *j_ptr; - Struct_B1400 *k_ptr; + BoneTransform *start_ptr; + BoneTransform *end_ptr; + BoneTransform *i_xform; + BoneTransform *start_xform; + BoneTransform *end_xform; - start_ptr = arg0->unk0; - j_ptr = arg1->unk0; - k_ptr = arg2->unk0; - end_ptr = start_ptr + arg0->unk4; - for(i_ptr = start_ptr; i_ptr < end_ptr; i_ptr++, j_ptr++, k_ptr++){ - if( (j_ptr->unk0[0] == k_ptr->unk0[0]) - && (j_ptr->unk0[1] == k_ptr->unk0[1]) - && (j_ptr->unk0[2] == k_ptr->unk0[2]) - && (j_ptr->unk0[3] == k_ptr->unk0[3]) + start_ptr = this->ptr; + start_xform = start_xform_list->ptr; + end_xform = end_xform_list->ptr; + end_ptr = start_ptr + this->count; + for(i_xform = start_ptr; i_xform < end_ptr; i_xform++, start_xform++, end_xform++){ + if( (start_xform->unk0[0] == end_xform->unk0[0]) + && (start_xform->unk0[1] == end_xform->unk0[1]) + && (start_xform->unk0[2] == end_xform->unk0[2]) + && (start_xform->unk0[3] == end_xform->unk0[3]) ) { - i_ptr->unk0[0] = j_ptr->unk0[0]; - i_ptr->unk0[1] = j_ptr->unk0[1]; - i_ptr->unk0[2] = j_ptr->unk0[2]; - i_ptr->unk0[3] = j_ptr->unk0[3]; + i_xform->unk0[0] = start_xform->unk0[0]; + i_xform->unk0[1] = start_xform->unk0[1]; + i_xform->unk0[2] = start_xform->unk0[2]; + i_xform->unk0[3] = start_xform->unk0[3]; } else { - func_803458E4(i_ptr, j_ptr, k_ptr, arg3); + func_803458E4(i_xform, start_xform, end_xform, arg3); } - i_ptr->unk10[0] = j_ptr->unk10[0] + ((k_ptr->unk10[0] - j_ptr->unk10[0]) * arg3); - i_ptr->unk10[1] = j_ptr->unk10[1] + ((k_ptr->unk10[1] - j_ptr->unk10[1]) * arg3); - i_ptr->unk10[2] = j_ptr->unk10[2] + ((k_ptr->unk10[2] - j_ptr->unk10[2]) * arg3); - i_ptr->unk1C[0] = j_ptr->unk1C[0] + ((k_ptr->unk1C[0] - j_ptr->unk1C[0]) * arg3); - i_ptr->unk1C[1] = j_ptr->unk1C[1] + ((k_ptr->unk1C[1] - j_ptr->unk1C[1]) * arg3); - i_ptr->unk1C[2] = j_ptr->unk1C[2] + ((k_ptr->unk1C[2] - j_ptr->unk1C[2]) * arg3); + i_xform->scale[0] = start_xform->scale[0] + ((end_xform->scale[0] - start_xform->scale[0]) * arg3); + i_xform->scale[1] = start_xform->scale[1] + ((end_xform->scale[1] - start_xform->scale[1]) * arg3); + i_xform->scale[2] = start_xform->scale[2] + ((end_xform->scale[2] - start_xform->scale[2]) * arg3); + i_xform->unk1C[0] = start_xform->unk1C[0] + ((end_xform->unk1C[0] - start_xform->unk1C[0]) * arg3); + i_xform->unk1C[1] = start_xform->unk1C[1] + ((end_xform->unk1C[1] - start_xform->unk1C[1]) * arg3); + i_xform->unk1C[2] = start_xform->unk1C[2] + ((end_xform->unk1C[2] - start_xform->unk1C[2]) * arg3); } } -void func_8033A8F0(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4]){ - func_80345250(&arg0->unk0[arg1], arg2); +void func_8033A8F0(BoneTransformList *this, s32 bone_id, f32 arg2[4]){ + vec4f_clone(&this->ptr[bone_id], arg2); } -void func_8033A928(Struct_B1400_1 *arg0, s32 arg1, f32 scale[3]) { - arg0->unk0[arg1].unk10[0] = scale[0]; - arg0->unk0[arg1].unk10[1] = scale[1]; - arg0->unk0[arg1].unk10[2] = scale[2]; +void boneTransformList_setBoneScale(BoneTransformList *this, s32 bone_id, f32 scale[3]) { + this->ptr[bone_id].scale[0] = scale[0]; + this->ptr[bone_id].scale[1] = scale[1]; + this->ptr[bone_id].scale[2] = scale[2]; } -void func_8033A968(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[3]) { - arg0->unk0[arg1].unk1C[0] = arg2[0]; - arg0->unk0[arg1].unk1C[1] = arg2[1]; - arg0->unk0[arg1].unk1C[2] = arg2[2]; +void func_8033A968(BoneTransformList *this, s32 bone_id, f32 arg2[3]) { + this->ptr[bone_id].unk1C[0] = arg2[0]; + this->ptr[bone_id].unk1C[1] = arg2[1]; + this->ptr[bone_id].unk1C[2] = arg2[2]; } -void func_8033A9A8(Struct_B1400_1 *arg0, s32 arg1, f32 arg2[4]){ +void func_8033A9A8(BoneTransformList *this, s32 bone_id, f32 arg2[4]){ f32 sp18[4]; func_80345C78(sp18, arg2); - func_8033A8F0(arg0, arg1, sp18); + func_8033A8F0(this, bone_id, sp18); } -Struct_B1400_1 * func_8033A9E4(Struct_B1400_1 *arg0){ - Struct_B1400_1 *var_v0; - var_v0 = (Struct_B1400_1 *)defrag(arg0); - var_v0->unk0 = (Struct_B1400 *)(var_v0 + 1); +BoneTransformList * boneTransformList_defrag(BoneTransformList *this){ + BoneTransformList *var_v0; + var_v0 = (BoneTransformList *)defrag(this); + var_v0->ptr = (BoneTransform *)(var_v0 + 1); return var_v0; } diff --git a/src/core2/code_B3A80.c b/src/core2/code_B3A80.c index f56b3ea9..28a57d19 100644 --- a/src/core2/code_B3A80.c +++ b/src/core2/code_B3A80.c @@ -37,7 +37,7 @@ extern s32 assetcache_release(void * arg0); f32 func_8033ABA0(AnimationFile *anim_file, f32 arg1); f32 func_8033AC38(AnimationFile *anim_file, AnimationFileElement *arg1, f32 arg2); s32 func_8033AC0C(AnimationFile *this); -void func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]); +void func_8033AFB8(BoneTransformList *arg0, s32 arg1, f32 arg2[3][3]); void func_8033BAB0(enum asset_e asset_id, s32 offset, s32 size, void *dst_ptr); /* .core2 */ @@ -47,21 +47,21 @@ f32 func_8033AA10(AnimationFile *this, s32 arg1){ return (f32)(arg1 - this->unk0)/(f32)(this->unk2 - this->unk0); } -void func_8033AA50(AnimationFile *anim_file, f32 arg1, Struct_B1400 *arg2){ - s32 tmp_s1; +void animationFile_getBoneTransformList(AnimationFile *anim_file, f32 progress, BoneTransformList *bone_transform_list){ + s32 bone_id; int i; f32 tmp_f22; AnimationFileElement *tmp_s0; f32 sp54[3][3]; - tmp_f22 = func_8033ABA0(anim_file, arg1); + tmp_f22 = func_8033ABA0(anim_file, progress); tmp_s0 = (AnimationFileElement *)((s32)anim_file + sizeof(AnimationFile)); - tmp_s1 = 0; + bone_id = 0; for(i = 0; i < anim_file->elem_cnt; i++){//L8033AAB8 - if(tmp_s0->unk0_15 != tmp_s1){ - if(tmp_s1) - func_8033AFB8(arg2, tmp_s1, sp54); - tmp_s1 = tmp_s0->unk0_15; + if(tmp_s0->unk0_15 != bone_id){ + if(bone_id != 0) + func_8033AFB8(bone_transform_list, bone_id, sp54); + bone_id = tmp_s0->unk0_15; sp54[0][0] = sp54[0][1] = sp54[0][2] = 0.0f; sp54[1][0] = sp54[1][1] = sp54[1][2] = 1.0f; sp54[2][0] = sp54[2][1] = sp54[2][2] = 0.0f; @@ -70,7 +70,7 @@ void func_8033AA50(AnimationFile *anim_file, f32 arg1, Struct_B1400 *arg2){ tmp_s0 += tmp_s0->data_cnt; tmp_s0++; }//L8033AB60 - func_8033AFB8(arg2, tmp_s1, sp54); + func_8033AFB8(bone_transform_list, bone_id, sp54); } f32 func_8033ABA0(AnimationFile *this, f32 arg1){ @@ -94,7 +94,7 @@ s32 func_8033AC1C(AnimationFile *this){ return this->unk2 - this->unk0 + 1; } -s32 func_8033AC30(AnimationFile *this){ +s32 animationFile_count(AnimationFile *this){ return this->elem_cnt; } @@ -149,12 +149,12 @@ f32 func_8033AC38(AnimationFile *this, AnimationFileElement *elem, f32 time){ return glspline_catmull_rom_interpolate(temp_f12, 4, knot_list); } -void func_8033AFB8(Struct_B1400 *arg0, s32 arg1, f32 arg2[3][3]){ +void func_8033AFB8(BoneTransformList *bone_transform_list, s32 bone_id, f32 arg2[3][3]){ f32 sp18[4]; func_80345CD4(sp18, arg2[0]); - func_8033A8F0(arg0, arg1, sp18); - func_8033A928(arg0, arg1, arg2[1]); - func_8033A968(arg0, arg1, arg2[2]); + func_8033A8F0(bone_transform_list, bone_id, sp18); + boneTransformList_setBoneScale(bone_transform_list, bone_id, arg2[1]); + func_8033A968(bone_transform_list, bone_id, arg2[2]); } void func_8033B020(void *ptr){ diff --git a/src/core2/code_B8860.c b/src/core2/code_B8860.c index b6a474aa..1c6d49e4 100644 --- a/src/core2/code_B8860.c +++ b/src/core2/code_B8860.c @@ -43,7 +43,7 @@ void func_8033F7F0(u8 arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx){ viewport_getPosition(sp3C); ml_vec3f_diff_copy(sp30, sp48, sp3C); if(sp54->unk28_12){ - func_80251BCC(func_8024DD90()); + mlMtxSet(func_8024DD90()); } else{ mlMtxIdent(); diff --git a/src/core2/code_BD100.c b/src/core2/code_BD100.c index d6570418..8fd6267c 100644 --- a/src/core2/code_BD100.c +++ b/src/core2/code_BD100.c @@ -81,7 +81,7 @@ void func_80344138(BKSpriteDisplayData *self, s32 frame, s32 mirrored, f32 posit if (D_80371EC0.unk0 != NULL) { D_80371EC0.unk0(D_80371EC0.unk4); } - func_80251BCC(func_8024DD90()); + mlMtxSet(func_8024DD90()); func_80252330(sp50[0], sp50[1], sp50[2]); if ((scale != NULL) || mirrored) { mlMtxScale_xyz((mirrored) ? -scale[0] : scale[0], sp38, sp34); @@ -140,7 +140,7 @@ void func_80344424(BKSpriteDisplayData *arg0, s32 frame, bool mirrored, f32 posi if (D_80371EC0.unk0 != NULL) { D_80371EC0.unk0(D_80371EC0.unk4); } - func_80251BCC(func_8024DD90()); + mlMtxSet(func_8024DD90()); mlMtxRotate(0.0f, 0.0f, rotation); func_80252330(sp50[0], sp50[1], sp50[2]); if ((scale != NULL) || mirrored) { diff --git a/src/core2/code_BE2C0.c b/src/core2/code_BE2C0.c index e0acef55..4a764413 100644 --- a/src/core2/code_BE2C0.c +++ b/src/core2/code_BE2C0.c @@ -11,7 +11,7 @@ s32 D_80371ED0[3] = {1, 2, 0}; /* .code */ //vec4f_copy -void func_80345250(f32 dst[4], f32 src[4]){ +void vec4f_clone(f32 dst[4], f32 src[4]){ dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; @@ -66,14 +66,14 @@ void func_80345274(f32 arg0[4], f32 arg1[3][3]) { arg1[2][2] = 1.0 - (sp28 + sp1C); } -bool func_80345434(f32 arg0[4]){ +bool vec4f_isZero(f32 arg0[4]){ return ((arg0[0] == 0.0f) && (arg0[1] == 0.0f) && (arg0[2] == 0.0f) && (arg0[3] == 1.0f)); } -bool func_803454D0(f32 arg0[4]) { +bool vec4f_isAlmostZero(f32 arg0[4]) { return (((0.0f <= arg0[0]) ? arg0[0] : - arg0[0]) < 0.01) && (((0.0f <= arg0[1]) ? arg0[1] : - arg0[1]) < 0.01) && (((0.0f <= arg0[1]) ? arg0[1] : - arg0[1]) < 0.01) @@ -81,7 +81,7 @@ bool func_803454D0(f32 arg0[4]) { && (((0.0f <= arg0[3]) ? arg0[3] : - arg0[3]) > 0.99); } -void func_80345630(f32 arg0[4]){ +void vec4f_zero(f32 arg0[4]){ arg0[0] = arg0[1] = arg0[2] = 0.0f; arg0[3] = 1.0f; } @@ -197,7 +197,7 @@ void func_80345A44(f32 arg0[4], f32 arg1[4][4]) { } } -void func_80345C78(s32 arg0, f32 arg1[3]) { +void func_80345C78(f32 arg0[4], f32 arg1[3]) { mlMtxIdent(); mlMtxRotYaw(arg1[1]); mlMtxRotPitch(arg1[0]); diff --git a/src/core2/code_C0B80.c b/src/core2/code_C0B80.c index dffbb128..a4314f24 100644 --- a/src/core2/code_C0B80.c +++ b/src/core2/code_C0B80.c @@ -12,7 +12,7 @@ void func_80347B10(Struct81s *arg0){ } void func_80347B54(Struct81s *arg0){ - __spawnQueue_add_1((GenMethod_1)func_80347B10, reinterpret_cast(s32, arg0)); + __spawnQueue_add_1((GenFunction_1)func_80347B10, reinterpret_cast(s32, arg0)); } void func_80347B80(Struct81s *arg0) { diff --git a/src/core2/code_C0CF0.c b/src/core2/code_C0CF0.c index ea97f995..779dc1ac 100644 --- a/src/core2/code_C0CF0.c +++ b/src/core2/code_C0CF0.c @@ -14,7 +14,7 @@ void func_80347C80(Struct81s *arg0){ } void func_80347CC8(Struct81s *arg0){ - __spawnQueue_add_1((GenMethod_1)func_80347C80, reinterpret_cast(s32, arg0)); + __spawnQueue_add_1((GenFunction_1)func_80347C80, reinterpret_cast(s32, arg0)); } void func_80347CF4(Struct81s *arg0) { diff --git a/src/core2/code_C0E60.c b/src/core2/code_C0E60.c index e1319615..ef413b48 100644 --- a/src/core2/code_C0E60.c +++ b/src/core2/code_C0E60.c @@ -79,7 +79,7 @@ void func_80347DF0(Struct81s *arg0){ } void func_80347E34(Struct81s *arg0){ - __spawnQueue_add_1((GenMethod_1) func_80347DF0, reinterpret_cast(s32, arg0)); + __spawnQueue_add_1((GenFunction_1) func_80347DF0, reinterpret_cast(s32, arg0)); } void func_80347E60(Struct81s *arg0) { diff --git a/src/core2/code_CB8A0.c b/src/core2/code_CB8A0.c index f590dcd4..36c2a635 100644 --- a/src/core2/code_CB8A0.c +++ b/src/core2/code_CB8A0.c @@ -3,8 +3,8 @@ #include "variables.h" -extern GenMethod_0 commonParticleType_getFreeMethod(enum common_particle_e); -extern GenMethod_0 commonParticleType_getUpdateMethod(enum common_particle_e); +extern GenFunction_0 commonParticleType_getFreeMethod(enum common_particle_e); +extern GenFunction_0 commonParticleType_getUpdateMethod(enum common_particle_e); typedef struct { u8 unk0; //prev_particle_type diff --git a/src/core2/code_CBBF0.c b/src/core2/code_CBBF0.c index 2c13d9f1..e7e56e45 100644 --- a/src/core2/code_CBBF0.c +++ b/src/core2/code_CBBF0.c @@ -4,14 +4,14 @@ typedef struct{ - GenMethod_0 init_method; - GenMethod_0 update_method; - GenMethod_0 free_method; + GenFunction_0 init_method; + GenFunction_0 update_method; + GenFunction_0 free_method; s32 unkC; s32 unk10; }CommonParticleType; -void commonParticleType_set(enum common_particle_e arg0, GenMethod_0 init_method, s32 update_method, GenMethod_0 free_method, s32 arg4, s32 arg5); +void commonParticleType_set(enum common_particle_e arg0, GenFunction_0 init_method, s32 update_method, GenFunction_0 free_method, s32 arg4, s32 arg5); /* .bss */ CommonParticleType D_80386260[0x12]; @@ -25,7 +25,7 @@ void commonParticleType_init(void){ } } -void commonParticleType_set(enum common_particle_e id, GenMethod_0 init_method, s32 update_method, GenMethod_0 free_method, s32 arg4, s32 arg5){ +void commonParticleType_set(enum common_particle_e id, GenFunction_0 init_method, s32 update_method, GenFunction_0 free_method, s32 arg4, s32 arg5){ D_80386260[id].init_method = init_method; D_80386260[id].update_method = update_method; D_80386260[id].free_method = free_method; @@ -33,16 +33,16 @@ void commonParticleType_set(enum common_particle_e id, GenMethod_0 init_method, D_80386260[id].unk10 = arg5; } -GenMethod_0 commonParticleType_getInitMethod(enum common_particle_e id) +GenFunction_0 commonParticleType_getInitMethod(enum common_particle_e id) { return D_80386260[id].init_method; } -GenMethod_0 commonParticleType_getUpdateMethod(enum common_particle_e id){ +GenFunction_0 commonParticleType_getUpdateMethod(enum common_particle_e id){ return D_80386260[id].update_method; } -GenMethod_0 commonParticleType_getFreeMethod(enum common_particle_e id){ +GenFunction_0 commonParticleType_getFreeMethod(enum common_particle_e id){ return D_80386260[id].free_method; } diff --git a/src/core2/code_D0CA0.c b/src/core2/code_D0CA0.c index eb9947bd..5f972083 100644 --- a/src/core2/code_D0CA0.c +++ b/src/core2/code_D0CA0.c @@ -2,7 +2,6 @@ #include "functions.h" #include "variables.h" -extern void func_80335A8C(Struct80s *, s32); extern f32 func_8025715C(f32, f32); extern f32 func_802575BC(f32); extern void ml_interpolate_vec3f(f32[3], f32[3], f32[3], f32); @@ -115,8 +114,8 @@ void func_80357F0C(Actor *this, s32 next_state) { local = (ActorLocal_core2_D0CA0 *)&this->local; if (this->state == 0) { - func_80335924(this->unk148, 0x23A, 0.0f, 0.45f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x23A, 0.0f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } this->state = next_state; @@ -126,8 +125,8 @@ void func_80357F0C(Actor *this, s32 next_state) { local->unk28 = randf2(0.0f, 2.0f); } if (this->state == 2) { - func_80335924(this->unk148, 0x23A, 0.3f, 0.45f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x23A, 0.3f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); for(var_s0 = 0; var_s0 < 10; var_s0++){ sp54[0] = this->position[0]; sp54[1] = this->position[1]; @@ -154,8 +153,8 @@ void func_80357F0C(Actor *this, s32 next_state) { if (this->state == 5) { func_8028F55C(1, this->marker); FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200); - func_80335924(this->unk148, 0x23A, 0.4f, 1.0f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x23A, 0.4f, 1.0f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); timed_playSfx(0.8f, 0x3FC, randf2(0.97f, 1.05f), 32000); local->unk39 = 0; local->unk28 = 2.0f; @@ -168,8 +167,8 @@ void func_80357F0C(Actor *this, s32 next_state) { this->marker->collidable = FALSE; this->unk10_1 = FALSE; FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200); - func_80335924(this->unk148, 0x23D, 0.3f, 0.45f); - func_80335A8C(this->unk148, 1); + skeletalAnim_set(this->unk148, 0x23D, 0.3f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); local->unk36 = 0x3E8; local->unk39 = 0; } @@ -214,7 +213,7 @@ Actor *func_80358344(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { } else { this->alpha_124_19 = 0xff; } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_80358490(Actor *this) { @@ -364,10 +363,10 @@ void func_80358684(Actor *this) { if (this->state == 2) { local->unk39 = 1; } else if (this->state == 3) { - if (func_8033567C(this->unk148) != 0x23B) { - func_80335924(this->unk148, 0x23B, 0.2f, 0.75f); - func_80335A8C(this->unk148, 2); - } else if (0.575 <= func_80335684(this->unk148)) { + if (skeletalAnim_getAnimId(this->unk148) != 0x23B) { + skeletalAnim_set(this->unk148, 0x23B, 0.2f, 0.75f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); + } else if (0.575 <= skeletalAnim_getProgress(this->unk148)) { local->unk39 = 1U; } } @@ -396,13 +395,13 @@ void func_80358684(Actor *this) { sp70 = func_802575BC(local->unk4); ml_interpolate_vec3f(this->position, local->unk8, local->unk18, sp70); this->yaw = local->unk14 + (sp70 * (local->unk24 - local->unk14)); - if ((func_8033567C(this->unk148) == 0x23B) && (func_80335794(this->unk148) > 0)) { - func_80335924(this->unk148, 0x23C, 0.1f, 0.45f); - func_80335A8C(this->unk148, 1); + if ((skeletalAnim_getAnimId(this->unk148) == 0x23B) && (skeletalAnim_getLoopCount(this->unk148) > 0)) { + skeletalAnim_set(this->unk148, 0x23C, 0.1f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } - if ((local->unk39 == 0) || ((func_8033567C(this->unk148) == 0x23C) && (0.7 <= (f64) local->unk4))) { - func_80335924(this->unk148, 0x23A, 0.3f, 0.45f); - func_80335A8C(this->unk148, 1); + if ((local->unk39 == 0) || ((skeletalAnim_getAnimId(this->unk148) == 0x23C) && (0.7 <= (f64) local->unk4))) { + skeletalAnim_set(this->unk148, 0x23A, 0.3f, 0.45f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_1_LOOP); } if (this->state == 3) { if (0.0f <= local->unk4 - 0.2) { @@ -450,7 +449,7 @@ void func_80358684(Actor *this) { this->yaw += 10.0f * sp88; } if (this->state == 6) { - if (func_8033567C(this->unk148) == 0x23D) { + if (skeletalAnim_getAnimId(this->unk148) == 0x23D) { sp3C[0] = this->position[0] - sp94[0]; sp3C[1] = this->position[1] - sp94[1]; sp3C[2] = this->position[2] - sp94[2]; @@ -467,7 +466,7 @@ void func_80358684(Actor *this) { FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.2f, 32200); timed_playSfx(0.1f, SFX_66_BIRD_AUUGHH, 1.6f, 32000); } - } else if (func_80335794(this->unk148) > 0) { + } else if (skeletalAnim_getLoopCount(this->unk148) > 0) { next_state = 7; } } diff --git a/src/core2/code_D5D10.c b/src/core2/code_D5D10.c index 53fb0e8b..40547034 100644 --- a/src/core2/code_D5D10.c +++ b/src/core2/code_D5D10.c @@ -50,7 +50,7 @@ ActorAnimationInfo D_80372D20[] = { ActorInfo D_80372D78 = { MARKER_218_LIMBO, ACTOR_34E_LIMBO, ASSET_4CC_MODEL_LIMBO, 0x1, D_80372D20, - chskeleton_update, func_80326224, func_80325888, + chskeleton_update, func_80326224, actor_draw, 2500, 0, 1.0f, 0 }; @@ -73,7 +73,7 @@ void chskeleton_despawn(ActorMarker *marker, s32 arg1) { func_802DAD8C(partEmitMgr_newEmitter(2), this, ASSET_4CD_MODEL_LIMBO_ARM); func_8035CCA0(partEmitMgr_newEmitter(4), this, ASSET_4D0_MODEL_LIMBO_BONE); FUNC_8030E8B4(SFX_119_FISH_DEATH, 1.0f, 32000, this->position, 1250, 2500); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); marker_despawn(marker); } diff --git a/src/core2/code_D5FD0.c b/src/core2/code_D5FD0.c index 397e2a92..5475ed18 100644 --- a/src/core2/code_D5FD0.c +++ b/src/core2/code_D5FD0.c @@ -51,7 +51,7 @@ ActorAnimationInfo D_80372DA0[] = { ActorInfo D_80372DF8 = { MARKER_21A_SEAMAN_GRUBLIN, ACTOR_350_SEAMAN_GRUBLIN, ASSET_49D_MODEL_SEAMAN_GRUBLIN, 0x1, D_80372DA0, - func_8035D058, func_80326224, func_80325888, + func_8035D058, func_80326224, actor_draw, 2500, 0, 1.0f, 0 }; diff --git a/src/core2/code_D6180.c b/src/core2/code_D6180.c index 40cde517..1affdf06 100644 --- a/src/core2/code_D6180.c +++ b/src/core2/code_D6180.c @@ -48,7 +48,7 @@ ActorAnimationInfo D_80372E20[] = { ActorInfo D_80372E78 = { MARKER_219_MUMMUM, ACTOR_34F_MUMMUM, ASSET_4C7_MODEL_MUMMUM, 0x1, D_80372E20, - func_8035D3D8, func_80326224, func_80325888, + func_8035D3D8, func_80326224, actor_draw, 2500, 0, 1.0f, 0 }; @@ -71,7 +71,7 @@ void func_8035D1F0(ActorMarker *arg0, s32 arg1) { func_802DAD8C(partEmitMgr_newEmitter(2), this, ASSET_4C8_MODEL_MUMMUM_ARM); func_8035D110(partEmitMgr_newEmitter(1), this, ASSET_4CB_MODEL_MUMMUM_BODY); FUNC_8030E8B4(SFX_119_FISH_DEATH, 0.8f, 32000, this->position, 1250, 2500); - __spawnQueue_add_4((GenMethod_4) func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4) func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); marker_despawn(arg0); } diff --git a/src/core2/code_D6600.c b/src/core2/code_D6600.c index 9b6272d7..1cf0ed81 100644 --- a/src/core2/code_D6600.c +++ b/src/core2/code_D6600.c @@ -30,7 +30,7 @@ ActorAnimationInfo D_80372EA0[] = { ActorInfo D_80372EE0 = { MARKER_69_CHUMP_FISH, ACTOR_A_CHUMP_FISH, ASSET_36B_CHUMP_FISH, 0x2, D_80372EA0, - func_8035DA1C, func_80326224, func_80325888, + func_8035DA1C, func_80326224, actor_draw, 3000, 0, 0.0f, 0 }; diff --git a/src/core2/code_D89E0.c b/src/core2/code_D89E0.c index 41a7e04d..e5fef42c 100644 --- a/src/core2/code_D89E0.c +++ b/src/core2/code_D89E0.c @@ -29,7 +29,7 @@ ActorAnimationInfo D_80373090[] = { ActorInfo D_803730D8 = { MARKER_127_BAT, ACTOR_163_BAT, ASSET_3CA_MODEL_BAT, 0x1, D_80373090, - func_80360828, func_80326224, func_80325888, + func_80360828, func_80326224, actor_draw, 2500, 0, 0.9f, 0 }; diff --git a/src/core2/code_DA3A0.c b/src/core2/code_DA3A0.c index 51af94c2..f338d520 100644 --- a/src/core2/code_DA3A0.c +++ b/src/core2/code_DA3A0.c @@ -15,14 +15,14 @@ u8 D_80373130[] = {0, 1, 0, 0}; ActorInfo D_80373134 = { 0x1a6, 0x289, 0x431, 0x0, NULL, - func_8036158C, NULL, func_80325888, + func_8036158C, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80373158 = { 0x1a6, 0x28f, 0x431, 0x0, NULL, - func_8036158C, NULL, func_80325888, + func_8036158C, NULL, actor_draw, 0, 0, 0.0f, 0 }; @@ -68,8 +68,8 @@ void func_80361330(Actor *this, s32 next_state){ func_802F9F80(tmp_s0, 0.0f, 0.2f, 0.6f); func_802FA060(tmp_s0, 27000, 27000, 0.0f); local->unk4 = 0.6f; - func_80335924(this->unk148, 0x169, 0.0f, 0.6f); - func_80335A8C(this->unk148, 2); + skeletalAnim_set(this->unk148, 0x169, 0.0f, 0.6f); + skeletalAnim_setBehavior(this->unk148, SKELETAL_ANIM_2_ONCE); }//L8036155C this->state = next_state; diff --git a/src/core2/fx/common3score.c b/src/core2/fx/common3score.c index a78fe81d..9c5e041c 100644 --- a/src/core2/fx/common3score.c +++ b/src/core2/fx/common3score.c @@ -211,7 +211,7 @@ void fxcommon3score_draw(enum item_e item_id, void *arg1, Gfx **gfx, Mtx **mtx, } func_80253208(gfx, a1->unk30 - a1->unk6C, sp40 - a1->unk6C, 2*a1->unk6C, 2*a1->unk6C, D_803A5D00[func_8024BDA0()]); if(a1->anim_ctrl != NULL){ - func_8028781C(a1->anim_ctrl, sp5C, 1); + animctrl_drawSetup(a1->anim_ctrl, sp5C, 1); } modelRender_draw(gfx, mtx, sp5C, sp68, a1->unk3C*sp3C, sp44, a1->model); }//L80300BA4 diff --git a/src/core2/fx/honeycarrierscore.c b/src/core2/fx/honeycarrierscore.c index 0acbc063..47014854 100644 --- a/src/core2/fx/honeycarrierscore.c +++ b/src/core2/fx/honeycarrierscore.c @@ -228,12 +228,12 @@ void fxhoneycarrierscore_update(s32 arg0, struct8s *arg1){ D_803815E4 = 0; D_803815E0 = 0.9999f; func_803463D4(ITEM_13_EMPTY_HONEYCOMB, -6); - timedFunc_set_2(0.25f, (GenMethod_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); + timedFunc_set_2(0.25f, (GenFunction_2)func_8025A6EC, COMUSIC_2B_DING_B, 28000); func_803463D4(ITEM_14_HEALTH, 0); - timedFunc_set_1(1.25f, (GenMethod_1)item_inc, ITEM_15_HEALTH_TOTAL); - timedFunc_set_1(1.25f, (GenMethod_1)func_8030E484, SFX_3EA_UNKNOWN); - timedFunc_set_2(1.25f, (GenMethod_2)item_set, ITEM_14_HEALTH, item_getCount(ITEM_15_HEALTH_TOTAL)+1); - timedFunc_set_1(1.5f, (GenMethod_1)gcpausemenu_80314AC8, 1); + timedFunc_set_1(1.25f, (GenFunction_1)item_inc, ITEM_15_HEALTH_TOTAL); + timedFunc_set_1(1.25f, (GenFunction_1)func_8030E484, SFX_3EA_UNKNOWN); + timedFunc_set_2(1.25f, (GenFunction_2)item_set, ITEM_14_HEALTH, item_getCount(ITEM_15_HEALTH_TOTAL)+1); + timedFunc_set_1(1.5f, (GenFunction_1)gcpausemenu_80314AC8, 1); } break; case 2://L802FECD4 diff --git a/src/core2/gc/parade.c b/src/core2/gc/parade.c index cbecc8dd..b3fccaf3 100644 --- a/src/core2/gc/parade.c +++ b/src/core2/gc/parade.c @@ -232,13 +232,13 @@ void gcparade_setState(enum parade_state_e next_state) { break; case PARADE_STATE_5_WAIT_ON_NAME: if ((D_803830F0.parade_id == 1) && (D_803830F0.parade_element->exit >= 0)) { - timedFunc_set_1(2.0f, (GenMethod_1)gcparade_setState, PARADE_STATE_6_NAME_DISAPPEAR);// queue state transition + timedFunc_set_1(2.0f, (GenFunction_1)gcparade_setState, PARADE_STATE_6_NAME_DISAPPEAR);// queue state transition } break; case PARADE_STATE_7_GOTO_NEXT: D_803830F0.indx++; D_803830F0.parade_element++; - timedFunc_set_1(0.25f, (GenMethod_1)gcparade_setState, (D_803830F0.indx == D_803830F0.count) ? PARADE_STATE_8_END : PARADE_STATE_3_WARP); + timedFunc_set_1(0.25f, (GenFunction_1)gcparade_setState, (D_803830F0.indx == D_803830F0.count) ? PARADE_STATE_8_END : PARADE_STATE_3_WARP); break; case PARADE_STATE_8_END: func_803204E4(0x1F, 0); @@ -294,13 +294,13 @@ void gcparade_update(void) { sp34 = 0xA0; if (D_803830F0.parade_element->exit >= 0) sp34 = 0xA8; - timedFunc_set_1(1.0f, (GenMethod_1)func_80311714, 0); + timedFunc_set_1(1.0f, (GenFunction_1)func_80311714, 0); func_80324DBC(1.0f, D_803830F0.indx + 0x11AF, sp34, NULL, NULL, gcparade_textCallback, NULL); - timedFunc_set_1(1.0f, (GenMethod_1)func_80311714, 1); + timedFunc_set_1(1.0f, (GenFunction_1)func_80311714, 1); } else if (D_803830F0.parade_element->exit >= 0) { func_8028F918(2); } - timedFunc_set_1(1.0f, (GenMethod_1)gcparade_setState, PARADE_STATE_4_NAME_APPEAR); + timedFunc_set_1(1.0f, (GenFunction_1)gcparade_setState, PARADE_STATE_4_NAME_APPEAR); D_803830F0.unk5 = 1; } } diff --git a/src/core2/gc/transition.c b/src/core2/gc/transition.c index 59bb88a8..c6c4d72e 100644 --- a/src/core2/gc/transition.c +++ b/src/core2/gc/transition.c @@ -222,7 +222,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){ if(D_80382430.animctrl != NULL){ gDPSetTextureFilter((*gdl)++, G_TF_POINT); gDPSetColorDither((*gdl)++, G_CD_DISABLE); - func_8028781C(D_80382430.animctrl, sp58, 1); + animctrl_drawSetup(D_80382430.animctrl, sp58, 1); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); } if(D_80382430.unk8 == 1 || D_80382430.unk8 == 6){ diff --git a/src/core2/gc/zoombox.c b/src/core2/gc/zoombox.c index aaaa3066..94d77940 100644 --- a/src/core2/gc/zoombox.c +++ b/src/core2/gc/zoombox.c @@ -843,7 +843,7 @@ void func_803163A8(gczoombox_t *this, Gfx **gfx, Mtx **mtx) { func_8033A308(sp44); modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE); if (this->anim_ctrl != NULL) { - func_8028781C(this->anim_ctrl, sp50, 1); + animctrl_drawSetup(this->anim_ctrl, sp50, 1); } modelRender_draw(gfx, mtx, sp50, sp5C, this->unk198 * sp34, sp38, this->model); } diff --git a/src/core2/modelRender.c b/src/core2/modelRender.c index 24c70c9d..e63f98f4 100644 --- a/src/core2/modelRender.c +++ b/src/core2/modelRender.c @@ -2,6 +2,7 @@ #include "functions.h" #include "variables.h" #include "core2/modelRender.h" +#include "animation.h" #define ARRAYLEN(x) (sizeof(x) / sizeof((x)[0])) @@ -19,8 +20,8 @@ extern s32 func_8024DB50(f32[3], f32); extern void func_80251788(f32, f32, f32); extern void mlMtxScale(f32); extern void mlMtxApply(Mtx* mtx); -extern struct58s *func_802EA154(); -extern struct58s *func_802EA374(struct58s *); +extern AnimMtxList *animMtxList_new(); +extern AnimMtxList *animMtxList_defrag(AnimMtxList *); typedef struct{ @@ -602,19 +603,19 @@ enum model_render_color_mode_e{ /* .bss */ struct5Bs *D_80383650; s32 D_80383658[0x2A]; -s32 D_80383700; +BoneTransformList *modelRenderBoneTransformList; bool D_80383704; f32 D_80383708; f32 D_8038370C; s32 D_80383710; enum model_render_color_mode_e modelRenderColorMode; BKGfxList * modelRenderDisplayList; -struct58s * D_8038371C; +AnimMtxList * D_8038371C; static BKTextureList * modelRenderTextureList; s32 modelRenderAnimatedTexturesCacheId; static BKVertexList * modelRendervertexList; BKModelUnk20List * D_8038372C; -struct58s * D_80383730; +AnimMtxList * modelRenderAnimMtxList; f32 modelRenderScale; struct{ @@ -631,9 +632,9 @@ struct{ } D_80383758; struct{ - GenMethod_1 pre_method; + GenFunction_1 pre_method; s32 pre_arg; - GenMethod_1 post_method; + GenFunction_1 post_method; s32 post_arg; } modelRenderCallback; @@ -674,7 +675,7 @@ f32 D_80383C98[3]; /* .code */ void modelRender_reset(void){ - D_80383700 = 0; + modelRenderBoneTransformList = 0; D_80383708 = 30000.0f; D_80383704 = TRUE; D_8038370C = 1.0f; @@ -794,7 +795,7 @@ void func_803387F8(Gfx **gfx, Mtx **mtx, void *arg2){ GeoCmd2 *cmd = (GeoCmd2 *)arg2; if(D_8038371C){ - func_802519C8(&D_80383BF8, func_802EA110(D_8038371C, cmd->unk9)); + func_802519C8(&D_80383BF8, animMtxList_get(D_8038371C, cmd->unk9)); if(D_80370990){ mlMtxApply(*mtx); gSPMatrix((*gfx)++, (*mtx)++, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); @@ -874,7 +875,7 @@ void func_80338BFC(Gfx **gfx, Mtx **mtx, void *arg2){ if(D_80383650){ if(D_8038371C){ - func_802519C8(&D_80383BF8, func_802EA110(D_8038371C, cmd->unkA)); + func_802519C8(&D_80383BF8, animMtxList_get(D_8038371C, cmd->unkA)); func_8025235C(sp20, cmd->unkC); mlMtxPop(); } @@ -969,7 +970,7 @@ void func_80338EB8(Gfx ** gfx, Mtx ** mtx, void *arg2){ sp30 = (f32)cmd->unkE*modelRenderScale; if(D_8038371C){ - func_802519C8(&D_80383BF8, func_802EA110(D_8038371C, cmd->unk12)); + func_802519C8(&D_80383BF8, animMtxList_get(D_8038371C, cmd->unk12)); func_8025235C(sp34, sp34); mlMtxPop(); } @@ -1237,13 +1238,13 @@ BKModelBin *modelRender_draw(Gfx **gfx, Mtx **mtx, f32 position[3], f32 rotation D_8038371C = 0; } else if(D_8038371C == 0 && modelRenderModelBin->animation_list_offset_18){ - if(D_80383700 == 0){ - func_802EA060(&D_80383730, (u8*)model_bin + model_bin->animation_list_offset_18); + if(modelRenderBoneTransformList == NULL){ + animMtxList_setBoneless(&modelRenderAnimMtxList, (u8*)model_bin + model_bin->animation_list_offset_18); } else{ - func_802EA1A8(&D_80383730, (u8*)model_bin + model_bin->animation_list_offset_18, D_80383700); + animMtxList_setBoned(&modelRenderAnimMtxList, (u8*)model_bin + model_bin->animation_list_offset_18, modelRenderBoneTransformList); } - D_8038371C = D_80383730; + D_8038371C = modelRenderAnimMtxList; } if(D_8038372C){ @@ -1301,8 +1302,8 @@ BKModelUnk28List *func_8033A048(BKModelBin *arg0){ return (BKModelUnk28List *)((s32)arg0 + arg0->unk28); } -s32 func_8033A064(void){ - return D_80383700; +BoneTransformList *modelRender_getBoneTransformList(void){ + return modelRenderBoneTransformList; } s32 func_8033A070(BKModelBin *arg0){ @@ -1373,18 +1374,18 @@ s32 func_8033A170(void){ return D_80370990; } -void func_8033A17C(void){ - func_802EA134(D_80383730); - D_80383730 = NULL; +void modelRender_free(void){ + animMtxList_free(modelRenderAnimMtxList); + modelRenderAnimMtxList = NULL; } -void func_8033A1A4(void){ +void modelRender_init(void){ modelRender_reset(); D_80383758.unk18 = 0; D_803837E0.cur_lookat = D_803837E0.lookat_buffer; D_803837E0.lookat_buffer_end = D_803837E0.cur_lookat + ARRAYLEN(D_803837E0.lookat_buffer); D_803837E0.eye_pos[0] = D_803837E0.eye_pos[1] = D_803837E0.eye_pos[2] = 0.0f; - D_80383730 = func_802EA154(); + modelRenderAnimMtxList = animMtxList_new(); } void func_8033A1FC(void){ @@ -1394,8 +1395,8 @@ void func_8033A1FC(void){ } } -void func_8033A238(s32 arg0){ - D_80383700 = arg0; +void modelRender_setBoneTransformList(BoneTransformList *arg0){ + modelRenderBoneTransformList = arg0; } f32 func_8033A244(f32 arg0){ @@ -1427,7 +1428,7 @@ void func_8033A298(bool arg0){ /* moderRender_preDraw() sets a generic 1 argument function that will * be called immediately prior to the model being drawn */ -void modelRender_preDraw(GenMethod_1 func, s32 arg){ +void modelRender_preDraw(GenFunction_1 func, s32 arg){ modelRenderCallback.pre_method = func; modelRenderCallback.pre_arg = arg; } @@ -1435,7 +1436,7 @@ void modelRender_preDraw(GenMethod_1 func, s32 arg){ /* moderRender_postDraw() sets a generic 1 argument function that will * be called immediately after to the model has been drawn */ -void modelRender_postDraw(GenMethod_1 func, s32 arg){ +void modelRender_postDraw(GenFunction_1 func, s32 arg){ modelRenderCallback.post_method = func; modelRenderCallback.post_arg = arg; } @@ -1484,7 +1485,7 @@ void modelRender_setAlpha(s32 a){ } } -void func_8033A444(struct58s *arg0){ +void func_8033A444(AnimMtxList *arg0){ D_8038371C = arg0; } @@ -1523,7 +1524,7 @@ void modelRender_setDepthMode(enum model_render_depth_mode_e renderMode){ } void modelRender_defrag(void){ - if(D_80383730 != NULL){ - D_80383730 = func_802EA374(D_80383730); + if(modelRenderAnimMtxList != NULL){ + modelRenderAnimMtxList = animMtxList_defrag(modelRenderAnimMtxList); } } diff --git a/src/core2/skeletalanim.c b/src/core2/skeletalanim.c new file mode 100644 index 00000000..65da40c3 --- /dev/null +++ b/src/core2/skeletalanim.c @@ -0,0 +1,277 @@ +#include +#include "functions.h" +#include "variables.h" + +#include "animation.h" + +extern void animationFile_getBoneTransformList(void *, f32, BoneTransformList *); +extern void boneTransformList_interpolate(BoneTransformList *, BoneTransformList *, BoneTransformList *, f32); +extern BoneTransformList *boneTransformList_new(void); + + +/* .code */ +static void skeletalAnim_clearTransition(SkeletalAnimation *self){ + if(self->bone_transform != NULL){ + boneTransformList_free(self->bone_transform); + self->bone_transform = NULL; + } + + if(self->animation_bin != NULL){ + assetcache_release(self->animation_bin); + self->animation_bin = NULL; + } + + if(self->transition_start != NULL){ + boneTransformList_free(self->transition_start); + self->transition_start = NULL; + } + + if(self->transition_target != NULL){ + boneTransformList_free(self->transition_target); + self->transition_target = NULL; + } + + self->transition_duration = 0.0f; +} + +static void __perform_callback(SkeletalAnimationCallback* arg0){ + if(arg0->arg_count == 0){ + ((void(*)(void))(arg0->callback_fn))(); + } + else if(arg0->arg_count == 1){ + ((void(*)(s32))(arg0->callback_fn))(arg0->arg); + } +} + +void skeletalAnim_clearCallbacks(SkeletalAnimation *self){ + if(self->callback_list != NULL){ + vector_clear(self->callback_list); + } +} + +enum asset_e skeletalAnim_getAnimId(SkeletalAnimation *self){ + return self->animation_id; +} + +f32 skeletalAnim_getProgress(SkeletalAnimation *self){ + return self->progress; +} + +void skeletalAnim_getProgressRange(SkeletalAnimation *self, f32 *prev_progress, f32 *progress){ + *prev_progress = self->prev_progress; + *progress = self->progress; +} + +BoneTransformList *skeletalAnim_getBoneTransformList(SkeletalAnimation *self){ + self->unk14 = 0; + if(self->bone_transform == NULL){ + self->bone_transform = boneTransformList_new(); + } + + if(self->unk30 != 0){ + self->unk30 = 0; + return self->bone_transform; + } + + if(self->animation_id == 0){ + return self->bone_transform; + } + + if(self->animation_bin == NULL){ + self->animation_bin = (AnimationFile *)assetcache_get(self->animation_id); + } + + if(0.0f == self->transition_duration){ + animationFile_getBoneTransformList(self->animation_bin, self->progress, self->bone_transform); + return self->bone_transform; + } + + if(self->transition_target == NULL){ + self->transition_target = (BoneTransformList *) boneTransformList_new(); + } + animationFile_getBoneTransformList(self->animation_bin, self->progress, self->transition_target); + boneTransformList_interpolate(self->bone_transform, self->transition_start, self->transition_target, self->transition_progress); + return self->bone_transform; +} + +s32 skeletalAnim_getLoopCount(SkeletalAnimation *self){ + return self->loop_count; +} + +void skeletalAnim_setCallback_0(SkeletalAnimation *self, f32 when, GenFunction_0 fn){ + SkeletalAnimationCallback *ptr; + if(self->callback_list == NULL){ + self->callback_list = vector_new(sizeof(SkeletalAnimationCallback), 8); + } + ptr = (SkeletalAnimationCallback *)vector_pushBackNew(&self->callback_list); + ptr->when = when; + ptr->arg_count = 0; + ptr->callback_fn = fn; + ptr->arg = 0; +} + +void skeletalAnim_setCallback_1(SkeletalAnimation *self, f32 when, GenFunction_1 fn, s32 arg){ + SkeletalAnimationCallback *ptr; + if(self->callback_list == NULL){ + self->callback_list = vector_new(sizeof(SkeletalAnimationCallback), 8); + } + ptr = (SkeletalAnimationCallback *)vector_pushBackNew(&self->callback_list); + ptr->when = when; + ptr->arg_count = 1; + ptr->callback_fn = fn; + ptr->arg = (s32)arg; +} + +void skeletalAnim_free(SkeletalAnimation *self){ + VLA * temp_a0; + skeletalAnim_clearTransition(self); + temp_a0 = self->callback_list; + if(temp_a0 != NULL){ + vector_free(temp_a0); + } + free(self); +} + +SkeletalAnimation *skeletalAnim_new(void){ + SkeletalAnimation *self; + + self = (SkeletalAnimation *)malloc(sizeof(SkeletalAnimation)); + self->bone_transform = NULL; + self->animation_bin = NULL; + self->callback_list = 0; + self->unk14 = 0; + self->behavior = SKELETAL_ANIM_1_LOOP; + self->loop_count = 0; + self->animation_id = 0; + self->unk30 = 0; + self->transition_start = NULL; + self->transition_target = NULL; + self->progress = 0.0f; + self->duration = 0.0f; + self->prev_progress = 0.0f; + self->transition_progress = 0.0f; + self->transition_duration = 0.0f; + + return self; +} + +void skeletalAnim_func_80335918(SkeletalAnimation *self){ + self->unk30 = 1; +} + +void skeletalAnim_set(SkeletalAnimation *self, enum asset_e anim_id, f32 transistion_duration, f32 duration){ + if(self->animation_bin != NULL && anim_id != self->animation_id){ + assetcache_release(self->animation_bin); + self->animation_bin = NULL; + } + + if(self->callback_list != NULL && anim_id != self->animation_id){ + vector_free(self->callback_list); + self->callback_list = NULL; + } + + self->progress = 0.0f; + self->duration = duration; + self->loop_count = 0; + self->animation_id = anim_id; + self->prev_progress = 0.0f; + self->transition_progress = 0.0f; + self->transition_duration = transistion_duration; + if(0.0f < transistion_duration){ + if(self->bone_transform != NULL ){ + BoneTransformList *tmp; + tmp = self->transition_start; + self->transition_start = self->bone_transform; + self->bone_transform = tmp; + if(self->transition_target != 0){ + boneTransformList_reset(self->transition_target); + } + } else { + self->transition_duration = 0.0f; + } + } +} + +//sets animation, but retains current animation's progress +void skeletalAnim_swap(SkeletalAnimation *self, enum asset_e anim_id, f32 transistion_duration, f32 duration){ + f32 sp1C; + sp1C = skeletalAnim_getProgress(self); + skeletalAnim_set(self, anim_id, transistion_duration, duration); + skeletalAnim_setProgress(self, sp1C); +} + +void skeletalAnim_setProgress(SkeletalAnimation *self, f32 progress){ + self->progress = progress; +} + +void skeletalAnim_setDuration(SkeletalAnimation *self, f32 duration){ + self->duration = duration; +} + +void skeletalAnim_setBehavior(SkeletalAnimation *self, enum skeletal_anim_e behavior){ + self->behavior = behavior; +} + +void skeletalAnim_update(SkeletalAnimation *self, f32 dt, s32 arg2) { + f32 pad2C; + SkeletalAnimationCallback *begin_ptr; + SkeletalAnimationCallback *end_ptr; + SkeletalAnimationCallback *i_ptr; + + if (arg2 == 0) { + if (self->unk14 < 10) { + self->unk14++; + if (self->unk14 == 0xA) { + skeletalAnim_clearTransition(self); + } + } + } + if (self->animation_id != 0) { + self->prev_progress = self->progress; + if ( self->duration > 0.0f) { + if (self->behavior == SKELETAL_ANIM_1_LOOP) { //LOOP + self->progress += dt / self->duration; + while (self->progress >= 1.0f) { + self->progress -= 1.0f; + self->loop_count++; + } + } else if ((self->behavior == SKELETAL_ANIM_2_ONCE) && (self->loop_count == 0)) { + //FORWARD ONCE + self->progress += (dt / self->duration); + if (self->progress >= 1.0f) { + self->progress = 0.99999f; + self->loop_count++; + } + } else if ((self->behavior == SKELETAL_ANIM_3_BACKWARDS) && (self->progress > 0.0f)) { + //BACKWARDS ONCE + self->progress -= (dt / self->duration); + if (self->progress < 0.0f) { + self->progress = 0.0f; + } + } + } + + if (self->callback_list != NULL) { + begin_ptr = vector_getBegin(self->callback_list); + end_ptr = vector_getEnd(self->callback_list); + for(i_ptr = begin_ptr; i_ptr < end_ptr; i_ptr++) { + if (((self->prev_progress < i_ptr->when) || (self->progress < self->prev_progress)) && ( i_ptr->when <= self->progress)) { + __perform_callback(i_ptr); + } + } + } + if (self->transition_duration > 0.0f) { + if (self->transition_progress < 1.0f) { + self->transition_progress += dt / self->transition_duration; + if (self->transition_progress >= 1.0f) { + self->transition_progress = 1.0f; + } + } else { + self->transition_duration = 0.0f; + if (self->bone_transform != 0) { + boneTransformList_reset(self->bone_transform); + } + } + } + } +} diff --git a/src/core2/spawnqueue.c b/src/core2/spawnqueue.c index b4675d5d..501ffbbb 100644 --- a/src/core2/spawnqueue.c +++ b/src/core2/spawnqueue.c @@ -475,7 +475,7 @@ void __spawnQueue_add_0(void (* arg0)(void)){ } } -void __spawnQueue_add_1(GenMethod_1 arg0, s32 arg1){ +void __spawnQueue_add_1(GenFunction_1 arg0, s32 arg1){ u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = (void (*)(void))arg0; @@ -508,7 +508,7 @@ void __spawnQueue_add_3(void (* arg0)(void), s32 arg1, s32 arg2, s32 arg3){ } } -void __spawnQueue_add_4(GenMethod_4 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){ +void __spawnQueue_add_4(GenFunction_4 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){ u32 tmp = (map_get() == MAP_90_GL_BATTLEMENTS)? 0x32: 0xF; if(tmp != spawnQueueLength){ spawnQueue[spawnQueueLength].func0 = (void (*)(void))arg0; diff --git a/src/core2/timedfuncqueue.c b/src/core2/timedfuncqueue.c index 362dba87..66a5a63a 100644 --- a/src/core2/timedfuncqueue.c +++ b/src/core2/timedfuncqueue.c @@ -12,13 +12,13 @@ typedef struct timed_function_queue_s{ u8 arg_cnt; u8 pad5[3]; union { - GenMethod_0 func0; - GenMethod_1 func1; - GenMethod_2 func2; - GenMethod_3 func3; - GenMethod_4 func4; - GenMethod_5 func5; - GenMethod_6 func6; + GenFunction_0 func0; + GenFunction_1 func1; + GenFunction_2 func2; + GenFunction_3 func3; + GenFunction_4 func4; + GenFunction_5 func5; + GenFunction_6 func6; }; s32 arg[25]; @@ -83,7 +83,7 @@ TimedFunction* __timedFuncQueue_insert(f32 time, s32 cnt, void *funcPtr, s32 arg retVal = (TimedFunction * )vector_insertNew((vector(TimedFunction)**)&D_80383380, ((s32)iPtr - (s32)startPtr)/(s32)sizeof(TimedFunction)); retVal->time = time; retVal->arg_cnt = cnt; - retVal->func5 = (GenMethod_5) funcPtr; + retVal->func5 = (GenFunction_5) funcPtr; retVal->arg[0] = arg0; retVal->arg[1] = arg1; retVal->arg[2] = arg2; @@ -162,7 +162,7 @@ f32 func_80324C7C(void){ } void timed_playSfx(f32 time, enum sfx_e arg0, f32 arg1, s32 arg2){ - timedFunc_set_3(time, (GenMethod_3)func_80324A68, arg0, (s32)(arg1*1000.0f), arg2); + timedFunc_set_3(time, (GenFunction_3)func_80324A68, arg0, (s32)(arg1*1000.0f), arg2); } void func_80324CD8(f32 time){ @@ -170,11 +170,11 @@ void func_80324CD8(f32 time){ } void func_80324CFC(f32 time, s32 id, s32 volume){ - timedFunc_set_2(time, (GenMethod_2)func_80324A28, id, volume); + timedFunc_set_2(time, (GenFunction_2)func_80324A28, id, volume); } void func_80324D2C(f32 time, enum comusic_e arg0){ - timedFunc_set_1(time, (GenMethod_1) func_80324A48, arg0); + timedFunc_set_1(time, (GenFunction_1) func_80324A48, arg0); } void func_80324D54(f32 time, enum sfx_e sfx_id, f32 arg2, s32 arg3, f32 position[3], f32 arg5, f32 arg6){ @@ -188,7 +188,7 @@ void func_80324D54(f32 time, enum sfx_e sfx_id, f32 arg2, s32 arg3, f32 position argStruct.unkC[1] = position[1]; argStruct.unkC[2] = position[2]; - timedFunc_set_6(time, (GenMethod_6) func_80324AA4, (void *) &argStruct); + timedFunc_set_6(time, (GenFunction_6) func_80324AA4, (void *) &argStruct); } void func_80324DBC(f32 time, enum asset_e text_id, s32 arg2, f32 position[3], ActorMarker *caller, void (*callback_method_1)(ActorMarker *, enum asset_e, s32), void (*callback_method_2)(ActorMarker *, enum asset_e, s32)) { @@ -207,47 +207,47 @@ void func_80324DBC(f32 time, enum asset_e text_id, s32 arg2, f32 position[3], Ac } else { sp20.position[0] = sp20.position[1] = sp20.position[2] = 0.0f; } - timedFunc_set_6(time, (GenMethod_6) func_80324AEC, (void *) &sp20); + timedFunc_set_6(time, (GenFunction_6) func_80324AEC, (void *) &sp20); } void func_80324E38(f32 time, s32 arg0){ - timedFunc_set_1(time, (GenMethod_1) func_80324BA0, arg0); + timedFunc_set_1(time, (GenFunction_1) func_80324BA0, arg0); } void timed_setStaticCameraToNode(f32 time, s32 arg0){ - timedFunc_set_1(time, (GenMethod_1) ncStaticCamera_setToNode, arg0); + timedFunc_set_1(time, (GenFunction_1) ncStaticCamera_setToNode, arg0); } void timed_exitStaticCamera(f32 time){ - timedFunc_set_0(time, (GenMethod_0) ncStaticCamera_exit); + timedFunc_set_0(time, (GenFunction_0) ncStaticCamera_exit); } -void timedFunc_set_0(f32 time, GenMethod_0 funcPtr){ +void timedFunc_set_0(f32 time, GenFunction_0 funcPtr){ __timedFuncQueue_insert(time, 0, (void *) funcPtr, 0, 0, 0, 0, 0); } -void timedFunc_set_1(f32 time, GenMethod_1 funcPtr, s32 arg0){ +void timedFunc_set_1(f32 time, GenFunction_1 funcPtr, s32 arg0){ __timedFuncQueue_insert(time, 1, (void *) funcPtr, arg0, 0, 0, 0, 0); } -void timedFunc_set_2(f32 time, GenMethod_2 funcPtr, s32 arg0, s32 arg1){ +void timedFunc_set_2(f32 time, GenFunction_2 funcPtr, s32 arg0, s32 arg1){ __timedFuncQueue_insert(time, 2, (void *) funcPtr, arg0, arg1, 0, 0, 0); } -void timedFunc_set_3(f32 time, GenMethod_3 funcPtr, s32 arg0, s32 arg1, s32 arg2){ +void timedFunc_set_3(f32 time, GenFunction_3 funcPtr, s32 arg0, s32 arg1, s32 arg2){ __timedFuncQueue_insert(time, 3, (void *) funcPtr, arg0, arg1, arg2, 0, 0); } -void timedFunc_set_4(f32 time, GenMethod_4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3){ +void timedFunc_set_4(f32 time, GenFunction_4 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3){ __timedFuncQueue_insert(time, 4, (void *) funcPtr, arg0, arg1, arg2, arg3, 0); } -void timedFunc_set_5(f32 time, GenMethod_5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){ +void timedFunc_set_5(f32 time, GenFunction_5 funcPtr, s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4){ __timedFuncQueue_insert(time, 5, (void *) funcPtr, arg0, arg1, arg2, arg3, arg4); } -void timedFunc_set_6(f32 time, GenMethod_6 funcPtr, void* argPtr ){ +void timedFunc_set_6(f32 time, GenFunction_6 funcPtr, void* argPtr ){ TimedFunction *q = __timedFuncQueue_insert(time, 6, funcPtr, 0, 0, 0, 0, 0); memcpy(&q->arg[5], argPtr, 0x50); } @@ -260,7 +260,7 @@ void timedJiggySpawn(f32 time, s32 jiggyId, f32 *position){ jiggyInfo.pos[1] = position[1]; jiggyInfo.pos[2] = position[2]; - timedFunc_set_6(time, (GenMethod_6) __spawnjiggy, (void*) &jiggyInfo); + timedFunc_set_6(time, (GenFunction_6) __spawnjiggy, (void*) &jiggyInfo); } bool timedFuncQueue_is_empty(void){ diff --git a/src/core2/vla.c b/src/core2/vla.c index 71e1bae5..b4c99473 100644 --- a/src/core2/vla.c +++ b/src/core2/vla.c @@ -1,6 +1,6 @@ #include #include "functions.h" -#include "variables.h" +#include "core2/vla.h" /* VARIABLE LENGTH ARRAY */ diff --git a/src/cutscenes/code_6730.c b/src/cutscenes/code_6730.c index b2a24e52..8ef17943 100644 --- a/src/cutscenes/code_6730.c +++ b/src/cutscenes/code_6730.c @@ -51,7 +51,7 @@ void cutscenes_func_8038CB20(ParticleEmitter *pCtrl){ } Actor* func_8038CBCC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ - Actor *actor = func_80325888(marker, gfx, mtx, vtx); + Actor *actor = actor_draw(marker, gfx, mtx, vtx); ActorLocal_cutscenes_6730 *local = (ActorLocal_cutscenes_6730 *)&actor->local; f32 sp3C[3]; int i; diff --git a/src/cutscenes/code_69F0.c b/src/cutscenes/code_69F0.c index 0fb8e0b6..2b2ad6d9 100644 --- a/src/cutscenes/code_69F0.c +++ b/src/cutscenes/code_69F0.c @@ -13,7 +13,7 @@ extern void func_8038CF50(Actor *this); ActorInfo D_8038E7A0 = { 0x211, 0x341, 0x45D, 1, NULL, - NULL, func_8038CF50, func_80325888, + NULL, func_8038CF50, actor_draw, 0, 0xA000, 0.0f, 0 }; diff --git a/src/cutscenes/code_6C90.c b/src/cutscenes/code_6C90.c index 5ea6f04c..5933f4d7 100644 --- a/src/cutscenes/code_6C90.c +++ b/src/cutscenes/code_6C90.c @@ -52,7 +52,7 @@ void func_8038D080(ParticleEmitter *pCtrl){ } Actor* func_8038D13C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ - Actor *actor = func_80325888(marker, gfx, mtx, vtx); + Actor *actor = actor_draw(marker, gfx, mtx, vtx); ActorLocal_cutscenes_6C90 *local = (ActorLocal_cutscenes_6C90 *)&actor->local; f32 sp3C[3]; int i; diff --git a/src/fight/chbossjinjo.c b/src/fight/chbossjinjo.c index 67bb5010..cbfbb936 100644 --- a/src/fight/chbossjinjo.c +++ b/src/fight/chbossjinjo.c @@ -28,28 +28,28 @@ ActorAnimationInfo D_80391810[] = { ActorInfo D_80391840 = { MARKER_27B_BOSS_JINJO_ORANGE, ACTOR_3A5_BOSS_JINJO_ORANGE, ASSET_3BC_MODEL_JINJO_ORANGE, 0x1, D_80391810, - func_8038C840, func_8038D014, func_80325888, + func_8038C840, func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; ActorInfo D_80391864 = { MARKER_27C_BOSS_JINJO_GREEN, ACTOR_3A6_BOSS_JINJO_GREEN, ASSET_3C2_MODEL_JINJO_GREEN, 0x1, D_80391810, - func_8038C840, func_8038D014, func_80325888, + func_8038C840, func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; ActorInfo D_80391888 = { MARKER_27D_BOSS_JINJO_PINK, ACTOR_3A7_BOSS_JINJO_PINK, ASSET_3C1_MODEL_JINJO_PINK, 0x1, D_80391810, - func_8038C840, func_8038D014, func_80325888, + func_8038C840, func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; ActorInfo D_803918AC = { MARKER_27E_BOSS_JINJO_YELLOW, ACTOR_3A8_BOSS_JINJO_YELLOW, ASSET_3BB_MODEL_JINJO_YELLOW, 0x1, D_80391810, - func_8038C840, func_8038D014, func_80325888, + func_8038C840, func_8038D014, actor_draw, 0, 0, 1.0f, 0 }; diff --git a/src/fight/chbossjinjobase.c b/src/fight/chbossjinjobase.c index ddfae347..e8eab233 100644 --- a/src/fight/chbossjinjobase.c +++ b/src/fight/chbossjinjobase.c @@ -12,7 +12,7 @@ void func_8038D568(Actor *this); ActorInfo D_80391990 = { MARKER_27A_JINJO_STATUE_BASE, ACTOR_3A2_JINJO_STATUE_BASE, ASSET_543_MODEL_JINJO_STATUE_BASE, 0x1, NULL, - func_8038D568, func_80326224, func_80325888, + func_8038D568, func_80326224, actor_draw, 0, 0x800, 0.0f, 0 }; @@ -127,7 +127,7 @@ void func_8038D568(Actor *this){ this->velocity_y = 100.0f; func_802BB3DC(0, 8.0f, 0.92f); - __spawnQueue_add_4((GenMethod_4)func_802C4140, 0x3ad, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]); + __spawnQueue_add_4((GenFunction_4)func_802C4140, 0x3ad, *(s32*)&this->unk1C[0], *(s32*)&this->unk1C[1], *(s32*)&this->unk1C[2]); func_8038D2EC(this->unk1C, 0x10); SPAWNQUEUE_ADD_1(chbossjinjobase_spawnStoneJinjo, this->marker); } diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index 8ee43bd0..9d96c82d 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -285,7 +285,7 @@ Actor *chfinalboss_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { if (local->phase == 1) { func_8033A25C(0); } - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_80386600(ActorMarker *arg0, s32 arg1) { @@ -695,7 +695,7 @@ void chfinalboss_setPhase(ActorMarker *this, u32 phase_id) timed_setStaticCameraToNode(0.0f, 0); timed_exitStaticCamera(2.0f); timed_setStaticCameraToNode(2.0f, 1); - timedFunc_set_1(2.0f, (GenMethod_1)func_8038B780, reinterpret_cast(s32, actor->marker)); + timedFunc_set_1(2.0f, (GenFunction_1)func_8038B780, reinterpret_cast(s32, actor->marker)); return; case 1: @@ -1506,7 +1506,7 @@ void chfinalboss_phase3_update(ActorMarker *marker) { chfinalboss_phase3_setState(this, 0x15); if (local->unkB == 0) { local->unkB = 1; - timedFunc_set_1(1.2f, (GenMethod_1)chfinalboss_dropHealth, (s32) this->marker); + timedFunc_set_1(1.2f, (GenFunction_1)chfinalboss_dropHealth, (s32) this->marker); } } break; @@ -1874,7 +1874,7 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { timedFunc_set_1(0.0f, chfinalboss_spawnStatue, 5); timed_setStaticCameraToNode(0.0f, sp28); timed_exitStaticCamera(7.5f); - timedFunc_set_1(7.5f, (GenMethod_1)func_8038AC50, (s32) this->marker); + timedFunc_set_1(7.5f, (GenFunction_1)func_8038AC50, (s32) this->marker); func_80324E38(7.5f, 0); break; @@ -1970,7 +1970,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { if (__chFinalBossJinjonatorHits == 9) { sp2C = 0x16; if(local->mirror_phase5) sp2C = 0x25; - timedFunc_set_1(2.4f, (GenMethod_1)func_8038AF84, (s32) this->marker); + timedFunc_set_1(2.4f, (GenFunction_1)func_8038AF84, (s32) this->marker); timed_setStaticCameraToNode(2.4f, sp2C); timed_exitStaticCamera(4.4f); timed_setStaticCameraToNode(4.4f, sp38 + 3 + __chFinalBossJinjonatorHits); @@ -2309,7 +2309,7 @@ void chfinalboss_update(Actor *this){ __chFinalBossJinjoStatueMarker[i] = NULL; } - __spawnQueue_add_1((GenMethod_1) chfinalboss_spawnShadow, (s32) this->marker); + __spawnQueue_add_1((GenFunction_1) chfinalboss_spawnShadow, (s32) this->marker); chfinalboss_setPhase(this->marker, 0); local->hits = 0; func_80386600(this->marker, 0); diff --git a/src/fight/chjinjonator.c b/src/fight/chjinjonator.c index 92cc950b..2dd49514 100644 --- a/src/fight/chjinjonator.c +++ b/src/fight/chjinjonator.c @@ -47,7 +47,7 @@ ActorAnimationInfo D_80391FB0[] = { ActorInfo D_80392018 = { MARKER_285_JINJONATOR, ACTOR_3AC_JINJONATOR, ASSET_551_MODEL_JINJONATOR, 0x1, D_80391FB0, - chjinjonator_update, func_80326224, func_80325888, + chjinjonator_update, func_80326224, actor_draw, 0, 0, 1.0f, 0 }; diff --git a/src/fight/chjinjonatorbase.c b/src/fight/chjinjonatorbase.c index f0f350d0..6c71414e 100644 --- a/src/fight/chjinjonatorbase.c +++ b/src/fight/chjinjonatorbase.c @@ -12,7 +12,7 @@ void chjinjonatorbase_update(Actor *); ActorInfo fight_D_80391A40 = { MARKER_27F_JINJONATOR_STATUE_BASE, ACTOR_3A9_JINJONATOR_STATUE_BASE, ASSET_544_MODEL_JINJONATOR_STATUE_BASE, 0x1, NULL, - chjinjonatorbase_update, func_80326224, func_80325888, + chjinjonatorbase_update, func_80326224, actor_draw, 0, 0x800, 0.0f, 0 }; @@ -97,7 +97,7 @@ void func_8038E260(ActorMarker *arg0) { Actor *sp24 = marker_getActor(arg0); func_802BB3DC(0, 18.0f, 0.92f); - __spawnQueue_add_4((GenMethod_4) func_802C4140, 0x3AD, *(u32 *)(&sp24->unk1C_x), *(u32 *)(&sp24->unk1C_y), *(u32 *)(&sp24->unk1C_z)); + __spawnQueue_add_4((GenFunction_4) func_802C4140, 0x3AD, *(u32 *)(&sp24->unk1C_x), *(u32 *)(&sp24->unk1C_y), *(u32 *)(&sp24->unk1C_z)); func_8038E03C(sp24->unk1C, 0x10); } @@ -139,7 +139,7 @@ void chjinjonatorbase_update(Actor *this){ func_802FA060(temp_s0, 17000, 17000, 0.0f); func_8025A6EC(JINGLE_MENACING_GRUNTILDA_A, 15000); func_8032BB88(this, 0, 0x7fff); - timedFunc_set_1(8.0f, (GenMethod_1)func_8038E2CC, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(8.0f, (GenFunction_1)func_8038E2CC, reinterpret_cast(s32,this->marker)); this->unk1C[0] = this->position_x; this->unk1C[1] = this->position_y; this->unk1C[2] = this->position_z; @@ -150,10 +150,10 @@ void chjinjonatorbase_update(Actor *this){ }else{ this->velocity_y = 100.0f; } - timedFunc_set_1(this->unk60* 0.05, (GenMethod_1)func_8038E260, reinterpret_cast(s32,this->marker)); - timedFunc_set_1(this->unk60* 0.28, (GenMethod_1) func_8038E260, reinterpret_cast(s32,this->marker)); - timedFunc_set_1(this->unk60* 0.46, (GenMethod_1) func_8038E260, reinterpret_cast(s32,this->marker)); - timedFunc_set_1(this->unk60* 0.58, (GenMethod_1) func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.05, (GenFunction_1)func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.28, (GenFunction_1) func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.46, (GenFunction_1) func_8038E260, reinterpret_cast(s32,this->marker)); + timedFunc_set_1(this->unk60* 0.58, (GenFunction_1) func_8038E260, reinterpret_cast(s32,this->marker)); SPAWNQUEUE_ADD_1(chjinjonatorbase_spawnStoneJinjo, this->marker); } diff --git a/src/fight/chspellbarrier.c b/src/fight/chspellbarrier.c index d79a7903..974c10d4 100644 --- a/src/fight/chspellbarrier.c +++ b/src/fight/chspellbarrier.c @@ -29,7 +29,7 @@ void chspellbarrier_update(Actor *this); ActorInfo D_80391AD0 = { MARKER_284_GRUNTY_SPELL_BARRIER, ACTOR_3AB_GRUNTY_SPELL_BARRIER, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER, 0x1, NULL, - chspellbarrier_update, func_80326224, func_80325888, + chspellbarrier_update, func_80326224, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/fight/chspellfireball.c b/src/fight/chspellfireball.c index 7d7197a7..c633e457 100644 --- a/src/fight/chspellfireball.c +++ b/src/fight/chspellfireball.c @@ -22,7 +22,7 @@ void func_8038F620(Actor *this); ActorInfo fight_D_80391B00 = { MARKER_25C_GRUNTY_SPELL_FIREBALL, ACTOR_389_GRUNTY_SPELL_FIREBALL, ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK, 0x1, NULL, - func_8038F620, func_80326224, func_80325888, + func_8038F620, func_80326224, actor_draw, 0, 0, 1.0f, 0 }; diff --git a/src/fight/chstonejinjo.c b/src/fight/chstonejinjo.c index 80d8bf19..91c0529f 100644 --- a/src/fight/chstonejinjo.c +++ b/src/fight/chstonejinjo.c @@ -19,7 +19,7 @@ ActorAnimationInfo fight_D_803919F0[] ={ ActorInfo D_80391A10 = { MARKER_276_STONE_JINJO, ACTOR_3A1_STONE_JINJO, ASSET_545_MODEL_STONE_JINJO, 0x1, fight_D_803919F0, - chstonejinjo_update, func_80326224, func_80325888, + chstonejinjo_update, func_80326224, actor_draw, 0, 0x800, 1.0f, 0 }; diff --git a/src/lair/ch/brentilda.c b/src/lair/ch/brentilda.c index f3f96abe..e9d9555e 100644 --- a/src/lair/ch/brentilda.c +++ b/src/lair/ch/brentilda.c @@ -17,7 +17,7 @@ ActorAnimationInfo chBrentildaAnimations[] ={ {0x26C, 4.0f}, {0x26B, 4.0f}, }; -ActorInfo chBrentilda = { 0x1E0, 0x348, 0x539, 0x1, chBrentildaAnimations, chBrentilda_update, func_80326224, func_80325888, 2000, 0, 2.0f, 0}; +ActorInfo chBrentilda = { 0x1E0, 0x348, 0x539, 0x1, chBrentildaAnimations, chBrentilda_update, func_80326224, actor_draw, 2000, 0, 2.0f, 0}; /* .code */ void func_8038BA30(ActorMarker *marker, enum asset_e text_id, s32 arg2){ diff --git a/src/lair/ch/cauldron.c b/src/lair/ch/cauldron.c index 95e2014f..6e1ca3af 100644 --- a/src/lair/ch/cauldron.c +++ b/src/lair/ch/cauldron.c @@ -438,7 +438,7 @@ Actor *chWarpCauldron_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) func_8033A45C(3, this->unk38_0 ? TRUE : FALSE); func_8033A45C(4, this->unk38_0 ? FALSE : TRUE); } - this = func_80325888(marker, gfx, mtx, vtx); + this = actor_draw(marker, gfx, mtx, vtx); if (marker->unk14_21 && this->unk38_0 && (getGameMode() != GAME_MODE_4_PAUSED)) { sp3C[1] = randi2(200, 255); sp3C[0] = randi2(150, sp3C[1]); diff --git a/src/lair/code_0.c b/src/lair/code_0.c index feadbf12..9e852965 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -115,52 +115,52 @@ ActorAnimationInfo D_80392CB0[] = { {0x271, 3.0f}, {0x271, 1e+08f} }; -ActorInfo lair_D_80392D90 = { 0x270, 0x2D8, 0x3B2, 0x1, NULL, func_802D3D54, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392DB4 = { 0x110, 0x214, 0x4AB, 0x1, D_80392CB0, func_803896D4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392DD8 = { 0x113, 0x217, 0x4A9, 0x1, D_80392CB0, func_803896F4, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392DFC = { 0x115, 0x219, 0x4AA, 0x1, D_80392CB0, func_80389714, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392E20 = { 0x11B, 0x221, 0x4B5, 0x1, D_80392CB0, func_80389734, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392E44 = { 0x11C, 0x222, 0x4B2, 0x1, D_80392CB0, func_8038975C, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392E68 = { 0x11D, 0x223, 0x4B0, 0x1, D_80392CB0, func_80389784, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392E8C = { 0x232, 0x23C, 0x4B8, 0x1, D_80392CB0, func_803897AC, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392EB0 = { 0x23F, 0x246, 0x534, 0x1, D_80392CB0, func_80386D20, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392ED4 = { 0x241, 0x248, 0x540, 0x1, D_80392CB0, func_80386780, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392EF8 = { MARKER_109_BREAKABLE_BRICK_WALL, ACTOR_20D_BREAKABLE_BRICK_WALL, ASSET_4A1_MODEL_BREAKABLE_BRICK_WALL, 0x1, D_80392CB0, lair_func_80386550, func_80326224, func_80325888, 0, 0, 0.0f, 0x85}; -ActorInfo D_80392F1C = { 0x264, 0x2E5, 0x550, 0x19, D_80392CB0, func_80388524, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_80392F40 = { MARKER_224_BREAKABLE_FLOOR_COBWEB, ACTOR_230_BREAKABLE_FLOOR_COBWEB, ASSET_4BF_MODEL_FLOOR_COBWEB, 0xB, D_80392CB0, chFloorCobweb_update, func_80326224, func_80325888, 0, 0, 0.0f, 0x88}; -ActorInfo D_80392F64 = { MARKER_225_BREAKABLE_WALL_COBWEB, ACTOR_231_BREAKABLE_WALL_COBWEB, ASSET_4D5_MODEL_WALL_COBWEB, 0xE, D_80392CB0, chWallCobweb_update, func_80326224, func_80325888, 0, 0, 0.0f, 0x88}; -ActorInfo D_80392F88 = { 0x111, 0x215, 0x4A4, 0x1, NULL, func_80388FC8, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392FAC = { 0x112, 0x216, 0x4A5, 0x1, NULL, func_80388FC8, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392FD0 = { 0x114, 0x218, 0x4A6, 0x1, NULL, lair_func_80389204, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80392FF4 = { 0x10D, 0x211, 0x4A3, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80393018 = { 0x22C, 0x23A, 0x4D9, 0x1, NULL, func_803882B0, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_8039303C = { 0x164, 0x259, 0x507, 0x1, NULL, func_803880BC, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80393060 = { 0x165, 0x25A, 0x508, 0x1, NULL, func_8038824C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80393084 = { MARKER_240_LAIR_SWITCH_FLIGHT_PAD, 0x247, 0x48A, 0x1, NULL, func_80386D78, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_803930A8 = { 0x242, 0x249, 0x2DD, 0x1, NULL, func_803867A8, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_803930CC = { 0x11F, 0x225, 0x4B3, 0x1, NULL, func_8038A064, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_803930F0 = { 0x10A, 0x20E, 0x4A2, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; -ActorInfo D_80393114 = { 0x11A, 0x220, 0x4B7, 0x1, NULL, func_80389FF4, func_80326224, func_80325E78, 0, 0, 0.0f, 0x91}; -ActorInfo D_80393138 = { 0x11E, 0x224, 0x4AF, 0x1, NULL, func_8038A014, func_80326224, func_80325E78, 0, 0, 0.0f, 0x83}; -ActorInfo D_8039315C = { 0x227, 0x234, 0x4D6, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x93}; -ActorInfo D_80393180 = { 0x228, 0x235, 0x4D7, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x8B}; -ActorInfo D_803931A4 = { 0x229, 0x236, 0x4D8, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x8B}; -ActorInfo D_803931C8 = { MARKER_121_GLASS_EYE, ACTOR_227_GLASS_EYE, ASSET_4BD_MODEL_GLASS_EYE, 0x1, NULL, func_8038A034, func_80326224, func_80325888, 0, 0, 0.0f, 0x89}; -ActorInfo D_803931EC = { 0x116, 0x21A, 0x4AC, 0x1, NULL, func_803893B8, func_80326224, func_80325E78, 0, 0, 0.0f, 0x82}; -ActorInfo D_80393210 = { 0x117, 0x21B, 0x4AD, 0x1, NULL, lair_func_803894B0, func_80326224, func_80325E78, 0, 0, 0.0f, 0x82}; -ActorInfo D_80393234 = { 0x10B, 0x20F, 0x4B4, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x90}; -ActorInfo D_80393258 = { 0x10C, 0x210, 0x4AE, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x84}; -ActorInfo D_8039327C = { 0x10E, 0x212, 0x4A7, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x7F}; -ActorInfo D_803932A0 = { 0x120, 0x226, 0x4BC, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x87}; -ActorInfo D_803932C4 = { 0x122, ACTOR_228_MMM_ENTRANCE_DOOR, 0x4BE, 0x1, NULL, func_80388524, func_80326224, func_80325E78, 0, 0, 0.0f, 0x8C}; -ActorInfo D_803932E8 = { 0x10F, 0x213, 0x4A8, 0x1, NULL, func_803875F0, func_80326224, func_80325E78, 0, 0, 0.0f, 0x80}; -ActorInfo D_8039330C = { 0x118, 0x21E, 0x4B1, 0x1, NULL, lair_func_8038A084, func_80326224, func_80325E78, 0, 0, 0.0f, 0x8F}; -ActorInfo D_80393330 = { 0x119, 0x21F, 0x4B6, 0x1, NULL, func_8038A0A4, func_80326224, func_80325E78, 0, 0, 0.0f, 0x92}; +ActorInfo lair_D_80392D90 = { 0x270, 0x2D8, 0x3B2, 0x1, NULL, func_802D3D54, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392DB4 = { 0x110, 0x214, 0x4AB, 0x1, D_80392CB0, func_803896D4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392DD8 = { 0x113, 0x217, 0x4A9, 0x1, D_80392CB0, func_803896F4, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392DFC = { 0x115, 0x219, 0x4AA, 0x1, D_80392CB0, func_80389714, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392E20 = { 0x11B, 0x221, 0x4B5, 0x1, D_80392CB0, func_80389734, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392E44 = { 0x11C, 0x222, 0x4B2, 0x1, D_80392CB0, func_8038975C, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392E68 = { 0x11D, 0x223, 0x4B0, 0x1, D_80392CB0, func_80389784, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392E8C = { 0x232, 0x23C, 0x4B8, 0x1, D_80392CB0, func_803897AC, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392EB0 = { 0x23F, 0x246, 0x534, 0x1, D_80392CB0, func_80386D20, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392ED4 = { 0x241, 0x248, 0x540, 0x1, D_80392CB0, func_80386780, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392EF8 = { MARKER_109_BREAKABLE_BRICK_WALL, ACTOR_20D_BREAKABLE_BRICK_WALL, ASSET_4A1_MODEL_BREAKABLE_BRICK_WALL, 0x1, D_80392CB0, lair_func_80386550, func_80326224, actor_draw, 0, 0, 0.0f, 0x85}; +ActorInfo D_80392F1C = { 0x264, 0x2E5, 0x550, 0x19, D_80392CB0, func_80388524, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_80392F40 = { MARKER_224_BREAKABLE_FLOOR_COBWEB, ACTOR_230_BREAKABLE_FLOOR_COBWEB, ASSET_4BF_MODEL_FLOOR_COBWEB, 0xB, D_80392CB0, chFloorCobweb_update, func_80326224, actor_draw, 0, 0, 0.0f, 0x88}; +ActorInfo D_80392F64 = { MARKER_225_BREAKABLE_WALL_COBWEB, ACTOR_231_BREAKABLE_WALL_COBWEB, ASSET_4D5_MODEL_WALL_COBWEB, 0xE, D_80392CB0, chWallCobweb_update, func_80326224, actor_draw, 0, 0, 0.0f, 0x88}; +ActorInfo D_80392F88 = { 0x111, 0x215, 0x4A4, 0x1, NULL, func_80388FC8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392FAC = { 0x112, 0x216, 0x4A5, 0x1, NULL, func_80388FC8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392FD0 = { 0x114, 0x218, 0x4A6, 0x1, NULL, lair_func_80389204, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80392FF4 = { 0x10D, 0x211, 0x4A3, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80393018 = { 0x22C, 0x23A, 0x4D9, 0x1, NULL, func_803882B0, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_8039303C = { 0x164, 0x259, 0x507, 0x1, NULL, func_803880BC, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80393060 = { 0x165, 0x25A, 0x508, 0x1, NULL, func_8038824C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80393084 = { MARKER_240_LAIR_SWITCH_FLIGHT_PAD, 0x247, 0x48A, 0x1, NULL, func_80386D78, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_803930A8 = { 0x242, 0x249, 0x2DD, 0x1, NULL, func_803867A8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_803930CC = { 0x11F, 0x225, 0x4B3, 0x1, NULL, func_8038A064, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_803930F0 = { 0x10A, 0x20E, 0x4A2, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; +ActorInfo D_80393114 = { 0x11A, 0x220, 0x4B7, 0x1, NULL, func_80389FF4, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x91}; +ActorInfo D_80393138 = { 0x11E, 0x224, 0x4AF, 0x1, NULL, func_8038A014, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x83}; +ActorInfo D_8039315C = { 0x227, 0x234, 0x4D6, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x93}; +ActorInfo D_80393180 = { 0x228, 0x235, 0x4D7, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8B}; +ActorInfo D_803931A4 = { 0x229, 0x236, 0x4D8, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8B}; +ActorInfo D_803931C8 = { MARKER_121_GLASS_EYE, ACTOR_227_GLASS_EYE, ASSET_4BD_MODEL_GLASS_EYE, 0x1, NULL, func_8038A034, func_80326224, actor_draw, 0, 0, 0.0f, 0x89}; +ActorInfo D_803931EC = { 0x116, 0x21A, 0x4AC, 0x1, NULL, func_803893B8, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x82}; +ActorInfo D_80393210 = { 0x117, 0x21B, 0x4AD, 0x1, NULL, lair_func_803894B0, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x82}; +ActorInfo D_80393234 = { 0x10B, 0x20F, 0x4B4, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x90}; +ActorInfo D_80393258 = { 0x10C, 0x210, 0x4AE, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x84}; +ActorInfo D_8039327C = { 0x10E, 0x212, 0x4A7, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x7F}; +ActorInfo D_803932A0 = { 0x120, 0x226, 0x4BC, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x87}; +ActorInfo D_803932C4 = { 0x122, ACTOR_228_MMM_ENTRANCE_DOOR, 0x4BE, 0x1, NULL, func_80388524, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8C}; +ActorInfo D_803932E8 = { 0x10F, 0x213, 0x4A8, 0x1, NULL, func_803875F0, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x80}; +ActorInfo D_8039330C = { 0x118, 0x21E, 0x4B1, 0x1, NULL, lair_func_8038A084, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8F}; +ActorInfo D_80393330 = { 0x119, 0x21F, 0x4B6, 0x1, NULL, func_8038A0A4, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x92}; ActorInfo D_80393354 = { 0x266, 0x2E3, 0x563, 0x1, NULL, func_803870DC, func_80326224, lair_func_80387560, 0, 0, 0.0f, 0}; ActorInfo D_80393378 = { 0x17D, 0x1E1, 0x517, 0x1, NULL, func_80389D08, func_80326224, func_80389E10, 0, 0, 0.0f, 0x8D}; -ActorInfo D_8039339C = { 0x234, 0x23E, 0x4E1, 0x12, D_80392CB0, func_8038982C, func_80326224, func_80325E78, 0, 0, 0.0f, 0}; +ActorInfo D_8039339C = { 0x234, 0x23E, 0x4E1, 0x12, D_80392CB0, func_8038982C, func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; ActorInfo D_803933C0 = { 0x163, 0x258, 0x511, 0x12, D_80392CB0, func_80389898, func_80326224, func_8038664C, 0, 0, 0.0f, 0x8E}; -ActorInfo D_803933E4 = { 0x160, 0x255, 0x509, 0x15, D_80392CB0, func_80389934, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_803933E4 = { 0x160, 0x255, 0x509, 0x15, D_80392CB0, func_80389934, func_80326224, actor_draw, 0, 0, 0.0f, 0}; ActorInfo D_80393408 = { 0x102, 0x203, 0x491, 0x1, D_80392CB0, func_80387730, func_80326224, func_80387DA8, 0, 0, 0.0f, 0}; struct31s D_8039342C = { {0.31f, 0.37f}, @@ -307,7 +307,7 @@ Actor *func_8038664C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) func_8033A45C(3, val == 1 ? 1 : 0); func_8033A45C(4, val == 0 ? 1 : 0); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } ParticleEmitter *func_803866D8(s32 a0) @@ -595,7 +595,7 @@ Actor *lair_func_80387560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) for (i = 0; i != 10; i++) func_8033A45C(i + 1, actor->unkF4_8 + 1 == i + 2); - return func_80325E78(marker, gfx, mtx, vtx); + return actor_drawFullDepth(marker, gfx, mtx, vtx); } //circular grate @@ -788,7 +788,7 @@ Actor *func_80387DA8(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) /** * Draw the note door */ - return func_80325E78(marker, gfx, mtx, vtx); + return actor_drawFullDepth(marker, gfx, mtx, vtx); } void func_80387E94(s32 arg0) @@ -822,7 +822,7 @@ void func_80387F1C(void) { jiggySpawn(JIGGY_35_LAIR_CC_WITCH_SWITCH, tmp); // FIXME: macro? - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, *(s32 *)&tmp[0], *(s32 *)&tmp[1], *(s32 *)&tmp[2]); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, *(s32 *)&tmp[0], *(s32 *)&tmp[1], *(s32 *)&tmp[2]); } } @@ -871,7 +871,7 @@ void func_803880BC(Actor *this) this->position_y -= 51.f; this->unk1C[0] = 0; - __spawnQueue_add_1((GenMethod_1)func_80387E94, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80387E94, reinterpret_cast(s32, this->marker)); if (func_803203FC(0xBC) && !fileProgressFlag_get(FILEPROG_9A_CC_WITCH_SWITCH_PRESSED)) FUNC_8030E624(SFX_3F6_UNKNOWN, 0.75f, 30000); @@ -1563,7 +1563,7 @@ void func_8038982C(Actor *this) this->initialized = TRUE; if (!fileProgressFlag_get(FILEPROG_9E_CRYPT_COFFIN_LID_OPEN)) - __spawnQueue_add_1((GenMethod_1)func_803897D4, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_803897D4, reinterpret_cast(s32, this->marker)); } } @@ -1779,7 +1779,7 @@ Actor *func_80389E10(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { static s32 D_80395360; - this = func_80325E78(marker, gfx, mtx, vtx); + this = actor_drawFullDepth(marker, gfx, mtx, vtx); if (marker->unk14_21 && (this->unk60 != 0.0f)) { func_8034A174((struct5Bs *) marker->unk44, 5, sp84); func_8034A174((struct5Bs *) marker->unk44, 6, sp78); diff --git a/src/lair/code_5ED0.c b/src/lair/code_5ED0.c index a38955f4..a6900e91 100644 --- a/src/lair/code_5ED0.c +++ b/src/lair/code_5ED0.c @@ -776,7 +776,7 @@ void func_8038D1E4(void) case 3: { timedFunc_set_2( - 0.5f, (GenMethod_2)func_8038D16C, + 0.5f, (GenFunction_2)func_8038D16C, D_80394354[D_8037DCB8->unkC].unk2, D_80394354[D_8037DCB8->unkC].unk4 ); @@ -788,7 +788,7 @@ void func_8038D1E4(void) } if (cleanupDelay > 0.0) // f64 - timedFunc_set_1(cleanupDelay, (GenMethod_1)func_8038D670, FFA_4_UNK); + timedFunc_set_1(cleanupDelay, (GenFunction_1)func_8038D670, FFA_4_UNK); } void func_8038D394(void) @@ -841,7 +841,7 @@ void func_8038D4BC(void) // trigger warp after a delay timedFunc_set_3(0.25f, - (GenMethod_3)func_802E4078, + (GenFunction_3)func_802E4078, D_803945B8[D_8037DCB8->unkC].map, D_803945B8[D_8037DCB8->unkC].exit, 1 diff --git a/src/lair/code_86F0.c b/src/lair/code_86F0.c index b9c87026..5c012432 100644 --- a/src/lair/code_86F0.c +++ b/src/lair/code_86F0.c @@ -25,8 +25,8 @@ void func_8038F350(Actor *this, s32 next_state); void lair_func_8038F924(Actor *this); /* .data */ -ActorInfo D_803947B0 = { 0x1EB, 0x3B7, 0x48B, 0x1, NULL, lair_func_8038F924, func_80326224, func_80325888, 0, 0, 0.0f, 0}; -ActorInfo D_803947D4 = { 0x1EB, 0x3BC, 0x538, 0x1, NULL, lair_func_8038F924, func_80326224, func_80325888, 0, 0, 0.0f, 0}; +ActorInfo D_803947B0 = { 0x1EB, 0x3B7, 0x48B, 0x1, NULL, lair_func_8038F924, func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_803947D4 = { 0x1EB, 0x3BC, 0x538, 0x1, NULL, lair_func_8038F924, func_80326224, actor_draw, 0, 0, 0.0f, 0}; Struct_lair_86F0_0 D_803947F8[0xb] ={ { 1, 0x1, FILEPROG_5D_MM_PUZZLE_PIECES_PLACED}, { 2, 0x2, FILEPROG_5E_TCC_PUZZLE_PIECES_PLACED}, @@ -365,7 +365,7 @@ void func_8038F350(Actor *this, s32 next_state){ } else if (this->unkF4_8 == 0xA) { func_80324DBC(1.0f, 0xFAC, 4, NULL, this->marker, func_8038F0C0, NULL); } - timedFunc_set_1(2.0f, (GenMethod_1) func_8038EBEC, (s32) this->marker); + timedFunc_set_1(2.0f, (GenFunction_1) func_8038EBEC, (s32) this->marker); this->unk60 = 3.0f; break; } diff --git a/src/lair/code_9C40.c b/src/lair/code_9C40.c index bf685b22..d5a9d9bc 100644 --- a/src/lair/code_9C40.c +++ b/src/lair/code_9C40.c @@ -20,7 +20,7 @@ ActorInfo D_803948B8 = { 0x16F, 0x1D7, 0x54F, 0x1, D_80394860, func_803902B8, fu Actor *func_80390030(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(3, 1); func_8033A45C(4, 1); - func_80325888(marker, gfx, mtx, vtx); + actor_draw(marker, gfx, mtx, vtx); } s32 func_80390084(void) { diff --git a/src/lair/code_A170.c b/src/lair/code_A170.c index a94ab5c3..cbe51848 100644 --- a/src/lair/code_A170.c +++ b/src/lair/code_A170.c @@ -28,7 +28,7 @@ ActorInfo D_80394958 = { 0x172, 0x1DA, 0x549, 0x1, D_80394900, func_803906A0, fu Actor *func_80390560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(3, marker->collidable); func_8033A45C(4, marker->collidable); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_803905CC(ActorMarker *marker, ActorMarker *other_marker){ diff --git a/src/lair/code_A4A0.c b/src/lair/code_A4A0.c index bb41ec57..0ff29525 100644 --- a/src/lair/code_A4A0.c +++ b/src/lair/code_A4A0.c @@ -40,9 +40,9 @@ ActorAnimationInfo D_803949B0[] ={ {0x26D, 1000000.0f}, {0x26D, 1000000.0f}, }; -ActorInfo D_80394A08 = { MARKER_1EA_GRUNTLING_RED, ACTOR_367_GRUNTLING_RED, ASSET_54A_MODEL_GRUNTLING_RED, 0x1, D_803949B0, func_80390AE8, func_80326224, func_80325888, 2500, 0, 1.0f, 0}; -ActorInfo D_80394A2C = { MARKER_295_GRUNTLING_BLUE, ACTOR_3BF_GRUNTLING_BLUE, ASSET_561_MODEL_GRUNTLING_BLUE, 0x1, D_803949B0, func_80390AE8, func_80326224, func_80325888, 2500, 0, 1.0f, 0}; -ActorInfo D_80394A50 = { MARKER_1F1_GRUNTLING_BLACK, ACTOR_3C0_GRUNTLING_BLACK, ASSET_562_MODEL_GRUNTLING_BLACK, 0x1, D_803949B0, func_80390AE8, func_80326224, func_80325888, 2500, 0, 1.0f, 0}; +ActorInfo D_80394A08 = { MARKER_1EA_GRUNTLING_RED, ACTOR_367_GRUNTLING_RED, ASSET_54A_MODEL_GRUNTLING_RED, 0x1, D_803949B0, func_80390AE8, func_80326224, actor_draw, 2500, 0, 1.0f, 0}; +ActorInfo D_80394A2C = { MARKER_295_GRUNTLING_BLUE, ACTOR_3BF_GRUNTLING_BLUE, ASSET_561_MODEL_GRUNTLING_BLUE, 0x1, D_803949B0, func_80390AE8, func_80326224, actor_draw, 2500, 0, 1.0f, 0}; +ActorInfo D_80394A50 = { MARKER_1F1_GRUNTLING_BLACK, ACTOR_3C0_GRUNTLING_BLACK, ASSET_562_MODEL_GRUNTLING_BLACK, 0x1, D_803949B0, func_80390AE8, func_80326224, actor_draw, 2500, 0, 1.0f, 0}; /* .code */ void func_80390890(ActorMarker *marker, ActorMarker *other_marker) { @@ -54,7 +54,7 @@ void func_80390890(ActorMarker *marker, ActorMarker *other_marker) { func_80328B8C(this, 5, 0.0f, 1); actor_playAnimationOnce(this); func_8030E878(SFX_C2_GRUBLIN_EGH, local->unkC_27*0.1 + 0.8, 32000, this->position, 1250.0f, 2500.0f); - __spawnQueue_add_4((GenMethod_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); + __spawnQueue_add_4((GenFunction_4)func_802C4140, ACTOR_4C_STEAM, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, this->position[1]), reinterpret_cast(s32, this->position[2])); actor_collisionOff(this); this->unk138_24 = TRUE; } diff --git a/src/lair/code_A810.c b/src/lair/code_A810.c index d404b46d..5279a86e 100644 --- a/src/lair/code_A810.c +++ b/src/lair/code_A810.c @@ -78,7 +78,7 @@ void func_80390D3C(Actor *this, s32 val) this->unk1C[2] = this->position_z; } - __spawnQueue_add_1((GenMethod_1)func_80390C00, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80390C00, reinterpret_cast(s32, this->marker)); break; } @@ -88,7 +88,7 @@ void func_80390D3C(Actor *this, s32 val) this->unk1C[1] = this->position_y; this->unk1C[2] = this->position_z; - __spawnQueue_add_1((GenMethod_1)func_80390CB4, reinterpret_cast(s32, this->marker)); + __spawnQueue_add_1((GenFunction_1)func_80390CB4, reinterpret_cast(s32, this->marker)); break; } diff --git a/src/lair/code_BBD0.c b/src/lair/code_BBD0.c index e892ec76..78637d1b 100644 --- a/src/lair/code_BBD0.c +++ b/src/lair/code_BBD0.c @@ -21,17 +21,17 @@ ActorAnimationInfo D_80394BE0[] = { }; ActorInfo D_80394C28 = { MARKER_29A_FF_PRIZE, ACTOR_3C4_FF_PRIZE_WASHING_CAULDRON, ASSET_55F_MODEL_FF_PRIZE_WASHING_CAULDRON, 0x1, D_80394BE0, - func_8039217C, func_80326224, func_80325888, + func_8039217C, func_80326224, actor_draw, 0, 0, 3.0f, 0 }; ActorInfo D_80394C4C = { MARKER_29A_FF_PRIZE, ACTOR_3C7_FF_PRIZE_GRUNTY_DOLL, ASSET_560_MODEL_FF_PRIZE_GRUNTY_DOLL, 0x3, D_80394BE0, - func_8039217C, func_80326224, func_80325888, + func_8039217C, func_80326224, actor_draw, 0, 0, 1.0f, 0 }; ActorInfo D_80394C70 = { MARKER_29A_FF_PRIZE, 0x3C6, 0x34C, 0x0, D_80394BE0, - func_8039217C, func_80326224, func_80325888, + func_8039217C, func_80326224, actor_draw, 0, 0, 3.0f, 0 }; ActorInfo D_80394C94 = { MARKER_29A_FF_PRIZE, ACTOR_3C8_FF_PRIZE_TOOTY, ASSET_35B_FF_PRIZE_TOOTY, @@ -44,7 +44,7 @@ ActorInfo D_80394C94 = { MARKER_29A_FF_PRIZE, ACTOR_3C8_FF_PRIZE_TOOTY, ASSET_35 Actor *func_80391FC0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(4, 1); func_8033A45C(5, 1); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); } void func_80392014(Actor *this, enum sfx_e sfx_id, f32 arg2, f32 arg3, s32 arg4) { diff --git a/src/lair/code_C1C0.c b/src/lair/code_C1C0.c index 37482c18..7ec635a5 100644 --- a/src/lair/code_C1C0.c +++ b/src/lair/code_C1C0.c @@ -23,7 +23,7 @@ Actor *func_803925B0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_8033A45C(3, 0); func_8033A45C(4, 0); func_8033A45C(5, 0); - return func_80325888(marker, gfx, mtx, vtx); + return actor_draw(marker, gfx, mtx, vtx); }