diff --git a/data/data_8107010.s b/data/data_8107010.s index a67be11c..655dbca6 100644 --- a/data/data_8107010.s +++ b/data/data_8107010.s @@ -1621,34 +1621,3 @@ gUnknown_8109930: @ 8109930 @ ??? .string "pksdir0\0" .align 2,0 -@ game_options.c -.string "pksdir0\0" -.align 2,0 - -.global gWindowBGColors -gWindowBGColors: @ 8109954 -.byte 0x20, 0x48, 0x68, 0x00 -.byte 0x80, 0x38, 0x20, 0x00 -.byte 0x28, 0x80, 0x48, 0x00 -.byte 0x28, 0x80, 0x48, 0x00 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 -@ ??? -.string "pksdir0\0" -.align 2,0 - -.global gUnknown_8109984 -gUnknown_8109984: @ 8109984 -.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00 - -@ ??? -.string "pksdir0\0" -.align 2,0 - diff --git a/data/data_8109964.s b/data/data_8109964.s new file mode 100644 index 00000000..bc25b214 --- /dev/null +++ b/data/data_8109964.s @@ -0,0 +1,23 @@ +.section .rodata + +@ ??? +.string "pksdir0\0" +.align 2,0 +@ ??? +.string "pksdir0\0" +.align 2,0 +@ ??? +.string "pksdir0\0" +.align 2,0 +@ ??? +.string "pksdir0\0" +.align 2,0 + +.global gUnknown_8109984 +gUnknown_8109984: @ 8109984 +.byte 0x00, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00 + +@ ??? +.string "pksdir0\0" +.align 2,0 + diff --git a/include/gba/defines.h b/include/gba/defines.h index 070cc77f..cf2f6910 100644 --- a/include/gba/defines.h +++ b/include/gba/defines.h @@ -57,6 +57,7 @@ #define TOTAL_OBJ_TILE_COUNT 1024 +#define RGB_U32(r, g, b) ((r) | ((g) << 8) | ((b) << 16)) // 32 bit RGB color #define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10)) #define RGB_BLACK RGB(0, 0, 0) diff --git a/ld_script.txt b/ld_script.txt index f055e128..2ed9e912 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -547,6 +547,8 @@ SECTIONS { src/dungeon_capabilities.o(.rodata); src/dungeon_ai_targeting.o(.rodata); data/data_8107010.o(.rodata); + src/game_options.o(.rodata); + data/data_8109964.o(.rodata); src/code_80972F4.o(.rodata); src/code_8097504.o(.rodata); data/data_8109D10.o(.rodata); diff --git a/src/game_options.c b/src/game_options.c index 81ee1046..2257638c 100644 --- a/src/game_options.c +++ b/src/game_options.c @@ -1,21 +1,27 @@ #include "global.h" +#include "globaldata.h" #include "code_8009804.h" #include "code_8092334.h" #include "game_options.h" -struct WindowBG -{ - // size: 0x10 - u32 hexBG[4]; -}; - struct unkStruct_8094CB0 { u16 unk0; s16 unk2; }; -extern struct WindowBG gWindowBGColors; +struct WindowBG +{ + // size: 0x10 + u32 hexBG[4]; +}; + +const struct WindowBG gWindowBGColors = { + RGB_U32(0x20, 0x48, 0x68), // Blue + RGB_U32(0x80, 0x38, 0x20), // Red + RGB_U32(0x28, 0x80, 0x48), // Green + RGB_U32(0x28, 0x80, 0x48) // Green +}; EWRAM_DATA_2 GameOptions *gGameOptionsRef = {0}; EWRAM_DATA GameOptions gGameOptions = {0};