Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fragment23 #164

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ typedef union{
} Color_RGBA14;

#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
#define RGBA5551(r, g, b, a) ((((r) << 8) & 0xF800) | (((g) << 3) & 0x7C0) | (((b) >> 2) & 0x3E) | ((a) & 0x1))

#define RGBA16_GET_R(pixel) ((((pixel) & 0xF800) >> 11) & 0xFF)
#define RGBA16_GET_G(pixel) ((((pixel) & 0x7C0) >> 6) & 0xFF)
Expand Down
17 changes: 15 additions & 2 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
typedef unsigned int uintptr_t;

#include "macros.h"

#include "attributes.h"
#include "functions.h"
#include "variables.h"
#include "sections.h"
#include "gfx.h"
#include "color.h"
#include "sound.h"
#include "string.h"
#include "math.h"

typedef struct unk_D_86002F58_004_000_00C_028 {
Expand Down Expand Up @@ -502,4 +501,18 @@ typedef struct arg1_func_81407874_014_000_010 {
/* 0x0F */ u8 unk_0F;
} arg1_func_81407874_014_000_010; // size >= 0x10

typedef struct func_88002628_sp38 {
/* 0x000 */ OSThread thread;
/* 0x1B0 */ char unk1B0[0x10];
} func_88002628_sp38; // size = 0x1C0

typedef struct unk_func_88500020 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ u8* unk_0C;
} unk_func_88500020; // size = 0x10

#include "variables.h"

#endif
16 changes: 16 additions & 0 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ extern u8 D_04008000[];
extern u8 D_04009000[];
extern u8 D_0400A000[];
extern u8 D_0400B000[];
extern u8 D_4006A60[];
extern u8 D_40022E0[];
extern u8 D_4002368[];
extern u8 D_40025F0[];
extern u8 D_4002878[];
extern u8 D_4002B00[];
extern u8 D_4002D88[];
extern u8 D_4003010[];
extern u8 D_4003298[];
extern u8 D_4003520[];
extern u8 D_4001638[];
extern u8 D_4001680[];
extern u8 D_40016C8[];
extern u8 D_4001710[];

extern u8 D_800818E0[0x20];

Expand Down Expand Up @@ -212,4 +226,6 @@ typedef struct unk_D_70B10 {
/* 0x00 */ char unk00[0x20];
} unk_D_70B10; // size = 0x20

extern unk_func_88500020 D_800758E0;

#endif
19 changes: 19 additions & 0 deletions linker_scripts/us/symbol_addrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,22 @@ D_86C11530 = 0x86C11530; // size:0xAD0
D_879060BC = 0x879060BC; // size:0x2
D_86E04D60 = 0x86E04D60; // size:0xAD0
D_86E05830 = 0x86E05830; // size:0x3610
D_4006A60 = 0x4006A60;
D_40022E0 = 0x40022E0;
D_4002368 = 0x4002368;
D_40025F0 = 0x40025F0;
D_4002878 = 0x4002878;
D_4002B00 = 0x4002B00;
D_4002D88 = 0x4002D88;
D_4003010 = 0x4003010;
D_4003298 = 0x4003298;
D_4003520 = 0x4003520;
D_88217C20 = 0x88217C20; // size:0x4
D_88217C24 = 0x88217C24; // size:0x4
D_88217C28 = 0x88217C28; // size:0x4
D_88217C2C = 0x88217C2C; // size:0x4
D_88217C48 = 0x88217C48; // size:0x4
D_88217C4C = 0x88217C4C; // size:0x4
D_88217C50 = 0x88217C50; // size:0x4
D_88217C54 = 0x88217C54; // size:0x4
D_88217C58 = 0x88217C58; // size:0x4
2 changes: 1 addition & 1 deletion src/19840.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ typedef struct unk_func_80019600 {
/* 0x04 */ OSMesgQueue* queue;
/* 0x08 */ void* unk_08;
/* 0x0C */ void* unk_0C;
/* 0x10 */ struct MainPoolState* pool;
/* 0x10 */ MainPoolState* pool;
/* 0x14 */ s32 size;
/* 0x18 */ arg1_func_80010CA8 unk_18;
} unk_func_80019600; // size >= 0x1C
Expand Down
2 changes: 1 addition & 1 deletion src/1AB70.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "global.h"
#include "1AB70.h"

