Skip to content

Commit

Permalink
id 18480 as geo_layout from sm64
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoSucks committed Oct 12, 2024
1 parent 38da9f4 commit e77b96f
Show file tree
Hide file tree
Showing 28 changed files with 642 additions and 585 deletions.
64 changes: 32 additions & 32 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ typedef struct unk_D_86002F34_000_014 {
/* 0x04 */ u8* unk_04;
} unk_D_86002F34_000_014; // size >= 0x8

typedef s32 (*func_D_86002F34_000_010)(s32, struct unk_D_86002F34_000*);
typedef s32 (*func_D_86002F34_000_010)(s32, struct GraphNode*);

typedef struct unk_D_86002F34_000 {
typedef struct GraphNode {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ struct unk_D_86002F34_000* unk_04;
/* 0x08 */ struct unk_D_86002F34_000* unk_08;
/* 0x04 */ struct GraphNode* unk_04;
/* 0x08 */ struct GraphNode* unk_08;
/* 0x0C */ struct unk_D_86002F34_00C* unk_0C;
/* 0x10 */ func_D_86002F34_000_010 unk_10;
/* 0x14 */ unk_D_86002F34_000_014* unk_14;
} unk_D_86002F34_000; // size = 0x18
} GraphNode; // size = 0x18

typedef struct unk_D_86002F34_00C_018 {
/* 0x00 */ Vp* vp;
Expand Down Expand Up @@ -237,7 +237,7 @@ typedef struct unk_D_86002F34_00C_0CC {
} unk_D_86002F34_00C_0CC; // size >= 0x20

typedef struct unk_D_86002F34_00C {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ unk_D_86002F34_00C_018 unk_18;
/* 0x24 */ unk_D_86002F34_00C_024 unk_24;
/* 0x40 */ unk_D_86002F34_00C_040 unk_40;
Expand All @@ -247,7 +247,7 @@ typedef struct unk_D_86002F34_00C {
} unk_D_86002F34_00C; // size = 0xF0

typedef struct unk_D_86002F34_alt1 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ u16 unk_1A;
/* 0x1C */ s8 unk_1C;
Expand All @@ -257,32 +257,32 @@ typedef struct unk_D_86002F34_alt1 {
} unk_D_86002F34_alt1; // size >= 0x28

typedef struct unk_D_86002F34_alt2 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x18 */ unk_D_86002F34_000* unk_18;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ struct GraphNode* unk_18;
} unk_D_86002F34_alt2; // size >= 0x1C

typedef struct unk_D_86002F34_alt3 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ s32 unk_1C;
} unk_D_86002F34_alt3; // size >= 0x20

typedef struct unk_D_86002F34_alt4 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Color_RGBA8_u32 unk_18;
/* 0x1C */ u16 unk_1C;
/* 0x1E */ u16 unk_1E;
} unk_D_86002F34_alt4; // size >= 0x20

typedef struct unk_D_86002F34_alt5 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Vec3f unk_18;
/* 0x24 */ Vec3s unk_24;
} unk_D_86002F34_alt5; // size = 0x2C

typedef struct unk_D_86002F34_alt6 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Vec3s unk_18;
/* 0x1E */ Vec3s unk_1E;
/* 0x24 */ Vec3f unk_24;
Expand All @@ -292,26 +292,26 @@ typedef struct unk_D_86002F34_alt6 {
} unk_D_86002F34_alt6; // size = 0x34

typedef struct unk_D_86002F34_alt7 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ s16 unk_1C;
} unk_D_86002F34_alt7; // size = 0x20

typedef struct unk_D_86002F34_alt8 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ MtxF unk_1C;
} unk_D_86002F34_alt8; // size = 0x5C

typedef struct unk_D_86002F34_alt9 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Gfx* unk_18;
/* 0x1C */ Vec3f unk_1C;
/* 0x28 */ f32 unk_28;
} unk_D_86002F34_alt9; // size = 0x2C

typedef struct unk_D_86002F34_alt10 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s16 unk_1C;
/* 0x1E */ s16 unk_1E;
Expand All @@ -329,43 +329,43 @@ typedef struct unk_D_86002F34_alt11_018 {
} unk_D_86002F34_alt11_018; // size >= 0xC

typedef struct unk_D_86002F34_alt11 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ unk_D_86002F34_alt11_018* unk_18;
/* 0x1C */ unk_D_86002F34_alt11_018* unk_1C;
} unk_D_86002F34_alt11; // size >= 0x20

typedef struct unk_D_86002F34_alt12 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ s16 unk_1C;
/* 0x1E */ s16 unk_1E;
} unk_D_86002F34_alt12; // size = 0x20

typedef struct unk_D_86002F34_alt13 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
} unk_D_86002F34_alt13; // size = 0x1C

typedef struct unk_D_86002F34_alt14 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
} unk_D_86002F34_alt14; // size = 0x18

typedef struct unk_D_86002F34_alt15 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
} unk_D_86002F34_alt15; // size = 0x18

typedef struct unk_D_86002F34_alt16 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ u32 unk_18;
} unk_D_86002F34_alt16; // size = 0x1C

