diff --git a/ld_script.txt b/ld_script.txt index 831ad24fc..7e04d3d29 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -422,6 +422,7 @@ SECTIONS { { data/data_code_2.o(.rodata); data/data.o(.rodata); + src/random.o(.rodata); src/text.o(.rodata); data/data2.o(.rodata); src/math.o(.rodata); diff --git a/src/code_801B3C0.c b/src/code_801B3C0.c index f3acc6a75..934f5bcf1 100644 --- a/src/code_801B3C0.c +++ b/src/code_801B3C0.c @@ -9,7 +9,6 @@ #include "menu_input.h" #include "sprite.h" #include "text.h" -#include "text.h" static EWRAM_DATA_2 unkStruct_203B230 *sUnknown_203B230 = {0}; diff --git a/src/code_801C8C4.c b/src/code_801C8C4.c index f3fbb6adf..ffe5c85b3 100644 --- a/src/code_801C8C4.c +++ b/src/code_801C8C4.c @@ -7,7 +7,6 @@ #include "memory.h" #include "menu_input.h" #include "text.h" -#include "text.h" static EWRAM_DATA_2 struct unkStruct_203B244 *sUnknown_203B244 = {0}; static EWRAM_DATA_2 u32 sUnknown_203B248 = {0}; diff --git a/src/code_801D014.c b/src/code_801D014.c index a09e5f25c..9070cffc7 100644 --- a/src/code_801D014.c +++ b/src/code_801D014.c @@ -25,7 +25,6 @@ #include "party_list_menu.h" #include "rescue_team_info.h" #include "text.h" -#include "text.h" #include "wigglytuff_shop2.h" #include "wonder_mail_802C4C8.h" #include "wonder_mail_802C860.h" diff --git a/src/code_801F428.c b/src/code_801F428.c index 866af7e2f..0ad2978d0 100644 --- a/src/code_801F428.c +++ b/src/code_801F428.c @@ -8,7 +8,6 @@ #include "moves.h" #include "pokemon.h" #include "text.h" -#include "text.h" #include "structs/struct_sub80095e4.h" struct unkStruct_203B274 diff --git a/src/code_801F808.c b/src/code_801F808.c index 848646e73..63602e66e 100644 --- a/src/code_801F808.c +++ b/src/code_801F808.c @@ -10,7 +10,6 @@ #include "structs/menu.h" #include "structs/str_text.h" #include "text.h" -#include "text.h" // TODO: UNIFY WITH struct_Sub80095E4 struct unkStruct_203B278 diff --git a/src/code_80227B8.c b/src/code_80227B8.c index ae22ae27a..0af45692d 100644 --- a/src/code_80227B8.c +++ b/src/code_80227B8.c @@ -15,7 +15,6 @@ #include "menu_input.h" #include "pokemon_3.h" #include "text.h" -#include "text.h" static EWRAM_DATA_2 unkStruct_203B294 *sUnknown_203B294 = {0}; diff --git a/src/code_8023144.c b/src/code_8023144.c index 9a31c0f3e..faa295813 100644 --- a/src/code_8023144.c +++ b/src/code_8023144.c @@ -12,7 +12,6 @@ #include "menu_input.h" #include "pokemon_3.h" #include "text.h" -#include "text.h" static EWRAM_DATA_2 u32 gUnknown_203B298 = {0}; static EWRAM_DATA_2 u16 gUnknown_203B29C = {0}; diff --git a/src/code_8272724.c b/src/code_8272724.c index 6f08e8c5a..6487650eb 100644 --- a/src/code_8272724.c +++ b/src/code_8272724.c @@ -1,6 +1,5 @@ #include "global.h" #include "text.h" -#include "text.h" extern void sub_8272774(UnkTextStruct1 *r0, u32 r1); extern void sub_8272884(UnkTextStruct1 *r0, u32 r1); diff --git a/src/random.c b/src/random.c index 864f0b107..d57aa516a 100644 --- a/src/random.c +++ b/src/random.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "random.h" EWRAM_DATA_2 s32 gPRNGSequenceNum = {0}; diff --git a/src/text.c b/src/text.c index e5c28b01d..185598174 100644 --- a/src/text.c +++ b/src/text.c @@ -1,4 +1,5 @@ #include "global.h" +#include "globaldata.h" #include "text.h" #include "decompress.h" #include "code_8009804.h" @@ -69,9 +70,6 @@ static const u8 *HandleTextFormat(UnkTextStruct1 *strArr, const u8 *str, struct static void sub_8009388(void); static s32 InterpretColorChar(u8 a0); -UNUSED static const char sPksDir0[] = "pksdir0"; -UNUSED static const char sPksDir1[] = "pksdir0"; - static const u32 gUnknown_80B853C[16] = { 0x66666666,