#pragma GLOBAL_ASM("asm/us/nonmatchings/1AB70/func_80019F70.s")

Expand Down
14 changes: 14 additions & 0 deletions src/1AB70.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef _1AB70_H_
#define _1AB70_H_

#include "global.h"

typedef struct unk_func_88201DA0_034_008 {
/* 0x00 */ char unk00[0x4];
} unk_func_88201DA0_034_008; // size >= 1

void func_8001B058(void);
void func_8001B0DC(unk_func_88201DA0_034_008*, s32, s32);


#endif // _1AB70_H_
4 changes: 2 additions & 2 deletions src/22630.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ char* func_80021B7C(char* arg0, char* arg1) {

#pragma GLOBAL_ASM("asm/us/nonmatchings/22630/func_80021C20.s")

void func_80021C40(char* arg0, char* arg1) {
char* func_80021C40(char* arg0, char* arg1) {
char sp1C[11];

_bcopy(arg1, sp1C, 0xA);

sp1C[10] = 'P';

func_80021A90(arg0, sp1C);
return func_80021A90(arg0, sp1C);
}

extern char D_8006FEE8[][0x1C];
Expand Down
65 changes: 60 additions & 5 deletions src/22630.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "global.h"
#include "memory.h"
#include "29BA0.h"
#include "2D340.h"

typedef enum {
POKEMON_ROM_NONE = 0,
Expand Down Expand Up @@ -51,6 +52,48 @@ typedef struct unk_D_800AE4E8_004_1_000_010 {
/* 0x2C */ u8 unk_2C[11];
} unk_D_800AE4E8_004_1_000_010; // size = 0x37

typedef struct unk_func_80022C28_ret {
/* 0x00 */ s8 unk_00;
/* 0x01 */ s8 unk_01;
/* 0x02 */ s8 unk_02;
/* 0x03 */ s8 unk_03;
/* 0x04 */ s8 unk_04;
/* 0x05 */ char unk05[0x3];
/* 0x08 */ s16 unk_08;
/* 0x0A */ s16 unk_0A;
} unk_func_80022C28_ret; // size = 0xC

typedef struct unk_func_8820BE14_sp {
/* 0x00 */ u8 unk_00;
/* 0x01 */ char unk01[0x3];
/* 0x04 */ u8 unk_04;
/* 0x05 */ char unk05[0x1];
/* 0x06 */ u8 unk_06;
/* 0x07 */ u8 unk_07;
/* 0x08 */ u8 unk_08;
/* 0x09 */ u8 unk_09;
/* 0x0A */ u8 unk_0A;
/* 0x0B */ u8 unk_0B;
/* 0x0C */ u8 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x0E */ s32 unk_10;
/* 0x0E */ s16 unk_14;
/* 0x0E */ s16 unk_16;
/* 0x0E */ s16 unk_18;
/* 0x0E */ s16 unk_1A;
/* 0x0E */ s16 unk_1C;
/* 0x0E */ s16 unk_1E;
/* 0x20 */ char unk20[0x4];
/* 0x24 */ u8 unk_24;
/* 0x25 */ u8 unk_25;
/* 0x26 */ char unk26[0xA];
/* 0x30 */ char unk_30[11];
/* 0x3B */ char unk_3B[11];
/* 0x46 */ char unk46[0xC];
/* 0x52 */ u8 unk_52;
/* 0x53 */ u8 unk_53;
} unk_func_8820BE14_sp; // size = 0x54

u16 func_80021A30(u8* arg0);
u32 func_80021A48(u8* arg0);
void func_80021A68(u8* arg0, s32 arg1);
Expand All @@ -59,7 +102,7 @@ char* func_80021A90(char* arg0, char* arg1);
void func_80021B5C(char*, char*);
char* func_80021B7C(char* arg0, char* arg1);
void func_80021C20(char*, char*);
void func_80021C40(char* arg0, char* arg1);
char* func_80021C40(char* arg0, char* arg1);
char* func_80021C80(char* arg0, char* arg1);
char* func_80021CA4(char* arg0, s32 arg1);
char* func_80021CE0(s32 arg0, s8* arg1);
Expand All @@ -71,11 +114,16 @@ u32 func_80022170(s32 arg0, s32 arg1, u16 arg2, u16 arg3, s32 arg4);
void func_80022338(unk_func_80026268_arg0* arg0);
u32 func_800224B8(s32 arg0, u16 arg1);
u16 func_800226C0(s32 arg0, u32 arg1);
void func_80022734(unk_func_8820BE14_sp*);
void func_800228B0(unk_func_8820BE14_sp*);
u8 func_80022A38(s32 arg0);
u8 func_80022A60(s32 arg0);
s32 func_80022C28(s32, s32, s32, s32);
void func_80022D8C(void*);
s32 func_80022E18(unk_func_80026268_arg0*, s32, void*);
unk_func_80022C28_ret* func_80022C28(s32, s32, s32, s32);
unk_func_80022C28_ret* func_80022CC0(s32, s32, s32, s32, char*, s32);
void func_80022D24(unk_func_80022C28_ret*);
void func_80022D8C(unk_func_80022C28_ret*);
s32 func_80022E18(unk_func_80026268_arg0*, s32, unk_func_80022C28_ret*);
s32 func_80022F24(unk_func_88205880_00D0*, s32, unk_func_80022C28_ret*);
void func_80023068(void);
char* func_8002311C(s32 arg0);
s32 func_80023130(u8* arg0);
Expand All @@ -90,12 +138,19 @@ void func_80023D60(s32);
void func_80023F78(s32 arg0);
void func_80024040(s32 arg0);
s32 func_800240A0(void);
void func_80024208(s32);
s32 func_80024A48(s32, s32, s32);
s32 func_80024EF4(void);
s32 func_80024F00(s32);
u8 func_80024F68(s32);
s32 func_80024FB0(s32 arg0);
void func_800251B0(s32, s8*);
s32 func_80025084(s32);
s32 func_8002513C(s32);
char* func_800251B0(s32, s8*);
s32 func_80025370(s32);
s32 func_8002539C(s32);
void func_80025540(s32);
void func_800256F4(s32, s32, s32);
void func_80026E4C(s32);

#endif // _6BC0_H_
6 changes: 4 additions & 2 deletions src/26820.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,13 @@ s32 func_8002797C(s32 arg0, s32 arg1, s32 arg2, void* arg3) {
break;

case 22:
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_1EC8.unk_0002[arg2], arg3, 0x8C);
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_1EC8.unk_0002[arg2], arg3,
sizeof(unk_D_800AE4E8_004_2_1EC8_0002));
break;

case 23:
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_3280.unk_0002[arg2], arg3, 0x8C);
_bcopy(&D_800AE4E8[2].unk_04.unk2->unk_3280.unk_0002[arg2], arg3,
sizeof(unk_D_800AE4E8_004_2_1EC8_0002));
break;
}
sp2C = 1;
Expand Down
3 changes: 3 additions & 0 deletions src/26820.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ void func_80026C0C(s32 arg0, s32 arg1);
void func_8002707C(s32 arg0, s32 arg1);
s32 func_800270AC(s32 arg0);
s32 func_80027108(s32 arg0);
s32 func_80027164(s32, s32);
s32 func_80027184(s32, s32);
void func_800272BC(s32, s32, char*);
s16 func_800275E0(s32 arg0, s32 arg1);
s32 func_8002797C(s32 arg0, s32 arg1, s32 arg2, void* arg3);
s32 func_80027C24(s32 arg0, s32 arg1, s32 arg2, void* arg3);
Expand Down
2 changes: 1 addition & 1 deletion src/2C1C0.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void func_8002BA34(s16 arg0, s16 arg1, s16 arg2, s16 arg3) {
void func_8002BB7C(s32 arg0, s32 arg1, s32 arg2) {
s32 i;
unk_func_80026268_arg0 sp48;
void* temp_v0;
unk_func_80022C28_ret* temp_v0;
unk_D_800AE540_0004* temp_s4;
char sp34[11];

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

#pragma GLOBAL_ASM("asm/us/nonmatchings/2D340/func_8002C740.s")

Expand Down
64 changes: 64 additions & 0 deletions src/2D340.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#ifndef _3D340_H_
#define _3D340_H_

#include "global.h"
#include "src/1C720.h"
#include "src/1AB70.h"

typedef struct unk_func_88205880_00D0 {
/* 0x000 */ unk_func_80026268_arg0 unk_000[20];
/* 0x690 */ s32 unk_690;
/* 0x694 */ s32 unk_694;
/* 0x698 */ s32 unk_698;
/* 0x69C */ u32 unk_69C;
} unk_func_88205880_00D0; // size = 0x6A0

typedef struct unk_func_88200FA0_030_038 {
/* 0x00 */ unk_func_88205880_00D0** unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
} unk_func_88200FA0_030_038; // size = 0xC

typedef struct unk_func_88201DA0_034 {
/* 0x0000 */ s32 unk_000;
/* 0x0004 */ char unk004[0x4];
/* 0x0008 */ unk_func_88201DA0_034_008 unk_008;
/* 0x000C */ char unk00C[0xC7C];
} unk_func_88201DA0_034; // size = 0xC88

typedef struct unk_func_88201DA0_038 {
/* 0x00 */ unk_func_88201DA0_034* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
} unk_func_88201DA0_038; // size = 0x10

typedef struct unk_func_88205880_A030 {
/* 0x00 */ unk_func_88205880_00D0** unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
} unk_func_88205880_A030; // size = 0xC

typedef struct unk_func_8820BE14_06C_000 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ unk_func_88200FA0_030_038 unk_04;
} unk_func_8820BE14_06C_000; // size = 0x10

typedef struct unk_func_8820BE14_06C {
/* 0x00 */ unk_func_8820BE14_06C_000* unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
} unk_func_8820BE14_06C; // size = 0x10

void func_8002C740(s8*, unk_func_88201DA0_034*, s32, s32, s32);
void func_8002C758(unk_func_8820BE14_06C*, s32, s32, MemoryPool*);
void func_8002C88C(unk_func_8820BE14_06C*, u8*, s32);
void func_8002C990(unk_func_8820BE14_06C*, s32);
void func_8002CBC0(unk_func_88200FA0_030_038*, s32, MemoryPool*);
void func_8002CBB0(unk_func_88205880_A030*, void*, s32, s32);
void func_8002CC2C(unk_func_88200FA0_030_038*, char*, s32);
void func_8002D3F0(f32*);
Color_RGBA8 func_8002D444(Color_RGBA8, f32);

#endif // _3D340_H_
24 changes: 22 additions & 2 deletions src/2E460.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,31 @@
#define _2E460_H_

#include "global.h"
#include "src/fragments/26/fragment26.h"

typedef struct ret_func_8002ED08 {
/* 0x00 */ u8 unk_00[12];
} ret_func_8002ED08; // size = 0xC

typedef struct unk_func_8820E99C_030_030 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s32 unk_08;
/* 0x0C */ s32 unk_0C;
/* 0x10 */ s32 unk_10;
} unk_func_8820E99C_030_030; // size = 0x14

void func_8002D8C8(unk_func_88500020*, s32, s32);
s32 func_8002EC08(s32);
s32 func_8002ECDC(s32);
s32 func_8002E0F4(unk_func_8820E99C_030_030*);
void func_8002E8E4(s32, s32, s32, s32);
s32 func_8002EE1C(s32, s32, s32);
void func_8002EE78(void);
void func_8002EEA8(unk_func_88001300_034*);
void func_8002EEA8(OSMesg);
ret_func_8002ED08* func_8002ED08(u8);
void func_8002EF18(s32*);
void func_8002EF44(void);
s32 func_8002F1C0(u8);
s32 func_8002F264(s32);

#endif // _2E460_H_
Loading
Loading