Matched hsfmotion
This commit is contained in:
parent
a3536d462a
commit
dab8e2e54b
12 changed files with 1592 additions and 91 deletions
|
|
@ -6128,7 +6128,7 @@ Hu3DShadowCamBit = .sbss:0x801D3C50; // type:object size:0x2 data:2byte
|
|||
toonAnim = .sbss:0x801D3C54; // type:object size:0x4 data:4byte
|
||||
reflectMapNo = .sbss:0x801D3C58; // type:object size:0x2 data:2byte
|
||||
BGColor = .sbss:0x801D3C5A; // type:object size:0x4 data:byte
|
||||
bitMapPtr = .sbss:0x801D3C60; // type:object size:0x8 scope:local data:4byte
|
||||
bitMapPtr = .sbss:0x801D3C60; // type:object size:0x4 scope:local data:4byte
|
||||
metf = .sbss:0x801D3C68; // type:object size:0x1 scope:local data:byte
|
||||
tokenEndF = .sbss:0x801D3C6A; // type:object size:0x2 scope:local data:2byte
|
||||
total_copy_clks = .sbss:0x801D3C6C; // type:object size:0x4 scope:local data:4byte
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ config.libs = [
|
|||
Object(Matching, "game/hsfload.c"),
|
||||
Object(NonMatching, "game/hsfdraw.c"),
|
||||
Object(Matching, "game/hsfman.c"),
|
||||
Object(NonMatching, "game/hsfmotion.c"),
|
||||
Object(Matching, "game/hsfmotion.c"),
|
||||
Object(Matching, "game/hsfanim.c"),
|
||||
Object(Matching, "game/hsfex.c"),
|
||||
Object(Matching, "game/perf.c"),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,30 @@
|
|||
#include "game/hsfman.h"
|
||||
#include "dolphin.h"
|
||||
|
||||
typedef struct model_data ModelData;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ s16 unk04;
|
||||
/* 0x06 */ char unk06[2];
|
||||
/* 0x08 */ float unk08;
|
||||
/* 0x0C */ float unk0C;
|
||||
/* 0x10 */ float unk10;
|
||||
/* 0x14 */ float unk14;
|
||||
/* 0x18 */ float unk18;
|
||||
/* 0x1C */ float unk1C;
|
||||
/* 0x20 */ float unk20;
|
||||
/* 0x24 */ float unk24;
|
||||
/* 0x28 */ float unk28;
|
||||
/* 0x2C */ float unk2C;
|
||||
/* 0x30 */ float unk30;
|
||||
/* 0x34 */ float unk34;
|
||||
/* 0x38 */ float unk38;
|
||||
/* 0x3C */ HsfBitmap *unk3C;
|
||||
/* 0x40 */ char unk40[4];
|
||||
} HsfdrawStruct01; // Size 0x44
|
||||
|
||||
void Hu3DDrawPreInit(void);
|
||||
void Hu3DDraw(ModelData *arg0, Mtx arg1, Vec *arg2);
|
||||
s32 ObjCullCheck(HsfData *arg0, HsfObject *arg1, Mtx arg2);
|
||||
|
|
@ -25,4 +49,13 @@ HsfObject *Hu3DObjDuplicate(HsfData *arg0, u32 arg1);
|
|||
void Hu3DModelObjDrawInit(void);
|
||||
void Hu3DModelObjDraw(s16 arg0, char *arg1, Mtx arg2);
|
||||
|
||||
extern u32 totalPolyCnt;
|
||||
extern u32 totalPolyCnted;
|
||||
extern u32 totalMatCnt;
|
||||
extern u32 totalMatCnted;
|
||||
extern u32 totalTexCnt;
|
||||
extern u32 totalTexCnted;
|
||||
extern u32 totalTexCacheCnt;
|
||||
extern u32 totalTexCacheCnted;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -241,7 +241,9 @@ typedef struct hsf_cluster {
|
|||
u32 target;
|
||||
};
|
||||
HsfPart *part;
|
||||
u8 unk10[132];
|
||||
float unk10;
|
||||
float unk14[1]; // unknown array size
|
||||
u8 unk18[124];
|
||||
u8 adjusted;
|
||||
u8 unk95;
|
||||
u16 type;
|
||||
|
|
@ -269,7 +271,7 @@ typedef struct hsf_object_data {
|
|||
HsfVector3f min;
|
||||
HsfVector3f max;
|
||||
float baseMorph;
|
||||
float *morphWeight[33];
|
||||
float morphWeight[33];
|
||||
} mesh;
|
||||
struct hsf_object *replica;
|
||||
};
|
||||
|
|
@ -339,9 +341,23 @@ typedef struct hsf_bitmap_keyframe {
|
|||
typedef struct hsf_track {
|
||||
u8 type;
|
||||
u8 start;
|
||||
u16 target;
|
||||
u16 param;
|
||||
u16 channel;
|
||||
union {
|
||||
u16 target;
|
||||
s16 target_s16;
|
||||
};
|
||||
union {
|
||||
s32 unk04;
|
||||
struct {
|
||||
union {
|
||||
s16 param;
|
||||
u16 param_u16;
|
||||
};
|
||||
union {
|
||||
u16 channel;
|
||||
s16 channel_s16;
|
||||
};
|
||||
};
|
||||
};
|
||||
u16 curveType;
|
||||
u16 numKeyframes;
|
||||
union {
|
||||
|
|
@ -352,7 +368,7 @@ typedef struct hsf_track {
|
|||
|
||||
typedef struct hsf_motion {
|
||||
char *name;
|
||||
u32 numTracks;
|
||||
s32 numTracks;
|
||||
HsfTrack *track;
|
||||
float len;
|
||||
} HsfMotion;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,8 @@
|
|||
#ifndef _GAME_HSFMAN_H
|
||||
#define _GAME_HSFMAN_H
|
||||
|
||||
#include "math.h"
|
||||
#include "game/memory.h"
|
||||
#include "game/hsfanim.h"
|
||||
#include "game/hsfformat.h"
|
||||
#include "game/sprite.h"
|
||||
#include "game/init.h"
|
||||
#include "game/data.h"
|
||||
#include "game/memory.h"
|
||||
#include "dolphin/gx/GXVert.h"
|
||||
|
||||
#define Hu3DModelCreateFile(data_id) (Hu3DModelCreate(HuDataSelHeapReadNum((data_id), MEMORY_DEFAULT_NUM, HEAP_DATA)))
|
||||
|
||||
|
|
@ -45,9 +38,19 @@ typedef struct model_data {
|
|||
f32 unk_64;
|
||||
Point3d unk_68;
|
||||
f32 unk_74;
|
||||
char unk_78[0x1C];
|
||||
f32 unk_78;
|
||||
f32 unk_7C;
|
||||
f32 unk_80;
|
||||
f32 unk_84;
|
||||
f32 unk_88;
|
||||
f32 unk_8C;
|
||||
f32 unk_90;
|
||||
f32 unk_94;
|
||||
char unk_98[0x2C];
|
||||
f32 unk_98;
|
||||
f32 unk_9C;
|
||||
f32 unk_A0;
|
||||
f32 unk_A4[4];
|
||||
f32 unk_B4[4];
|
||||
union {
|
||||
HsfData *hsfData;
|
||||
ModelHookFunc hook;
|
||||
|
|
@ -102,11 +105,6 @@ typedef struct shadow_data {
|
|||
Mtx unk_38;
|
||||
Mtx unk_68;
|
||||
} ShadowData; // sizeof 0x98
|
||||
typedef struct motion_data {
|
||||
s16 unk_00;
|
||||
s16 unk_02;
|
||||
HsfData *unk_04;
|
||||
} MotionData;
|
||||
typedef struct light_data {
|
||||
s16 unk_00;
|
||||
s16 unk_02;
|
||||
|
|
@ -123,45 +121,8 @@ extern void ClusterMotionExec(ModelData*); /* extern */
|
|||
extern void ClusterProc(ModelData*); /* extern */
|
||||
extern void EnvelopeProc(HsfData*); /* extern */
|
||||
extern void GXWaitDrawDone(); /* extern */
|
||||
extern void Hu3DAnimExec(); /* extern */
|
||||
extern void Hu3DCameraMotionExec(s16); /* extern */
|
||||
extern void Hu3DDraw(ModelData*, Mtx, Vec*); /* extern */
|
||||
extern void Hu3DDrawPost(); /* extern */
|
||||
extern void Hu3DDrawPreInit(); /* extern */
|
||||
extern void Hu3DMotionNext(s16); /* extern */
|
||||
extern void Hu3DShadowExec(); /* extern */
|
||||
extern void Hu3DSubMotionExec(s16); /* extern */
|
||||
extern void HuPerfBegin(s32); /* extern */
|
||||
extern void HuPerfEnd(s32); /* extern */
|
||||
extern void HuSprBegin(void); /* extern */
|
||||
extern void HuSprDispInit(void); /* extern */
|
||||
extern void HuSprExec(s16); /* extern */
|
||||
extern void HuSprFinish(void); /* extern */
|
||||
extern void InitVtxParm(HsfData*); /* extern */
|
||||
extern void ShapeProc(HsfData*); /* extern */
|
||||
extern void mtxRot(Mtx, f32, f32, f32); /* extern */
|
||||
extern void mtxScaleCat(Mtx, f32, f32, f32); /* extern */
|
||||
extern void mtxTransCat(Mtx, f32, f32, f32);
|
||||
extern void Hu3DAnimInit(void);
|
||||
extern void Hu3DMotionInit(void);
|
||||
extern void Hu3DParManInit(void);
|
||||
extern void Hu3DMotionClusterSet(s16, s16); /* extern */
|
||||
extern void Hu3DMotionExec(s16, s16, f32, s32);
|
||||
extern f32 Hu3DMotionMaxTimeGet(s16); /* extern */
|
||||
extern s16 Hu3DMotionModelCreate(s16); /* extern */
|
||||
extern void Hu3DMotionShapeSet(s16, s16); /* extern */
|
||||
extern void MakeDisplayList(s16, HsfData*); /* extern */
|
||||
extern void ClusterAdjustObject(HsfData*, HsfData*); /* extern */
|
||||
extern HsfObject* Hu3DObjDuplicate(HsfData*, u32); /* extern */
|
||||
extern void Hu3DAnimModelKill(s16); /* extern */
|
||||
extern void Hu3DGLightKill(s16); /* extern */
|
||||
extern void Hu3DLLightKill(s16, s16); /* extern */
|
||||
extern s32 Hu3DMotionKill(s16);
|
||||
extern void Hu3DModelKill(s16);
|
||||
extern void Hu3DParManAllKill(void);
|
||||
extern f32 Hu3DMotionMotionMaxTimeGet(s16);
|
||||
extern void Hu3DMotionStartEndSet(s16, f32, f32);
|
||||
extern void Hu3DMotionTimeSet(s16, f32);
|
||||
extern void GXInitSpecularDir(GXLightObj*, f32, f32, f32);
|
||||
|
||||
void Hu3DInit(void);
|
||||
|
|
@ -283,13 +244,4 @@ extern s16 Hu3DCameraNo;
|
|||
extern s16 Hu3DCameraBit;
|
||||
extern s16 Hu3DPauseF;
|
||||
|
||||
extern MotionData Hu3DMotion[0x100];
|
||||
extern u32 totalMatCnt;
|
||||
extern u32 totalMatCnted;
|
||||
extern u32 totalPolyCnt;
|
||||
extern u32 totalPolyCnted;
|
||||
extern u32 totalTexCacheCnt;
|
||||
extern u32 totalTexCacheCnted;
|
||||
extern u32 totalTexCnt;
|
||||
extern u32 totalTexCnted;
|
||||
#endif
|
||||
|
|
|
|||
78
include/game/hsfmotion.h
Normal file
78
include/game/hsfmotion.h
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
#ifndef _GAME_HSFMOTION_H
|
||||
#define _GAME_HSFMOTION_H
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "game/hsfformat.h"
|
||||
|
||||
typedef struct motion_data {
|
||||
s16 unk_00;
|
||||
s16 unk_02;
|
||||
HsfData *unk_04;
|
||||
} MotionData;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ float unk00;
|
||||
/* 0x04 */ HsfBitmap *unk04;
|
||||
} UnknownHsfMotionStruct01; // Size 8
|
||||
|
||||
void Hu3DMotionInit(void);
|
||||
s16 Hu3DMotionCreate(void *arg0);
|
||||
s16 Hu3DMotionModelCreate(s16 arg0);
|
||||
s32 Hu3DMotionKill(s16 arg0);
|
||||
void Hu3DMotionAllKill(void);
|
||||
void Hu3DMotionSet(s16 arg0, s16 arg1);
|
||||
void Hu3DMotionOverlaySet(s16 arg0, s16 arg1);
|
||||
void Hu3DMotionOverlayReset(s16 arg0);
|
||||
float Hu3DMotionOverlayTimeGet(s16 arg0);
|
||||
void Hu3DMotionOverlayTimeSet(s16 arg0, float arg1);
|
||||
void Hu3DMotionOverlaySpeedSet(s16 arg0, float arg1);
|
||||
void Hu3DMotionShiftSet(s16 arg0, s16 arg1, float arg2, float arg3, u32 arg4);
|
||||
void Hu3DMotionShapeSet(s16 arg0, s16 arg1);
|
||||
s16 Hu3DMotionShapeIDGet(s16 arg0);
|
||||
void Hu3DMotionShapeSpeedSet(s16 arg0, float arg1);
|
||||
void Hu3DMotionShapeTimeSet(s16 arg0, float arg1);
|
||||
float Hu3DMotionShapeMaxTimeGet(s16 arg0);
|
||||
void Hu3DMotionShapeStartEndSet(s16 arg0, float arg1, float arg2);
|
||||
s16 Hu3DMotionClusterSet(s16 arg0, s16 arg1);
|
||||
s16 Hu3DMotionClusterNoSet(s16 arg0, s16 arg1, s16 arg2);
|
||||
void Hu3DMotionShapeReset(s16 arg0);
|
||||
void Hu3DMotionClusterReset(s16 arg0, s16 arg1);
|
||||
s16 Hu3DMotionIDGet(s16 arg0);
|
||||
s16 Hu3DMotionShiftIDGet(s16 arg0);
|
||||
void Hu3DMotionTimeSet(s16 arg0, float arg1);
|
||||
float Hu3DMotionTimeGet(s16 arg0);
|
||||
float Hu3DMotionShiftTimeGet(s16 arg0);
|
||||
float Hu3DMotionMaxTimeGet(s16 arg0);
|
||||
float Hu3DMotionShiftMaxTimeGet(s16 arg0);
|
||||
void Hu3DMotionShiftStartEndSet(s16 arg0, float arg1, float arg2);
|
||||
float Hu3DMotionMotionMaxTimeGet(s16 arg0);
|
||||
void Hu3DMotionStartEndSet(s16 arg0, float arg1, float arg2);
|
||||
s32 Hu3DMotionEndCheck(s16 arg0);
|
||||
void Hu3DMotionSpeedSet(s16 arg0, float arg1);
|
||||
void Hu3DMotionShiftSpeedSet(s16 arg0, float arg1);
|
||||
void Hu3DMotionNoMotSet(s16 arg0, char *arg1, u32 arg2);
|
||||
void Hu3DMotionNoMotReset(s16 arg0, char *arg1, u32 arg2);
|
||||
void Hu3DMotionForceSet(s16 arg0, char *arg1, u32 arg2, float arg3);
|
||||
void Hu3DMotionNext(s16 arg0);
|
||||
void Hu3DMotionExec(s16 arg0, s16 arg1, float arg2, s32 arg3);
|
||||
void Hu3DCameraMotionExec(s16 arg0);
|
||||
void Hu3DSubMotionExec(s16 arg0);
|
||||
float *GetObjTRXPtr(HsfObject *arg0, u16 arg1);
|
||||
void SetObjMatMotion(s16 arg0, HsfTrack *arg1, float arg2);
|
||||
void SetObjAttrMotion(s16 arg0, HsfTrack *arg1, float arg2);
|
||||
void SetObjCameraMotion(s16 arg0, HsfTrack *arg1, float arg2);
|
||||
void SetObjLightMotion(s16 arg0, HsfTrack *arg1, float arg2);
|
||||
float GetCurve(HsfTrack *arg0, float arg1);
|
||||
float GetConstant(s32 arg0, float *arg1, float arg2);
|
||||
float GetLinear(s32 arg0, float arg1[][2], float arg2);
|
||||
float GetBezier(s32 arg0, HsfTrack *arg1, float arg2);
|
||||
HsfBitmap *GetBitMap(s32 arg0, UnknownHsfMotionStruct01 *arg1, float arg2);
|
||||
s16 Hu3DJointMotion(s16 arg0, void *arg1);
|
||||
void JointModel_Motion(s16 arg0, s16 arg1);
|
||||
void Hu3DMotionCalc(s16 arg0);
|
||||
s32 SearchObjectIndex(HsfData *arg0, u32 arg1);
|
||||
s32 SearchAttributeIndex(HsfData *arg0, u32 arg1);
|
||||
|
||||
extern MotionData Hu3DMotion[256];
|
||||
|
||||
#endif
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#include "game/hsfanim.h"
|
||||
#include "game/hsfdraw.h"
|
||||
#include "game/init.h"
|
||||
#include "game/memory.h"
|
||||
#include "game/process.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,27 +16,6 @@ typedef struct {
|
|||
/* 0x3C */ Vec unk3C;
|
||||
} HsfdrawStruct00; // Size 0x48
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ s16 unk04;
|
||||
/* 0x06 */ char unk06[2];
|
||||
/* 0x08 */ float unk08;
|
||||
/* 0x0C */ float unk0C;
|
||||
/* 0x10 */ float unk10;
|
||||
/* 0x14 */ float unk14;
|
||||
/* 0x18 */ float unk18;
|
||||
/* 0x1C */ float unk1C;
|
||||
/* 0x20 */ float unk20;
|
||||
/* 0x24 */ float unk24;
|
||||
/* 0x28 */ float unk28;
|
||||
/* 0x2C */ float unk2C;
|
||||
/* 0x30 */ float unk30;
|
||||
/* 0x34 */ float unk34;
|
||||
/* 0x38 */ float unk38;
|
||||
/* 0x3C */ HsfBitmap *unk3C;
|
||||
} HsfdrawStruct01; // Size unknown
|
||||
|
||||
typedef struct {
|
||||
s32 unk00;
|
||||
s32 unk04;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "game/hsfex.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/hsfmotion.h"
|
||||
|
||||
#include "math.h"
|
||||
|
||||
|
|
@ -13,8 +14,6 @@ typedef struct {
|
|||
|
||||
static void SetObjCamMotion(s16 arg0, HsfTrack *arg1, float arg2, HsfexStruct02 *arg3);
|
||||
|
||||
float GetCurve(void*, float);
|
||||
|
||||
void CamMotionEx2(s16 arg0, s16 arg1, float arg2, s16 arg3) {
|
||||
CameraData *temp_r30;
|
||||
s16 i;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
#include "game/hsfman.h"
|
||||
#include "game/data.h"
|
||||
#include "game/hsfdraw.h"
|
||||
#include "game/hsfload.h"
|
||||
#include "game/hsfmotion.h"
|
||||
#include "game/init.h"
|
||||
#include "game/memory.h"
|
||||
#include "game/perf.h"
|
||||
#include "game/sprite.h"
|
||||
#include "dolphin/gx/GXVert.h"
|
||||
|
||||
#include "math.h"
|
||||
|
||||
ModelData Hu3DData[0x200];
|
||||
CameraData Hu3DCamera[0x10];
|
||||
|
|
|
|||
1432
src/game/hsfmotion.c
Normal file
1432
src/game/hsfmotion.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,5 @@
|
|||
#include "game/audio.h"
|
||||
#include "game/hsfdraw.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/printfunc.h"
|
||||
#include "game/object.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue