Match memory.c, remove warnings, fix fake matches (#301)

* Match memory, remove warnings, fix fake matches

* label switch
This commit is contained in:
MegaMech
2023-04-07 22:13:28 -06:00
committed by GitHub
parent 772091700c
commit afb29a5a65
91 changed files with 1818 additions and 4071 deletions
+7 -1
View File
@@ -5,6 +5,10 @@
#include <macros.h>
#include <common_structs.h>
//#pragma GCC diagnostic push
//#pragma GCC diagnostic ignored "-Wmicrosoft-extension"
//#pragma GCC diagnostic ignored "-Wmissing-member-name-in-structure-/-union"
/*
gActorList should be understood to be populated by generic Actor structs.
However, for human readability, many functions interacting with actor list elements expect one of the many
@@ -329,4 +333,6 @@ struct BananaActor {
/* 0x30 */ UnkActorInner unk30;
}; // size = 0x70
#endif
//#pragma GCC diagnostic pop
#endif // ACTOR_TYPES_H
+10 -4
View File
@@ -148,12 +148,18 @@ typedef struct {
// This struct is almost identical to the GBI Vtx_t type,
// except that its missing the "flag" member.
typedef struct {
s16 ob[3]; /* x, y, z */
s16 tc[2]; /* texture coord */
u8 ca[4]; /* color & alpha */
s16 ob[3]; /* x, y, z */
s16 tc[2]; /* texture coord */
u8 ca[4]; /* color & alpha */
} mk64_Vtx;
typedef struct {
s16 ob[3]; /* x, y, z */
s16 tc[2]; /* texture coord */
s8 n[3]; /* color & alpha */
} mk64_Vtx_n;
/*
This struct has been copied (with only minor modifications) from
https://github.com/micro500/mariokart64/wiki/Surface-Map
@@ -291,7 +297,7 @@ typedef struct {
/* 0x010C */ s16 unk_10C;
/* 0x010E */ char unk_10E[0x2];
/* 0x0110 */ UnkActorInner unk_110;
/* 0x0150 */ f32 unk_150[9];
/* 0x0150 */ Mat3 unk_150;
/* 0x0174 */ Mat3 unk_174;
/* 0x0198 */ KartBoundingBoxCorner boundingBoxCorners[4];
/* 0x01F8 */ f32 unk_1F8;
+3
View File
@@ -5,6 +5,9 @@
void mio0decode(u8* arg0, u8* arg1);
// Unused mio0decode function.
void func_80040030(u8* arg0, u8* arg1);
void func_8000F2DC(void);
void func_8000F628(void);
void func_8006B7E4(Player* player, s32 arg1);
+1
View File
@@ -1,6 +1,7 @@
#ifndef SEGMENTS_H
#define SEGMENTS_H
#define SEG_START 0x80000000
#define SEG_MAIN 0x80000400
#define SEG_80280000 0x80280000
#define SEG_8028DF00 0x8028DF00
+16 -14
View File
@@ -49,7 +49,7 @@ struct UnkStruct_800DC5EC {
/* 0x00 */ struct Controller *controllers; // gControllers ptr 800F6910
/* 0x04 */ Camera *camera; // Player camera ptr
/* 0x08 */ Player *player; // Player ptr 800F6990
/* 0x0C */ s32 unkC; // unk struct?
/* 0x0C */ s32 *unkC; // unk struct?
/* 0x10 */ Vp viewport;
/* 0x20 */ s32 pad[2];
/* 0x28 */ s16 cameraHeight;
@@ -114,20 +114,22 @@ typedef struct {
s8 unk;
} coursePath;
// dlRomStart, vertexRomStart, & vertexStart, are u8* because mio0 compressed.
struct courseTable {
u32 *dlRomStart; // 0x00 ROM start for segment 6 DL data
u32 *dlRomEnd; // 0x04 ROM end for segment 6 DL data
u32 *vertexRomStart; // 0x08 ROM start for segment 4 vertex data
u32 *vertexRomEnd; // 0x0C ROM end for segment 7?
u32 *offsetRomStart; // 0x10 ROM start for uncompressed segment 9 texture and DL addresses
u32 *offsetRomEnd; // 0x14 ROM end for uncompressed segment 9 texture and DL addresses
mk64_Vtx *vertexStart; // 0x18 segmented address of vertex data
u32 vertexCount; // 0x1C number of vertices in vertex data
u32 *packedStart; // 0x20 packed display list start address
u32 *finalDL; // 0x24
u32 *textures; // 0x20 segmented address of textures table
u16 unknown1; // 0x2C
u16 padding; // 0x2E
u8 *dlRomStart; // 0x00 ROM start for segment 6 DL data
u8 *dlRomEnd; // 0x04 ROM end for segment 6 DL data
u8 *vertexRomStart; // 0x08 ROM start for segment 4 vertex data
u8 *vertexRomEnd; // 0x0C ROM end for segment 7?
struct course_texture *offsetRomStart; // 0x10 ROM start for uncompressed segment 9 texture and DL addresses
struct course_texture *offsetRomEnd; // 0x14 ROM end for uncompressed segment 9 texture and DL addresses
u8 *vertexStart; // 0x18 segmented address of vertex data
u32 vertexCount; // 0x1C number of vertices in vertex data
u8 *packedStart; // 0x20 packed display list start address
uintptr_t finalDisplaylistOffset; // 0x24
u32 *textures; // 0x20 segmented address of textures table
u16 unknown1; // 0x2C
u16 padding; // 0x2E
};
extern mk64_Vtx d_course_mario_raceway_vertex[];