animation struct documentation
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user