Skip to content

Commit

Permalink
Merge pull request #146 from Kelebek1/fragment14
Browse files Browse the repository at this point in the history
fragment14
  • Loading branch information
RevoSucks authored Oct 2, 2024
2 parents 341cb72 + e263e05 commit cbf1027
Show file tree
Hide file tree
Showing 15 changed files with 3,289 additions and 85 deletions.
8 changes: 5 additions & 3 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ typedef struct unk_D_86002F58_004_000 {
/* 0x0DC */ Vec3f unk_0DC;
/* 0x0E0 */ char pad0E0[0x4];
/* 0x0EC */ Vec3f unk_0EC;
/* 0x0F8 */ char pad0F8[0x70];
/* 0x0F8 */ char pad0F8[0x4];
/* 0x0FC */ Vec3f unk_0FC;
/* 0x108 */ char pad108[0x60];
} unk_D_86002F58_004_000; // size = 0x168

typedef struct unk_D_86002F34_000_014_004 {
Expand All @@ -166,10 +168,10 @@ typedef struct unk_D_86002F34_000 {
/* 0x04 */ char pad04[0x2];
/* 0x06 */ s16 unk_06;
/* 0x08 */ struct unk_D_86002F34_000* unk_08;
/* 0x0C */ struct unk_D_86002F34_000* unk_0C;
/* 0x0C */ struct unk_D_86002F34_00C* unk_0C;
/* 0x10 */ s32 (*unk_10)(s32, struct unk_D_86002F34_000*);
/* 0x14 */ unk_D_86002F34_000_014* unk_14;
} unk_D_86002F34_000; // size >= 0x18
} unk_D_86002F34_000; // size = 0x18

typedef struct unk_D_86002F34_00C_018 {
/* 0x00 */ Vp* vp;
Expand Down
2 changes: 2 additions & 0 deletions include/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
#define ABS(x) ((x) < 0 ? -(x) : (x))
#define ABS_ALT(x) ((x) >= 0 ? (x) : -(x))

#define ABS_NORMALIZED(x) ((ABS_ALT((x)) < (0.000001f)) ? 0.0f : (x))

#define FRAGMENT_ID(fragment) ((((u32)fragment##_TEXT_START & 0x0FF00000) >> 0x14) - 0x10)
#define ASSET_ID(asset) (((u32)asset & 0x0F000000) >> 0x18)

Expand Down
26 changes: 25 additions & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extern Gfx D_1002508[];
extern Gfx D_1002590[];
extern u8 D_2000000[];
extern u8 D_3000000[];
extern u8 D_4000000[];
extern u8 D_04000000[];
extern u8 D_4000008[];
extern u8 D_4000810[];
extern u8 D_4001018[];
Expand All @@ -78,6 +78,29 @@ extern u8 D_2028A20[];
extern u8 D_2028A60[];
extern u8 D_2028AA0[];
extern u32 D_B0000D10;
extern u8 D_400C800[];
extern u8 D_400CA00[];
extern u8 D_400CC00[];
extern u8 D_400CE00[];
extern u8 D_400CF00[];
extern u8 D_400D100[];
extern u8 D_400D200[];
extern u8 D_04000000[];
extern u8 D_04000800[];
extern u8 D_04001000[];
extern u8 D_04001800[];
extern u8 D_04002000[];
extern u8 D_04002800[];
extern u8 D_04003000[];
extern u8 D_04003800[];
extern u8 D_04004000[];
extern u8 D_04005000[];
extern u8 D_04006000[];
extern u8 D_04007000[];
extern u8 D_04008000[];
extern u8 D_04009000[];
extern u8 D_0400A000[];
extern u8 D_0400B000[];

extern u8 D_800818E0[0x20];

Expand All @@ -94,6 +117,7 @@ extern u8 D_86200000;
extern u8 D_86800000;
extern u8 D_86C00000;
extern u8 D_87A00000;
extern u8 D_87000000[];

typedef struct unk_D_800A7440 {
/* 0x00 */ s16 x1;
Expand Down
24 changes: 24 additions & 0 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,27 @@ D_879060E0 = 0x879060E0; // size:0xC
D_87906100 = 0x87906100; // size:0xC
D_87906110 = 0x87906110; // size:0xC
D_8140E628 = 0x8140E628; // size:0x90
D_400C800 = 0x400C800;
D_400CA00 = 0x400CA00;
D_400CC00 = 0x400CC00;
D_400CE00 = 0x400CE00;
D_400CF00 = 0x400CF00;
D_400D100 = 0x400D100;
D_400D200 = 0x400D200;
D_86808498 = 0x86808498; // size:0x38
D_04000000 = 0x04000000;
D_04000800 = 0x04000800;
D_04001000 = 0x04001000;
D_04001800 = 0x04001800;
D_04002000 = 0x04002000;
D_04002800 = 0x04002800;
D_04003000 = 0x04003000;
D_04003800 = 0x04003800;
D_04004000 = 0x04004000;
D_04005000 = 0x04005000;
D_04006000 = 0x04006000;
D_04007000 = 0x04007000;
D_04008000 = 0x04008000;
D_04009000 = 0x04009000;
D_0400A000 = 0x0400A000;
D_0400B000 = 0x0400B000;
4 changes: 2 additions & 2 deletions src/18480.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ extern u8* D_800ABE00;

#pragma GLOBAL_ASM("asm/us/nonmatchings/18480/func_80018AD0.s")

unk_D_86002F34* func_80018B70(MemoryBlock* arg0, void* arg1) {
void* func_80018B70(MemoryBlock* arg0, void* arg1) {
extern func_D_8006F2B0 D_8006F2B0[];

D_800ABD34 = NULL;
Expand All @@ -107,7 +107,7 @@ unk_D_86002F34* func_80018B70(MemoryBlock* arg0, void* arg1) {
D_800ABD38[0] = 0;
D_800ABD38[1] = 0;

while (D_800ABE00 != 0) {
while (D_800ABE00 != NULL) {
D_8006F2B0[*D_800ABE00]();
}

Expand Down
2 changes: 1 addition & 1 deletion src/18480.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "global.h"
#include "src/memory.h"

unk_D_86002F34* func_80018B70(MemoryBlock*, void*);
void* func_80018B70(MemoryBlock*, void*);


#endif // _18480_H_
183 changes: 183 additions & 0 deletions src/fragments/14/fragment14.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
#ifndef _FRAGMENT14_H_
#define _FRAGMENT14_H_

#include "global.h"
#include "src/controller.h"

typedef struct unk_D_868084D8_038 {
/* 0x000 */ s16 unk_000;
/* 0x002 */ s16 unk_002;
/* 0x004 */ char unk004[0x2];
/* 0x006 */ s16 unk_006;
/* 0x008 */ struct unk_D_868084D8_038* unk_008;
/* 0x00C */ Vec3f unk_00C;
/* 0x018 */ char unk018[0x1B8];
/* 0x1D0 */ Vec3f unk_1D0;
} unk_D_868084D8_038; // size >= 0x1DC

typedef struct unk_D_868084D8_040 {
/* 0x00 */char unk00[0x1];
/* 0x01 */u8 unk_01;
/* 0x02 */char unk02[0x1];
/* 0x03 */u8 unk_03;
} unk_D_868084D8_040; // size >= 0x2

typedef struct unk_D_868084D8 {
/* 0x00 */ u16 unk_00;
/* 0x02 */ u16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ Color_RGBA8_u32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
/* 0x14 */ Vec3f unk_14;
/* 0x20 */ Vec3f unk_20;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ f32 unk_30;
/* 0x34 */ f32 unk_34;
/* 0x38 */ unk_D_868084D8_038* unk_38;
/* 0x3C */ Gfx* unk_3C;
/* 0x40 */ unk_D_86002F34_alt9* unk_40;
} unk_D_868084D8; // size = 0x44

typedef struct unk_D_86807558_040 {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s16 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ f32 unk_10;
/* 0x14 */ f32 unk_14;
/* 0x18 */ s16 unk_18;
} unk_D_86807558_040; // size >= 0x1C

typedef struct unk_D_86807558_098 {
/* 0x00 */ Vec3f unk_00;
/* 0x0C */ Vec3f unk_0C;
/* 0x18 */ Vec3f unk_18;
} unk_D_86807558_098; // size = 0x24

typedef struct unk_D_86807558 {
/* 0x000 */ s16 unk_000;
/* 0x002 */ u16 unk_002;
/* 0x004 */ s16 unk_004;
/* 0x004 */ s16 unk_006;
/* 0x008 */ s32 unk_008;
/* 0x00C */ s16 unk_00C;
/* 0x010 */ unk_D_868084D8* unk_010;
/* 0x014 */ s16 unk_014;
/* 0x016 */ u16 unk_016;
/* 0x018 */ s32 unk_018;
/* 0x01C */ s32 unk_01C;
/* 0x020 */ s32 unk_020;
/* 0x024 */ s32 unk_024;
/* 0x028 */ s16 unk_028;
/* 0x02A */ s16 unk_02A;
/* 0x02C */ s16 unk_02C[9];
/* 0x03E */ s16 unk_03E;
/* 0x040 */ unk_D_86807558_040 unk_040;
/* 0x05C */ s32 unk_05C;
/* 0x060 */ s32 unk_060;
/* 0x064 */ Controller* unk_064;
/* 0x068 */ Vec3f unk_068;
/* 0x074 */ Vec3f unk_074;
/* 0x080 */ Vec3f unk_080;
/* 0x08C */ Vec3f unk_08C;
/* 0x098 */ unk_D_86807558_098 unk_098;
/* 0x0BC */ s16 unk_0BC;
/* 0x0BE */ s16 unk_0BE;
/* 0x0C0 */ s32 unk_0C0;
/* 0x0C4 */ s32 unk_0C4;
/* 0x0C8 */ f32 unk_0C8;
/* 0x0CC */ s16 unk_0CC;
/* 0x0D0 */ Color_RGBA8_u32 unk_0D0;
/* 0x0D4 */ s16 unk_0D4;
/* 0x0D8 */ f32 unk_0D8;
/* 0x0DC */ unk_D_868084D8* unk_0DC;
/* 0x0E0 */ s16 unk_0E0;
/* 0x0E2 */ s16 unk_0E2;
/* 0x0E4 */ unk_D_86002F58_004_000 unk_0E4;
/* 0x24C */ unk_D_86002F58_004_000 unk_24C;
/* 0x3B4 */ u32* unk_3B4;
} unk_D_86807558; // size = 0x3B8

typedef struct unk_D_86808498 {
/* 0x00 */ Vec3f unk_00;
/* 0x0C */ Vec3f unk_0C;
/* 0x18 */ s16 unk_18;
/* 0x1A */ s16 unk_1A;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ Vec3f unk_20;
/* 0x2C */ Vec3f unk_2C;
} unk_D_86808498; // size >= 0x38

typedef struct unk_D_86808808_018 {
/* 0x000 */ unk_D_86002F58_004_000_000 unk_000;
/* 0x018 */ char unk018[0xC];
/* 0x024 */ Vec3f unk_024;
/* 0x030 */ Vec3f unk_030;
} unk_D_86808808_018; // size >= 0x3C

typedef struct unk_D_86808808 {
/* 0x000 */ s16 unk_000;
/* 0x002 */ s16 unk_002;
/* 0x004 */ u16 unk_004;
/* 0x006 */ s16 unk_006;
/* 0x008 */ s32 unk_008;
/* 0x00C */ Vec3f unk_00C;
/* 0x018 */ unk_D_86808808_018 unk_018;
/* 0x054 */ char unk054[0x12C];
} unk_D_86808808; // size = 0x180

typedef struct unk_D_86807180 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ u8* unk_04;
/* 0x08 */ u8* unk_08;
/* 0x10 */ char* unk_0C;
/* 0x10 */ s16 unk_10;
/* 0x12 */ s16 unk_12;
/* 0x14 */ s32 unk_14;
/* 0x18 */ s16 unk_18;
} unk_D_86807180; // size = 0x1C

extern s32 D_86807160[];
extern unk_D_86807180 D_86807180[];

extern unk_D_86002F34* D_86807500;
extern s32 D_86807510;
extern unk_D_86807558 D_86807558[4];

extern unk_D_868084D8 D_868084D8[12];

void func_86800020(s32 arg0);
void func_86800070(void);
Gfx* func_868001A8(Gfx* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
void func_868004F4(void);
void func_868005A8(Color_RGB8* arg0, Color_RGB8* arg1, s32 arg2, s32 arg3, s32 arg4);
void func_8680091C(s32 arg0, s16 arg1, s16 arg2, f32 arg3);
void func_86800B38(void);
void func_86801644(void);
void func_86801700(void);
s32 func_86801840(void);
s32 func_86801884(void);
void func_86801CA8(void);
void func_86801D48(void);
void func_86801E2C(s32 arg0, UNUSED s32 arg1);


void func_86805108(u16, s32);
s32 func_868055D4(void);
void func_86805858(s32);
void func_86805974(void);
void func_86805BD4(void);
void func_86805CB4(void);

f32 func_86805E94(unk_D_868084D8*, Vec3f*, Vec3f*);
void func_86806868(unk_D_868084D8*, s32, unk_D_86807558*);
s32 func_86806930(unk_D_868084D8*);
s16 func_86806950(s32);
void func_86806964(s32);
void func_86806A50(void);
void func_86806BF0(void);

#endif // _FRAGMENT14_H_
Loading

0 comments on commit cbf1027

Please sign in to comment.