diff --git a/include/debug_mode.h b/include/debug_mode.h index dc5255f..28421cd 100644 --- a/include/debug_mode.h +++ b/include/debug_mode.h @@ -8,8 +8,8 @@ #define PRINT_LINK_DATA (false && DEBUG_MODE) // This is currently broken... not sure why #define INSTANT_TEXT_SPEED (false && DEBUG_MODE) -#define IGNORE_GAME_PAK (true && DEBUG_MODE) -#define IGNORE_GAME_PAK_SPRITES (true && DEBUG_MODE) +#define IGNORE_GAME_PAK (false && DEBUG_MODE) +#define IGNORE_GAME_PAK_SPRITES (false && DEBUG_MODE) #define IGNORE_LINK_CABLE (true && DEBUG_MODE) #define IGNORE_MG_E4_FLAGS (true && DEBUG_MODE) #define IGNORE_UNRECEIVED_PKMN (true && DEBUG_MODE) diff --git a/include/gba_rom_values/base_gba_rom_struct.h b/include/gba_rom_values/base_gba_rom_struct.h index ea3cd27..633e660 100644 --- a/include/gba_rom_values/base_gba_rom_struct.h +++ b/include/gba_rom_values/base_gba_rom_struct.h @@ -46,6 +46,7 @@ struct ROM_DATA int loc_gMonFrontPicTable; // gMonStillFrontPicTable in Emerald int loc_gMonPaletteTable; int loc_gMonShinyPaletteTable; + int loc_gMonIconTable; int loc_gSaveBlock1; // Only used in R/S int loc_gSaveDataBuffer; // The location of the saveDataBuffer diff --git a/include/gba_rom_values/eng_gba_rom_values.h b/include/gba_rom_values/eng_gba_rom_values.h index f56540d..8e0c1c7 100644 --- a/include/gba_rom_values/eng_gba_rom_values.h +++ b/include/gba_rom_values/eng_gba_rom_values.h @@ -21,6 +21,11 @@ const struct ROM_DATA ENG_RUBY_v0 = { .loc_voicegroup = 0x084401E8, .loc_sPicTable_NPC = 0x0836E788, + .loc_gMonFrontPicTable = 0x081E8354, + .loc_gMonPaletteTable = 0x081EA5B4, + .loc_gMonShinyPaletteTable = 0x081EB374, + .loc_gMonIconTable = 0x083BBD20, + // The following should be consistant across languages and revisions. .loc_gSaveBlock1 = 0x02025734, .loc_gSaveDataBuffer = 0x02000000, // Known as "gSharedMem" in RS @@ -481,6 +486,10 @@ const struct ROM_DATA ENG_LEAFGREEN_v1 = { .loc_voicegroup = 0x084981C4, .loc_sPicTable_NPC = 0x083A0B08, + .loc_gMonFrontPicTable = 0x08301418, + .loc_gMonPaletteTable = 0x08303678, + .loc_gMonShinyPaletteTable = 0x08304438, + // The following should be consistant across languages and revisions. .loc_gSaveDataBuffer = 0x02039A38, // The location of the saveDataBuffer .loc_gSpecialVar_0x8000 = 0x020370B8, @@ -537,6 +546,7 @@ const struct ROM_DATA ENG_EMERALD_v0 = { .loc_gMonFrontPicTable = 0x08301418, .loc_gMonPaletteTable = 0x08303678, .loc_gMonShinyPaletteTable = 0x08304438, + .loc_gMonIconTable = 0x0857BCA8, // The following should be consistant across languages and revisions. .loc_gSaveDataBuffer = 0x0203ABBC, // The location of the saveDataBuffer diff --git a/include/rom_data.h b/include/rom_data.h index 514bf13..18af5e5 100644 --- a/include/rom_data.h +++ b/include/rom_data.h @@ -57,6 +57,7 @@ public: int loc_gMonFrontPicTable; int loc_gMonPaletteTable; int loc_gMonShinyPaletteTable; + int loc_gMonIconTable; int offset_ramscript; // Ramscript offset as found within the SaveBlock1 struct in global.h int offset_flags; // Flag offset as found within the SaveBlock1 struct in global.h int offset_wondercard; diff --git a/loader/data/multiboot_rom.bin b/loader/data/multiboot_rom.bin index 42d54f3..baac7cc 100644 Binary files a/loader/data/multiboot_rom.bin and b/loader/data/multiboot_rom.bin differ diff --git a/source/rom_data.cpp b/source/rom_data.cpp index ae04d64..92c4c63 100644 --- a/source/rom_data.cpp +++ b/source/rom_data.cpp @@ -124,6 +124,7 @@ void rom_data::fill_values(const ROM_DATA *rom_values) loc_gMonFrontPicTable = rom_values->loc_gMonFrontPicTable; loc_gMonPaletteTable = rom_values->loc_gMonPaletteTable; loc_gMonShinyPaletteTable = rom_values->loc_gMonShinyPaletteTable; + loc_gMonIconTable = rom_values->loc_gMonIconTable; offset_ramscript = rom_values->offset_ramscript; offset_flags = rom_values->offset_flags; diff --git a/source/sprite_data.cpp b/source/sprite_data.cpp index 1accccb..45f2c0f 100644 --- a/source/sprite_data.cpp +++ b/source/sprite_data.cpp @@ -914,9 +914,7 @@ void update_menu_sprite(Pokemon_Party *party_data, int index, int frame) { dex_num = 0; } - - u32 sprite_table = 0x0857bca8; - - u32 sprite_location = (*(u32 *)(sprite_table + (dex_num * 4))) + (frame == 0 ? 0 : 512); + + u32 sprite_location = (*(u32 *)(curr_rom.loc_gMonIconTable + (dex_num * 4))) + (frame == 0 ? 0 : 512); tonccpy(&tile_mem[SPRITE_CHAR_BLOCK][curr_tile_id], (const unsigned int *)sprite_location, 512); } \ No newline at end of file