commit
8d1841ba7a
8 changed files with 1222 additions and 128 deletions
|
|
@ -5425,7 +5425,8 @@ FogData = .bss:0x8018C88C; // type:object size:0x10 data:4byte
|
|||
Hu3DCameraMtx = .bss:0x8018C89C; // type:object size:0x30
|
||||
Hu3DCameraMtxXPose = .bss:0x8018C8CC; // type:object size:0x30
|
||||
Hu3DGlobalLight = .bss:0x8018C8FC; // type:object size:0x220 data:2byte
|
||||
Hu3DLocalLight = .bss:0x8018CB1C; // type:object size:0x8B4 data:2byte
|
||||
Hu3DLocalLight = .bss:0x8018CB1C; // type:object size:0x880 data:2byte
|
||||
lbl_8018D39C = .bss:0x8018D39C; // type:object size:0x48
|
||||
Hu3DMotion = .bss:0x8018D3D0; // type:object size:0x800 data:2byte
|
||||
Hu3DTexAnimData = .bss:0x8018DBD0; // type:object size:0x1400 data:2byte
|
||||
Hu3DTexScrData = .bss:0x8018EFD0; // type:object size:0x6C0 data:2byte
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ config.libs = [
|
|||
Object(Matching, "game/sprput.c"),
|
||||
Object(Matching, "game/hsfload.c"),
|
||||
Object(NonMatching, "game/hsfdraw.c"),
|
||||
Object(NonMatching, "game/hsfman.c"),
|
||||
Object(Matching, "game/hsfman.c"),
|
||||
Object(NonMatching, "game/hsfmotion.c"),
|
||||
Object(NonMatching, "game/hsfanim.c"),
|
||||
Object(NonMatching, "game/hsfex.c"),
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ void Hu3DLayerHookSet(short layer, void (*func)(short layer));
|
|||
void Hu3D2Dto3D(Vec*, s32, Vec*);
|
||||
void Hu3DModelLightInfoSet(s32, s32);
|
||||
void Hu3DBGColorSet(u8, u8, u8);
|
||||
void Hu3DCameraCreate(s16);
|
||||
void Hu3DCameraPerspectiveSet(s16, f32, f32, f32, f32);
|
||||
void Hu3DCameraViewportSet(s16, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DCameraCreate(s32);
|
||||
void Hu3DCameraPerspectiveSet(s32, f32, f32, f32, f32);
|
||||
void Hu3DCameraViewportSet(s32, f32, f32, f32, f32, f32, f32);
|
||||
void HuAudFadeOut(int arg0);
|
||||
|
||||
void WipeCreate(char dir, char type, short duration);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _GAME_HSFFORMAT_H
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "game/hsfanim.h"
|
||||
|
||||
#define HSF_OBJ_NULL1 0
|
||||
#define HSF_OBJ_REPLICA 1
|
||||
|
|
@ -151,13 +152,15 @@ typedef struct hsf_face {
|
|||
|
||||
typedef struct hsf_const_data {
|
||||
u32 flags;
|
||||
u8 unk4[64];
|
||||
s16 hook;
|
||||
u8 unk6[0x3A];
|
||||
AnimData *hilite_map;
|
||||
} HsfConstData;
|
||||
|
||||
typedef struct hsf_transform {
|
||||
HsfVector3f pos;
|
||||
HsfVector3f rot;
|
||||
HsfVector3f scale;
|
||||
Vec pos;
|
||||
Vec rot;
|
||||
Vec scale;
|
||||
} HsfTransform;
|
||||
|
||||
typedef struct hsf_cenv_single {
|
||||
|
|
@ -273,12 +276,24 @@ typedef struct hsf_object_data {
|
|||
void *file[2];
|
||||
} HsfObjectData;
|
||||
|
||||
typedef struct hsf_camera {
|
||||
HsfVector3f target;
|
||||
HsfVector3f pos;
|
||||
float aspect_dupe;
|
||||
float fov;
|
||||
float near;
|
||||
float far;
|
||||
} HsfCamera;
|
||||
|
||||
typedef struct hsf_object {
|
||||
char *name;
|
||||
s32 type;
|
||||
u32 type;
|
||||
HsfConstData *constData;
|
||||
u32 flags;
|
||||
HsfObjectData data;
|
||||
union {
|
||||
HsfObjectData data;
|
||||
HsfCamera camera;
|
||||
};
|
||||
} HsfObject;
|
||||
|
||||
typedef struct hsf_skeleton {
|
||||
|
|
@ -370,4 +385,4 @@ typedef struct hsf_data {
|
|||
s16 matrixCnt;
|
||||
} HsfData;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,15 +2,17 @@
|
|||
#define _GAME_HSFMAN_H
|
||||
|
||||
#include "common.h"
|
||||
#include "math.h"
|
||||
#include "game/memory.h"
|
||||
#include "game/hsfanim.h"
|
||||
#include "game/hsfformat.h"
|
||||
#include "game/sprite.h"
|
||||
#include "game/init.h"
|
||||
|
||||
typedef struct model_data {
|
||||
u8 unk_00;
|
||||
u8 unk_01;
|
||||
s8 unk_02;
|
||||
u8 unk_02;
|
||||
s8 unk_03;
|
||||
s8 unk_04;
|
||||
s8 unk_05;
|
||||
|
|
@ -45,38 +47,59 @@ typedef struct model_data {
|
|||
Vec scale;
|
||||
Mtx unk_F0;
|
||||
ParticleData *unk_120;
|
||||
} ModelData;
|
||||
|
||||
typedef struct ThreeDCameraStruct {
|
||||
f32 unk_00;
|
||||
f32 start;
|
||||
f32 end;
|
||||
char unk_04[0x4C];
|
||||
} ThreeDCameraStruct;
|
||||
} ModelData; // sizeof 0x124
|
||||
typedef struct camera_data {
|
||||
f32 fov;
|
||||
f32 near;
|
||||
f32 far;
|
||||
f32 aspect;
|
||||
f32 aspect_dupe;
|
||||
Vec pos;
|
||||
Vec up;
|
||||
Vec target;
|
||||
s16 scissor_x;
|
||||
s16 scissor_y;
|
||||
s16 scissor_w;
|
||||
s16 scissor_h;
|
||||
f32 viewport_x;
|
||||
f32 viewport_y;
|
||||
f32 viewport_w;
|
||||
f32 viewport_h;
|
||||
f32 near_z;
|
||||
f32 far_z;
|
||||
} CameraData; // sizeof 0x58
|
||||
typedef struct ThreeDProjectionStruct {
|
||||
s8 unk_00;
|
||||
u8 unk_00;
|
||||
char unk_01[0x3];
|
||||
AnimData *unk_04;
|
||||
char unk_08[0xC];
|
||||
void *unk_04;
|
||||
Vec unk_08;
|
||||
Point3d unk_14;
|
||||
Point3d unk_20;
|
||||
Vec unk_2C;
|
||||
Mtx unk_38;
|
||||
char unk_68[0x30];
|
||||
} ThreeDProjectionStruct;
|
||||
Mtx unk_68;
|
||||
} ThreeDProjectionStruct; // sizeof 0x98
|
||||
typedef struct shadow_data {
|
||||
char unk_00[0x2];
|
||||
u16 unk_02;
|
||||
void*unk_04;
|
||||
char unk_08[0x90];
|
||||
} ShadowData;
|
||||
} ShadowData; // sizeof 0x98
|
||||
typedef struct motion_data {
|
||||
s16 unk_00;
|
||||
s16 unk_02;
|
||||
HsfData *unk_04;
|
||||
} MotionData;
|
||||
typedef struct light_data {
|
||||
char unk_00[0x44];
|
||||
s16 unk_00;
|
||||
s16 unk_02;
|
||||
f32 unk_04;
|
||||
f32 unk_08;
|
||||
char unk_0C[0x10];
|
||||
Vec unk_1C;
|
||||
Vec unk_28;
|
||||
Vec unk_34;
|
||||
GXColor color;
|
||||
} LightData;
|
||||
|
||||
void ClusterMotionExec(ModelData*); /* extern */
|
||||
|
|
@ -85,7 +108,6 @@ void EnvelopeProc(HsfData*); /* extern */
|
|||
void GXWaitDrawDone(); /* extern */
|
||||
void Hu3DAnimExec(); /* extern */
|
||||
void Hu3DCameraMotionExec(s16); /* extern */
|
||||
void Hu3DCameraSet(s16, void*); /* extern */
|
||||
void Hu3DDraw(ModelData*, f32*, f32*); /* extern */
|
||||
void Hu3DDrawPost(); /* extern */
|
||||
void Hu3DDrawPreInit(); /* extern */
|
||||
|
|
@ -105,7 +127,6 @@ void mtxScaleCat(Mtx, f32, f32, f32); /* extern */
|
|||
void mtxTransCat(Mtx, f32, f32, f32);
|
||||
void Hu3DAnimInit(void);
|
||||
void Hu3DFogClear(void);
|
||||
void Hu3DLighInit(void);
|
||||
void Hu3DMotionInit(void);
|
||||
void Hu3DParManInit(void);
|
||||
void Hu3DFogSet(f32, f32, u8, u8, u8); /* extern */
|
||||
|
|
@ -125,6 +146,9 @@ s32 Hu3DMotionKill(s16);
|
|||
void Hu3DModelKill(s16);
|
||||
void Hu3DParManAllKill(void);
|
||||
s32 MakeObjectName(s32);
|
||||
f32 Hu3DMotionMotionMaxTimeGet(s16);
|
||||
void Hu3DMotionStartEndSet(s16, f32, f32);
|
||||
void Hu3DMotionTimeSet(s16, f32);
|
||||
|
||||
void Hu3DInit(void);
|
||||
void Hu3DPreProc(void);
|
||||
|
|
@ -153,6 +177,68 @@ void Hu3DModelClusterAttrReset(s16, s16, s32);
|
|||
void Hu3DModelCameraSet(s16, u16);
|
||||
void Hu3DModelLayerSet(s16, s16);
|
||||
HsfObject* Hu3DModelObjPtrGet(s16, s32);
|
||||
void Hu3DModelTPLvlSet(s16, f32);
|
||||
void Hu3DModelHiliteMapSet(s16, AnimData*);
|
||||
void Hu3DModelShadowSet(s16);
|
||||
void Hu3DModelShadowReset(s16);
|
||||
void Hu3DModelShadowDispOn(s16);
|
||||
void Hu3DModelShadowDispOff(s16);
|
||||
void Hu3DModelShadowMapSet(s16);
|
||||
void Hu3DModelShadowMapObjSet(s16, s32);
|
||||
void Hu3DModelAmbSet(s16, f32, f32, f32);
|
||||
void Hu3DModelHookSet(s16, s32, s16);
|
||||
void Hu3DModelHookReset(s16);
|
||||
void Hu3DModelHookObjReset(s16, s32);
|
||||
void Hu3DModelProjectionSet(s16, s16);
|
||||
void Hu3DModelProjectionReset(s16, s16);
|
||||
void Hu3DModelHiliteTypeSet(s16, s16);
|
||||
void Hu3DModelReflectTypeSet(s16, s16);
|
||||
void Hu3DCameraCreate(s32);
|
||||
void Hu3DCameraPerspectiveSet(s32, f32, f32, f32, f32);
|
||||
void Hu3DCameraViewportSet(s32, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DCameraScissorSet(s32, s32, s32, s32, s32);
|
||||
void Hu3DCameraPosSet(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DCameraPosSetV(s32, Vec, Vec, Vec);
|
||||
void Hu3DCameraKill(s32);
|
||||
void Hu3DCameraAllKill(void);
|
||||
void Hu3DCameraSet(s32, Mtx);
|
||||
BOOL Hu3DModelCameraInfoSet(s16, u16);
|
||||
s16 Hu3DModelCameraCreate(s16, u16);
|
||||
void Hu3DCameraMotionOn(s16, s8);
|
||||
void Hu3DCameraMotionStart(s16, u16);
|
||||
void Hu3DCameraMotionOff(s16);
|
||||
void Hu3DLighInit(void);
|
||||
s16 Hu3DGLightCreate(f32, f32, f32, f32, f32, f32, u8, u8, u8);
|
||||
s16 Hu3DGLightCreateV(Vec*, Vec*, GXColor*);
|
||||
s16 Hu3DLLightCreate(s16, f32, f32, f32, f32, f32, f32, u8, u8, u8);
|
||||
s16 Hu3DLLightCreateV(s16, Vec*, Vec*, GXColor*);
|
||||
void Hu3DGLightSpotSet(s16, u16, f32);
|
||||
void Hu3DLLightSpotSet(s16, s16, u16, f32);
|
||||
void Hu3DGLightInfinitytSet(s16);
|
||||
void Hu3DLLightInfinitytSet(s16, s16);
|
||||
void Hu3DGLightPointSet(s16, u16, f32, f32);
|
||||
void Hu3DLLightPointSet(s16, s16, u16, f32, f32);
|
||||
void Hu3DGLightKill(s16);
|
||||
void Hu3DLLightKill(s16, s16);
|
||||
void Hu3DLightAllKill(void);
|
||||
void Hu3DGLightColorSet(s16, u8, u8, u8, u8);
|
||||
void Hu3DLLightColorSet(s16, s16, u8, u8, u8, u8);
|
||||
void Hu3DGLightPosSetV(s16, Vec*, Point3d*);
|
||||
void Hu3DLLightPosSetV(s16, s16, Vec*, Point3d*);
|
||||
void Hu3DGLightPosSet(s16, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DLLightPosSet(s16, s16, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DGLightPosAimSetV(s16, Point3d*, Point3d*);
|
||||
void Hu3DLLightPosAimSetV(s16, s16, Point3d*, Point3d*);
|
||||
void Hu3DGLightPosAimSet(s16, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DLLightPosAimSet(s16, s16, f32, f32, f32, f32, f32, f32);
|
||||
void Hu3DGLightStaticSet(s16, s32);
|
||||
void Hu3DLLightStaticSet(s16, s16, s32);
|
||||
//...
|
||||
s16 Hu3DLightSet(ModelData*, s32, s32, f32);
|
||||
void lightSet(LightData*, s16, s32, s32, f32);
|
||||
//...
|
||||
void Hu3DFogSet(f32, f32, u8, u8, u8);
|
||||
void Hu3DFogClear(void);
|
||||
//...
|
||||
void Hu3DShadowSizeSet(u16);
|
||||
void Hu3DProjectionKill(s16);
|
||||
|
|
@ -161,9 +247,6 @@ void Hu3DProjectionTPLvlSet(s16, f32);
|
|||
void Hu3DMipMapSet(char*, s16, s32, f32);
|
||||
|
||||
extern MotionData Hu3DMotion[0x100];
|
||||
extern f32 lbl_801D4AB0;
|
||||
extern f32 lbl_801D4AB4;
|
||||
extern f32 lbl_801D4AB8;
|
||||
extern f32 lbl_801D4AFC;
|
||||
extern GXColor lbl_801D6BE0;
|
||||
extern u32 totalMatCnt;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _MATH_H
|
||||
#define _MATH_H
|
||||
|
||||
#define M_PI 3.141592653589793
|
||||
|
||||
extern inline float sqrtf(float x)
|
||||
{
|
||||
static const double _half=.5;
|
||||
|
|
@ -40,4 +42,4 @@ float acosf(float x);
|
|||
|
||||
#define abs(x) __abs(x)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
#include "dolphin.h"
|
||||
#include "common_structs.h"
|
||||
|
||||
#define M_PI 3.141592653589793
|
||||
|
||||
extern u16 HuPadBtnDown[4];
|
||||
extern u8 HuPadDStk[4];
|
||||
|
||||
|
|
|
|||
1179
src/game/hsfman.c
1179
src/game/hsfman.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue