animation struct documentation
This commit is contained in:
@@ -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
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#define __ANIM_CTRL_H__
|
||||
|
||||
#include <ultra64.h>
|
||||
#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);
|
||||
|
15
include/core2/bonetransform.h
Normal file
15
include/core2/bonetransform.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef _BONE_TRANSFORMATION_H_
|
||||
#define _BONE_TRANSFORMATION_H_
|
||||
#include <ultratypes.h>
|
||||
|
||||
typedef struct {
|
||||
f32 unk0[4];
|
||||
f32 scale[3];
|
||||
f32 unk1C[3];
|
||||
}BoneTransform;
|
||||
|
||||
typedef struct bone_transform_list_s{
|
||||
BoneTransform *ptr;
|
||||
s32 count;
|
||||
}BoneTransformList;
|
||||
#endif
|
@@ -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);
|
||||
|
58
include/core2/skeletalanim.h
Normal file
58
include/core2/skeletalanim.h
Normal file
@@ -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
|
@@ -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
|
||||
|
17
include/core2/vla.h
Normal file
17
include/core2/vla.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _STATIC_LENGTH_ARRAY_H_
|
||||
#define _STATIC_LENGTH_ARRAY_H_
|
||||
|
||||
#include<ultratypes.h>
|
||||
|
||||
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
|
@@ -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]);
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
#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 {
|
||||
|
Reference in New Issue
Block a user