typedef struct unk_D_86002F34_alt17 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
} unk_D_86002F34_alt17; // size = 0x18

typedef struct unk_D_86002F34_alt18 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ u8 r;
/* 0x19 */ u8 g;
/* 0x1A */ u8 b;
Expand All @@ -375,36 +375,36 @@ typedef struct unk_D_86002F34_alt18 {
} unk_D_86002F34_alt18; // size = 0x20

typedef struct unk_D_86002F34_alt19 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ u8 r;
/* 0x19 */ u8 g;
/* 0x1A */ u8 b;
} unk_D_86002F34_alt19; // size = 0x1C

typedef struct unk_D_86002F34_alt20 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
} unk_D_86002F34_alt20; // size = 0x1C

typedef struct unk_D_86002F34_alt21 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
} unk_D_86002F34_alt21; // size = 0x1C

typedef struct unk_D_86002F34_alt22 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ Vec3f unk_18;
} unk_D_86002F34_alt22; // size = 0x24

typedef struct unk_D_86002F34_alt23 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
} unk_D_86002F34_alt23; // size = 0x1C

typedef struct unk_D_86002F34_alt24 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ s16 unk_1C;
Expand Down Expand Up @@ -434,7 +434,7 @@ typedef struct unk_D_86002F34_01C {
} unk_D_86002F34_01C; // size = 0xC

