Matched hsfanim and most of hsfdraw
This commit is contained in:
parent
f2f2ead4f7
commit
c6b2795026
12 changed files with 4771 additions and 19 deletions
|
|
@ -2,12 +2,140 @@
|
|||
#define GAME_HSFANIM_H
|
||||
|
||||
#include "common.h"
|
||||
#include "game/hsfformat.h"
|
||||
#include "game/hsfman.h"
|
||||
#include "game/sprite.h"
|
||||
|
||||
typedef struct model_data ModelData;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ union {
|
||||
u16 unk00;
|
||||
s16 unk00_s16;
|
||||
};
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ s16 unk04;
|
||||
/* 0x06 */ s16 unk06;
|
||||
/* 0x08 */ Vec unk08;
|
||||
/* 0x14 */ Vec unk14;
|
||||
/* 0x20 */ float unk20;
|
||||
/* 0x24 */ float unk24;
|
||||
/* 0x28 */ float unk28;
|
||||
/* 0x2C */ float unk2C;
|
||||
/* 0x30 */ float unk30;
|
||||
/* 0x34 */ Vec unk34;
|
||||
/* 0x40 */ GXColor unk40;
|
||||
} HsfanimStruct01; // Size 0x44
|
||||
|
||||
typedef struct particle_data {
|
||||
char unk_00[0x44];
|
||||
AnimData *unk_44;
|
||||
char unk_48[0x10];
|
||||
} ParticleData;
|
||||
/* 0x00 */ s16 unk_00;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ char unk_04[0x1C];
|
||||
/* 0x20 */ s16 unk_20;
|
||||
/* 0x22 */ s16 unk_22;
|
||||
/* 0x24 */ float unk_24;
|
||||
/* 0x28 */ float unk_28;
|
||||
/* 0x2C */ u8 unk_2C;
|
||||
/* 0x2D */ u8 unk_2D;
|
||||
/* 0x2E */ char unk_2E[2];
|
||||
/* 0x30 */ s16 unk_30;
|
||||
/* 0x32 */ char unk_32[2];
|
||||
/* 0x34 */ s32 unk_34;
|
||||
/* 0x38 */ s32 unk_38;
|
||||
/* 0x3C */ u32 unk_3C;
|
||||
/* 0x40 */ s32 unk_40;
|
||||
/* 0x44 */ AnimData *unk_44;
|
||||
/* 0x48 */ HsfanimStruct01 *unk_48;
|
||||
/* 0x4C */ Vec *unk_4C;
|
||||
/* 0x50 */ void *unk_50;
|
||||
/* 0x54 */ void *unk_54;
|
||||
} ParticleData; // Size 0x58
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk00;
|
||||
/* 0x02 */ char unk02[2];
|
||||
/* 0x04 */ float unk04;
|
||||
/* 0x08 */ float unk08;
|
||||
/* 0x0C */ float unk0C;
|
||||
/* 0x10 */ Vec unk10;
|
||||
/* 0x1C */ float unk1C;
|
||||
/* 0x20 */ float unk20;
|
||||
/* 0x24 */ float unk24;
|
||||
/* 0x28 */ float unk28;
|
||||
/* 0x2C */ s16 unk2C;
|
||||
/* 0x2E */ GXColor unk2E[4];
|
||||
/* 0x3E */ GXColor unk3E[4];
|
||||
} HsfanimStruct00; // Size unknown
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ s16 unk04;
|
||||
/* 0x06 */ s16 unk06;
|
||||
/* 0x08 */ float unk08;
|
||||
/* 0x0C */ float unk0C;
|
||||
/* 0x10 */ AnimData *unk10;
|
||||
} Hu3DTexAnimDataStruct; // Size 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk00;
|
||||
/* 0x02 */ s16 unk02;
|
||||
/* 0x04 */ Vec unk04;
|
||||
/* 0x10 */ char unk10[0xC];
|
||||
/* 0x1C */ Vec unk1C;
|
||||
/* 0x28 */ char unk28[0xC];
|
||||
/* 0x34 */ float unk34;
|
||||
/* 0x38 */ float unk38;
|
||||
/* 0x3C */ Mtx unk3C;
|
||||
} Hu3DTexScrDataStruct; // Size 0x6C
|
||||
|
||||
void Hu3DAnimInit(void);
|
||||
s16 Hu3DAnimCreate(void *arg0, s16 arg1, char *arg2);
|
||||
s16 Hu3DAnimLink(s16 arg0, s16 arg1, char *arg2);
|
||||
void Hu3DAnimKill(s16 arg0);
|
||||
void Hu3DAnimModelKill(s16 arg0);
|
||||
void Hu3DAnimAllKill(void);
|
||||
void Hu3DAnimAttrSet(s16 arg0, u16 arg1);
|
||||
void Hu3DAnimAttrReset(s16 arg0, s32 arg1);
|
||||
void Hu3DAnimSpeedSet(s16 arg0, float arg1);
|
||||
void Hu3DAnimBankSet(s16 arg0, s32 arg1);
|
||||
void Hu3DAnmNoSet(s16 arg0, s32 arg1);
|
||||
s32 Hu3DAnimSet(ModelData *arg0, HsfAttribute *arg1, s16 arg2);
|
||||
void Hu3DAnimExec(void);
|
||||
s16 Hu3DTexScrollCreate(s16 arg0, char *arg1);
|
||||
void Hu3DTexScrollKill(s16 arg0);
|
||||
void Hu3DTexScrollAllKill(void);
|
||||
void Hu3DTexScrollPosSet(s16 arg0, float arg1, float arg2, float arg3);
|
||||
void Hu3DTexScrollPosMoveSet(s16 arg0, float arg1, float arg2, float arg3);
|
||||
void Hu3DTexScrollRotSet(s16 arg0, float arg1);
|
||||
void Hu3DTexScrollRotMoveSet(s16 arg0, float arg1);
|
||||
void Hu3DTexScrollPauseDisableSet(s16 arg0, s32 arg1);
|
||||
s16 Hu3DParticleCreate(AnimData *arg0, s16 arg1);
|
||||
void Hu3DParticleScaleSet(s16 arg0, float arg1);
|
||||
void Hu3DParticleZRotSet(s16 arg0, float arg1);
|
||||
void Hu3DParticleColSet(s16 arg0, u8 arg1, u8 arg2, u8 arg3);
|
||||
void Hu3DParticleTPLvlSet(s16 arg0, float arg1);
|
||||
void Hu3DParticleBlendModeSet(s16 arg0, u8 arg1);
|
||||
void Hu3DParticleAttrSet(s16 arg0, u8 arg1);
|
||||
void Hu3DParticleAttrReset(s16 arg0, u8 arg1);
|
||||
void Hu3DParticleAnimModeSet(s16 arg0, s16 arg1);
|
||||
void Hu3DParManInit(void);
|
||||
s16 Hu3DParManCreate(AnimData *arg0, s16 arg1, HsfanimStruct00 *arg2);
|
||||
s16 Hu3DParManLink(s16 arg0, HsfanimStruct00 *arg1);
|
||||
void Hu3DParManKill(s16 arg0);
|
||||
void Hu3DParManAllKill(void);
|
||||
void *Hu3DParManPtrGet(s16 arg0);
|
||||
void Hu3DParManPosSet(s16 arg0, float arg1, float arg2, float arg3);
|
||||
void Hu3DParManVecSet(s16 arg0, float arg1, float arg2, float arg3);
|
||||
void Hu3DParManRotSet(s16 arg0, float arg1, float arg2, float arg3);
|
||||
void Hu3DParManAttrSet(s16 arg0, s32 arg1);
|
||||
void Hu3DParManAttrReset(s16 arg0, s32 arg1);
|
||||
s16 Hu3DParManModelIDGet(s16 arg0);
|
||||
void Hu3DParManTimeLimitSet(s16 arg0, s32 arg1);
|
||||
void Hu3DParManVacumeSet(s16 arg0, float arg1, float arg2, float arg3, float arg4);
|
||||
void Hu3DParManColorSet(s16 arg0, s16 arg1);
|
||||
|
||||
extern Hu3DTexAnimDataStruct Hu3DTexAnimData[256];
|
||||
extern Hu3DTexScrDataStruct Hu3DTexScrData[16];
|
||||
|
||||
#endif
|
||||
|
|
|
|||
28
include/game/hsfdraw.h
Executable file
28
include/game/hsfdraw.h
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef _GAME_HSFDRAW_H
|
||||
#define _GAME_HSFDRAW_H
|
||||
|
||||
#include "game/hsfman.h"
|
||||
#include "dolphin.h"
|
||||
|
||||
void Hu3DDrawPreInit(void);
|
||||
void Hu3DDraw(ModelData *arg0, Mtx arg1, Vec *arg2);
|
||||
s32 ObjCullCheck(HsfData *arg0, HsfObject *arg1, Mtx arg2);
|
||||
void Hu3DDrawPost(void);
|
||||
void MakeDisplayList(s16 arg0, HsfData *arg1);
|
||||
HsfConstData *ObjConstantMake(HsfObject *arg0, u32 arg1);
|
||||
void mtxTransCat(Mtx arg0, float arg1, float arg2, float arg3);
|
||||
void mtxRotCat(Mtx arg0, float arg1, float arg2, float arg3);
|
||||
void mtxRot(Mtx arg0, float arg1, float arg2, float arg3);
|
||||
void mtxScaleCat(Mtx arg0, float arg1, float arg2, float arg3);
|
||||
s16 HmfInverseMtxF3X3(Mtx arg0, Mtx arg1);
|
||||
void SetDefLight(Vec arg0, Vec arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5, u8 arg6, u8 arg7, u8 arg8, u8 arg9, u8 argA);
|
||||
void Hu3DModelObjPosGet(s16 arg0, char *arg1, Vec *arg2);
|
||||
void Hu3DModelObjMtxGet(s16 arg0, char *arg1, Mtx arg2);
|
||||
void PGObjCall(ModelData *arg0, HsfObject *arg1);
|
||||
void PGObjCalc(ModelData *arg0, HsfObject *arg1);
|
||||
void PGObjReplica(ModelData *arg0, HsfObject *arg1);
|
||||
HsfObject *Hu3DObjDuplicate(HsfData *arg0, u32 arg1);
|
||||
void Hu3DModelObjDrawInit(void);
|
||||
void Hu3DModelObjDraw(s16 arg0, char *arg1, Mtx arg2);
|
||||
|
||||
#endif
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
#define _GAME_HSFFORMAT_H
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "game/hsfanim.h"
|
||||
#include "game/sprite.h"
|
||||
|
||||
#define HSF_OBJ_NULL1 0
|
||||
#define HSF_OBJ_REPLICA 1
|
||||
|
|
@ -78,7 +78,7 @@ typedef struct hsf_scene {
|
|||
|
||||
typedef struct hsf_bitmap {
|
||||
char *name;
|
||||
s32 maxLod;
|
||||
u32 maxLod;
|
||||
u8 dataFmt;
|
||||
u8 pixSize;
|
||||
s16 sizeX;
|
||||
|
|
@ -99,10 +99,23 @@ typedef struct hsf_palette {
|
|||
|
||||
typedef struct hsf_attribute {
|
||||
char *name;
|
||||
u8 unk4[96];
|
||||
void *unk04;
|
||||
u8 unk8[4];
|
||||
float unk0C;
|
||||
u8 unk10[4];
|
||||
float unk14;
|
||||
u8 unk18[8];
|
||||
float unk20;
|
||||
u8 unk24[4];
|
||||
float unk28;
|
||||
float unk2C;
|
||||
float unk30;
|
||||
float unk34;
|
||||
u8 unk38[44];
|
||||
u32 wrap_s;
|
||||
u32 wrap_t;
|
||||
u8 unk6C[16];
|
||||
u8 unk6C[12];
|
||||
u32 unk78;
|
||||
u32 flag;
|
||||
HsfBitmap *bitmap;
|
||||
} HsfAttribute;
|
||||
|
|
@ -123,7 +136,7 @@ typedef struct hsf_material {
|
|||
float unk2C;
|
||||
u32 flags;
|
||||
u32 numAttrs;
|
||||
HsfAttribute **attrs;
|
||||
s32 *attrs;
|
||||
} HsfMaterial;
|
||||
|
||||
typedef struct hsf_vertex_buf {
|
||||
|
|
@ -153,7 +166,10 @@ typedef struct hsf_face {
|
|||
typedef struct hsf_const_data {
|
||||
u32 flags;
|
||||
s16 hook;
|
||||
u8 unk6[0x3A];
|
||||
u8 unk6[2];
|
||||
void *unk08;
|
||||
void *unk0C;
|
||||
Mtx unk10;
|
||||
AnimData *hilite_map;
|
||||
} HsfConstData;
|
||||
|
||||
|
|
@ -267,6 +283,7 @@ typedef struct hsf_object_data {
|
|||
HsfAttribute *attribute;
|
||||
u8 unk120[2];
|
||||
u8 shapeType;
|
||||
u8 unk123;
|
||||
u32 vertexShapeCnt;
|
||||
HsfBuffer **vertexShape;
|
||||
u32 clusterCnt;
|
||||
|
|
|
|||
|
|
@ -14,11 +14,13 @@
|
|||
|
||||
#define Hu3DModelCreateFile(data_id) (Hu3DModelCreate(HuDataSelHeapReadNum((data_id), MEMORY_DEFAULT_NUM, HEAP_DATA)))
|
||||
|
||||
typedef struct particle_data ParticleData;
|
||||
|
||||
typedef struct model_data {
|
||||
u8 unk_00;
|
||||
u8 unk_01;
|
||||
u8 unk_02;
|
||||
s8 unk_03;
|
||||
u8 unk_03;
|
||||
s8 unk_04;
|
||||
s8 unk_05;
|
||||
s16 layer;
|
||||
|
|
@ -119,7 +121,7 @@ extern void EnvelopeProc(HsfData*); /* extern */
|
|||
extern void GXWaitDrawDone(); /* extern */
|
||||
extern void Hu3DAnimExec(); /* extern */
|
||||
extern void Hu3DCameraMotionExec(s16); /* extern */
|
||||
extern void Hu3DDraw(ModelData*, f32*, f32*); /* extern */
|
||||
extern void Hu3DDraw(ModelData*, Mtx, Vec*); /* extern */
|
||||
extern void Hu3DDrawPost(); /* extern */
|
||||
extern void Hu3DDrawPreInit(); /* extern */
|
||||
extern void Hu3DMotionNext(s16); /* extern */
|
||||
|
|
@ -259,6 +261,24 @@ void Hu3DProjectionPosSet(s16, Vec, Vec, Vec);
|
|||
void Hu3DProjectionTPLvlSet(s16, f32);
|
||||
void Hu3DMipMapSet(char*, s16, s32, f32);
|
||||
|
||||
extern ModelData Hu3DData[0x200];
|
||||
extern CameraData Hu3DCamera[0x10];
|
||||
extern AnimData *reflectAnim[5];
|
||||
extern AnimData *hiliteAnim[4];
|
||||
extern ThreeDProjectionStruct Hu3DProjection[4];
|
||||
extern ShadowData Hu3DShadowData;
|
||||
extern Mtx Hu3DCameraMtx;
|
||||
extern Mtx Hu3DCameraMtxXPose;
|
||||
extern LightData Hu3DGlobalLight[0x8];
|
||||
extern s16 reflectMapNo;
|
||||
extern AnimData *toonAnim;
|
||||
extern s16 Hu3DShadowCamBit;
|
||||
extern s32 Hu3DShadowF;
|
||||
extern s32 shadowModelDrawF;
|
||||
extern s16 Hu3DCameraNo;
|
||||
extern s16 Hu3DCameraBit;
|
||||
extern s16 Hu3DPauseF;
|
||||
|
||||
extern MotionData Hu3DMotion[0x100];
|
||||
extern u32 totalMatCnt;
|
||||
extern u32 totalMatCnted;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue