mirror of
https://github.com/n64decomp/mk64
synced 2026-07-09 05:13:17 -04:00
Match a lot of functions, add header for objects (#251)
* Match a lot of functions, add header for objects * Refreshed a TON of functions and created/added to several header files * Add header for code_800431B0, address comments Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
@@ -104,6 +104,7 @@ typedef struct {
|
||||
/* 0x04 */ u16 unk34;
|
||||
/* 0x06 */ u16 unk36;
|
||||
/* 0x08 */ u16 unk38;
|
||||
// This may be an index to the tilemap?
|
||||
/* 0x0A */ u16 unk3A;
|
||||
/* 0x0C */ f32 unk3C;
|
||||
/* 0x10 */ f32 unk40;
|
||||
@@ -229,7 +230,7 @@ typedef struct {
|
||||
/* 0x002C */ Vec3s unk_02C;
|
||||
/* 0x0032 */ char unk_032[0x2];
|
||||
/* 0x0034 */ Vec3f unk_034;
|
||||
/* 0x0040 */ char unk_040[0x2];
|
||||
/* 0x0040 */ s16 unk_040;
|
||||
/* 0x0042 */ s16 unk_042;
|
||||
/* 0x0044 */ s16 unk_044;
|
||||
/* 0x0046 */ u16 unk_046;
|
||||
@@ -416,83 +417,6 @@ typedef struct {
|
||||
char unk_32[0xE]; // guessed
|
||||
} struct_D_801650D0;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x00 */ f32 unk_000;
|
||||
/* 0x04 */ Vec3f unk_004;
|
||||
/* 0x10 */ Vec3f unk_010;
|
||||
/* 0x1C */ s8 unk_01C[0xC];
|
||||
/* 0x28 */ Vec3f unk_028;
|
||||
/* 0x34 */ f32 unk_034;
|
||||
/* 0x38 */ f32 unk_038;
|
||||
/* 0x3C */ f32 unk_03C;
|
||||
/* 0x40 */ f32 unk_040;
|
||||
/* 0x44 */ s32 unk_044;
|
||||
/* 0x48 */ s32 unk_048;
|
||||
/* 0x4C */ s32 unk_04C;
|
||||
/* 0x50 */ s32 unk_050;
|
||||
/* 0x54 */ s32 unk_054;
|
||||
/* 0x58 */ s32 unk_058;
|
||||
/* 0x5C */ s32 unk_05C;
|
||||
/* 0x60 */ s32* unk_060;
|
||||
/* 0x64 */ s32* unk_064;
|
||||
/* 0x68 */ s32* unk_068;
|
||||
/* 0x6C */ s32 unk_06C;
|
||||
/* 0x70 */ s32 unk_070;
|
||||
/* 0x74 */ s32 unk_074;
|
||||
/* 0x78 */ s8 unk_078[0x04];
|
||||
/* 0x7C */ s32 unk_07C;
|
||||
/* 0x80 */ s32 unk_080;
|
||||
/* 0x84 */ s16 unk_084[0xA];
|
||||
/* 0x98 */ s16 unk_098;
|
||||
/* 0x9A */ s16 unk_09A;
|
||||
/* 0x9C */ s32 unk_09C;
|
||||
/* 0xA0 */ s16 unk_0A0;
|
||||
/* 0xA2 */ s16 unk_0A2;
|
||||
/* 0xA4 */ s16 unk_0A4;
|
||||
/* 0xA6 */ s16 unk_0A6;
|
||||
/* 0xA8 */ s16 unk_0A8;
|
||||
/* 0xAA */ s16 unk_0AA;
|
||||
/* 0xAC */ s16 unk_0AC;
|
||||
/* 0xAE */ s16 unk_0AE;
|
||||
/* 0xB0 */ s16 unk_0B0;
|
||||
/* 0xB0 */ s16 unk_0B2;
|
||||
/* 0xB0 */ s16 unk_0B4;
|
||||
/* 0xB0 */ s16 unk_0B6;
|
||||
/* 0xB0 */ s8 unk_0B8[0x6];
|
||||
/* 0xBE */ u16 unk_0BE;
|
||||
/* 0xC0 */ u16 unk_0C0;
|
||||
/* 0xC2 */ u16 unk_0C2;
|
||||
/* 0xC4 */ s8 unk_0C4;
|
||||
/* 0xC5 */ s8 unk_0C5;
|
||||
/* 0xC6 */ s8 unk_0C6;
|
||||
/* 0xC7 */ s8 unk_0C7;
|
||||
/* 0xC8 */ s8 unk_0C8;
|
||||
/* 0xC9 */ s8 unk_0C9;
|
||||
/* 0xCA */ s8 unk_0CA;
|
||||
/* 0xCB */ s8 unk_0CB;
|
||||
/* 0xCC */ s8 unk_0CC;
|
||||
/* 0xCD */ s8 unk_0CD;
|
||||
/* 0xCE */ s8 unk_0CE;
|
||||
/* 0xCF */ s8 unk_0CF;
|
||||
/* 0xD0 */ s8 unk_0D0;
|
||||
/* 0xD1 */ s8 unk_0D1;
|
||||
/* 0xD2 */ s8 unk_0D2;
|
||||
/* 0xD3 */ s8 unk_0D3;
|
||||
/* 0xD4 */ s8 unk_0D4;
|
||||
/* 0xD5 */ s8 unk_0D5;
|
||||
/* 0xD6 */ u8 unk_0D6;
|
||||
/* 0xD7 */ u8 unk_0D7;
|
||||
/* 0xD8 */ s8 unk_0D8;
|
||||
/* 0xD9 */ u8 unk_0D9;
|
||||
/* 0xDA */ u8 unk_0DA;
|
||||
/* 0xDB */ u8 unk_0DB;
|
||||
/* 0xDC */ u8 unk_0DC;
|
||||
/* 0xDD */ s8 unk_0DD;
|
||||
/* 0xDE */ s8 unk_0DE;
|
||||
/* 0xDF */ s8 unk_0DF;
|
||||
} struct_80165C18_entry; // size = 0xE0
|
||||
|
||||
typedef struct {
|
||||
char unk_00[0x4];
|
||||
f32 unk_04;
|
||||
@@ -598,7 +522,12 @@ typedef struct {
|
||||
/* 0x7D */ s8 unk_7D;
|
||||
/* 0x7E */ s8 unk_7E;
|
||||
/* 0x7F */ s8 unk_7F;
|
||||
/* 0x80 */ s32 unk_80;
|
||||
/* 0x80 */ s8 unk_80;
|
||||
/* 0x81 */ s8 unk_81;
|
||||
/* 0x82 */ s8 unk_82;
|
||||
/* 0x83 */ s8 unk_83;
|
||||
} struct_8018CA70_entry; // size = 0x84
|
||||
|
||||
#define D_8018CA70_SIZE 4
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
#ifndef OBJECTS_H
|
||||
#define OBJECTS_H
|
||||
|
||||
#include "common_structs.h"
|
||||
|
||||
#define OBJECT_LIST_SIZE 0x226
|
||||
#define D_80183DD8_SIZE 7
|
||||
#define SOME_OBJECT_INDEX_LIST_SIZE 32
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x00 */ f32 unk_000;
|
||||
/* 0x04 */ Vec3f unk_004;
|
||||
/* 0x10 */ Vec3f unk_010;
|
||||
/* 0x1C */ Vec3f unk_01C;
|
||||
/* 0x28 */ Vec3f unk_028;
|
||||
/* 0x34 */ f32 unk_034;
|
||||
/* 0x38 */ Vec3f unk_038;
|
||||
/* 0x44 */ f32 unk_044;
|
||||
/* 0x48 */ s32 unk_048;
|
||||
/* 0x4C */ s32 unk_04C;
|
||||
/* 0x50 */ s32 unk_050;
|
||||
/* 0x54 */ s32 unk_054;
|
||||
/* 0x58 */ s32 unk_058;
|
||||
/* 0x5C */ s32 unk_05C;
|
||||
/* 0x60 */ s32* unk_060;
|
||||
/* 0x64 */ s32* unk_064;
|
||||
/* 0x68 */ s32* unk_068;
|
||||
/* 0x6C */ s32 unk_06C;
|
||||
/* 0x70 */ s32 unk_070;
|
||||
/* 0x74 */ s32 unk_074;
|
||||
/* 0x78 */ s8 unk_078[0x04];
|
||||
/* 0x7C */ s32 unk_07C;
|
||||
/* 0x80 */ s32 unk_080;
|
||||
/* 0x84 */ s16 unk_084[0xA];
|
||||
/* 0x98 */ s16 unk_098;
|
||||
/* 0x9A */ s16 unk_09A;
|
||||
/* 0x9C */ s16 unk_09C;
|
||||
/* 0x9E */ s16 unk_09E;
|
||||
/* 0xA0 */ s16 unk_0A0;
|
||||
/* 0xA2 */ s16 unk_0A2;
|
||||
/* 0xA4 */ s16 unk_0A4;
|
||||
/* 0xA6 */ s16 unk_0A6;
|
||||
/* 0xA8 */ s16 unk_0A8;
|
||||
/* 0xAA */ s16 unk_0AA;
|
||||
/* 0xAC */ s16 unk_0AC;
|
||||
/* 0xAE */ s16 unk_0AE;
|
||||
/* 0xB0 */ s16 unk_0B0;
|
||||
/* 0xB2 */ u16 unk_0B2;
|
||||
/* 0xB4 */ u16 unk_0B4;
|
||||
/* 0xB6 */ u16 unk_0B6;
|
||||
/* 0xB8 */ Vec3s unk_0B8;
|
||||
/* 0xBE */ u16 unk_0BE;
|
||||
/* 0xC0 */ u16 unk_0C0;
|
||||
/* 0xC2 */ u16 unk_0C2;
|
||||
/* 0xC4 */ u16 unk_0C4;
|
||||
/* 0xC6 */ u16 unk_0C6;
|
||||
/* 0xC8 */ u16 unk_0C8;
|
||||
/* 0xCA */ s8 unk_0CA;
|
||||
/* 0xCB */ s8 unk_0CB;
|
||||
/* 0xCC */ s8 unk_0CC;
|
||||
/* 0xCD */ s8 unk_0CD;
|
||||
/* 0xCE */ s8 unk_0CE;
|
||||
/* 0xCF */ s8 unk_0CF;
|
||||
/* 0xD0 */ s8 unk_0D0;
|
||||
/* 0xD1 */ s8 unk_0D1;
|
||||
/* 0xD2 */ s8 unk_0D2;
|
||||
/* 0xD3 */ s8 unk_0D3;
|
||||
/* 0xD4 */ s8 unk_0D4;
|
||||
/* 0xD5 */ u8 unk_0D5;
|
||||
/* 0xD6 */ u8 unk_0D6;
|
||||
/* 0xD7 */ u8 unk_0D7;
|
||||
/* 0xD8 */ s8 unk_0D8;
|
||||
/* 0xD9 */ u8 unk_0D9;
|
||||
/* 0xDA */ u8 unk_0DA;
|
||||
/* 0xDB */ u8 unk_0DB;
|
||||
/* 0xDC */ u8 unk_0DC;
|
||||
/* 0xDD */ u8 unk_0DD;
|
||||
/* 0xDE */ s8 unk_0DE;
|
||||
/* 0xDF */ u8 unk_0DF;
|
||||
} struct_80165C18_entry; // size = 0xE0
|
||||
|
||||
// This is the object list
|
||||
extern struct_80165C18_entry D_80165C18[];
|
||||
|
||||
// This is another list of indices in D_80165C18.
|
||||
extern s32 D_80183DD8[];
|
||||
|
||||
/**
|
||||
* D_80183EA0, D_80183F28, D_8018BFA8, and D_8018C030 are all lists of indices in D_80165C18.
|
||||
* func_80070190 initializes them in such a way that the indicies in each list are not adjacent.
|
||||
* First D_80183EA0 gets an unused index, then D_80183F28, then D_8018BFA8, then D_8018C030, and then it loops.
|
||||
*
|
||||
* The objects found at the indices in each list appears to be course dependent
|
||||
**/
|
||||
|
||||
extern s32 D_80183EA0[];
|
||||
extern s32 D_80183F28[];
|
||||
extern s32 D_8018BFA8[];
|
||||
extern s32 D_8018C030[];
|
||||
|
||||
#endif
|
||||
@@ -106,63 +106,6 @@ struct UnkStruct_802B53C8 {
|
||||
};
|
||||
// end math util structs
|
||||
|
||||
struct UnkStruct8008A890 {
|
||||
// B4 long
|
||||
Vec3f pos;
|
||||
//f32 posY;
|
||||
//f32 posZ;
|
||||
f32 unk; // lookat? faceangle?
|
||||
f32 unk1;
|
||||
f32 unk2;
|
||||
f32 angleX;
|
||||
f32 angleY;
|
||||
f32 angleZ;
|
||||
s16 rotX;
|
||||
s16 rotX2;
|
||||
s16 rotY; // unused?
|
||||
s16 rotZ;
|
||||
s32 unk3; // zero
|
||||
s32 unk4; // 0x4119999A
|
||||
s32 unk5; // 0xC20C bit flag?
|
||||
s32 unk6; // 0
|
||||
s32 unk7; // 0
|
||||
s32 unk8; // 0x41F
|
||||
s32 unk9; // 0
|
||||
s32 unk10; // 0
|
||||
s32 unk11; // 0
|
||||
s32 unk12; // 0
|
||||
u16 unk13; // 0x103F7
|
||||
u16 unk13_and_a_half;
|
||||
u16 unk14; // 0x05BC00## Surface camera is over?
|
||||
u16 unk14_half;
|
||||
u16 collisionX;
|
||||
u16 value;
|
||||
u16 collisionY;
|
||||
f32 collisionZ;
|
||||
f32 unk15;
|
||||
f32 unk16;
|
||||
f32 unk17;
|
||||
f32 unk18;
|
||||
f32 unk19;
|
||||
f32 unk20;
|
||||
f32 unkAngleX;
|
||||
f32 unkAngleY;
|
||||
f32 unkAngleZ;
|
||||
s32 unk21; // zero
|
||||
f32 collision;
|
||||
f32 unk22; // zero
|
||||
s16 unk23; // confirmed s16
|
||||
s16 unk24; // zero
|
||||
s16 unk24_and_a_half;
|
||||
s32 unk25; // zero
|
||||
s32 unk26; // zero
|
||||
// need another s16 here?
|
||||
s32 unk27; // 8
|
||||
s16 unk28; // zero
|
||||
f32 unk29; // 422
|
||||
f32 unk30;
|
||||
};
|
||||
|
||||
struct UnkStruct_800DDB68 {
|
||||
s32 *D_800ED600; s32 *D_800ED608; s32 *D_800ED610; s32 *D_800ED618;
|
||||
s32 *D_800ED620; s32 *D_800ED628; s32 *D_800ED630; s32 *D_800ED638;
|
||||
|
||||
Reference in New Issue
Block a user