Skip to content

Commit e77b96f

Browse files
committed
id 18480 as geo_layout from sm64
1 parent 38da9f4 commit e77b96f

28 files changed

+642
-585
lines changed

include/global.h

+32-32
Original file line numberDiff line numberDiff line change
@@ -167,19 +167,19 @@ typedef struct unk_D_86002F34_000_014 {
167167
/* 0x04 */ u8* unk_04;
168168
} unk_D_86002F34_000_014; // size >= 0x8
169169

170-
typedef s32 (*func_D_86002F34_000_010)(s32, struct unk_D_86002F34_000*);
170+
typedef s32 (*func_D_86002F34_000_010)(s32, struct GraphNode*);
171171

172-
typedef struct unk_D_86002F34_000 {
172+
typedef struct GraphNode {
173173
/* 0x00 */ u8 unk_00;
174174
/* 0x01 */ u8 unk_01;
175175
/* 0x02 */ u8 unk_02;
176176
/* 0x03 */ u8 unk_03;
177-
/* 0x04 */ struct unk_D_86002F34_000* unk_04;
178-
/* 0x08 */ struct unk_D_86002F34_000* unk_08;
177+
/* 0x04 */ struct GraphNode* unk_04;
178+
/* 0x08 */ struct GraphNode* unk_08;
179179
/* 0x0C */ struct unk_D_86002F34_00C* unk_0C;
180180
/* 0x10 */ func_D_86002F34_000_010 unk_10;
181181
/* 0x14 */ unk_D_86002F34_000_014* unk_14;
182-
} unk_D_86002F34_000; // size = 0x18
182+
} GraphNode; // size = 0x18
183183

