mirror of
https://github.com/sonicdcer/sf64.git
synced 2024-11-23 21:09:56 +00:00
11197f6c28
* stuff * three whole files * format * format and such * a switch in time * merge prep * nintendo switch * format * the great switch statement of our time * 43AC0 matched * stuff * Enums everywhere * oh god the switch * knakyo * new headers * format * fox * everyone hates recursion * format * one more thing * one more one more thing * renames * matches * matrix scale why * names and such * cleanup * name back * it just keeps going * they don't give up * splits * merge going poorly * I object * more names
130 lines
2.8 KiB
C
130 lines
2.8 KiB
C
#ifndef STRUCTS_H
|
|
#define STRUCTS_H
|
|
|
|
#include "libultra/ultra64.h"
|
|
#include "sf64math.h"
|
|
|
|
#define UNK_TYPE s32
|
|
|
|
typedef struct {
|
|
f32 offset;
|
|
f32 size;
|
|
} HitboxDim;
|
|
|
|
typedef struct {
|
|
HitboxDim z;
|
|
HitboxDim y;
|
|
HitboxDim x;
|
|
} Hitbox;
|
|
|
|
typedef struct {
|
|
s16 vtx[3];
|
|
s16 unk_06;
|
|
Vec3s normal;
|
|
s32 dist;
|
|
} CollisionPoly;
|
|
|
|
typedef struct {
|
|
Vec3f min;
|
|
Vec3f max;
|
|
s32 polyCount;
|
|
CollisionPoly* polys;
|
|
Vec3s* mesh;
|
|
} CollisionHeader; // size = 0x24
|
|
|
|
typedef struct {
|
|
Vec3f min;
|
|
Vec3f max;
|
|
s32 polyCount;
|
|
s16 (*polys)[3];
|
|
Vec3f* mesh;
|
|
} CollisionHeader2; // size = 0x24
|
|
|
|
typedef struct {
|
|
/* bit 0 */ u8 unk_0 : 3;
|
|
/* bit 3 */ u8 unk_3 : 1;
|
|
/* bit 4 */ u8 unk_4 : 1;
|
|
/* bit 5 */ u8 unk_5 : 1;
|
|
/* bit 6 */ u8 unk_6 : 1;
|
|
/* bit 7 */ u8 unk_7 : 1;
|
|
} Save_SubStruct_00; // size = 0x1
|
|
|
|
typedef struct {
|
|
/* bit 0 */ u16 unk_0 : 8;
|
|
/* bit 8 */ u16 unk_8 : 4;
|
|
/* bit C */ u16 unk_C : 1;
|
|
/* bit D */ u16 unk_D : 1;
|
|
/* bit E */ u16 unk_E : 1;
|
|
/* bit F */ u16 unk_F : 1;
|
|
} Save_SubStruct_5E; // size = 0x10
|
|
|
|
typedef struct{
|
|
/* 0x00 */ Save_SubStruct_00 unk_00[16];
|
|
/* 0x10 */ char pad10[0x4];
|
|
/* 0x14 */ u8 soundMode;
|
|
/* 0x15 */ u8 musicVolume;
|
|
/* 0x16 */ u8 voiceVolume;
|
|
/* 0x17 */ u8 sfxVolume;
|
|
/* 0x18 */ u8 unk_18[10][3];
|
|
/* 0x36 */ u8 unk_36[10];
|
|
/* 0x40 */ u8 unk_40[10];
|
|
/* 0x4A */ u16 unk_4A[10];
|
|
/* 0x5E */ Save_SubStruct_5E unk_5E[10][7];
|
|
/* 0xEA */ u8 unk_EA;
|
|
/* 0xEB */ char padEB[0x3];
|
|
/* 0xEE */ char padEE[0x10];
|
|
} SaveData; // size = 0xFE
|
|
|
|
typedef struct {
|
|
/* 0x00 */ union {
|
|
u8 raw[sizeof(SaveData)];
|
|
SaveData data;
|
|
};
|
|
/* 0xFE */ u16 checksum;
|
|
} Save; // size = 0x100
|
|
|
|
typedef struct {
|
|
/* 0x000 */ Save save;
|
|
/* 0x100 */ Save backup;
|
|
} SaveFile; // size = 0x200
|
|
|
|
typedef struct {
|
|
/* 0x0 */ u16 unk_0;
|
|
/* 0x2 */ s8 unk_2;
|
|
/* 0x3 */ s8 unk_3;
|
|
} UnkStruct_gInputPress; // size = 0x4
|
|
|
|
typedef struct {
|
|
/* 0x00 */ u8 unk_00;
|
|
/* 0x01 */ char pad01[0x1];
|
|
/* 0x02 */ u16 unk_02;
|
|
/* 0x04 */ Vec3f pos;
|
|
/* 0x10 */ f32 unk_10;
|
|
/* 0x14 */ char pad14[0x14];
|
|
} UnkEntity28; // size = 0x28
|
|
|
|
typedef struct {
|
|
/* 0x00 */ u8 mode;
|
|
/* 0x02 */ u16 timer;
|
|
/* 0x04 */ Vec3f unk_04;
|
|
/* 0x10 */ Vec3f unk_10;
|
|
/* 0x1C */ f32 unk_1C;
|
|
/* 0x20 */ f32 unk_20;
|
|
/* 0x24 */ f32 unk_24;
|
|
/* 0x28 */ f32 unk_28;
|
|
/* 0x2C */ u8 unk_2C; // possibly a color struct
|
|
/* 0x2D */ u8 unk_2D;
|
|
/* 0x2E */ u8 unk_2E;
|
|
/* 0x2F */ u8 unk_2F;
|
|
} UnkEntity30; // size = 0x30
|
|
|
|
typedef struct {
|
|
/* 0x00 */ u8 hits;
|
|
/* 0x04 */ Vec3f pos;
|
|
/* 0x10 */ f32 unk_10;
|
|
/* 0x14 */ char pad14[0x4];
|
|
/* 0x18 */ u16 timer;
|
|
} UnkEntity1C; // size = 0x1C
|
|
|
|
#endif
|