typedef struct unk_D_86002F34 {
/* 0x00 */ unk_D_86002F34_000 unk_00;
/* 0x00 */ struct GraphNode unk_00;
/* 0x18 */ unk_D_86002F34_018* unk_18;
/* 0x1C */ unk_D_86002F34_01C* unk_1C;
/* 0x20 */ Vtx* unk_20;
Expand Down
9 changes: 9 additions & 0 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,19 @@ D_8006F050 = 0x8006F050; // size:0xC
D_8006F05C = 0x8006F05C; // size:0x6
D_8006F064 = 0x8006F064; // size:0xC
D_800ABE10 = 0x800ABE10; // size:0xA18
gCurRootGraphNode = 0x800ABD34; // size:0x4
gPlayer1Controller = 0x80068BA0;
gPlayer2Controller = 0x80068BA4;
gPlayer3Controller = 0x80068BA8;
gPlayer4Controller = 0x80068BAC;
GeoLayoutJumpTable = 0x8006F2B0; // size:0xA0
gGeoLayoutCommand = 0x800ABE00; // size:0x4
gGeoLayoutStack = 0x800ABD38;
gGraphNodePool = 0x800ABD30; // size:0x4
gGeoLayoutStackIndex = 0x800ABDFA; // size:0x2
gGeoLayoutReturnIndex = 0x800ABDFE; // size:0x2
gCurGraphNodeList = 0x800ABD78; // size:0x80
gCurGraphNodeIndex = 0x800ABDF8; // size:0x2
D_8790606C = 0x8790606C; // size:0x6
D_87906088 = 0x87906088; // size:0xC
D_8790609C = 0x8790609C; // size:0x6
Expand Down
16 changes: 8 additions & 8 deletions linker_scripts/us/symbol_addrs_code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,13 @@ func_80017804 = 0x80017804; // type:func
func_8001781C = 0x8001781C; // type:func
func_8001783C = 0x8001783C; // type:func
func_80017858 = 0x80017858; // type:func
func_80017880 = 0x80017880; // type:func
func_80017914 = 0x80017914; // type:func
func_8001799C = 0x8001799C; // type:func
func_800179C8 = 0x800179C8; // type:func
func_80017A1C = 0x80017A1C; // type:func
func_80017A54 = 0x80017A54; // type:func
func_80017A98 = 0x80017A98; // type:func
geo_layout_cmd_branch_and_link = 0x80017880; // type:func
geo_layout_cmd_end = 0x80017914; // type:func
geo_layout_cmd_jump = 0x8001799C; // type:func
geo_layout_cmd_branch = 0x800179C8; // type:func
geo_layout_cmd_return = 0x80017A1C; // type:func
geo_layout_cmd_open_node = 0x80017A54; // type:func
geo_layout_cmd_close_node = 0x80017A98; // type:func
func_80017AC4 = 0x80017AC4; // type:func
func_80017B28 = 0x80017B28; // type:func
func_80017B60 = 0x80017B60; // type:func
Expand Down Expand Up @@ -596,7 +596,7 @@ func_800189B8 = 0x800189B8; // type:func
func_80018A40 = 0x80018A40; // type:func
func_80018A8C = 0x80018A8C; // type:func
func_80018AD0 = 0x80018AD0; // type:func
func_80018B70 = 0x80018B70; // type:func
process_geo_layout = 0x80018B70; // type:func
func_80018C40 = 0x80018C40; // type:func
func_80018DE8 = 0x80018DE8; // type:func
func_80018E7C = 0x80018E7C; // type:func
Expand Down
16 changes: 8 additions & 8 deletions src/11BA0.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "F420.h"
#include "util.h"

void func_80010FA0(unk_D_86002F34_000* arg0, u8 arg1) {
void func_80010FA0(struct GraphNode* arg0, u8 arg1) {
if (arg0 != NULL) {
arg0->unk_00 = arg1;
arg0->unk_01 = 0x11;
Expand All @@ -17,7 +17,7 @@ void func_80010FA0(unk_D_86002F34_000* arg0, u8 arg1) {
}
}

void func_80010FDC(unk_D_86002F34_000* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2) {
void func_80010FDC(struct GraphNode* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2) {
if (arg1 != NULL) {
arg1 = Util_ConvertAddrToVirtAddr(arg1);
}
Expand All @@ -31,9 +31,9 @@ void func_80010FDC(unk_D_86002F34_000* arg0, func_D_86002F34_000_010 arg1, unk_D
}
}

unk_D_86002F34_000* func_8001103C(MainPoolState* arg0, unk_D_86002F34_000* arg1) {
struct GraphNode* func_8001103C(MainPoolState* arg0, struct GraphNode* arg1) {
if (arg0 != NULL) {
arg1 = func_80002DCC(arg0, sizeof(unk_D_86002F34_000), 4);
arg1 = func_80002DCC(arg0, sizeof(struct GraphNode), 4);
}

if (arg1 != NULL) {
Expand All @@ -43,7 +43,7 @@ unk_D_86002F34_000* func_8001103C(MainPoolState* arg0, unk_D_86002F34_000* arg1)
return arg1;
}

unk_D_86002F34_alt2* func_80011088(MainPoolState* arg0, unk_D_86002F34_alt2* arg1, unk_D_86002F34_000* arg2) {
unk_D_86002F34_alt2* func_80011088(MainPoolState* arg0, unk_D_86002F34_alt2* arg1, struct GraphNode* arg2) {
if (arg0 != NULL) {
arg1 = func_80002DCC(arg0, sizeof(unk_D_86002F34_alt2), 4);
}
Expand Down Expand Up @@ -529,9 +529,9 @@ void func_80011FC8(unk_D_86002F34_00C* arg0, s16 arg1, s16 arg2, u8 arg3, u8 arg

#pragma GLOBAL_ASM("asm/us/nonmatchings/11BA0/func_80012044.s")

void func_80012094(unk_D_86002F34_000* arg0, unk_D_86002F34_000* arg1) {
unk_D_86002F34_000* temp_v0;
unk_D_86002F34_000* temp_v1;
void func_80012094(struct GraphNode* arg0, struct GraphNode* arg1) {
struct GraphNode* temp_v0;
struct GraphNode* temp_v1;

if ((arg0 != NULL) && (arg1 != NULL)) {
temp_v0 = arg0->unk_0C;
Expand Down
10 changes: 5 additions & 5 deletions src/11BA0.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ typedef struct unk_D_8690A610 {
/* 0x18 */ unk_D_8690A610_018 unk_18;
} unk_D_8690A610; // size = 0x20

void func_80010FA0(unk_D_86002F34_000* arg0, u8 arg1);
void func_80010FDC(unk_D_86002F34_000* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2);
unk_D_86002F34_000* func_8001103C(MainPoolState* arg0, unk_D_86002F34_000* arg1);
unk_D_86002F34_alt2* func_80011088(MainPoolState* arg0, unk_D_86002F34_alt2* arg1, unk_D_86002F34_000* arg2);
void func_80010FA0(struct GraphNode* arg0, u8 arg1);
void func_80010FDC(struct GraphNode* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2);
struct GraphNode* func_8001103C(MainPoolState* arg0, struct GraphNode* arg1);
unk_D_86002F34_alt2* func_80011088(MainPoolState* arg0, unk_D_86002F34_alt2* arg1, struct GraphNode* arg2);
unk_D_86002F34_00C* func_800110E0(MemoryBlock* arg0, unk_D_86002F34_00C* arg1, s16 arg2, s16 arg3, s16 arg4, s16 arg5);
unk_D_86002F34_alt13* func_800111A4(MemoryBlock* arg0, unk_D_86002F34_alt13* arg1, s16 arg2);
unk_D_86002F34_alt1* func_800111FC(MemoryBlock* arg0, unk_D_86002F34_alt1* arg1, s16 arg2);
Expand Down Expand Up @@ -58,5 +58,5 @@ void func_80011DAC(unk_D_86002F34_00C* arg0, s16 arg1, s16 arg2, s16 arg3, s16 a
void func_80011E68(unk_D_86002F34_00C* arg0, f32 arg1, f32 arg2, f32 arg3);
void func_80011EB4(unk_D_86002F34_00C* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, s32 arg7);
void func_80011FC8(unk_D_86002F34_00C* arg0, s16 arg1, s16 arg2, u8 arg3, u8 arg4, u8 arg5);
void func_80012094(unk_D_86002F34_000* arg0, unk_D_86002F34_000* arg1);
void func_80012094(struct GraphNode* arg0, struct GraphNode* arg1);
#endif // _11BA0_H_
Loading

0 comments on commit e77b96f

Please sign in to comment.