184184
typedef struct unk_D_86002F34_00C_018 {
185185
/* 0x00 */ Vp* vp;
@@ -237,7 +237,7 @@ typedef struct unk_D_86002F34_00C_0CC {
237237
} unk_D_86002F34_00C_0CC; // size >= 0x20
238238

239239
typedef struct unk_D_86002F34_00C {
240-
/* 0x00 */ unk_D_86002F34_000 unk_00;
240+
/* 0x00 */ struct GraphNode unk_00;
241241
/* 0x18 */ unk_D_86002F34_00C_018 unk_18;
242242
/* 0x24 */ unk_D_86002F34_00C_024 unk_24;
243243
/* 0x40 */ unk_D_86002F34_00C_040 unk_40;
@@ -247,7 +247,7 @@ typedef struct unk_D_86002F34_00C {
247247
} unk_D_86002F34_00C; // size = 0xF0
248248

249249
typedef struct unk_D_86002F34_alt1 {
250-
/* 0x00 */ unk_D_86002F34_000 unk_00;
250+
/* 0x00 */ struct GraphNode unk_00;
251251
/* 0x18 */ s16 unk_18;
252252
/* 0x1A */ u16 unk_1A;
253253
/* 0x1C */ s8 unk_1C;
@@ -257,32 +257,32 @@ typedef struct unk_D_86002F34_alt1 {
257257
} unk_D_86002F34_alt1; // size >= 0x28
258258

259259
typedef struct unk_D_86002F34_alt2 {
260-
/* 0x00 */ unk_D_86002F34_000 unk_00;
261-
/* 0x18 */ unk_D_86002F34_000* unk_18;
260+
/* 0x00 */ struct GraphNode unk_00;
261+
/* 0x18 */ struct GraphNode* unk_18;
262262
} unk_D_86002F34_alt2; // size >= 0x1C
263263

264264
typedef struct unk_D_86002F34_alt3 {
265-
/* 0x00 */ unk_D_86002F34_000 unk_00;
265+
/* 0x00 */ struct GraphNode unk_00;
266266
/* 0x18 */ s16 unk_18;
267267
/* 0x1A */ s16 unk_1A;
268268
/* 0x1C */ s32 unk_1C;
269269
} unk_D_86002F34_alt3; // size >= 0x20
270270

271271
typedef struct unk_D_86002F34_alt4 {
272-
/* 0x00 */ unk_D_86002F34_000 unk_00;
272+
/* 0x00 */ struct GraphNode unk_00;
273273
/* 0x18 */ Color_RGBA8_u32 unk_18;
274274
/* 0x1C */ u16 unk_1C;
275275
/* 0x1E */ u16 unk_1E;
276276
} unk_D_86002F34_alt4; // size >= 0x20
277277

278278
typedef struct unk_D_86002F34_alt5 {
279-
/* 0x00 */ unk_D_86002F34_000 unk_00;
279+
/* 0x00 */ struct GraphNode unk_00;
280280
/* 0x18 */ Vec3f unk_18;
281281
/* 0x24 */ Vec3s unk_24;
282282
} unk_D_86002F34_alt5; // size = 0x2C
283283

284284
typedef struct unk_D_86002F34_alt6 {
285-
/* 0x00 */ unk_D_86002F34_000 unk_00;
285+
/* 0x00 */ struct GraphNode unk_00;
286286
/* 0x18 */ Vec3s unk_18;
287287
/* 0x1E */ Vec3s unk_1E;
288288
/* 0x24 */ Vec3f unk_24;
@@ -292,26 +292,26 @@ typedef struct unk_D_86002F34_alt6 {
292292
} unk_D_86002F34_alt6; // size = 0x34
293293

294294
typedef struct unk_D_86002F34_alt7 {
295-
/* 0x00 */ unk_D_86002F34_000 unk_00;
295+
/* 0x00 */ struct GraphNode unk_00;
296296
/* 0x18 */ Gfx* unk_18;
297297
/* 0x1C */ s16 unk_1C;
298298
} unk_D_86002F34_alt7; // size = 0x20
299299

300300
typedef struct unk_D_86002F34_alt8 {
301-
/* 0x00 */ unk_D_86002F34_000 unk_00;
301+
/* 0x00 */ struct GraphNode unk_00;
302302
/* 0x18 */ Gfx* unk_18;
303303
/* 0x1C */ MtxF unk_1C;
304304
} unk_D_86002F34_alt8; // size = 0x5C
305305

306306
typedef struct unk_D_86002F34_alt9 {
307-
/* 0x00 */ unk_D_86002F34_000 unk_00;
307+
/* 0x00 */ struct GraphNode unk_00;
308308
/* 0x18 */ Gfx* unk_18;
309309
/* 0x1C */ Vec3f unk_1C;
310310
/* 0x28 */ f32 unk_28;
311311
} unk_D_86002F34_alt9; // size = 0x2C
312312

313313
typedef struct unk_D_86002F34_alt10 {
314-
/* 0x00 */ unk_D_86002F34_000 unk_00;
314+
/* 0x00 */ struct GraphNode unk_00;
315315
/* 0x18 */ s32 unk_18;
316316
/* 0x1C */ s16 unk_1C;
317317
/* 0x1E */ s16 unk_1E;
@@ -329,43 +329,43 @@ typedef struct unk_D_86002F34_alt11_018 {
329329
} unk_D_86002F34_alt11_018; // size >= 0xC
330330

331331
typedef struct unk_D_86002F34_alt11 {
332-
/* 0x00 */ unk_D_86002F34_000 unk_00;
332+
/* 0x00 */ struct GraphNode unk_00;
333333
/* 0x18 */ unk_D_86002F34_alt11_018* unk_18;
334334
/* 0x1C */ unk_D_86002F34_alt11_018* unk_1C;
335335
} unk_D_86002F34_alt11; // size >= 0x20
336336

337337
typedef struct unk_D_86002F34_alt12 {
338-
/* 0x00 */ unk_D_86002F34_000 unk_00;
338+
/* 0x00 */ struct GraphNode unk_00;
339339
/* 0x18 */ s16 unk_18;
340340
/* 0x1A */ s16 unk_1A;
341341
/* 0x1C */ s16 unk_1C;
342342
/* 0x1E */ s16 unk_1E;
343343
} unk_D_86002F34_alt12; // size = 0x20
344344

345345
typedef struct unk_D_86002F34_alt13 {
346-
/* 0x00 */ unk_D_86002F34_000 unk_00;
346+
/* 0x00 */ struct GraphNode unk_00;
347347
/* 0x18 */ s16 unk_18;
348348
} unk_D_86002F34_alt13; // size = 0x1C
349349

350350
typedef struct unk_D_86002F34_alt14 {
351-
/* 0x00 */ unk_D_86002F34_000 unk_00;
351+
/* 0x00 */ struct GraphNode unk_00;
352352
} unk_D_86002F34_alt14; // size = 0x18
353353

354354
typedef struct unk_D_86002F34_alt15 {
355-
/* 0x00 */ unk_D_86002F34_000 unk_00;
355+
/* 0x00 */ struct GraphNode unk_00;
356356
} unk_D_86002F34_alt15; // size = 0x18
357357

358358
typedef struct unk_D_86002F34_alt16 {
359-
/* 0x00 */ unk_D_86002F34_000 unk_00;
359+
/* 0x00 */ struct GraphNode unk_00;
360360
/* 0x18 */ u32 unk_18;
361361
} unk_D_86002F34_alt16; // size = 0x1C
362362

363363
typedef struct unk_D_86002F34_alt17 {
364-
/* 0x00 */ unk_D_86002F34_000 unk_00;
364+
/* 0x00 */ struct GraphNode unk_00;
365365
} unk_D_86002F34_alt17; // size = 0x18
366366

367367
typedef struct unk_D_86002F34_alt18 {
368-
/* 0x00 */ unk_D_86002F34_000 unk_00;
368+
/* 0x00 */ struct GraphNode unk_00;
369369
/* 0x18 */ u8 r;
370370
/* 0x19 */ u8 g;
371371
/* 0x1A */ u8 b;
@@ -375,36 +375,36 @@ typedef struct unk_D_86002F34_alt18 {
375375
} unk_D_86002F34_alt18; // size = 0x20
376376

377377
typedef struct unk_D_86002F34_alt19 {
378-
/* 0x00 */ unk_D_86002F34_000 unk_00;
378+
/* 0x00 */ struct GraphNode unk_00;
379379
/* 0x18 */ u8 r;
380380
/* 0x19 */ u8 g;
381381
/* 0x1A */ u8 b;
382382
} unk_D_86002F34_alt19; // size = 0x1C
383383

384384
typedef struct unk_D_86002F34_alt20 {
385-
/* 0x00 */ unk_D_86002F34_000 unk_00;
385+
/* 0x00 */ struct GraphNode unk_00;
386386
/* 0x18 */ s16 unk_18;
387387
/* 0x1A */ s16 unk_1A;
388388
} unk_D_86002F34_alt20; // size = 0x1C
389389

390390
typedef struct unk_D_86002F34_alt21 {
391-
/* 0x00 */ unk_D_86002F34_000 unk_00;
391+
/* 0x00 */ struct GraphNode unk_00;
392392
/* 0x18 */ s16 unk_18;
393393
/* 0x1A */ s16 unk_1A;
394394
} unk_D_86002F34_alt21; // size = 0x1C
395395

396396
typedef struct unk_D_86002F34_alt22 {
397-
/* 0x00 */ unk_D_86002F34_000 unk_00;
397+
/* 0x00 */ struct GraphNode unk_00;
398398
/* 0x18 */ Vec3f unk_18;
399399
} unk_D_86002F34_alt22; // size = 0x24
400400

401401
typedef struct unk_D_86002F34_alt23 {
402-
/* 0x00 */ unk_D_86002F34_000 unk_00;
402+
/* 0x00 */ struct GraphNode unk_00;
403403
/* 0x18 */ s16 unk_18;
404404
} unk_D_86002F34_alt23; // size = 0x1C
405405

406406
typedef struct unk_D_86002F34_alt24 {
407-
/* 0x00 */ unk_D_86002F34_000 unk_00;
407+
/* 0x00 */ struct GraphNode unk_00;
408408
/* 0x18 */ s16 unk_18;
409409
/* 0x1A */ s16 unk_1A;
410410
/* 0x1C */ s16 unk_1C;
@@ -434,7 +434,7 @@ typedef struct unk_D_86002F34_01C {
434434
} unk_D_86002F34_01C; // size = 0xC
435435

436436
typedef struct unk_D_86002F34 {
437-
/* 0x00 */ unk_D_86002F34_000 unk_00;
437+
/* 0x00 */ struct GraphNode unk_00;
438438
/* 0x18 */ unk_D_86002F34_018* unk_18;
439439
/* 0x1C */ unk_D_86002F34_01C* unk_1C;
440440
/* 0x20 */ Vtx* unk_20;

linker_scripts/us/symbol_addrs.txt

+9
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,19 @@ D_8006F050 = 0x8006F050; // size:0xC
295295
D_8006F05C = 0x8006F05C; // size:0x6
296296
D_8006F064 = 0x8006F064; // size:0xC
297297
D_800ABE10 = 0x800ABE10; // size:0xA18
298+
gCurRootGraphNode = 0x800ABD34; // size:0x4
298299
gPlayer1Controller = 0x80068BA0;
299300
gPlayer2Controller = 0x80068BA4;
300301
gPlayer3Controller = 0x80068BA8;
301302
gPlayer4Controller = 0x80068BAC;
303+
GeoLayoutJumpTable = 0x8006F2B0; // size:0xA0
304+
gGeoLayoutCommand = 0x800ABE00; // size:0x4
305+
gGeoLayoutStack = 0x800ABD38;
306+
gGraphNodePool = 0x800ABD30; // size:0x4
307+
gGeoLayoutStackIndex = 0x800ABDFA; // size:0x2
308+
gGeoLayoutReturnIndex = 0x800ABDFE; // size:0x2
309+
gCurGraphNodeList = 0x800ABD78; // size:0x80
310+
gCurGraphNodeIndex = 0x800ABDF8; // size:0x2
302311
D_8790606C = 0x8790606C; // size:0x6
303312
D_87906088 = 0x87906088; // size:0xC
304313
D_8790609C = 0x8790609C; // size:0x6

linker_scripts/us/symbol_addrs_code.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,13 @@ func_80017804 = 0x80017804; // type:func
556556
func_8001781C = 0x8001781C; // type:func
557557
func_8001783C = 0x8001783C; // type:func
558558
func_80017858 = 0x80017858; // type:func
559-
func_80017880 = 0x80017880; // type:func
560-
func_80017914 = 0x80017914; // type:func
561-
func_8001799C = 0x8001799C; // type:func
562-
func_800179C8 = 0x800179C8; // type:func
563-
func_80017A1C = 0x80017A1C; // type:func
564-
func_80017A54 = 0x80017A54; // type:func
565-
func_80017A98 = 0x80017A98; // type:func
559+
geo_layout_cmd_branch_and_link = 0x80017880; // type:func
560+
geo_layout_cmd_end = 0x80017914; // type:func
561+
geo_layout_cmd_jump = 0x8001799C; // type:func
562+
geo_layout_cmd_branch = 0x800179C8; // type:func
563+
geo_layout_cmd_return = 0x80017A1C; // type:func
564+
geo_layout_cmd_open_node = 0x80017A54; // type:func
565+
geo_layout_cmd_close_node = 0x80017A98; // type:func
566566
func_80017AC4 = 0x80017AC4; // type:func
567567
func_80017B28 = 0x80017B28; // type:func
568568
func_80017B60 = 0x80017B60; // type:func
@@ -596,7 +596,7 @@ func_800189B8 = 0x800189B8; // type:func
596596
func_80018A40 = 0x80018A40; // type:func
597597
func_80018A8C = 0x80018A8C; // type:func
598598
func_80018AD0 = 0x80018AD0; // type:func
599-
func_80018B70 = 0x80018B70; // type:func
599+
process_geo_layout = 0x80018B70; // type:func
600600
func_80018C40 = 0x80018C40; // type:func
601601
func_80018DE8 = 0x80018DE8; // type:func
602602
func_80018E7C = 0x80018E7C; // type:func

src/11BA0.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "F420.h"
44
#include "util.h"
55

6-
void func_80010FA0(unk_D_86002F34_000* arg0, u8 arg1) {
6+
void func_80010FA0(struct GraphNode* arg0, u8 arg1) {
77
if (arg0 != NULL) {
88
arg0->unk_00 = arg1;
99
arg0->unk_01 = 0x11;
@@ -17,7 +17,7 @@ void func_80010FA0(unk_D_86002F34_000* arg0, u8 arg1) {
1717
}
1818
}
1919

20-
void func_80010FDC(unk_D_86002F34_000* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2) {
20+
void func_80010FDC(struct GraphNode* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2) {
2121
if (arg1 != NULL) {
2222
arg1 = Util_ConvertAddrToVirtAddr(arg1);
2323
}
@@ -31,9 +31,9 @@ void func_80010FDC(unk_D_86002F34_000* arg0, func_D_86002F34_000_010 arg1, unk_D
3131
}
3232
}
3333

34-
unk_D_86002F34_000* func_8001103C(MainPoolState* arg0, unk_D_86002F34_000* arg1) {
34+
struct GraphNode* func_8001103C(MainPoolState* arg0, struct GraphNode* arg1) {
3535
if (arg0 != NULL) {
36-
arg1 = func_80002DCC(arg0, sizeof(unk_D_86002F34_000), 4);
36+
arg1 = func_80002DCC(arg0, sizeof(struct GraphNode), 4);
3737
}
3838

3939
if (arg1 != NULL) {
@@ -43,7 +43,7 @@ unk_D_86002F34_000* func_8001103C(MainPoolState* arg0, unk_D_86002F34_000* arg1)
4343
return arg1;
4444
}
4545

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

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

532-
void func_80012094(unk_D_86002F34_000* arg0, unk_D_86002F34_000* arg1) {
533-
unk_D_86002F34_000* temp_v0;
534-
unk_D_86002F34_000* temp_v1;
532+
void func_80012094(struct GraphNode* arg0, struct GraphNode* arg1) {
533+
struct GraphNode* temp_v0;
534+
struct GraphNode* temp_v1;
535535

536536
if ((arg0 != NULL) && (arg1 != NULL)) {
537537
temp_v0 = arg0->unk_0C;

src/11BA0.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ typedef struct unk_D_8690A610 {
2020
/* 0x18 */ unk_D_8690A610_018 unk_18;
2121
} unk_D_8690A610; // size = 0x20
2222

23-
void func_80010FA0(unk_D_86002F34_000* arg0, u8 arg1);
24-
void func_80010FDC(unk_D_86002F34_000* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2);
25-
unk_D_86002F34_000* func_8001103C(MainPoolState* arg0, unk_D_86002F34_000* arg1);
26-
unk_D_86002F34_alt2* func_80011088(MainPoolState* arg0, unk_D_86002F34_alt2* arg1, unk_D_86002F34_000* arg2);
23+
void func_80010FA0(struct GraphNode* arg0, u8 arg1);
24+
void func_80010FDC(struct GraphNode* arg0, func_D_86002F34_000_010 arg1, unk_D_86002F34_000_014* arg2);
25+
struct GraphNode* func_8001103C(MainPoolState* arg0, struct GraphNode* arg1);
26+
unk_D_86002F34_alt2* func_80011088(MainPoolState* arg0, unk_D_86002F34_alt2* arg1, struct GraphNode* arg2);
2727
unk_D_86002F34_00C* func_800110E0(MemoryBlock* arg0, unk_D_86002F34_00C* arg1, s16 arg2, s16 arg3, s16 arg4, s16 arg5);
2828
unk_D_86002F34_alt13* func_800111A4(MemoryBlock* arg0, unk_D_86002F34_alt13* arg1, s16 arg2);
2929
unk_D_86002F34_alt1* func_800111FC(MemoryBlock* arg0, unk_D_86002F34_alt1* arg1, s16 arg2);
@@ -58,5 +58,5 @@ void func_80011DAC(unk_D_86002F34_00C* arg0, s16 arg1, s16 arg2, s16 arg3, s16 a
5858
void func_80011E68(unk_D_86002F34_00C* arg0, f32 arg1, f32 arg2, f32 arg3);
5959
void func_80011EB4(unk_D_86002F34_00C* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, s32 arg7);
6060
void func_80011FC8(unk_D_86002F34_00C* arg0, s16 arg1, s16 arg2, u8 arg3, u8 arg4, u8 arg5);
61-
void func_80012094(unk_D_86002F34_000* arg0, unk_D_86002F34_000* arg1);
61+
void func_80012094(struct GraphNode* arg0, struct GraphNode* arg1);
6262
#endif // _11BA0_H_

0 commit comments

Comments
 (0)