diff options
author | Swastik Baranwal <swstkbaranwal@gmail.com> | 2019-06-23 18:47:35 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-23 18:47:35 +0530 |
commit | 99703c6ab831d34e6859d8a8f53ba8e73dc4d3d9 (patch) | |
tree | 3a712d3039d152616af58a45a13d82c40a87e58f /include | |
parent | 6d190f861e3559eec922cd760778c0cba6e08397 (diff) | |
parent | 9ee0c34758a63f8c00724b6fc984b4e96be2f7af (diff) |
Merge pull request #5 from pret/master
Take files
Diffstat (limited to 'include')
119 files changed, 4162 insertions, 1649 deletions
diff --git a/include/bag.h b/include/bag.h new file mode 100644 index 000000000..f82531778 --- /dev/null +++ b/include/bag.h @@ -0,0 +1,18 @@ +#ifndef GUARD_BAG_H +#define GUARD_BAG_H + +void sub_810B858(void); +void sub_810B8F0(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, s8 speed, u8 colorIdx); +void sub_810B958(const u8 * str); +void sub_810B994(void); +u8 sub_810B9DC(u8 a0, u8 a1); +void sub_810BA3C(u8 a0); +u8 sub_810BA70(u8 a0); +void sub_810BA9C(u8 a0); +u8 sub_810BAD8(u8 a0); +void sub_810BAE8(u8 taskId, const struct YesNoFuncTable * ptrs); +void sub_810BB14(u8 taskId, const struct YesNoFuncTable * ptrs); +void sub_810BB40(void); +void sub_810BB74(u8 windowId); + +#endif //GUARD_BAG_H diff --git a/include/battle.h b/include/battle.h index c86bc9232..2e6d251c3 100644 --- a/include/battle.h +++ b/include/battle.h @@ -983,6 +983,6 @@ extern u8 gBattlersCount; extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT]; extern s32 gBattleMoveDamage; -extern u8 gUnknown_2023E8A; +extern u8 gBattleOutcome; #endif // GUARD_BATTLE_H diff --git a/include/battle_2.h b/include/battle_2.h index ca8b78805..1f7a2304d 100644 --- a/include/battle_2.h +++ b/include/battle_2.h @@ -43,6 +43,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves); void RunBattleScriptCommands_PopCallbacksStack(void); void RunBattleScriptCommands(void); bool8 TryRunFromBattle(u8 bank); +void sub_800FD9C(void); extern const u8 gStatusConditionString_PoisonJpn[8]; extern const u8 gStatusConditionString_SleepJpn[8]; diff --git a/include/battle_anim.h b/include/battle_anim.h index 4ea3bdead..5929a318e 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -59,10 +59,13 @@ extern u8 gAnimFriendship; extern u16 gWeatherMoveAnim; extern s16 gBattleAnimArgs[ANIM_ARGS_COUNT]; extern u8 gAnimMoveTurn; -extern u8 gAnimBankAttacker; -extern u8 gAnimBankTarget; +extern u8 gBattleAnimAttacker; +extern u8 gBattleAnimTarget; extern u16 gAnimSpeciesByBanks[BATTLE_BANKS_COUNT]; extern u8 gUnknown_02038440; +extern u8 gBattlerSpriteIds[MAX_BATTLERS_COUNT]; +extern u16 gUnknown_2037EEC; +extern s32 gUnknown_2037EE8; void ClearBattleAnimationVars(void); void DoMoveAnim(u16 move); @@ -77,6 +80,7 @@ s8 BattleAnimAdjustPanning(s8 pan); s8 BattleAnimAdjustPanning2(s8 pan); s16 sub_80A52EC(s16 a); s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan); +bool8 sub_8072DF0(u8 battlerId); // battle_anim_80FE840.s void SetAnimBgAttribute(u8 bgId, u8 attributeId, u8 value); @@ -121,4 +125,14 @@ u8 ItemIdToBallId(u16 itemId); u8 LaunchBallStarsTask(u8 x, u8 y, u8 kindOfStars, u8 arg3, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 bank, u32 arg2, u8 ballId); +// battle_anim_mons.s +void sub_8074DC4(struct Sprite * sprite); +void sub_8074E14(struct Sprite * sprite); +void sub_80754B8(struct Sprite * sprite); +void sub_80758E0(u8 spriteId, u8 b); +void sub_8075980(u8 spriteId); +void obj_id_set_rotscale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation); +bool8 sub_8073788(void); +void sub_80759DC(u8 spriteId); + #endif // GUARD_BATTLE_ANIM_H diff --git a/include/battle_setup.h b/include/battle_setup.h index 2806295ca..61395811b 100644 --- a/include/battle_setup.h +++ b/include/battle_setup.h @@ -11,11 +11,12 @@ void BattleSetup_StartWildBattle(void); void BattleSetup_StartRoamerBattle(void); u8 HasTrainerAlreadyBeenFought(u16); -void trainer_flag_set(u16); -void trainer_flag_clear(u16); +void SetTrainerFlag(u16); +void ClearTrainerFlag(u16); void BattleSetup_StartTrainerBattle(void); u8 *BattleSetup_GetScriptAddrAfterBattle(void); u8 *BattleSetup_GetTrainerPostBattleScript(void); void sub_80803FC(void); +u8 sub_8080060(void); #endif // GUARD_BATTLE_SETUP_H diff --git a/include/battle_transition.h b/include/battle_transition.h index eba76fd61..91e564790 100644 --- a/include/battle_transition.h +++ b/include/battle_transition.h @@ -3,6 +3,8 @@ #include "global.h" -void sub_8149DFC(u8 a1); +void sub_8149DFC(u8 a0); +bool8 sub_80D08F8(void); +void sub_80D08B8(u8 a0); #endif // GUARD_BATTLE_TRANSITION_H diff --git a/include/berry.h b/include/berry.h index 40715868b..c5a132ccb 100644 --- a/include/berry.h +++ b/include/berry.h @@ -62,6 +62,7 @@ void FieldObjectInteractionPickBerryTree(void); void FieldObjectInteractionRemoveBerryTree(void); u8 PlayerHasBerries(void); void ResetBerryTreeSparkleFlags(void); +const struct Berry * sub_809C8A0(u8 berryIdx); extern const struct Berry gBerries[]; diff --git a/include/berry_pouch.h b/include/berry_pouch.h new file mode 100644 index 000000000..8e652225b --- /dev/null +++ b/include/berry_pouch.h @@ -0,0 +1,12 @@ +#ifndef GUARD_BERRY_POUCH_H +#define GUARD_BERRY_POUCH_H + +#include "task.h" + +void BerryPouch_StartFadeToExitCallback(u8 taskId); +void BerryPouch_SetExitCallback(void (*)(void)); +void InitBerryPouch(u8, void (*)(void), u8); +void DisplayItemMessageInBerryPouch(u8 taskId, u8 bgId, const u8 * str, TaskFunc followUpFunc); +void sub_813E2B8(u8 taskId); + +#endif //GUARD_BERRY_POUCH_H diff --git a/include/berry_powder.h b/include/berry_powder.h new file mode 100644 index 000000000..89582aacc --- /dev/null +++ b/include/berry_powder.h @@ -0,0 +1,6 @@ +#ifndef GUARD_BERRY_POWDER_H +#define GUARD_BERRY_POWDER_H + +u32 GetBerryPowder(void); + +#endif //GUARD_BERRY_POWDER_H diff --git a/include/bike.h b/include/bike.h index 468c48273..68cc5f5c9 100644 --- a/include/bike.h +++ b/include/bike.h @@ -2,5 +2,7 @@ #define GUARD_BIKE_H void sub_80BD620(u32 unkC, u32 unk10); +bool8 sub_80BD540(void); +void StartTransitionToFlipBikeState(u8 flags); #endif //GUARD_BIKE_H diff --git a/include/blit.h b/include/blit.h new file mode 100644 index 000000000..78f67766e --- /dev/null +++ b/include/blit.h @@ -0,0 +1,17 @@ +#ifndef GUARD_BLIT_H +#define GUARD_BLIT_H + +struct Bitmap +{ + u8 *pixels; + u32 width:16; + u32 height:16; +}; + +void BlitBitmapRect4BitWithoutColorKey(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height); +void BlitBitmapRect4Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey); +void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue); +void BlitBitmapRect4BitTo8Bit(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height, u8 colorKey, u8 paletteOffset); +void FillBitmapRect8Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue); + +#endif // GUARD_BLIT_H diff --git a/include/cereader_tool.h b/include/cereader_tool.h index 05677dc79..f223bdaa5 100644 --- a/include/cereader_tool.h +++ b/include/cereader_tool.h @@ -3,7 +3,45 @@ #include "global.h" -bool32 sub_815D794(u8 *); -bool32 sub_815D6B4(u8 *); +struct TrainerTowerTrainer_004 +{ + /* 0x000 */ u8 unk_000[11]; + /* 0x00B */ u8 unk_00B; + /* 0x00C */ u8 unk_00C; + /* 0x00E */ u16 unk_00E[6]; + /* 0x01A */ u16 unk_01A[6]; + /* 0x026 */ u16 unk_026[6]; + /* 0x032 */ u16 unk_032[6]; + /* 0x040 */ struct BattleTowerPokemon unk_040[PARTY_SIZE]; +}; // size: 328 + +struct TrainerTowerTrainer +{ + /* 0x000 */ u8 unk_000; + /* 0x000 */ u8 unk_001; + /* 0x002 */ u8 unk_002; + /* 0x003 */ u8 unk_003; + /* 0x004 */ struct TrainerTowerTrainer_004 unk_004[3]; + /* 0x3DC */ u32 checksum; +}; + +struct Unk_203F458_Header +{ + u8 unk0; + u8 unk1; + u32 unk4; +}; + +struct TrainerTowerData +{ + u8 count; + u8 id; + u16 dummy; + u32 checksum; + struct TrainerTowerTrainer trainers[8]; +}; + +bool32 ValidateTrainerTowerData(struct TrainerTowerData * a0); +bool32 CEReaderTool_SaveTrainerTower(struct TrainerTowerData * a0); #endif //GUARD_CEREADER_TOOL_H diff --git a/include/constants/battle.h b/include/constants/battle.h index 25544ba3d..074c0d0cd 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -207,12 +207,12 @@ #define WEATHER_SANDSTORM_TEMPORARY (1 << 3) #define WEATHER_SANDSTORM_PERMANENT (1 << 4) #define WEATHER_SANDSTORM_ANY (WEATHER_SANDSTORM_TEMPORARY | WEATHER_SANDSTORM_PERMANENT) -#define WEATHER_SUN_TEMPORARY (1 << 5) -#define WEATHER_SUN_PERMANENT (1 << 6) -#define WEATHER_SUN_ANY (WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT) +#define WEATHER_SUNNY_TEMPORARY (1 << 5) +#define WEATHER_SUNNY_PERMANENT (1 << 6) +#define WEATHER_SUNNY_ANY (WEATHER_SUNNY_TEMPORARY | WEATHER_SUNNY_PERMANENT) #define WEATHER_HAIL (1 << 7) #define WEATHER_HAIL_ANY (WEATHER_HAIL) -#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY) +#define WEATHER_ANY (WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUNNY_ANY | WEATHER_HAIL_ANY) // Move Effects #define MOVE_EFFECT_SLEEP 0x1 diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h index 4c3a45dc6..f55661b91 100644 --- a/include/constants/battle_ai.h +++ b/include/constants/battle_ai.h @@ -23,10 +23,10 @@ #define AI_EFFECTIVENESS_x0 0 // ai weather -#define AI_WEATHER_SUN 0 -#define AI_WEATHER_RAIN 1 +#define AI_WEATHER_SUNNY 0 +#define AI_WEATHER_RAIN 1 #define AI_WEATHER_SANDSTORM 2 -#define AI_WEATHER_HAIL 3 +#define AI_WEATHER_HAIL 3 // get_how_powerful_move_is #define MOVE_POWER_DISCOURAGED 0 diff --git a/include/constants/fanfares.h b/include/constants/fanfares.h new file mode 100644 index 000000000..21d3af79c --- /dev/null +++ b/include/constants/fanfares.h @@ -0,0 +1,22 @@ +#ifndef GUARD_CONSTANTS_FANFARES_H +#define GUARD_CONSTANTS_FANFARES_H + +enum Fanfares +{ + FANFARE_00, + FANFARE_01, + FANFARE_02, + FANFARE_03, + FANFARE_04, + FANFARE_05, + FANFARE_06, + FANFARE_07, + FANFARE_08, + FANFARE_09, + FANFARE_10, + FANFARE_POKEFLUTE, + FANFARE_KEY_ITEM, + FANFARE_DEX_EVAL +}; + +#endif //GUARD_CONSTANTS_FANFARES_H diff --git a/include/constants/flags.h b/include/constants/flags.h index daa8b3132..209e68aee 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -1,6 +1,92 @@ #ifndef GUARD_CONSTANTS_FLAGS_H #define GUARD_CONSTANTS_FLAGS_H +// Sys Flags Maybe +#define FLAG_WHITE_FLUTE_ACTIVE 0x803 +#define FLAG_BLACK_FLUTE_ACTIVE 0x804 + +// World Map Flags +#define FLAG_WORLD_MAP_PALLET_TOWN 0x890 +#define FLAG_WORLD_MAP_VIRIDIAN_CITY 0x891 +#define FLAG_WORLD_MAP_PEWTER_CITY 0x892 +#define FLAG_WORLD_MAP_CERULEAN_CITY 0x893 +#define FLAG_WORLD_MAP_LAVENDER_TOWN 0x894 +#define FLAG_WORLD_MAP_VERMILION_CITY 0x895 +#define FLAG_WORLD_MAP_CELADON_CITY 0x896 +#define FLAG_WORLD_MAP_FUCHSIA_CITY 0x897 +#define FLAG_WORLD_MAP_CINNABAR_ISLAND 0x898 +#define FLAG_WORLD_MAP_INDIGO_PLATEAU_EXTERIOR 0x899 +#define FLAG_WORLD_MAP_SAFFRON_CITY_DUPLICATE 0x89a +#define FLAG_WORLD_MAP_ONE_ISLAND 0x89b +#define FLAG_WORLD_MAP_TWO_ISLAND 0x89c +#define FLAG_WORLD_MAP_THREE_ISLAND 0x89d +#define FLAG_WORLD_MAP_FOUR_ISLAND 0x89e +#define FLAG_WORLD_MAP_FIVE_ISLAND 0x89f +#define FLAG_WORLD_MAP_SEVEN_ISLAND 0x8a0 +#define FLAG_WORLD_MAP_SIX_ISLAND 0x8a1 +#define FLAG_WORLD_MAP_ROUTE4_POKEMON_CENTER_1F 0x8a2 +#define FLAG_WORLD_MAP_ROUTE10_POKEMON_CENTER_1F 0x8a3 +#define FLAG_WORLD_MAP_VIRIDIAN_FOREST 0x8a4 +#define FLAG_WORLD_MAP_MT_MOON_1F 0x8a5 +#define FLAG_WORLD_MAP_SSANNE_EXTERIOR 0x8a6 +#define FLAG_WORLD_MAP_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL 0x8a7 +#define FLAG_WORLD_MAP_UNDERGROUND_PATH_EAST_WEST_TUNNEL 0x8a8 +#define FLAG_WORLD_MAP_DIGLETTS_CAVE_B1F 0x8a9 +#define FLAG_WORLD_MAP_VICTORY_ROAD_1F 0x8aa +#define FLAG_WORLD_MAP_ROCKET_HIDEOUT_B1F 0x8ab +#define FLAG_WORLD_MAP_SILPH_CO_1F 0x8ac +#define FLAG_WORLD_MAP_POKEMON_MANSION_1F 0x8ad +#define FLAG_WORLD_MAP_SAFARI_ZONE_CENTER 0x8ae +#define FLAG_WORLD_MAP_POKEMON_LEAGUE_LORELEIS_ROOM 0x8af +#define FLAG_WORLD_MAP_ROCK_TUNNEL_1F 0x8b0 +#define FLAG_WORLD_MAP_SEAFOAM_ISLANDS_1F 0x8b1 +#define FLAG_WORLD_MAP_POKEMON_TOWER_1F 0x8b2 +#define FLAG_WORLD_MAP_CERULEAN_CAVE_1F 0x8b3 +#define FLAG_WORLD_MAP_POWER_PLANT 0x8b4 +#define FLAG_WORLD_MAP_NAVEL_ROCK_EXTERIOR 0x8b5 +#define FLAG_WORLD_MAP_MT_EMBER_EXTERIOR 0x8b6 +#define FLAG_WORLD_MAP_THREE_ISLAND_BERRY_FOREST 0x8b7 +#define FLAG_WORLD_MAP_FOUR_ISLAND_ICEFALL_CAVE_ENTRANCE 0x8b8 +#define FLAG_WORLD_MAP_FIVE_ISLAND_ROCKET_WAREHOUSE 0x8b9 +#define FLAG_WORLD_MAP_SEVEN_ISLAND_TRAINER_TOWER_LOBBY 0x8ba +#define FLAG_WORLD_MAP_SIX_ISLAND_DOTTED_HOLE_1F 0x8bb +#define FLAG_WORLD_MAP_FIVE_ISLAND_LOST_CAVE_ENTRANCE 0x8bc +#define FLAG_WORLD_MAP_SIX_ISLAND_PATTERN_BUSH 0x8bd +#define FLAG_WORLD_MAP_SIX_ISLAND_ALTERING_CAVE 0x8be +#define FLAG_WORLD_MAP_SEVEN_ISLAND_TANOBY_RUINS_MONEAN_CHAMBER 0x8bf +#define FLAG_WORLD_MAP_THREE_ISLAND_DUNSPARCE_TUNNEL 0x8c0 +#define FLAG_WORLD_MAP_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY 0x8c1 +#define FLAG_WORLD_MAP_BIRTH_ISLAND_EXTERIOR 0x8c2 + +// Unknown + +#define FLAG_0x807 0x807 +#define FLAG_0x821 0x821 +#define FLAG_0x822 0x822 +#define FLAG_0x823 0x823 +#define FLAG_0x825 0x825 +#define FLAG_0x827 0x827 +#define FLAG_0x828 0x828 +#define FLAG_0x829 0x829 +#define FLAG_0x82C 0x82C +#define FLAG_0x82F 0x82F +#define FLAG_0x830 0x830 +#define FLAG_SYS_NOT_SOMEONES_PC 0x834 +#define FLAG_0x83C 0x83C +#define FLAG_0x83E 0x83E +#define FLAG_0x841 0x841 +#define FLAG_0x844 0x844 +#define FLAG_0x845 0x845 +#define FLAG_0x846 0x846 +#define FLAG_0x847 0x847 +#define FLAG_0x848 0x848 +#define FLAG_0x849 0x849 +#define FLAG_0x84A 0x84A +#define FLAG_0x84B 0x84B + + +// Emerald Flags + // TODO: Get correct names and numbers #define FLAG_0x001 0x1 @@ -136,7 +222,7 @@ #define FLAG_0x083 0x83 #define FLAG_0x084 0x84 #define FLAG_0x085 0x85 -#define FLAG_PENDING_DAYCARE_EGG 0x86 +#define FLAG_0x086 0x86 #define FLAG_0x087 0x87 #define FLAG_0x088 0x88 #define FLAG_0x089 0x89 @@ -616,7 +702,7 @@ #define FLAG_0x263 0x263 #define FLAG_0x264 0x264 #define FLAG_0x265 0x265 -#define FLAG_0x266 0x266 +#define FLAG_PENDING_DAYCARE_EGG 0x266 #define FLAG_0x267 0x267 #define FLAG_0x268 0x268 #define FLAG_0x269 0x269 diff --git a/include/constants/global.h b/include/constants/global.h new file mode 100644 index 000000000..b1c8fed3e --- /dev/null +++ b/include/constants/global.h @@ -0,0 +1,81 @@ +#ifndef GUARD_CONSTANTS_GLOBAL_H +#define GUARD_CONSTANTS_GLOBAL_H + +#define POKEMON_SLOTS_NUMBER 412 + +#define ITEM_NAME_LENGTH 14 +#define POKEMON_NAME_LENGTH 10 +#define OT_NAME_LENGTH 7 + +enum +{ + VERSION_SAPPHIRE = 1, + VERSION_RUBY = 2, + VERSION_EMERALD = 3, + VERSION_FIRE_RED = 4, + VERSION_LEAF_GREEN = 5, +}; + +enum LanguageId { + LANGUAGE_JAPANESE = 1, + LANGUAGE_ENGLISH = 2, + LANGUAGE_FRENCH = 3, + LANGUAGE_ITALIAN = 4, + LANGUAGE_GERMAN = 5, + // 6 goes unused but the theory is it was meant to be Korean + LANGUAGE_SPANISH = 7, +}; + +#define GAME_LANGUAGE (LANGUAGE_ENGLISH) + +#define PC_ITEMS_COUNT 30 +#define BAG_ITEMS_COUNT 42 +#define BAG_KEYITEMS_COUNT 30 +#define BAG_POKEBALLS_COUNT 13 +#define BAG_TMHM_COUNT 58 +#define BAG_BERRIES_COUNT 43 + +enum +{ + MALE, + FEMALE +}; + +enum +{ + OPTIONS_BUTTON_MODE_NORMAL, + OPTIONS_BUTTON_MODE_LR, + OPTIONS_BUTTON_MODE_L_EQUALS_A +}; + +enum +{ + OPTIONS_TEXT_SPEED_SLOW, + OPTIONS_TEXT_SPEED_MID, + OPTIONS_TEXT_SPEED_FAST +}; + +enum +{ + OPTIONS_SOUND_MONO, + OPTIONS_SOUND_STEREO +}; + +enum +{ + OPTIONS_BATTLE_STYLE_SHIFT, + OPTIONS_BATTLE_STYLE_SET +}; + +enum +{ + POCKET_ITEMS = 1, + POCKET_KEY_ITEMS, + POCKET_POKE_BALLS, + POCKET_TM_CASE, + POCKET_BERRY_POUCH, +}; + +#define NUM_BAG_POCKETS 5 + +#endif //GUARD_CONSTANTS_GLOBAL_H diff --git a/include/constants/items.h b/include/constants/items.h index 64fed0e4c..6959ad358 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -379,6 +379,8 @@ #define ITEM_RUBY 373 #define ITEM_SAPPHIRE 374 +#define ITEM_N_A 375 + // Emerald #define ITEM_MAGMA_EMBLEM 375 #define ITEM_OLD_SEA_MAP 376 @@ -393,11 +395,4 @@ // Check if the item is one that can be used on a Pokemon. #define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) -// POCKETS -#define POCKET_ITEMS 1 -#define POCKET_KEY_ITEMS 2 -#define POCKET_POKE_BALLS 3 -#define POCKET_TM_CASE 4 -#define POCKET_BERRY_POUCH 5 - #endif // GUARD_CONSTANTS_ITEMS_H diff --git a/include/constants/layouts.h b/include/constants/layouts.h new file mode 100644 index 000000000..b97ef69cb --- /dev/null +++ b/include/constants/layouts.h @@ -0,0 +1,370 @@ +#ifndef GUARD_CONSTANTS_LAYOUTS_H +#define GUARD_CONSTANTS_LAYOUTS_H + +#define LAYOUT_PALLET_TOWN_PLAYERS_HOUSE_1F 1 +#define LAYOUT_PALLET_TOWN_PLAYERS_HOUSE_2F 2 +#define LAYOUT_PALLET_TOWN_GARYS_HOUSE 3 +#define LAYOUT_UNUSED_LAYOUT_82D54D8 4 +#define LAYOUT_PALLET_TOWN_PROFESSOR_OAKS_LAB 5 +#define LAYOUT_HOUSE1 6 +#define LAYOUT_HOUSE2 7 +#define LAYOUT_POKEMON_CENTER_1F 8 +#define LAYOUT_POKEMON_CENTER_2F 9 +#define LAYOUT_MART 10 +#define LAYOUT_HOUSE3 11 +#define LAYOUT_CERULEAN_CITY_GYM 12 +#define LAYOUT_HOUSE4 13 +#define LAYOUT_UNUSED_LAYOUT_82D6144 14 +#define LAYOUT_CELADON_CITY_GYM 15 +#define LAYOUT_UNUSED_LAYOUT_82D6490 16 +#define LAYOUT_FIVE_ISLAND_RESORT_GORGEOUS_HOUSE 17 +#define LAYOUT_UNUSED_LAYOUT_82D6654 18 +#define LAYOUT_UNUSED_LAYOUT_82D672C 19 +#define LAYOUT_FUCHSIA_CITY_GYM 20 +#define LAYOUT_HOUSE5 21 +#define LAYOUT_UNUSED_LAYOUT_82D6C34 24 +#define LAYOUT_VERMILION_CITY_GYM 25 +#define LAYOUT_CERULEAN_CITY_BIKE_SHOP 26 +#define LAYOUT_CELADON_CITY_GAME_CORNER 27 +#define LAYOUT_PEWTER_CITY_GYM 28 +#define LAYOUT_FOUR_ISLAND_LORELEIS_HOUSE 30 +#define LAYOUT_THREE_ISLAND_HOUSE1 31 +#define LAYOUT_UNUSED_LAYOUT_82D75F0 32 +#define LAYOUT_UNUSED_LAYOUT_82D7674 33 +#define LAYOUT_SAFFRON_CITY_GYM 34 +#define LAYOUT_UNUSED_LAYOUT_82D7CC8 35 +#define LAYOUT_CINNABAR_ISLAND_GYM 36 +#define LAYOUT_VIRIDIAN_CITY_GYM 37 +#define LAYOUT_UNUSED_LAYOUT_82D88C8 46 +#define LAYOUT_UNKNOWN_MAP_00_00 47 +#define LAYOUT_UNKNOWN_MAP_00_01 48 +#define LAYOUT_UNKNOWN_MAP_00_02 49 +#define LAYOUT_UNKNOWN_MAP_00_03 50 +#define LAYOUT_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE 51 +#define LAYOUT_UNUSED_LAYOUT_82D9B24 52 +#define LAYOUT_UNUSED_LAYOUT_82DA7C8 53 +#define LAYOUT_UNUSED_LAYOUT_82DB46C 54 +#define LAYOUT_UNUSED_LAYOUT_82DB4F0 55 +#define LAYOUT_UNUSED_LAYOUT_82DBBE0 57 +#define LAYOUT_UNUSED_LAYOUT_82DBDD8 62 +#define LAYOUT_UNUSED_LAYOUT_82DBFB8 63 +#define LAYOUT_UNUSED_LAYOUT_82DC4EC 64 +#define LAYOUT_UNUSED_LAYOUT_82DC60C 65 +#define LAYOUT_UNUSED_LAYOUT_82DC72C 66 +#define LAYOUT_UNUSED_LAYOUT_82DC84C 67 +#define LAYOUT_UNUSED_LAYOUT_82DCA70 68 +#define LAYOUT_UNUSED_LAYOUT_82DCB44 69 +#define LAYOUT_UNUSED_LAYOUT_82DCC40 70 +#define LAYOUT_UNUSED_LAYOUT_82DCCD4 71 +#define LAYOUT_UNUSED_LAYOUT_82DCD68 72 +#define LAYOUT_UNUSED_LAYOUT_82DCDFC 73 +#define LAYOUT_UNUSED_LAYOUT_82DCF00 74 +#define LAYOUT_UNUSED_LAYOUT_82DD004 75 +#define LAYOUT_UNUSED_LAYOUT_82DD0DC 77 +#define LAYOUT_PALLET_TOWN 78 +#define LAYOUT_VIRIDIAN_CITY 79 +#define LAYOUT_PEWTER_CITY 80 +#define LAYOUT_CERULEAN_CITY 81 +#define LAYOUT_LAVENDER_TOWN 82 +#define LAYOUT_VERMILION_CITY 83 +#define LAYOUT_CELADON_CITY 84 +#define LAYOUT_FUCHSIA_CITY 85 +#define LAYOUT_CINNABAR_ISLAND 86 +#define LAYOUT_INDIGO_PLATEAU_EXTERIOR 87 +#define LAYOUT_SAFFRON_CITY 88 +#define LAYOUT_ROUTE1 89 +#define LAYOUT_ROUTE2 90 +#define LAYOUT_ROUTE3 91 +#define LAYOUT_ROUTE4 92 +#define LAYOUT_ROUTE5 93 +#define LAYOUT_ROUTE6 94 +#define LAYOUT_ROUTE7 95 +#define LAYOUT_ROUTE8 96 +#define LAYOUT_ROUTE9 97 +#define LAYOUT_ROUTE10 98 +#define LAYOUT_ROUTE11 99 +#define LAYOUT_ROUTE12 100 +#define LAYOUT_ROUTE13 101 +#define LAYOUT_ROUTE14 102 +#define LAYOUT_ROUTE15 103 +#define LAYOUT_ROUTE16 104 +#define LAYOUT_ROUTE17 105 +#define LAYOUT_ROUTE18 106 +#define LAYOUT_ROUTE19 107 +#define LAYOUT_ROUTE20 108 +#define LAYOUT_ROUTE21_NORTH 109 +#define LAYOUT_ROUTE22 110 +#define LAYOUT_ROUTE23 111 +#define LAYOUT_ROUTE24 112 +#define LAYOUT_ROUTE25 113 +#define LAYOUT_MT_MOON_1F 114 +#define LAYOUT_MT_MOON_B1F 115 +#define LAYOUT_MT_MOON_B2F 116 +#define LAYOUT_VIRIDIAN_FOREST 117 +#define LAYOUT_SSANNE_EXTERIOR 118 +#define LAYOUT_SSANNE_1F_CORRIDOR 119 +#define LAYOUT_SSANNE_2F_CORRIDOR 120 +#define LAYOUT_SSANNE_3F_CORRIDOR 121 +#define LAYOUT_SSANNE_B1F_CORRIDOR 122 +#define LAYOUT_SSANNE_DECK 123 +#define LAYOUT_DIGLETTS_CAVE_B1F 124 +#define LAYOUT_VICTORY_ROAD_1F 125 +#define LAYOUT_VICTORY_ROAD_2F 126 +#define LAYOUT_VICTORY_ROAD_3F 127 +#define LAYOUT_ROCKET_HIDEOUT_B1F 128 +#define LAYOUT_ROCKET_HIDEOUT_B2F 129 +#define LAYOUT_ROCKET_HIDEOUT_B3F 130 +#define LAYOUT_ROCKET_HIDEOUT_B4F 131 +#define LAYOUT_SILPH_CO_1F 132 +#define LAYOUT_SILPH_CO_2F 133 +#define LAYOUT_SILPH_CO_3F 134 +#define LAYOUT_SILPH_CO_4F 135 +#define LAYOUT_SILPH_CO_5F 136 +#define LAYOUT_SILPH_CO_6F 137 +#define LAYOUT_SILPH_CO_7F 138 +#define LAYOUT_SILPH_CO_8F 139 +#define LAYOUT_SILPH_CO_9F 140 +#define LAYOUT_SILPH_CO_10F 141 +#define LAYOUT_SILPH_CO_11F 142 +#define LAYOUT_POKEMON_MANSION_1F 143 +#define LAYOUT_POKEMON_MANSION_2F 144 +#define LAYOUT_POKEMON_MANSION_3F 145 +#define LAYOUT_POKEMON_MANSION_B1F 146 +#define LAYOUT_SAFARI_ZONE_CENTER 147 +#define LAYOUT_SAFARI_ZONE_EAST 148 +#define LAYOUT_SAFARI_ZONE_NORTH 149 +#define LAYOUT_SAFARI_ZONE_WEST 150 +#define LAYOUT_CERULEAN_CAVE_1F 151 +#define LAYOUT_CERULEAN_CAVE_2F 152 +#define LAYOUT_CERULEAN_CAVE_B1F 153 +#define LAYOUT_ROCK_TUNNEL_1F 154 +#define LAYOUT_ROCK_TUNNEL_B1F 155 +#define LAYOUT_SEAFOAM_ISLANDS_1F 156 +#define LAYOUT_SEAFOAM_ISLANDS_B1F 157 +#define LAYOUT_SEAFOAM_ISLANDS_B2F 158 +#define LAYOUT_SEAFOAM_ISLANDS_B3F 159 +#define LAYOUT_SEAFOAM_ISLANDS_B4F 160 +#define LAYOUT_POKEMON_TOWER_1F 161 +#define LAYOUT_POKEMON_TOWER_2F 162 +#define LAYOUT_POKEMON_TOWER_3F 163 +#define LAYOUT_POKEMON_TOWER_4F 164 +#define LAYOUT_POKEMON_TOWER_5F 165 +#define LAYOUT_POKEMON_TOWER_6F 166 +#define LAYOUT_POKEMON_TOWER_7F 167 +#define LAYOUT_POWER_PLANT 168 +#define LAYOUT_ROUTE25_SEA_COTTAGE 169 +#define LAYOUT_SSANNE_KITCHEN 170 +#define LAYOUT_SSANNE_CAPTAINS_OFFICE 171 +#define LAYOUT_UNDERGROUND_PATH_ENTRANCE 172 +#define LAYOUT_UNDERGROUND_PATH_EAST_WEST_TUNNEL 173 +#define LAYOUT_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL 174 +#define LAYOUT_ROUTE12_NORTH_ENTRANCE_1F 176 +#define LAYOUT_SSANNE_ROOM1 177 +#define LAYOUT_SSANNE_ROOM2 178 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_ELEVATOR 179 +#define LAYOUT_PEWTER_CITY_MUSEUM_1F 180 +#define LAYOUT_PEWTER_CITY_MUSEUM_2F 181 +#define LAYOUT_CERULEAN_CITY_HOUSE2 182 +#define LAYOUT_CERULEAN_CITY_HOUSE1 183 +#define LAYOUT_CELADON_CITY_CONDOMINIUMS_1F 184 +#define LAYOUT_CELADON_CITY_CONDOMINIUMS_2F 185 +#define LAYOUT_CELADON_CITY_CONDOMINIUMS_3F 186 +#define LAYOUT_CELADON_CITY_CONDOMINIUMS_ROOF 187 +#define LAYOUT_CELADON_CITY_CONDOMINIUMS_ROOF_ROOM 188 +#define LAYOUT_CELADON_CITY_GAME_CORNER_PRIZE_ROOM 189 +#define LAYOUT_CELADON_CITY_RESTAURANT 190 +#define LAYOUT_CELADON_CITY_HOTEL 191 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_1F 192 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_2F 193 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_3F 194 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_4F 195 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_5F 196 +#define LAYOUT_CELADON_CITY_DEPARTMENT_STORE_ROOF 197 +#define LAYOUT_SAFARI_ZONE_BUILDING 198 +#define LAYOUT_SAFARI_ZONE_SECRET_HOUSE 199 +#define LAYOUT_FUCHSIA_CITY_ZOO_BUILDING 200 +#define LAYOUT_FUCHSIA_CITY_BUILDING1 201 +#define LAYOUT_FUCHSIA_CITY_HOUSE2 202 +#define LAYOUT_CINNABAR_ISLAND_POKEMON_LAB_ENTRANCE 203 +#define LAYOUT_CINNABAR_ISLAND_POKEMON_LAB_LOUNGE 204 +#define LAYOUT_CINNABAR_ISLAND_POKEMON_LAB_RESEARCH_ROOM 205 +#define LAYOUT_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM 206 +#define LAYOUT_SAFFRON_CITY_DUPLICATE 207 +#define LAYOUT_SAFFRON_CITY_NORTH_SOUTH_ENTRANCE 208 +#define LAYOUT_SAFFRON_CITY_EAST_WEST_ENTRANCE 209 +#define LAYOUT_DIGLETTS_CAVE_NORTH_ENTRANCE 210 +#define LAYOUT_DIGLETTS_CAVE_SOUTH_ENTRANCE 211 +#define LAYOUT_INDIGO_PLATEAU_POKEMON_CENTER_1F 212 +#define LAYOUT_POKEMON_LEAGUE_LORELEIS_ROOM 213 +#define LAYOUT_POKEMON_LEAGUE_BRUNOS_ROOM 214 +#define LAYOUT_POKEMON_LEAGUE_AGATHAS_ROOM 215 +#define LAYOUT_POKEMON_LEAGUE_LANCES_ROOM 216 +#define LAYOUT_POKEMON_LEAGUE_CHAMPIONS_ROOM 217 +#define LAYOUT_POKEMON_LEAGUE_HALL_OF_FAME 218 +#define LAYOUT_ROUTE21_SOUTH 219 +#define LAYOUT_ENTRANCE_2F 220 +#define LAYOUT_ROUTE2_ENTRANCE 221 +#define LAYOUT_ROUTE22_NORTH_ENTRANCE 222 +#define LAYOUT_ROUTE16_NORTH_ENTRANCE_1F 223 +#define LAYOUT_ENTRANCE_1F 224 +#define LAYOUT_ROCKET_HIDEOUT_ELEVATOR 225 +#define LAYOUT_SAFFRON_CITY_HOUSE1_1F 226 +#define LAYOUT_SAFFRON_CITY_HOUSE1_2F 227 +#define LAYOUT_SAFFRON_CITY_DOJO 228 +#define LAYOUT_SILPH_CO_ELEVATOR 229 +#define LAYOUT_ONE_ISLAND 230 +#define LAYOUT_TWO_ISLAND 231 +#define LAYOUT_THREE_ISLAND 232 +#define LAYOUT_FOUR_ISLAND 233 +#define LAYOUT_FIVE_ISLAND 234 +#define LAYOUT_SEVEN_ISLAND 235 +#define LAYOUT_SIX_ISLAND 236 +#define LAYOUT_ONE_ISLAND_KINDLE_ROAD 237 +#define LAYOUT_ONE_ISLAND_TREASURE_BEACH 238 +#define LAYOUT_TWO_ISLAND_CAPE_BRINK 239 +#define LAYOUT_THREE_ISLAND_BOND_BRIDGE 240 +#define LAYOUT_THREE_ISLAND_PORT 241 +#define LAYOUT_UNKNOWN_MAP_03_50 242 +#define LAYOUT_UNKNOWN_MAP_03_51 243 +#define LAYOUT_UNKNOWN_MAP_03_52 244 +#define LAYOUT_UNKNOWN_MAP_03_53 245 +#define LAYOUT_FIVE_ISLAND_RESORT_GORGEOUS 246 +#define LAYOUT_FIVE_ISLAND_WATER_LABYRINTH 247 +#define LAYOUT_FIVE_ISLAND_MEADOW 248 +#define LAYOUT_FIVE_ISLAND_MEMORIAL_PILLAR 249 +#define LAYOUT_SIX_ISLAND_OUTCAST_ISLAND 250 +#define LAYOUT_SIX_ISLAND_GREEN_PATH 251 +#define LAYOUT_SIX_ISLAND_WATER_PATH 252 +#define LAYOUT_SIX_ISLAND_RUIN_VALLEY 253 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER 254 +#define LAYOUT_SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE 255 +#define LAYOUT_SEVEN_ISLAND_SEVAULT_CANYON 256 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS 257 +#define LAYOUT_UNUSED_LAYOUT_833614C 258 +#define LAYOUT_UNUSED_LAYOUT_83377F0 259 +#define LAYOUT_UNUSED_LAYOUT_8338354 260 +#define LAYOUT_UNUSED_LAYOUT_8338738 261 +#define LAYOUT_UNKNOWN_MAP_00_04 262 +#define LAYOUT_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB 263 +#define LAYOUT_UNUSED_LAYOUT_8338B4C 264 +#define LAYOUT_SEVEN_ISLAND_HOUSE_ROOM2 265 +#define LAYOUT_VIRIDIAN_CITY_HOUSE2 266 +#define LAYOUT_UNUSED_LAYOUT_8338E90 267 +#define LAYOUT_UNUSED_LAYOUT_833902C 268 +#define LAYOUT_MT_EMBER_RUBY_PATH_B4F 269 +#define LAYOUT_THREE_ISLAND_BERRY_FOREST 270 +#define LAYOUT_ONE_ISLAND_POKEMON_CENTER_1F 271 +#define LAYOUT_TWO_ISLAND_JOYFUL_GAME_CORNER 272 +#define LAYOUT_VERMILION_CITY_POKEMON_FAN_CLUB 273 +#define LAYOUT_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE 274 +#define LAYOUT_ROUTE5_POKEMON_DAY_CARE 275 +#define LAYOUT_VIRIDIAN_CITY_HOUSE1 276 +#define LAYOUT_FOUR_ISLAND_POKEMON_DAY_CARE 277 +#define LAYOUT_UNUSED_LAYOUT_833B6EC 278 +#define LAYOUT_UNUSED_LAYOUT_833BE30 279 +#define LAYOUT_MT_EMBER_EXTERIOR 280 +#define LAYOUT_MT_EMBER_SUMMIT 281 +#define LAYOUT_MT_EMBER_SUMMIT_PATH_1F 282 +#define LAYOUT_MT_EMBER_SUMMIT_PATH_2F 283 +#define LAYOUT_MT_EMBER_SUMMIT_PATH_3F 284 +#define LAYOUT_MT_EMBER_RUBY_PATH_1F 285 +#define LAYOUT_MT_EMBER_RUBY_PATH_B1F 286 +#define LAYOUT_MT_EMBER_RUBY_PATH_B2F 287 +#define LAYOUT_MT_EMBER_RUBY_PATH_B3F 288 +#define LAYOUT_MT_EMBER_RUBY_PATH_B1F_STAIRS 289 +#define LAYOUT_MT_EMBER_RUBY_PATH_B2F_STAIRS 290 +#define LAYOUT_MT_EMBER_RUBY_PATH_B5F 291 +#define LAYOUT_FIVE_ISLAND_ROCKET_WAREHOUSE 292 +#define LAYOUT_FOUR_ISLAND_ICEFALL_CAVE_ENTRANCE 293 +#define LAYOUT_FOUR_ISLAND_ICEFALL_CAVE_1F 294 +#define LAYOUT_FOUR_ISLAND_ICEFALL_CAVE_B1F 295 +#define LAYOUT_FOUR_ISLAND_ICEFALL_CAVE_BACK 296 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_LOBBY 297 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_1F 298 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_2F 299 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_3F 300 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_4F 301 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_5F 302 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_6F 303 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_7F 304 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_8F 305 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_ROOF 306 +#define LAYOUT_SEVEN_ISLAND_TRAINER_TOWER_ELEVATOR 307 +#define LAYOUT_CERULEAN_CITY_HOUSE5 308 +#define LAYOUT_SIX_ISLAND_DOTTED_HOLE_1F 309 +#define LAYOUT_SIX_ISLAND_DOTTED_HOLE_B1F 310 +#define LAYOUT_SIX_ISLAND_DOTTED_HOLE_B2F 311 +#define LAYOUT_SIX_ISLAND_DOTTED_HOLE_B3F 312 +#define LAYOUT_SIX_ISLAND_DOTTED_HOLE_B4F 313 +#define LAYOUT_SIX_ISLAND_DOTTED_HOLE_SAPPHIRE_ROOM 314 +#define LAYOUT_ISLAND_HARBOR 315 +#define LAYOUT_ONE_ISLAND_POKEMON_CENTER_2F 316 +#define LAYOUT_SIX_ISLAND_PATTERN_BUSH 317 +#define LAYOUT_THREE_ISLAND_DUNSPARCE_TUNNEL 318 +#define LAYOUT_UNUSED_LAYOUT_83453C0 319 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ENTRANCE 320 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM1 321 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM2 322 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM3 323 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM4 324 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM5 325 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM6 326 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM7 327 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM8 328 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM9 329 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM10 330 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM11 331 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM12 332 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM13 333 +#define LAYOUT_FIVE_ISLAND_LOST_CAVE_ROOM14 334 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_MONEAN_CHAMBER 335 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_LIPTOO_CHAMBER 336 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_WEEPTH_CHAMBER 337 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_DILFORD_CHAMBER 338 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_SCUFIB_CHAMBER 339 +#define LAYOUT_SIX_ISLAND_ALTERING_CAVE 340 +#define LAYOUT_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY 341 +#define LAYOUT_BIRTH_ISLAND_EXTERIOR 342 +#define LAYOUT_NAVEL_ROCK_EXTERIOR 343 +#define LAYOUT_NAVEL_ROCK_1F 344 +#define LAYOUT_NAVEL_ROCK_SUMMIT 345 +#define LAYOUT_NAVEL_ROCK_BASE 346 +#define LAYOUT_NAVEL_ROCK_SUMMIT_PATH_2F 347 +#define LAYOUT_NAVEL_ROCK_SUMMIT_PATH_3F 348 +#define LAYOUT_NAVEL_ROCK_SUMMIT_PATH_4F 349 +#define LAYOUT_NAVEL_ROCK_SUMMIT_PATH_5F 350 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B1F 351 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B2F 352 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B3F 353 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B4F 354 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B5F 355 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B6F 356 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B7F 357 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B8F 358 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B9F 359 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B10F 360 +#define LAYOUT_NAVEL_ROCK_BASE_PATH_B11F 361 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_RIXY_CHAMBER 362 +#define LAYOUT_SEVEN_ISLAND_TANOBY_RUINS_VIAPOIS_CHAMBER 363 +#define LAYOUT_NAVEL_ROCK_B1F 364 +#define LAYOUT_NAVEL_ROCK_FORK 365 +#define LAYOUT_UNUSED_LAYOUT_834BC2C 366 +#define LAYOUT_UNUSED_LAYOUT_834BEB4 367 +#define LAYOUT_UNUSED_LAYOUT_834C13C 368 +#define LAYOUT_UNUSED_LAYOUT_834C3C4 369 +#define LAYOUT_UNUSED_LAYOUT_834C64C 370 +#define LAYOUT_UNUSED_LAYOUT_834C8D4 371 +#define LAYOUT_UNUSED_LAYOUT_834CB5C 372 +#define LAYOUT_UNUSED_LAYOUT_834CDE4 373 +#define LAYOUT_UNUSED_LAYOUT_834D06C 374 +#define LAYOUT_UNUSED_LAYOUT_834D2F4 375 +#define LAYOUT_UNUSED_LAYOUT_834D57C 376 +#define LAYOUT_UNUSED_LAYOUT_834D804 377 +#define LAYOUT_UNUSED_LAYOUT_834DA8C 378 +#define LAYOUT_UNUSED_LAYOUT_834DD14 379 +#define LAYOUT_UNUSED_LAYOUT_834DF9C 380 +#define LAYOUT_UNUSED_LAYOUT_834E224 381 +#define LAYOUT_SEVEN_ISLAND_HOUSE_ROOM1 382 +#define LAYOUT_ONE_ISLAND_KINDLE_ROAD_EMBER_SPA 383 + +#endif // GUARD_CONSTANTS_LAYOUTS_H diff --git a/include/constants/map_groups.h b/include/constants/map_groups.h new file mode 100644 index 000000000..d769520ca --- /dev/null +++ b/include/constants/map_groups.h @@ -0,0 +1,517 @@ +#ifndef GUARD_CONSTANTS_MAP_GROUPS_H +#define GUARD_CONSTANTS_MAP_GROUPS_H + +// Map Group 0 +#define MAP_UNKNOWN_MAP_00_00 (0 | (0 << 8)) +#define MAP_UNKNOWN_MAP_00_01 (1 | (0 << 8)) +#define MAP_UNKNOWN_MAP_00_02 (2 | (0 << 8)) +#define MAP_UNKNOWN_MAP_00_03 (3 | (0 << 8)) +#define MAP_UNKNOWN_MAP_00_04 (4 | (0 << 8)) + +// Map Group 1 +#define MAP_VIRIDIAN_FOREST (0 | (1 << 8)) +#define MAP_MT_MOON_1F (1 | (1 << 8)) +#define MAP_MT_MOON_B1F (2 | (1 << 8)) +#define MAP_MT_MOON_B2F (3 | (1 << 8)) +#define MAP_SSANNE_EXTERIOR (4 | (1 << 8)) +#define MAP_SSANNE_1F_CORRIDOR (5 | (1 << 8)) +#define MAP_SSANNE_2F_CORRIDOR (6 | (1 << 8)) +#define MAP_SSANNE_3F_CORRIDOR (7 | (1 << 8)) +#define MAP_SSANNE_B1F_CORRIDOR (8 | (1 << 8)) +#define MAP_SSANNE_DECK (9 | (1 << 8)) +#define MAP_SSANNE_KITCHEN (10 | (1 << 8)) +#define MAP_SSANNE_CAPTAINS_OFFICE (11 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM1 (12 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM2 (13 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM3 (14 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM4 (15 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM5 (16 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM7 (17 | (1 << 8)) +#define MAP_SSANNE_2F_ROOM1 (18 | (1 << 8)) +#define MAP_SSANNE_2F_ROOM2 (19 | (1 << 8)) +#define MAP_SSANNE_2F_ROOM3 (20 | (1 << 8)) +#define MAP_SSANNE_2F_ROOM4 (21 | (1 << 8)) +#define MAP_SSANNE_2F_ROOM5 (22 | (1 << 8)) +#define MAP_SSANNE_2F_ROOM6 (23 | (1 << 8)) +#define MAP_SSANNE_B1F_ROOM1 (24 | (1 << 8)) +#define MAP_SSANNE_B1F_ROOM2 (25 | (1 << 8)) +#define MAP_SSANNE_B1F_ROOM3 (26 | (1 << 8)) +#define MAP_SSANNE_B1F_ROOM4 (27 | (1 << 8)) +#define MAP_SSANNE_B1F_ROOM5 (28 | (1 << 8)) +#define MAP_SSANNE_1F_ROOM6 (29 | (1 << 8)) +#define MAP_UNDERGROUND_PATH_NORTH_ENTRANCE (30 | (1 << 8)) +#define MAP_UNDERGROUND_PATH_NORTH_SOUTH_TUNNEL (31 | (1 << 8)) +#define MAP_UNDERGROUND_PATH_SOUTH_ENTRANCE (32 | (1 << 8)) +#define MAP_UNDERGROUND_PATH_WEST_ENTRANCE (33 | (1 << 8)) +#define MAP_UNDERGROUND_PATH_EAST_WEST_TUNNEL (34 | (1 << 8)) +#define MAP_UNDERGROUND_PATH_EAST_ENTRANCE (35 | (1 << 8)) +#define MAP_DIGLETTS_CAVE_NORTH_ENTRANCE (36 | (1 << 8)) +#define MAP_DIGLETTS_CAVE_B1F (37 | (1 << 8)) +#define MAP_DIGLETTS_CAVE_SOUTH_ENTRANCE (38 | (1 << 8)) +#define MAP_VICTORY_ROAD_1F (39 | (1 << 8)) +#define MAP_VICTORY_ROAD_2F (40 | (1 << 8)) +#define MAP_VICTORY_ROAD_3F (41 | (1 << 8)) +#define MAP_ROCKET_HIDEOUT_B1F (42 | (1 << 8)) +#define MAP_ROCKET_HIDEOUT_B2F (43 | (1 << 8)) +#define MAP_ROCKET_HIDEOUT_B3F (44 | (1 << 8)) +#define MAP_ROCKET_HIDEOUT_B4F (45 | (1 << 8)) +#define MAP_ROCKET_HIDEOUT_ELEVATOR (46 | (1 << 8)) +#define MAP_SILPH_CO_1F (47 | (1 << 8)) +#define MAP_SILPH_CO_2F (48 | (1 << 8)) +#define MAP_SILPH_CO_3F (49 | (1 << 8)) +#define MAP_SILPH_CO_4F (50 | (1 << 8)) +#define MAP_SILPH_CO_5F (51 | (1 << 8)) +#define MAP_SILPH_CO_6F (52 | (1 << 8)) +#define MAP_SILPH_CO_7F (53 | (1 << 8)) +#define MAP_SILPH_CO_8F (54 | (1 << 8)) +#define MAP_SILPH_CO_9F (55 | (1 << 8)) +#define MAP_SILPH_CO_10F (56 | (1 << 8)) +#define MAP_SILPH_CO_11F (57 | (1 << 8)) +#define MAP_SILPH_CO_ELEVATOR (58 | (1 << 8)) +#define MAP_POKEMON_MANSION_1F (59 | (1 << 8)) +#define MAP_POKEMON_MANSION_2F (60 | (1 << 8)) +#define MAP_POKEMON_MANSION_3F (61 | (1 << 8)) +#define MAP_POKEMON_MANSION_B1F (62 | (1 << 8)) +#define MAP_SAFARI_ZONE_CENTER (63 | (1 << 8)) +#define MAP_SAFARI_ZONE_EAST (64 | (1 << 8)) +#define MAP_SAFARI_ZONE_NORTH (65 | (1 << 8)) +#define MAP_SAFARI_ZONE_WEST (66 | (1 << 8)) +#define MAP_SAFARI_ZONE_BUILDING1 (67 | (1 << 8)) +#define MAP_SAFARI_ZONE_BUILDING2 (68 | (1 << 8)) +#define MAP_SAFARI_ZONE_BUILDING3 (69 | (1 << 8)) +#define MAP_SAFARI_ZONE_BUILDING4 (70 | (1 << 8)) +#define MAP_SAFARI_ZONE_SECRET_HOUSE (71 | (1 << 8)) +#define MAP_CERULEAN_CAVE_1F (72 | (1 << 8)) +#define MAP_CERULEAN_CAVE_2F (73 | (1 << 8)) +#define MAP_CERULEAN_CAVE_B1F (74 | (1 << 8)) +#define MAP_POKEMON_LEAGUE_LORELEIS_ROOM (75 | (1 << 8)) +#define MAP_POKEMON_LEAGUE_BRUNOS_ROOM (76 | (1 << 8)) +#define MAP_POKEMON_LEAGUE_AGATHAS_ROOM (77 | (1 << 8)) +#define MAP_POKEMON_LEAGUE_LANCES_ROOM (78 | (1 << 8)) +#define MAP_POKEMON_LEAGUE_CHAMPIONS_ROOM (79 | (1 << 8)) +#define MAP_POKEMON_LEAGUE_HALL_OF_FAME (80 | (1 << 8)) +#define MAP_ROCK_TUNNEL_1F (81 | (1 << 8)) +#define MAP_ROCK_TUNNEL_B1F (82 | (1 << 8)) +#define MAP_SEAFOAM_ISLANDS_1F (83 | (1 << 8)) +#define MAP_SEAFOAM_ISLANDS_B1F (84 | (1 << 8)) +#define MAP_SEAFOAM_ISLANDS_B2F (85 | (1 << 8)) +#define MAP_SEAFOAM_ISLANDS_B3F (86 | (1 << 8)) +#define MAP_SEAFOAM_ISLANDS_B4F (87 | (1 << 8)) +#define MAP_POKEMON_TOWER_1F (88 | (1 << 8)) +#define MAP_POKEMON_TOWER_2F (89 | (1 << 8)) +#define MAP_POKEMON_TOWER_3F (90 | (1 << 8)) +#define MAP_POKEMON_TOWER_4F (91 | (1 << 8)) +#define MAP_POKEMON_TOWER_5F (92 | (1 << 8)) +#define MAP_POKEMON_TOWER_6F (93 | (1 << 8)) +#define MAP_POKEMON_TOWER_7F (94 | (1 << 8)) +#define MAP_POWER_PLANT (95 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B4F (96 | (1 << 8)) +#define MAP_MT_EMBER_EXTERIOR (97 | (1 << 8)) +#define MAP_MT_EMBER_SUMMIT_PATH_1F (98 | (1 << 8)) +#define MAP_MT_EMBER_SUMMIT_PATH_2F (99 | (1 << 8)) +#define MAP_MT_EMBER_SUMMIT_PATH_3F (100 | (1 << 8)) +#define MAP_MT_EMBER_SUMMIT (101 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B5F (102 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_1F (103 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B1F (104 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B2F (105 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B3F (106 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B1F_STAIRS (107 | (1 << 8)) +#define MAP_MT_EMBER_RUBY_PATH_B2F_STAIRS (108 | (1 << 8)) +#define MAP_THREE_ISLAND_BERRY_FOREST (109 | (1 << 8)) +#define MAP_FOUR_ISLAND_ICEFALL_CAVE_ENTRANCE (110 | (1 << 8)) +#define MAP_FOUR_ISLAND_ICEFALL_CAVE_1F (111 | (1 << 8)) +#define MAP_FOUR_ISLAND_ICEFALL_CAVE_B1F (112 | (1 << 8)) +#define MAP_FOUR_ISLAND_ICEFALL_CAVE_BACK (113 | (1 << 8)) +#define MAP_FIVE_ISLAND_ROCKET_WAREHOUSE (114 | (1 << 8)) +#define MAP_SIX_ISLAND_DOTTED_HOLE_1F (115 | (1 << 8)) +#define MAP_SIX_ISLAND_DOTTED_HOLE_B1F (116 | (1 << 8)) +#define MAP_SIX_ISLAND_DOTTED_HOLE_B2F (117 | (1 << 8)) +#define MAP_SIX_ISLAND_DOTTED_HOLE_B3F (118 | (1 << 8)) +#define MAP_SIX_ISLAND_DOTTED_HOLE_B4F (119 | (1 << 8)) +#define MAP_SIX_ISLAND_DOTTED_HOLE_SAPPHIRE_ROOM (120 | (1 << 8)) +#define MAP_SIX_ISLAND_PATTERN_BUSH (121 | (1 << 8)) +#define MAP_SIX_ISLAND_ALTERING_CAVE (122 | (1 << 8)) + +// Map Group 2 +#define MAP_NAVEL_ROCK_EXTERIOR (0 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_1F (1 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_2F (2 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_3F (3 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_4F (4 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_5F (5 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_6F (6 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_7F (7 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_8F (8 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_ROOF (9 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_LOBBY (10 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER_ELEVATOR (11 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ENTRANCE (12 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM1 (13 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM2 (14 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM3 (15 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM4 (16 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM5 (17 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM6 (18 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM7 (19 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM8 (20 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM9 (21 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM10 (22 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM11 (23 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM12 (24 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM13 (25 | (2 << 8)) +#define MAP_FIVE_ISLAND_LOST_CAVE_ROOM14 (26 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_MONEAN_CHAMBER (27 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_LIPTOO_CHAMBER (28 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_WEEPTH_CHAMBER (29 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_DILFORD_CHAMBER (30 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_SCUFIB_CHAMBER (31 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_RIXY_CHAMBER (32 | (2 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS_VIAPOIS_CHAMBER (33 | (2 << 8)) +#define MAP_THREE_ISLAND_DUNSPARCE_TUNNEL (34 | (2 << 8)) +#define MAP_SEVEN_ISLAND_SEAVAULT_CANYON_TANOBY_KEY (35 | (2 << 8)) +#define MAP_NAVEL_ROCK_1F (36 | (2 << 8)) +#define MAP_NAVEL_ROCK_SUMMIT (37 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE (38 | (2 << 8)) +#define MAP_NAVEL_ROCK_SUMMIT_PATH_2F (39 | (2 << 8)) +#define MAP_NAVEL_ROCK_SUMMIT_PATH_3F (40 | (2 << 8)) +#define MAP_NAVEL_ROCK_SUMMIT_PATH_4F (41 | (2 << 8)) +#define MAP_NAVEL_ROCK_SUMMIT_PATH_5F (42 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B1F (43 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B2F (44 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B3F (45 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B4F (46 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B5F (47 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B6F (48 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B7F (49 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B8F (50 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B9F (51 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B10F (52 | (2 << 8)) +#define MAP_NAVEL_ROCK_BASE_PATH_B11F (53 | (2 << 8)) +#define MAP_NAVEL_ROCK_B1F (54 | (2 << 8)) +#define MAP_NAVEL_ROCK_FORK (55 | (2 << 8)) +#define MAP_BIRTH_ISLAND_EXTERIOR (56 | (2 << 8)) +#define MAP_ONE_ISLAND_KINDLE_ROAD_EMBER_SPA (57 | (2 << 8)) +#define MAP_BIRTH_ISLAND_HARBOR (58 | (2 << 8)) +#define MAP_NAVEL_ROCK_HARBOR (59 | (2 << 8)) + +// Map Group 3 +#define MAP_PALLET_TOWN (0 | (3 << 8)) +#define MAP_VIRIDIAN_CITY (1 | (3 << 8)) +#define MAP_PEWTER_CITY (2 | (3 << 8)) +#define MAP_CERULEAN_CITY (3 | (3 << 8)) +#define MAP_LAVENDER_TOWN (4 | (3 << 8)) +#define MAP_VERMILION_CITY (5 | (3 << 8)) +#define MAP_CELADON_CITY (6 | (3 << 8)) +#define MAP_FUCHSIA_CITY (7 | (3 << 8)) +#define MAP_CINNABAR_ISLAND (8 | (3 << 8)) +#define MAP_INDIGO_PLATEAU_EXTERIOR (9 | (3 << 8)) +#define MAP_SAFFRON_CITY_DUPLICATE (10 | (3 << 8)) +#define MAP_SAFFRON_CITY (11 | (3 << 8)) +#define MAP_ONE_ISLAND (12 | (3 << 8)) +#define MAP_TWO_ISLAND (13 | (3 << 8)) +#define MAP_THREE_ISLAND (14 | (3 << 8)) +#define MAP_FOUR_ISLAND (15 | (3 << 8)) +#define MAP_FIVE_ISLAND (16 | (3 << 8)) +#define MAP_SEVEN_ISLAND (17 | (3 << 8)) +#define MAP_SIX_ISLAND (18 | (3 << 8)) +#define MAP_ROUTE1 (19 | (3 << 8)) +#define MAP_ROUTE2 (20 | (3 << 8)) +#define MAP_ROUTE3 (21 | (3 << 8)) +#define MAP_ROUTE4 (22 | (3 << 8)) +#define MAP_ROUTE5 (23 | (3 << 8)) +#define MAP_ROUTE6 (24 | (3 << 8)) +#define MAP_ROUTE7 (25 | (3 << 8)) +#define MAP_ROUTE8 (26 | (3 << 8)) +#define MAP_ROUTE9 (27 | (3 << 8)) +#define MAP_ROUTE10 (28 | (3 << 8)) +#define MAP_ROUTE11 (29 | (3 << 8)) +#define MAP_ROUTE12 (30 | (3 << 8)) +#define MAP_ROUTE13 (31 | (3 << 8)) +#define MAP_ROUTE14 (32 | (3 << 8)) +#define MAP_ROUTE15 (33 | (3 << 8)) +#define MAP_ROUTE16 (34 | (3 << 8)) +#define MAP_ROUTE17 (35 | (3 << 8)) +#define MAP_ROUTE18 (36 | (3 << 8)) +#define MAP_ROUTE19 (37 | (3 << 8)) +#define MAP_ROUTE20 (38 | (3 << 8)) +#define MAP_ROUTE21_NORTH (39 | (3 << 8)) +#define MAP_ROUTE21_SOUTH (40 | (3 << 8)) +#define MAP_ROUTE22 (41 | (3 << 8)) +#define MAP_ROUTE23 (42 | (3 << 8)) +#define MAP_ROUTE24 (43 | (3 << 8)) +#define MAP_ROUTE25 (44 | (3 << 8)) +#define MAP_ONE_ISLAND_KINDLE_ROAD (45 | (3 << 8)) +#define MAP_ONE_ISLAND_TREASURE_BEACH (46 | (3 << 8)) +#define MAP_TWO_ISLAND_CAPE_BRINK (47 | (3 << 8)) +#define MAP_THREE_ISLAND_BOND_BRIDGE (48 | (3 << 8)) +#define MAP_THREE_ISLAND_PORT (49 | (3 << 8)) +#define MAP_UNKNOWN_MAP_03_50 (50 | (3 << 8)) +#define MAP_UNKNOWN_MAP_03_51 (51 | (3 << 8)) +#define MAP_UNKNOWN_MAP_03_52 (52 | (3 << 8)) +#define MAP_UNKNOWN_MAP_03_53 (53 | (3 << 8)) +#define MAP_FIVE_ISLAND_RESORT_GORGEOUS (54 | (3 << 8)) +#define MAP_FIVE_ISLAND_WATER_LABYRINTH (55 | (3 << 8)) +#define MAP_FIVE_ISLAND_MEADOW (56 | (3 << 8)) +#define MAP_FIVE_ISLAND_MEMORIAL_PILLAR (57 | (3 << 8)) +#define MAP_SIX_ISLAND_OUTCAST_ISLAND (58 | (3 << 8)) +#define MAP_SIX_ISLAND_GREEN_PATH (59 | (3 << 8)) +#define MAP_SIX_ISLAND_WATER_PATH (60 | (3 << 8)) +#define MAP_SIX_ISLAND_RUIN_VALLEY (61 | (3 << 8)) +#define MAP_SEVEN_ISLAND_TRAINER_TOWER (62 | (3 << 8)) +#define MAP_SEVEN_ISLAND_SEVAULT_CANYON_ENTRANCE (63 | (3 << 8)) +#define MAP_SEVEN_ISLAND_SEVAULT_CANYON (64 | (3 << 8)) +#define MAP_SEVEN_ISLAND_TANOBY_RUINS (65 | (3 << 8)) + +// Map Group 4 +#define MAP_PALLET_TOWN_PLAYERS_HOUSE_1F (0 | (4 << 8)) +#define MAP_PALLET_TOWN_PLAYERS_HOUSE_2F (1 | (4 << 8)) +#define MAP_PALLET_TOWN_GARYS_HOUSE (2 | (4 << 8)) +#define MAP_PALLET_TOWN_PROFESSOR_OAKS_LAB (3 | (4 << 8)) + +// Map Group 5 +#define MAP_VIRIDIAN_CITY_HOUSE1 (0 | (5 << 8)) +#define MAP_VIRIDIAN_CITY_GYM (1 | (5 << 8)) +#define MAP_VIRIDIAN_CITY_HOUSE2 (2 | (5 << 8)) +#define MAP_VIRIDIAN_CITY_MART (3 | (5 << 8)) +#define MAP_VIRIDIAN_CITY_POKEMON_CENTER_1F (4 | (5 << 8)) +#define MAP_VIRIDIAN_CITY_POKEMON_CENTER_2F (5 | (5 << 8)) + +// Map Group 6 +#define MAP_PEWTER_CITY_MUSEUM_1F (0 | (6 << 8)) +#define MAP_PEWTER_CITY_MUSEUM_2F (1 | (6 << 8)) +#define MAP_PEWTER_CITY_GYM (2 | (6 << 8)) +#define MAP_PEWTER_CITY_MART (3 | (6 << 8)) +#define MAP_PEWTER_CITY_HOUSE1 (4 | (6 << 8)) +#define MAP_PEWTER_CITY_POKEMON_CENTER_1F (5 | (6 << 8)) +#define MAP_PEWTER_CITY_POKEMON_CENTER_2F (6 | (6 << 8)) +#define MAP_PEWTER_CITY_HOUSE2 (7 | (6 << 8)) + +// Map Group 7 +#define MAP_CERULEAN_CITY_HOUSE1 (0 | (7 << 8)) +#define MAP_CERULEAN_CITY_HOUSE2 (1 | (7 << 8)) +#define MAP_CERULEAN_CITY_HOUSE3 (2 | (7 << 8)) +#define MAP_CERULEAN_CITY_POKEMON_CENTER_1F (3 | (7 << 8)) +#define MAP_CERULEAN_CITY_POKEMON_CENTER_2F (4 | (7 << 8)) +#define MAP_CERULEAN_CITY_GYM (5 | (7 << 8)) +#define MAP_CERULEAN_CITY_BIKE_SHOP (6 | (7 << 8)) +#define MAP_CERULEAN_CITY_MART (7 | (7 << 8)) +#define MAP_CERULEAN_CITY_HOUSE4 (8 | (7 << 8)) +#define MAP_CERULEAN_CITY_HOUSE5 (9 | (7 << 8)) + +// Map Group 8 +#define MAP_LAVENDER_TOWN_POKEMON_CENTER_1F (0 | (8 << 8)) +#define MAP_LAVENDER_TOWN_POKEMON_CENTER_2F (1 | (8 << 8)) +#define MAP_LAVENDER_TOWN_VOLUNTEER_POKEMON_HOUSE (2 | (8 << 8)) +#define MAP_LAVENDER_TOWN_HOUSE1 (3 | (8 << 8)) +#define MAP_LAVENDER_TOWN_HOUSE2 (4 | (8 << 8)) +#define MAP_LAVENDER_TOWN_MART (5 | (8 << 8)) + +// Map Group 9 +#define MAP_VERMILION_CITY_HOUSE1 (0 | (9 << 8)) +#define MAP_VERMILION_CITY_POKEMON_CENTER_1F (1 | (9 << 8)) +#define MAP_VERMILION_CITY_POKEMON_CENTER_2F (2 | (9 << 8)) +#define MAP_VERMILION_CITY_POKEMON_FAN_CLUB (3 | (9 << 8)) +#define MAP_VERMILION_CITY_HOUSE2 (4 | (9 << 8)) +#define MAP_VERMILION_CITY_MART (5 | (9 << 8)) +#define MAP_VERMILION_CITY_GYM (6 | (9 << 8)) +#define MAP_VERMILION_CITY_HOUSE3 (7 | (9 << 8)) + +// Map Group 10 +#define MAP_CELADON_CITY_DEPARTMENT_STORE_1F (0 | (10 << 8)) +#define MAP_CELADON_CITY_DEPARTMENT_STORE_2F (1 | (10 << 8)) +#define MAP_CELADON_CITY_DEPARTMENT_STORE_3F (2 | (10 << 8)) +#define MAP_CELADON_CITY_DEPARTMENT_STORE_4F (3 | (10 << 8)) +#define MAP_CELADON_CITY_DEPARTMENT_STORE_5F (4 | (10 << 8)) +#define MAP_CELADON_CITY_DEPARTMENT_STORE_ROOF (5 | (10 << 8)) +#define MAP_CELADON_CITY_DEPARTMENT_STORE_ELEVATOR (6 | (10 << 8)) +#define MAP_CELADON_CITY_CONDOMINIUMS_1F (7 | (10 << 8)) +#define MAP_CELADON_CITY_CONDOMINIUMS_2F (8 | (10 << 8)) +#define MAP_CELADON_CITY_CONDOMINIUMS_3F (9 | (10 << 8)) +#define MAP_CELADON_CITY_CONDOMINIUMS_ROOF (10 | (10 << 8)) +#define MAP_CELADON_CITY_CONDOMINIUMS_ROOF_ROOM (11 | (10 << 8)) +#define MAP_CELADON_CITY_POKEMON_CENTER_1F (12 | (10 << 8)) +#define MAP_CELADON_CITY_POKEMON_CENTER_2F (13 | (10 << 8)) +#define MAP_CELADON_CITY_GAME_CORNER (14 | (10 << 8)) +#define MAP_CELADON_CITY_GAME_CORNER_PRIZE_ROOM (15 | (10 << 8)) +#define MAP_CELADON_CITY_GYM (16 | (10 << 8)) +#define MAP_CELADON_CITY_RESTAURANT (17 | (10 << 8)) +#define MAP_CELADON_CITY_HOUSE1 (18 | (10 << 8)) +#define MAP_CELADON_CITY_HOTEL (19 | (10 << 8)) + +// Map Group 11 +#define MAP_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE (0 | (11 << 8)) +#define MAP_FUCHSIA_CITY_MART (1 | (11 << 8)) +#define MAP_FUCHSIA_CITY_ZOO_BUILDING (2 | (11 << 8)) +#define MAP_FUCHSIA_CITY_GYM (3 | (11 << 8)) +#define MAP_FUCHSIA_CITY_HOUSE1 (4 | (11 << 8)) +#define MAP_FUCHSIA_CITY_POKEMON_CENTER_1F (5 | (11 << 8)) +#define MAP_FUCHSIA_CITY_POKEMON_CENTER_2F (6 | (11 << 8)) +#define MAP_FUCHSIA_CITY_BUILDING1 (7 | (11 << 8)) +#define MAP_FUCHSIA_CITY_HOUSE2 (8 | (11 << 8)) +#define MAP_FUCHSIA_CITY_HOUSE3 (9 | (11 << 8)) + +// Map Group 12 +#define MAP_CINNABAR_ISLAND_GYM (0 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_POKEMON_LAB_ENTRANCE (1 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_POKEMON_LAB_LOUNGE (2 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_POKEMON_LAB_RESEARCH_ROOM (3 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_POKEMON_LAB_EXPERIMENT_ROOM (4 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_POKEMON_CENTER_1F (5 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_POKEMON_CENTER_2F (6 | (12 << 8)) +#define MAP_CINNABAR_ISLAND_MART (7 | (12 << 8)) + +// Map Group 13 +#define MAP_INDIGO_PLATEAU_POKEMON_CENTER_1F (0 | (13 << 8)) +#define MAP_INDIGO_PLATEAU_POKEMON_CENTER_2F (1 | (13 << 8)) + +// Map Group 14 +#define MAP_SAFFRON_CITY_HOUSE1_1F (0 | (14 << 8)) +#define MAP_SAFFRON_CITY_HOUSE1_2F (1 | (14 << 8)) +#define MAP_SAFFRON_CITY_DOJO (2 | (14 << 8)) +#define MAP_SAFFRON_CITY_GYM (3 | (14 << 8)) +#define MAP_SAFFRON_CITY_HOUSE2 (4 | (14 << 8)) +#define MAP_SAFFRON_CITY_MART (5 | (14 << 8)) +#define MAP_SAFFRON_CITY_POKEMON_CENTER_1F (6 | (14 << 8)) +#define MAP_SAFFRON_CITY_POKEMON_CENTER_2F (7 | (14 << 8)) +#define MAP_SAFFRON_CITY_HOUSE3 (8 | (14 << 8)) +#define MAP_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB (9 | (14 << 8)) + +// Map Group 15 +#define MAP_ROUTE2_VIRIDIAN_FOREST_SOUTH_ENTRANCE (0 | (15 << 8)) +#define MAP_ROUTE2_HOUSE (1 | (15 << 8)) +#define MAP_ROUTE2_EAST_BUILDING (2 | (15 << 8)) +#define MAP_ROUTE2_VIRIDIAN_FOREST_NORTH_ENTRANCE (3 | (15 << 8)) + +// Map Group 16 +#define MAP_ROUTE4_POKEMON_CENTER_1F (0 | (16 << 8)) +#define MAP_ROUTE4_POKEMON_CENTER_2F (1 | (16 << 8)) + +// Map Group 17 +#define MAP_ROUTE5_POKEMON_DAY_CARE (0 | (17 << 8)) +#define MAP_ROUTE5_SOUTH_ENTRANCE (1 | (17 << 8)) + +// Map Group 18 +#define MAP_ROUTE6_NORTH_ENTRANCE (0 | (18 << 8)) +#define MAP_UNKNOWN_MAP_18_01 (1 | (18 << 8)) + +// Map Group 19 +#define MAP_ROUTE7_EAST_ENTRANCE (0 | (19 << 8)) + +// Map Group 20 +#define MAP_ROUTE8_WEST_ENTRANCE (0 | (20 << 8)) + +// Map Group 21 +#define MAP_ROUTE10_POKEMON_CENTER_1F (0 | (21 << 8)) +#define MAP_ROUTE10_POKEMON_CENTER_2F (1 | (21 << 8)) + +// Map Group 22 +#define MAP_ROUTE11_EAST_ENTRANCE_1F (0 | (22 << 8)) +#define MAP_ROUTE11_EAST_ENTRANCE_2F (1 | (22 << 8)) + +// Map Group 23 +#define MAP_ROUTE12_NORTH_ENTRANCE_1F (0 | (23 << 8)) +#define MAP_ROUTE12_NORTH_ENTRANCE_2F (1 | (23 << 8)) +#define MAP_ROUTE12_FISHING_HOUSE (2 | (23 << 8)) + +// Map Group 24 +#define MAP_ROUTE15_WEST_ENTRANCE_1F (0 | (24 << 8)) +#define MAP_ROUTE15_WEST_ENTRANCE_2F (1 | (24 << 8)) + +// Map Group 25 +#define MAP_ROUTE16_HOUSE (0 | (25 << 8)) +#define MAP_ROUTE16_NORTH_ENTRANCE_1F (1 | (25 << 8)) +#define MAP_ROUTE16_NORTH_ENTRANCE_2F (2 | (25 << 8)) + +// Map Group 26 +#define MAP_ROUTE18_EAST_ENTRANCE_1F (0 | (26 << 8)) +#define MAP_ROUTE18_EAST_ENTRANCE_2F (1 | (26 << 8)) + +// Map Group 27 +#define MAP_UNUSED_HOUSE_27_00 (0 | (27 << 8)) + +// Map Group 28 +#define MAP_ROUTE22_NORTH_ENTRANCE (0 | (28 << 8)) + +// Map Group 29 +#define MAP_UNUSED_HOUSE_29_00 (0 | (29 << 8)) + +// Map Group 30 +#define MAP_ROUTE25_SEA_COTTAGE (0 | (30 << 8)) + +// Map Group 31 +#define MAP_SEVEN_ISLAND_HOUSE_ROOM1 (0 | (31 << 8)) +#define MAP_SEVEN_ISLAND_HOUSE_ROOM2 (1 | (31 << 8)) +#define MAP_SEVEN_ISLAND_MART (2 | (31 << 8)) +#define MAP_SEVEN_ISLAND_POKEMON_CENTER_1F (3 | (31 << 8)) +#define MAP_SEVEN_ISLAND_POKEMON_CENTER_2F (4 | (31 << 8)) +#define MAP_UNUSED_HOUSE_31_05 (5 | (31 << 8)) +#define MAP_SEVEN_ISLAND_HARBOR (6 | (31 << 8)) + +// Map Group 32 +#define MAP_ONE_ISLAND_POKEMON_CENTER_1F (0 | (32 << 8)) +#define MAP_ONE_ISLAND_POKEMON_CENTER_2F (1 | (32 << 8)) +#define MAP_ONE_ISLAND_HOUSE1 (2 | (32 << 8)) +#define MAP_ONE_ISLAND_HOUSE2 (3 | (32 << 8)) +#define MAP_ONE_ISLAND_HARBOR (4 | (32 << 8)) + +// Map Group 33 +#define MAP_TWO_ISLAND_JOYFUL_GAME_CORNER (0 | (33 << 8)) +#define MAP_TWO_ISLAND_HOUSE (1 | (33 << 8)) +#define MAP_TWO_ISLAND_POKEMON_CENTER_1F (2 | (33 << 8)) +#define MAP_TWO_ISLAND_POKEMON_CENTER_2F (3 | (33 << 8)) +#define MAP_TWO_ISLAND_HARBOR (4 | (33 << 8)) + +// Map Group 34 +#define MAP_THREE_ISLAND_HOUSE1 (0 | (34 << 8)) +#define MAP_THREE_ISLAND_POKEMON_CENTER_1F (1 | (34 << 8)) +#define MAP_THREE_ISLAND_POKEMON_CENTER_2F (2 | (34 << 8)) +#define MAP_THREE_ISLAND_MART (3 | (34 << 8)) +#define MAP_THREE_ISLAND_HOUSE2 (4 | (34 << 8)) +#define MAP_THREE_ISLAND_HOUSE3 (5 | (34 << 8)) +#define MAP_THREE_ISLAND_HOUSE4 (6 | (34 << 8)) +#define MAP_THREE_ISLAND_HOUSE5 (7 | (34 << 8)) + +// Map Group 35 +#define MAP_FOUR_ISLAND_POKEMON_DAY_CARE (0 | (35 << 8)) +#define MAP_FOUR_ISLAND_POKEMON_CENTER_1F (1 | (35 << 8)) +#define MAP_FOUR_ISLAND_POKEMON_CENTER_2F (2 | (35 << 8)) +#define MAP_FOUR_ISLAND_HOUSE1 (3 | (35 << 8)) +#define MAP_FOUR_ISLAND_LORELEIS_HOUSE (4 | (35 << 8)) +#define MAP_FOUR_ISLAND_HARBOR (5 | (35 << 8)) +#define MAP_FOUR_ISLAND_HOUSE2 (6 | (35 << 8)) +#define MAP_FOUR_ISLAND_MART (7 | (35 << 8)) + +// Map Group 36 +#define MAP_FIVE_ISLAND_POKEMON_CENTER_1F (0 | (36 << 8)) +#define MAP_FIVE_ISLAND_POKEMON_CENTER_2F (1 | (36 << 8)) +#define MAP_FIVE_ISLAND_HARBOR (2 | (36 << 8)) +#define MAP_FIVE_ISLAND_HOUSE1 (3 | (36 << 8)) +#define MAP_FIVE_ISLAND_HOUSE2 (4 | (36 << 8)) + +// Map Group 37 +#define MAP_SIX_ISLAND_POKEMON_CENTER_1F (0 | (37 << 8)) +#define MAP_SIX_ISLAND_POKEMON_CENTER_2F (1 | (37 << 8)) +#define MAP_SIX_ISLAND_HARBOR (2 | (37 << 8)) +#define MAP_SIX_ISLAND_HOUSE (3 | (37 << 8)) +#define MAP_SIX_ISLAND_MART (4 | (37 << 8)) + +// Map Group 38 +#define MAP_THREE_ISLAND_HARBOR (0 | (38 << 8)) + +// Map Group 39 +#define MAP_FIVE_ISLAND_RESORT_GORGEOUS_HOUSE (0 | (39 << 8)) + +// Map Group 40 +#define MAP_TWO_ISLAND_CAPE_BRINK_HOUSE (0 | (40 << 8)) + +// Map Group 41 +#define MAP_SIX_ISLAND_WATER_PATH_HOUSE1 (0 | (41 << 8)) +#define MAP_SIX_ISLAND_WATER_PATH_HOUSE2 (1 | (41 << 8)) + +// Map Group 42 +#define MAP_SEVEN_ISLAND_SEVAULT_CANYON_HOUSE (0 | (42 << 8)) + +#define MAP_GROUPS_COUNT 43 + +#endif // GUARD_CONSTANTS_MAP_GROUPS_H diff --git a/include/constants/maps.h b/include/constants/maps.h index 737edd7de..db8ee451c 100644 --- a/include/constants/maps.h +++ b/include/constants/maps.h @@ -1,595 +1,43 @@ #ifndef GUARD_CONSTANTS_MAPS_H #define GUARD_CONSTANTS_MAPS_H -// Map Group 0 -#define MAP_PETALBURG_CITY (0 | (0 << 8)) -#define MAP_SLATEPORT_CITY (1 | (0 << 8)) -#define MAP_MAUVILLE_CITY (2 | (0 << 8)) -#define MAP_RUSTBORO_CITY (3 | (0 << 8)) -#define MAP_FORTREE_CITY (4 | (0 << 8)) -#define MAP_LILYCOVE_CITY (5 | (0 << 8)) -#define MAP_MOSSDEEP_CITY (6 | (0 << 8)) -#define MAP_SOOTOPOLIS_CITY (7 | (0 << 8)) -#define MAP_EVER_GRANDE_CITY (8 | (0 << 8)) -#define MAP_LITTLEROOT_TOWN (9 | (0 << 8)) -#define MAP_OLDALE_TOWN (10 | (0 << 8)) -#define MAP_DEWFORD_TOWN (11 | (0 << 8)) -#define MAP_LAVARIDGE_TOWN (12 | (0 << 8)) -#define MAP_FALLARBOR_TOWN (13 | (0 << 8)) -#define MAP_VERDANTURF_TOWN (14 | (0 << 8)) -#define MAP_PACIFIDLOG_TOWN (15 | (0 << 8)) -#define MAP_ROUTE101 (16 | (0 << 8)) -#define MAP_ROUTE102 (17 | (0 << 8)) -#define MAP_ROUTE103 (18 | (0 << 8)) -#define MAP_ROUTE104 (19 | (0 << 8)) -#define MAP_ROUTE105 (20 | (0 << 8)) -#define MAP_ROUTE106 (21 | (0 << 8)) -#define MAP_ROUTE107 (22 | (0 << 8)) -#define MAP_ROUTE108 (23 | (0 << 8)) -#define MAP_ROUTE109 (24 | (0 << 8)) -#define MAP_ROUTE110 (25 | (0 << 8)) -#define MAP_ROUTE111 (26 | (0 << 8)) -#define MAP_ROUTE112 (27 | (0 << 8)) -#define MAP_ROUTE113 (28 | (0 << 8)) -#define MAP_ROUTE114 (29 | (0 << 8)) -#define MAP_ROUTE115 (30 | (0 << 8)) -#define MAP_ROUTE116 (31 | (0 << 8)) -#define MAP_ROUTE117 (32 | (0 << 8)) -#define MAP_ROUTE118 (33 | (0 << 8)) -#define MAP_ROUTE119 (34 | (0 << 8)) -#define MAP_ROUTE120 (35 | (0 << 8)) -#define MAP_ROUTE121 (36 | (0 << 8)) -#define MAP_ROUTE122 (37 | (0 << 8)) -#define MAP_ROUTE123 (38 | (0 << 8)) -#define MAP_ROUTE124 (39 | (0 << 8)) -#define MAP_ROUTE125 (40 | (0 << 8)) -#define MAP_ROUTE126 (41 | (0 << 8)) -#define MAP_ROUTE127 (42 | (0 << 8)) -#define MAP_ROUTE128 (43 | (0 << 8)) -#define MAP_ROUTE129 (44 | (0 << 8)) -#define MAP_ROUTE130 (45 | (0 << 8)) -#define MAP_ROUTE131 (46 | (0 << 8)) -#define MAP_ROUTE132 (47 | (0 << 8)) -#define MAP_ROUTE133 (48 | (0 << 8)) -#define MAP_ROUTE134 (49 | (0 << 8)) -#define MAP_UNDERWATER1 (50 | (0 << 8)) -#define MAP_UNDERWATER2 (51 | (0 << 8)) -#define MAP_UNDERWATER3 (52 | (0 << 8)) -#define MAP_UNDERWATER4 (53 | (0 << 8)) - -// Map Group 1 -#define MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F (0 | (1 << 8)) -#define MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F (1 | (1 << 8)) -#define MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F (2 | (1 << 8)) -#define MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F (3 | (1 << 8)) -#define MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB (4 | (1 << 8)) - -// Map Group 2 -#define MAP_OLDALE_TOWN_HOUSE1 (0 | (2 << 8)) -#define MAP_OLDALE_TOWN_HOUSE2 (1 | (2 << 8)) -#define MAP_OLDALE_TOWN_POKEMON_CENTER_1F (2 | (2 << 8)) -#define MAP_OLDALE_TOWN_POKEMON_CENTER_2F (3 | (2 << 8)) -#define MAP_OLDALE_TOWN_MART (4 | (2 << 8)) - -// Map Group 3 -#define MAP_DEWFORD_TOWN_HOUSE1 (0 | (3 << 8)) -#define MAP_DEWFORD_TOWN_POKEMON_CENTER_1F (1 | (3 << 8)) -#define MAP_DEWFORD_TOWN_POKEMON_CENTER_2F (2 | (3 << 8)) -#define MAP_DEWFORD_TOWN_GYM (3 | (3 << 8)) -#define MAP_DEWFORD_TOWN_HALL (4 | (3 << 8)) -#define MAP_DEWFORD_TOWN_HOUSE2 (5 | (3 << 8)) - -// Map Group 4 -#define MAP_LAVARIDGE_TOWN_HERB_SHOP (0 | (4 << 8)) -#define MAP_LAVARIDGE_TOWN_GYM_1F (1 | (4 << 8)) -#define MAP_LAVARIDGE_TOWN_GYM_B1F (2 | (4 << 8)) -#define MAP_LAVARIDGE_TOWN_HOUSE (3 | (4 << 8)) -#define MAP_LAVARIDGE_TOWN_MART (4 | (4 << 8)) -#define MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F (5 | (4 << 8)) -#define MAP_LAVARIDGE_TOWN_POKEMON_CENTER_2F (6 | (4 << 8)) - -// Map Group 5 -#define MAP_FALLARBOR_TOWN_MART (0 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY (1 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR (2 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM (3 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F (4 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_POKEMON_CENTER_2F (5 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_HOUSE1 (6 | (5 << 8)) -#define MAP_FALLARBOR_TOWN_HOUSE2 (7 | (5 << 8)) - -// Map Group 6 -#define MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY (0 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR (1 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM (2 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_MART (3 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F (4 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_POKEMON_CENTER_2F (5 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_WANDAS_HOUSE (6 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_FRIENDSHIP_RATERS_HOUSE (7 | (6 << 8)) -#define MAP_VERDANTURF_TOWN_HOUSE (8 | (6 << 8)) - -// Map Group 7 -#define MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F (0 | (7 << 8)) -#define MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_2F (1 | (7 << 8)) -#define MAP_PACIFIDLOG_TOWN_HOUSE1 (2 | (7 << 8)) -#define MAP_PACIFIDLOG_TOWN_HOUSE2 (3 | (7 << 8)) -#define MAP_PACIFIDLOG_TOWN_HOUSE3 (4 | (7 << 8)) -#define MAP_PACIFIDLOG_TOWN_HOUSE4 (5 | (7 << 8)) -#define MAP_PACIFIDLOG_TOWN_HOUSE5 (6 | (7 << 8)) - -// Map Group 8 -#define MAP_PETALBURG_CITY_WALLYS_HOUSE (0 | (8 << 8)) -#define MAP_PETALBURG_CITY_GYM (1 | (8 << 8)) -#define MAP_PETALBURG_CITY_HOUSE1 (2 | (8 << 8)) -#define MAP_PETALBURG_CITY_HOUSE2 (3 | (8 << 8)) -#define MAP_PETALBURG_CITY_POKEMON_CENTER_1F (4 | (8 << 8)) -#define MAP_PETALBURG_CITY_POKEMON_CENTER_2F (5 | (8 << 8)) -#define MAP_PETALBURG_CITY_MART (6 | (8 << 8)) - -// Map Group 9 -#define MAP_SLATEPORT_CITY_STERNS_SHIPYARD_1F (0 | (9 << 8)) -#define MAP_SLATEPORT_CITY_STERNS_SHIPYARD_2F (1 | (9 << 8)) -#define MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY (2 | (9 << 8)) -#define MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR (3 | (9 << 8)) -#define MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM (4 | (9 << 8)) -#define MAP_SLATEPORT_CITY_HOUSE1 (5 | (9 << 8)) -#define MAP_SLATEPORT_CITY_POKEMON_FAN_CLUB (6 | (9 << 8)) -#define MAP_SLATEPORT_CITY_OCEANIC_MUSEUM_1F (7 | (9 << 8)) -#define MAP_SLATEPORT_CITY_OCEANIC_MUSEUM_2F (8 | (9 << 8)) -#define MAP_SLATEPORT_CITY_HARBOR (9 | (9 << 8)) -#define MAP_SLATEPORT_CITY_HOUSE2 (10 | (9 << 8)) -#define MAP_SLATEPORT_CITY_POKEMON_CENTER_1F (11 | (9 << 8)) -#define MAP_SLATEPORT_CITY_POKEMON_CENTER_2F (12 | (9 << 8)) -#define MAP_SLATEPORT_CITY_MART (13 | (9 << 8)) - -// Map Group 10 -#define MAP_MAUVILLE_CITY_GYM (0 | (10 << 8)) -#define MAP_MAUVILLE_CITY_BIKE_SHOP (1 | (10 << 8)) -#define MAP_MAUVILLE_CITY_HOUSE1 (2 | (10 << 8)) -#define MAP_MAUVILLE_CITY_GAME_CORNER (3 | (10 << 8)) -#define MAP_MAUVILLE_CITY_HOUSE2 (4 | (10 << 8)) -#define MAP_MAUVILLE_CITY_POKEMON_CENTER_1F (5 | (10 << 8)) -#define MAP_MAUVILLE_CITY_POKEMON_CENTER_2F (6 | (10 << 8)) -#define MAP_MAUVILLE_CITY_MART (7 | (10 << 8)) - -// Map Group 11 -#define MAP_RUSTBORO_CITY_DEVON_CORP_1F (0 | (11 << 8)) -#define MAP_RUSTBORO_CITY_DEVON_CORP_2F (1 | (11 << 8)) -#define MAP_RUSTBORO_CITY_DEVON_CORP_3F (2 | (11 << 8)) -#define MAP_RUSTBORO_CITY_GYM (3 | (11 << 8)) -#define MAP_RUSTBORO_CITY_POKEMON_SCHOOL (4 | (11 << 8)) -#define MAP_RUSTBORO_CITY_POKEMON_CENTER_1F (5 | (11 << 8)) -#define MAP_RUSTBORO_CITY_POKEMON_CENTER_2F (6 | (11 << 8)) -#define MAP_RUSTBORO_CITY_MART (7 | (11 << 8)) -#define MAP_RUSTBORO_CITY_FLAT1_1F (8 | (11 << 8)) -#define MAP_RUSTBORO_CITY_FLAT1_2F (9 | (11 << 8)) -#define MAP_RUSTBORO_CITY_HOUSE1 (10 | (11 << 8)) -#define MAP_RUSTBORO_CITY_CUTTERS_HOUSE (11 | (11 << 8)) -#define MAP_RUSTBORO_CITY_HOUSE2 (12 | (11 << 8)) -#define MAP_RUSTBORO_CITY_FLAT2_1F (13 | (11 << 8)) -#define MAP_RUSTBORO_CITY_FLAT2_2F (14 | (11 << 8)) -#define MAP_RUSTBORO_CITY_FLAT2_3F (15 | (11 << 8)) -#define MAP_RUSTBORO_CITY_HOUSE3 (16 | (11 << 8)) - -// Map Group 12 -#define MAP_FORTREE_CITY_HOUSE1 (0 | (12 << 8)) -#define MAP_FORTREE_CITY_GYM (1 | (12 << 8)) -#define MAP_FORTREE_CITY_POKEMON_CENTER_1F (2 | (12 << 8)) -#define MAP_FORTREE_CITY_POKEMON_CENTER_2F (3 | (12 << 8)) -#define MAP_FORTREE_CITY_MART (4 | (12 << 8)) -#define MAP_FORTREE_CITY_HOUSE2 (5 | (12 << 8)) -#define MAP_FORTREE_CITY_HOUSE3 (6 | (12 << 8)) -#define MAP_FORTREE_CITY_HOUSE4 (7 | (12 << 8)) -#define MAP_FORTREE_CITY_HOUSE5 (8 | (12 << 8)) -#define MAP_FORTREE_CITY_DECORATION_SHOP (9 | (12 << 8)) - -// Map Group 13 -#define MAP_LILYCOVE_CITY_COVE_LILY_MOTEL_1F (0 | (13 << 8)) -#define MAP_LILYCOVE_CITY_COVE_LILY_MOTEL_2F (1 | (13 << 8)) -#define MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_1F (2 | (13 << 8)) -#define MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F (3 | (13 << 8)) -#define MAP_LILYCOVE_CITY_CONTEST_LOBBY (4 | (13 << 8)) -#define MAP_LILYCOVE_CITY_CONTEST_HALL (5 | (13 << 8)) -#define MAP_LILYCOVE_CITY_POKEMON_CENTER_1F (6 | (13 << 8)) -#define MAP_LILYCOVE_CITY_POKEMON_CENTER_2F (7 | (13 << 8)) -#define MAP_LILYCOVE_CITY_UNUSED_MART (8 | (13 << 8)) -#define MAP_LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB (9 | (13 << 8)) -#define MAP_LILYCOVE_CITY_HARBOR (10 | (13 << 8)) -#define MAP_LILYCOVE_CITY_MOVE_DELETERS_HOUSE (11 | (13 << 8)) -#define MAP_LILYCOVE_CITY_HOUSE1 (12 | (13 << 8)) -#define MAP_LILYCOVE_CITY_HOUSE2 (13 | (13 << 8)) -#define MAP_LILYCOVE_CITY_HOUSE3 (14 | (13 << 8)) -#define MAP_LILYCOVE_CITY_HOUSE4 (15 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F (16 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F (17 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F (18 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F (19 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F (20 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP (21 | (13 << 8)) -#define MAP_LILYCOVE_CITY_DEPARTMENT_STORE_ELEVATOR (22 | (13 << 8)) - -// Map Group 14 -#define MAP_MOSSDEEP_CITY_GYM (0 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_HOUSE1 (1 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_HOUSE2 (2 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F (3 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_POKEMON_CENTER_2F (4 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_MART (5 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_HOUSE3 (6 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_STEVENS_HOUSE (7 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_HOUSE4 (8 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_SPACE_CENTER_1F (9 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_SPACE_CENTER_2F (10 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_GAME_CORNER_1F (11 | (14 << 8)) -#define MAP_MOSSDEEP_CITY_GAME_CORNER_B1F (12 | (14 << 8)) - -// Map Group 15 -#define MAP_SOOTOPOLIS_CITY_GYM_1F (0 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_GYM_B1F (1 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F (2 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_2F (3 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_MART (4 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE1 (5 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE2 (6 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE3 (7 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE4 (8 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE5 (9 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE6 (10 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE7 (11 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE8 (12 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE9_1F (13 | (15 << 8)) -#define MAP_SOOTOPOLIS_CITY_HOUSE9_B1F (14 | (15 << 8)) - -// Map Group 16 -#define MAP_EVER_GRANDE_CITY_SIDNEYS_ROOM (0 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_PHOEBES_ROOM (1 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_GLACIAS_ROOM (2 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_DRAKES_ROOM (3 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_CHAMPIONS_ROOM (4 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_CORRIDOR1 (5 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_CORRIDOR2 (6 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_CORRIDOR3 (7 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_CORRIDOR4 (8 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_CORRIDOR5 (9 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F (10 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_HALL_OF_FAME (11 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F (12 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_POKEMON_CENTER_2F (13 | (16 << 8)) -#define MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_2F (14 | (16 << 8)) - -// Map Group 17 -#define MAP_ROUTE104_MR_BRINEYS_HOUSE (0 | (17 << 8)) -#define MAP_ROUTE104_PRETTY_PETAL_FLOWER_SHOP (1 | (17 << 8)) - -// Map Group 18 -#define MAP_ROUTE111_WINSTRATE_FAMILYS_HOUSE (0 | (18 << 8)) -#define MAP_ROUTE111_OLD_LADYS_REST_STOP (1 | (18 << 8)) - -// Map Group 19 -#define MAP_ROUTE112_CABLE_CAR_STATION (0 | (19 << 8)) -#define MAP_MT_CHIMNEY_CABLE_CAR_STATION (1 | (19 << 8)) - -// Map Group 20 -#define MAP_ROUTE114_FOSSIL_MANIACS_HOUSE (0 | (20 << 8)) -#define MAP_ROUTE114_FOSSIL_MANIACS_TUNNEL (1 | (20 << 8)) -#define MAP_ROUTE114_LANETTES_HOUSE (2 | (20 << 8)) - -// Map Group 21 -#define MAP_ROUTE116_TUNNELERS_REST_HOUSE (0 | (21 << 8)) - -// Map Group 22 -#define MAP_ROUTE117_POKEMON_DAY_CARE (0 | (22 << 8)) - -// Map Group 23 -#define MAP_ROUTE121_SAFARI_ZONE_ENTRANCE (0 | (23 << 8)) - -// Map Group 24 -#define MAP_METEOR_FALLS_1F_1R (0 | (24 << 8)) -#define MAP_METEOR_FALLS_1F_2R (1 | (24 << 8)) -#define MAP_METEOR_FALLS_B1F_1R (2 | (24 << 8)) -#define MAP_METEOR_FALLS_B1F_2R (3 | (24 << 8)) -#define MAP_RUSTURF_TUNNEL (4 | (24 << 8)) -#define MAP_UNDERWATER_SOOTOPOLIS_CITY (5 | (24 << 8)) -#define MAP_DESERT_RUINS (6 | (24 << 8)) -#define MAP_GRANITE_CAVE_1F (7 | (24 << 8)) -#define MAP_GRANITE_CAVE_B1F (8 | (24 << 8)) -#define MAP_GRANITE_CAVE_B2F (9 | (24 << 8)) -#define MAP_GRANITE_CAVE_STEVENS_ROOM (10 | (24 << 8)) -#define MAP_PETALBURG_WOODS (11 | (24 << 8)) -#define MAP_MT_CHIMNEY (12 | (24 << 8)) -#define MAP_JAGGED_PASS (13 | (24 << 8)) -#define MAP_FIERY_PATH (14 | (24 << 8)) -#define MAP_MT_PYRE_1F (15 | (24 << 8)) -#define MAP_MT_PYRE_2F (16 | (24 << 8)) -#define MAP_MT_PYRE_3F (17 | (24 << 8)) -#define MAP_MT_PYRE_4F (18 | (24 << 8)) -#define MAP_MT_PYRE_5F (19 | (24 << 8)) -#define MAP_MT_PYRE_6F (20 | (24 << 8)) -#define MAP_MT_PYRE_EXTERIOR (21 | (24 << 8)) -#define MAP_MT_PYRE_SUMMIT (22 | (24 << 8)) -#define MAP_AQUA_HIDEOUT_1F (23 | (24 << 8)) -#define MAP_AQUA_HIDEOUT_B1F (24 | (24 << 8)) -#define MAP_AQUA_HIDEOUT_B2F (25 | (24 << 8)) -#define MAP_UNDERWATER_SEAFLOOR_CAVERN (26 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ENTRANCE (27 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM1 (28 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM2 (29 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM3 (30 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM4 (31 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM5 (32 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM6 (33 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM7 (34 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM8 (35 | (24 << 8)) -#define MAP_SEAFLOOR_CAVERN_ROOM9 (36 | (24 << 8)) -#define MAP_CAVE_OF_ORIGIN_ENTRANCE (37 | (24 << 8)) -#define MAP_CAVE_OF_ORIGIN_1F (38 | (24 << 8)) -#define MAP_CAVE_OF_ORIGIN_UNUSED_RS_B1F (39 | (24 << 8)) // -#define MAP_CAVE_OF_ORIGIN_UNUSED_RS_B2F (40 | (24 << 8)) // Ruby/Sapphire leftovers -#define MAP_CAVE_OF_ORIGIN_UNUSED_RS_B3F (41 | (24 << 8)) // -#define MAP_CAVE_OF_ORIGIN_B1F (42 | (24 << 8)) -#define MAP_VICTORY_ROAD_1F (43 | (24 << 8)) -#define MAP_VICTORY_ROAD_B1F (44 | (24 << 8)) -#define MAP_VICTORY_ROAD_B2F (45 | (24 << 8)) -#define MAP_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM (46 | (24 << 8)) -#define MAP_SHOAL_CAVE_LOW_TIDE_INNER_ROOM (47 | (24 << 8)) -#define MAP_SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM (48 | (24 << 8)) -#define MAP_SHOAL_CAVE_LOW_TIDE_LOWER_ROOM (49 | (24 << 8)) -#define MAP_SHOAL_CAVE_HIGH_TIDE_ENTRANCE_ROOM (50 | (24 << 8)) -#define MAP_SHOAL_CAVE_HIGH_TIDE_INNER_ROOM (51 | (24 << 8)) -#define MAP_NEW_MAUVILLE_ENTRANCE (52 | (24 << 8)) -#define MAP_NEW_MAUVILLE_INSIDE (53 | (24 << 8)) -#define MAP_ABANDONED_SHIP_DECK (54 | (24 << 8)) -#define MAP_ABANDONED_SHIP_CORRIDORS_1F (55 | (24 << 8)) -#define MAP_ABANDONED_SHIP_ROOMS_1F (56 | (24 << 8)) -#define MAP_ABANDONED_SHIP_CORRIDORS_B1F (57 | (24 << 8)) -#define MAP_ABANDONED_SHIP_ROOMS_B1F (58 | (24 << 8)) -#define MAP_ABANDONED_SHIP_ROOMS2_B1F (59 | (24 << 8)) -#define MAP_ABANDONED_SHIP_UNDERWATER1 (60 | (24 << 8)) -#define MAP_ABANDONED_SHIP_ROOM_B1F (61 | (24 << 8)) -#define MAP_ABANDONED_SHIP_ROOMS2_1F (62 | (24 << 8)) -#define MAP_ABANDONED_SHIP_CAPTAINS_OFFICE (63 | (24 << 8)) -#define MAP_ABANDONED_SHIP_UNDERWATER2 (64 | (24 << 8)) -#define MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS (65 | (24 << 8)) -#define MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS (66 | (24 << 8)) -#define MAP_ISLAND_CAVE (67 | (24 << 8)) -#define MAP_ANCIENT_TOMB (68 | (24 << 8)) -#define MAP_UNDERWATER_ROUTE134 (69 | (24 << 8)) -#define MAP_UNDERWATER_SEALED_CHAMBER (70 | (24 << 8)) -#define MAP_SEALED_CHAMBER_OUTER_ROOM (71 | (24 << 8)) -#define MAP_SEALED_CHAMBER_INNER_ROOM (72 | (24 << 8)) -#define MAP_SCORCHED_SLAB (73 | (24 << 8)) -#define MAP_UNUSED_RUBY_MAGMA_HIDEOUT_1F (74 | (24 << 8)) // -#define MAP_UNUSED_RUBY_MAGMA_HIDEOUT_B1F (75 | (24 << 8)) // Ruby/Sapphire leftovers -#define MAP_UNUSED_RUBY_MAGMA_HIDEOUT_B2F (76 | (24 << 8)) // -#define MAP_SKY_PILLAR_ENTRANCE (77 | (24 << 8)) -#define MAP_SKY_PILLAR_OUTSIDE (78 | (24 << 8)) -#define MAP_SKY_PILLAR_1F (79 | (24 << 8)) -#define MAP_SKY_PILLAR_2F (80 | (24 << 8)) -#define MAP_SKY_PILLAR_3F (81 | (24 << 8)) -#define MAP_SKY_PILLAR_4F (82 | (24 << 8)) -#define MAP_SHOAL_CAVE_LOW_TIDE_ICE_ROOM (83 | (24 << 8)) -#define MAP_SKY_PILLAR_5F (84 | (24 << 8)) -#define MAP_SKY_PILLAR_TOP (85 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_1F (86 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_2F_1R (87 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_2F_2R (88 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_3F_1R (89 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_3F_2R (90 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_4F (91 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_3F_3R (92 | (24 << 8)) -#define MAP_MAGMA_HIDEOUT_2F_3R (93 | (24 << 8)) -#define MAP_MIRAGE_TOWER_1F (94 | (24 << 8)) -#define MAP_MIRAGE_TOWER_2F (95 | (24 << 8)) -#define MAP_MIRAGE_TOWER_3F (96 | (24 << 8)) -#define MAP_MIRAGE_TOWER_4F (97 | (24 << 8)) -#define MAP_DESERT_UNDERPASS (98 | (24 << 8)) -#define MAP_ARTISAN_CAVE_B1F (99 | (24 << 8)) -#define MAP_ARTISAN_CAVE_1F (100 | (24 << 8)) -#define MAP_UNDERWATER_MARINE_CAVE (101 | (24 << 8)) -#define MAP_MARINE_CAVE_ENTRANCE (102 | (24 << 8)) -#define MAP_MARINE_CAVE_END (103 | (24 << 8)) -#define MAP_TERRA_CAVE_ENTRANCE (104 | (24 << 8)) -#define MAP_TERRA_CAVE_END (105 | (24 << 8)) -#define MAP_ALTERING_CAVE (106 | (24 << 8)) -#define MAP_METEOR_FALLS_STEVENS_CAVE (107 | (24 << 8)) - -// Map Group 25 -#define MAP_SECRET_BASE_RED_CAVE1 (0 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE1 (1 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE1 (2 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE1 (3 | (25 << 8)) -#define MAP_SECRET_BASE_TREE1 (4 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB1 (5 | (25 << 8)) -#define MAP_SECRET_BASE_RED_CAVE2 (6 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE2 (7 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE2 (8 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE2 (9 | (25 << 8)) -#define MAP_SECRET_BASE_TREE2 (10 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB2 (11 | (25 << 8)) -#define MAP_SECRET_BASE_RED_CAVE3 (12 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE3 (13 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE3 (14 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE3 (15 | (25 << 8)) -#define MAP_SECRET_BASE_TREE3 (16 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB3 (17 | (25 << 8)) -#define MAP_SECRET_BASE_RED_CAVE4 (18 | (25 << 8)) -#define MAP_SECRET_BASE_BROWN_CAVE4 (19 | (25 << 8)) -#define MAP_SECRET_BASE_BLUE_CAVE4 (20 | (25 << 8)) -#define MAP_SECRET_BASE_YELLOW_CAVE4 (21 | (25 << 8)) -#define MAP_SECRET_BASE_TREE4 (22 | (25 << 8)) -#define MAP_SECRET_BASE_SHRUB4 (23 | (25 << 8)) -#define MAP_SINGLE_BATTLE_COLOSSEUM (24 | (25 << 8)) -#define MAP_TRADE_CENTER (25 | (25 << 8)) -#define MAP_RECORD_CORNER (26 | (25 << 8)) -#define MAP_DOUBLE_BATTLE_COLOSSEUM (27 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM1 (28 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_29 (29 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_30 (30 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_31 (31 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_32 (32 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_33 (33 | (25 << 8)) -#define MAP_UNKNOWN_MAP_25_34 (34 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM2 (35 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM3 (36 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM4 (37 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM5 (38 | (25 << 8)) -#define MAP_LINK_CONTEST_ROOM6 (39 | (25 << 8)) -#define MAP_INSIDE_OF_TRUCK (40 | (25 << 8)) -#define MAP_SS_TIDAL_CORRIDOR (41 | (25 << 8)) -#define MAP_SS_TIDAL_LOWER_DECK (42 | (25 << 8)) -#define MAP_SS_TIDAL_ROOMS (43 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_01 (44 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_02 (45 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_03 (46 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_04 (47 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_05 (48 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_06 (49 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_07 (50 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_08 (51 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_09 (52 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_10 (53 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_11 (54 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_12 (55 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_13 (56 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_14 (57 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_15 (58 | (25 << 8)) -#define MAP_BATTLE_PYRAMID_SQUARE_16 (59 | (25 << 8)) -#define MAP_UNION_ROOM (60 | (25 << 8)) - -// Map Group 26 -#define MAP_SAFARI_ZONE_NORTHWEST (0 | (26 << 8)) -#define MAP_SAFARI_ZONE_NORTHEAST (1 | (26 << 8)) -#define MAP_SAFARI_ZONE_SOUTHWEST (2 | (26 << 8)) -#define MAP_SAFARI_ZONE_SOUTHEAST (3 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_OUTSIDE_WEST (4 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY (5 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR (6 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR (7 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM (8 | (26 << 8)) -#define MAP_SOUTHERN_ISLAND_EXTERIOR (9 | (26 << 8)) -#define MAP_SOUTHERN_ISLAND_INTERIOR (10 | (26 << 8)) -#define MAP_SAFARI_ZONE_REST_HOUSE (11 | (26 << 8)) -#define MAP_SAFARI_ZONE_EM_1 (12 | (26 << 8)) -#define MAP_SAFARI_ZONE_EM_2 (13 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_OUTSIDE_EAST (14 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM (15 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR_2 (16 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM_2 (17 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY (18 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR (19 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM (20 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM (21 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY (22 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR (23 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM (24 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY (25 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_EMPTY_SQUARE (26 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP (27 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY (28 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR (29 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM (30 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY (31 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM (32 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM (33 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY (34 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR (35 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM (36 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM_1 (37 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM_2 (38 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_PIKE_RANDOM_ROOM_3 (39 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_RANKING_HALL (40 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_1 (41 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_BATTLE_POINT_EXCHANGE_SERVICE_CORNER (42 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_2 (43 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_3 (44 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_4 (45 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_SCOTTS_HOUSE (46 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_5 (47 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_6 (48 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_7 (49 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_RECEPTION_GATE (50 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_8 (51 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_LOUNGE_9 (52 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F (53 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_POKEMON_CENTER_2F (54 | (26 << 8)) -#define MAP_BATTLE_FRONTIER_MART (55 | (26 << 8)) -#define MAP_FARAWAY_ISLAND_ENTRANCE (56 | (26 << 8)) -#define MAP_FARAWAY_ISLAND_INTERIOR (57 | (26 << 8)) -#define MAP_BIRTH_ISLAND_EXTERIOR (58 | (26 << 8)) -#define MAP_BIRTH_ISLAND_HARBOR (59 | (26 << 8)) -#define MAP_TRAINER_HILL_ENTRANCE (60 | (26 << 8)) -#define MAP_TRAINER_HILL_1F (61 | (26 << 8)) -#define MAP_TRAINER_HILL_2F (62 | (26 << 8)) -#define MAP_TRAINER_HILL_3F (63 | (26 << 8)) -#define MAP_TRAINER_HILL_4F (64 | (26 << 8)) -#define MAP_TRAINER_HILL_ROOF (65 | (26 << 8)) -#define MAP_NAVEL_ROCK_EXTERIOR (66 | (26 << 8)) -#define MAP_NAVEL_ROCK_HARBOR (67 | (26 << 8)) -#define MAP_NAVEL_ROCK_ENTRANCE (68 | (26 << 8)) -#define MAP_NAVEL_ROCK_B1F (69 | (26 << 8)) -#define MAP_NAVEL_ROCK_FORK (70 | (26 << 8)) -#define MAP_NAVEL_ROCK_UP_1 (71 | (26 << 8)) -#define MAP_NAVEL_ROCK_UP_2 (72 | (26 << 8)) -#define MAP_NAVEL_ROCK_UP_3 (73 | (26 << 8)) -#define MAP_NAVEL_ROCK_UP_4 (74 | (26 << 8)) -#define MAP_NAVEL_ROCK_TOP (75 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_01 (76 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_02 (77 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_03 (78 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_04 (79 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_05 (80 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_06 (81 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_07 (82 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_08 (83 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_09 (84 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_10 (85 | (26 << 8)) -#define MAP_NAVEL_ROCK_DOWN_11 (86 | (26 << 8)) -#define MAP_NAVEL_ROCK_BOTTOM (87 | (26 << 8)) -#define MAP_TRAINER_HILL_ELEVATOR (88 | (26 << 8)) - -// Map Group 27 -#define MAP_ROUTE104_PROTOTYPE (0 | (27 << 8)) -#define MAP_ROUTE104_PROTOTYPE_PRETTY_PETAL_FLOWER_SHOP (1 | (27 << 8)) - -// Map Group 28 -#define MAP_ROUTE109_SEASHORE_HOUSE (0 | (28 << 8)) - -// Map Group 29 -#define MAP_ROUTE110_TRICK_HOUSE_ENTRANCE (0 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_END (1 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_CORRIDOR (2 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE1 (3 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE2 (4 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE3 (5 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE4 (6 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE5 (7 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE6 (8 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE7 (9 | (29 << 8)) -#define MAP_ROUTE110_TRICK_HOUSE_PUZZLE8 (10 | (29 << 8)) -#define MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE (11 | (29 << 8)) -#define MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE (12 | (29 << 8)) - -// Map Group 30 -#define MAP_ROUTE113_GLASS_WORKSHOP (0 | (30 << 8)) - -// Map Group 31 -#define MAP_ROUTE123_BERRY_MASTERS_HOUSE (0 | (31 << 8)) - -// Map Group 32 -#define MAP_ROUTE119_WEATHER_INSTITUTE_1F (0 | (32 << 8)) -#define MAP_ROUTE119_WEATHER_INSTITUTE_2F (1 | (32 << 8)) -#define MAP_ROUTE119_HOUSE (2 | (32 << 8)) - -// Map Group 33 -#define MAP_ROUTE124_DIVING_TREASURE_HUNTERS_HOUSE (0 | (33 << 8)) - +#include "constants/map_groups.h" #define MAP_NONE (0x7F | (0x7F << 8)) #define MAP_UNDEFINED (0xFF | (0xFF << 8)) - #define MAP_GROUP(map) (MAP_##map >> 8) #define MAP_NUM(map) (MAP_##map & 0xFF) +#define MAP(map) MAP_GROUP(map), MAP_NUM(map) + +// temporary map constants +#define BATTLE_SCENE_0 0 +#define BATTLE_SCENE_1 1 +#define BATTLE_SCENE_2 2 +#define BATTLE_SCENE_3 3 +#define BATTLE_SCENE_4 4 +#define BATTLE_SCENE_5 5 +#define BATTLE_SCENE_6 6 +#define BATTLE_SCENE_7 7 +#define BATTLE_SCENE_8 8 +#define BATTLE_SCENE_9 9 +#define BATTLE_SCENE_10 10 +#define BATTLE_SCENE_11 11 +#define BATTLE_SCENE_12 12 +#define BATTLE_SCENE_13 13 +#define BATTLE_SCENE_14 14 +#define BATTLE_SCENE_15 15 + +#define MAP_TYPE_0 0 +#define MAP_TYPE_1 1 +#define MAP_TYPE_2 2 +#define MAP_TYPE_3 3 +#define MAP_TYPE_4 4 +#define MAP_TYPE_5 5 +#define MAP_TYPE_6 6 +#define MAP_TYPE_7 7 +#define MAP_TYPE_8 8 +#define MAP_TYPE_9 9 + #endif // GUARD_CONSTANTS_MAPS_H diff --git a/include/constants/region_map.h b/include/constants/region_map.h index 87203f538..527acf2c9 100644 --- a/include/constants/region_map.h +++ b/include/constants/region_map.h @@ -1,115 +1,203 @@ #ifndef GUARD_CONSTANTS_REGION_MAP_H #define GUARD_CONSTANTS_REGION_MAP_H -#define MAPSEC_PALLET_TOWN 0x0 -#define MAPSEC_VIRIDIAN_CITY 0x1 -#define MAPSEC_PEWTER_CITY 0x2 -#define MAPSEC_CERULEAN_CITY 0x3 -#define MAPSEC_LAVENDER_TOWN 0x4 -#define MAPSEC_VERMILION_CITY 0x5 -#define MAPSEC_CELADON_CITY 0x6 -#define MAPSEC_FUCHSIA_CITY 0x7 -#define MAPSEC_CINNABAR_ISLAND 0x8 -#define MAPSEC_INDIGO_PLATEAU 0x9 -#define MAPSEC_SAFFRON_CITY 0xA -#define MAPSEC_ROUTE_4 0xB -#define MAPSEC_ROUTE_10 0xC -#define MAPSEC_ROUTE_1 0xD -#define MAPSEC_ROUTE_2 0xE -#define MAPSEC_ROUTE_3 0xF -#define MAPSEC_ROUTE_4_2 0x10 -#define MAPSEC_ROUTE_5 0x11 -#define MAPSEC_ROUTE_6 0x12 -#define MAPSEC_ROUTE_7 0x13 -#define MAPSEC_ROUTE_8 0x14 -#define MAPSEC_ROUTE_9 0x15 -#define MAPSEC_ROUTE_10_2 0x16 -#define MAPSEC_ROUTE_11 0x17 -#define MAPSEC_ROUTE_12 0x18 -#define MAPSEC_ROUTE_13 0x19 -#define MAPSEC_ROUTE_14 0x1A -#define MAPSEC_ROUTE_15 0x1B -#define MAPSEC_ROUTE_16 0x1C -#define MAPSEC_ROUTE_17 0x1D -#define MAPSEC_ROUTE_18 0x1E -#define MAPSEC_ROUTE_19 0x1F -#define MAPSEC_ROUTE_20 0x20 -#define MAPSEC_ROUTE_21 0x21 -#define MAPSEC_ROUTE_22 0x22 -#define MAPSEC_ROUTE_23 0x23 -#define MAPSEC_ROUTE_24 0x24 -#define MAPSEC_ROUTE_25 0x25 -#define MAPSEC_VIRIDIAN_FOREST 0x26 -#define MAPSEC_MT_MOON 0x27 -#define MAPSEC_S_S_ANNE 0x28 -#define MAPSEC_UNDERGROUND_PATH 0x29 -#define MAPSEC_UNDERGROUND_PATH_2 0x2A -#define MAPSEC_DIGLETTS_CAVE 0x2B -#define MAPSEC_KANTO_VICTORY_ROAD 0x2C -#define MAPSEC_ROCKET_HIDEOUT 0x2D -#define MAPSEC_SILPH_CO 0x2E -#define MAPSEC_POKEMON_MANSION 0x2F -#define MAPSEC_KANTO_SAFARI_ZONE 0x30 -#define MAPSEC_POKEMON_LEAGUE 0x31 -#define MAPSEC_ROCK_TUNNEL 0x32 -#define MAPSEC_SEAFOAM_ISLANDS 0x33 -#define MAPSEC_POKEMON_TOWER 0x34 -#define MAPSEC_CERULEAN_CAVE 0x35 -#define MAPSEC_POWER_PLANT 0x36 -#define MAPSEC_ONE_ISLAND 0x37 -#define MAPSEC_TWO_ISLAND 0x38 -#define MAPSEC_THREE_ISLAND 0x39 -#define MAPSEC_FOUR_ISLAND 0x3A -#define MAPSEC_FIVE_ISLAND 0x3B -#define MAPSEC_SEVEN_ISLAND 0x3C -#define MAPSEC_SIX_ISLAND 0x3D -#define MAPSEC_KINDLE_ROAD 0x3E -#define MAPSEC_TREASURE_BEACH 0x3F -#define MAPSEC_CAPE_BRINK 0x40 -#define MAPSEC_BOND_BRIDGE 0x41 -#define MAPSEC_THREE_ISLE_PORT 0x42 -#define MAPSEC_SEVII_ISLE_6 0x43 -#define MAPSEC_SEVII_ISLE_7 0x44 -#define MAPSEC_SEVII_ISLE_8 0x45 -#define MAPSEC_SEVII_ISLE_9 0x46 -#define MAPSEC_RESORT_GORGEOUS 0x47 -#define MAPSEC_WATER_LABYRINTH 0x48 -#define MAPSEC_FIVE_ISLE_MEADOW 0x49 -#define MAPSEC_MEMORIAL_PILLAR 0x4A -#define MAPSEC_OUTCAST_ISLAND 0x4B -#define MAPSEC_GREEN_PATH 0x4C -#define MAPSEC_WATER_PATH 0x4D -#define MAPSEC_RUIN_VALLEY 0x4E -#define MAPSEC_TRAINER_TOWER 0x4F -#define MAPSEC_CANYON_ENTRANCE 0x50 -#define MAPSEC_SEVAULT_CANYON 0x51 -#define MAPSEC_TANOBY_RUINS 0x52 -#define MAPSEC_SEVII_ISLE_22 0x53 -#define MAPSEC_SEVII_ISLE_23 0x54 -#define MAPSEC_SEVII_ISLE_24 0x55 -#define MAPSEC_NAVEL_ROCK 0x56 -#define MAPSEC_MT_EMBER 0x57 -#define MAPSEC_BERRY_FOREST 0x58 -#define MAPSEC_ICEFALL_CAVE 0x59 -#define MAPSEC_ROCKET_WAREHOUSE 0x5A -#define MAPSEC_TRAINER_TOWER_2 0x5B -#define MAPSEC_DOTTED_HOLE 0x5C -#define MAPSEC_LOST_CAVE 0x5D -#define MAPSEC_PATTERN_BUSH 0x5E -#define MAPSEC_ALTERING_CAVE 0x5F -#define MAPSEC_TANOBY_CHAMBERS 0x60 -#define MAPSEC_THREE_ISLE_PATH 0x61 -#define MAPSEC_TANOBY_KEY 0x62 -#define MAPSEC_BIRTH_ISLAND 0x63 -#define MAPSEC_MONEAN_CHAMBER 0x64 -#define MAPSEC_LIPTOO_CHAMBER 0x65 -#define MAPSEC_WEEPTH_CHAMBER 0x66 -#define MAPSEC_DILFORD_CHAMBER 0x67 -#define MAPSEC_SCUFIB_CHAMBER 0x68 -#define MAPSEC_RIXY_CHAMBER 0x69 -#define MAPSEC_VIAPOIS_CHAMBER 0x6A -#define MAPSEC_EMBER_SPA 0x6B -#define MAPSEC_CELADON_DEPT 0x6C -#define MAPSEC_NONE 0x6D +#define MAPSEC_LITTLEROOT_TOWN 0x00 +#define MAPSEC_OLDALE_TOWN 0x01 +#define MAPSEC_DEWFORD_TOWN 0x02 +#define MAPSEC_LAVARIDGE_TOWN 0x03 +#define MAPSEC_FALLARBOR_TOWN 0x04 +#define MAPSEC_VERDANTURF_TOWN 0x05 +#define MAPSEC_PACIFIDLOG_TOWN 0x06 +#define MAPSEC_PETALBURG_CITY 0x07 +#define MAPSEC_SLATEPORT_CITY 0x08 +#define MAPSEC_MAUVILLE_CITY 0x09 +#define MAPSEC_RUSTBORO_CITY 0x0A +#define MAPSEC_FORTREE_CITY 0x0B +#define MAPSEC_LILYCOVE_CITY 0x0C +#define MAPSEC_MOSSDEEP_CITY 0x0D +#define MAPSEC_SOOTOPOLIS_CITY 0x0E +#define MAPSEC_EVER_GRANDE_CITY 0x0F +#define MAPSEC_ROUTE_101 0x10 +#define MAPSEC_ROUTE_102 0x11 +#define MAPSEC_ROUTE_103 0x12 +#define MAPSEC_ROUTE_104 0x13 +#define MAPSEC_ROUTE_105 0x14 +#define MAPSEC_ROUTE_106 0x15 +#define MAPSEC_ROUTE_107 0x16 +#define MAPSEC_ROUTE_108 0x17 +#define MAPSEC_ROUTE_109 0x18 +#define MAPSEC_ROUTE_110 0x19 +#define MAPSEC_ROUTE_111 0x1A +#define MAPSEC_ROUTE_112 0x1B +#define MAPSEC_ROUTE_113 0x1C +#define MAPSEC_ROUTE_114 0x1D +#define MAPSEC_ROUTE_115 0x1E +#define MAPSEC_ROUTE_116 0x1F +#define MAPSEC_ROUTE_117 0x20 +#define MAPSEC_ROUTE_118 0x21 +#define MAPSEC_ROUTE_119 0x22 +#define MAPSEC_ROUTE_120 0x23 +#define MAPSEC_ROUTE_121 0x24 +#define MAPSEC_ROUTE_122 0x25 +#define MAPSEC_ROUTE_123 0x26 +#define MAPSEC_ROUTE_124 0x27 +#define MAPSEC_ROUTE_125 0x28 +#define MAPSEC_ROUTE_126 0x29 +#define MAPSEC_ROUTE_127 0x2A +#define MAPSEC_ROUTE_128 0x2B +#define MAPSEC_ROUTE_129 0x2C +#define MAPSEC_ROUTE_130 0x2D +#define MAPSEC_ROUTE_131 0x2E +#define MAPSEC_ROUTE_132 0x2F +#define MAPSEC_ROUTE_133 0x30 +#define MAPSEC_ROUTE_134 0x31 +#define MAPSEC_UNDERWATER_124 0x32 +#define MAPSEC_UNDERWATER_125 0x33 +#define MAPSEC_UNDERWATER_126 0x34 +#define MAPSEC_UNDERWATER_127 0x35 +#define MAPSEC_UNDERWATER_SOOTOPOLIS 0x36 +#define MAPSEC_GRANITE_CAVE 0x37 +#define MAPSEC_MT_CHIMNEY 0x38 +#define MAPSEC_SAFARI_ZONE 0x39 +#define MAPSEC_BATTLE_FRONTIER 0x3A +#define MAPSEC_PETALBURG_WOODS 0x3B +#define MAPSEC_RUSTURF_TUNNEL 0x3C +#define MAPSEC_ABANDONED_SHIP 0x3D +#define MAPSEC_NEW_MAUVILLE 0x3E +#define MAPSEC_METEOR_FALLS 0x3F +#define MAPSEC_METEOR_FALLS2 0x40 +#define MAPSEC_MT_PYRE 0x41 +#define MAPSEC_AQUA_HIDEOUT_OLD 0x42 +#define MAPSEC_SHOAL_CAVE 0x43 +#define MAPSEC_SEAFLOOR_CAVERN 0x44 +#define MAPSEC_UNDERWATER_128 0x45 +#define MAPSEC_VICTORY_ROAD 0x46 +#define MAPSEC_MIRAGE_ISLAND 0x47 +#define MAPSEC_CAVE_OF_ORIGIN 0x48 +#define MAPSEC_SOUTHERN_ISLAND 0x49 +#define MAPSEC_FIERY_PATH 0x4A +#define MAPSEC_FIERY_PATH2 0x4B +#define MAPSEC_JAGGED_PASS 0x4C +#define MAPSEC_JAGGED_PASS2 0x4D +#define MAPSEC_SEALED_CHAMBER 0x4E +#define MAPSEC_UNDERWATER_SEALED_CHAMBER 0x4F +#define MAPSEC_SCORCHED_SLAB 0x50 +#define MAPSEC_ISLAND_CAVE 0x51 +#define MAPSEC_DESERT_RUINS 0x52 +#define MAPSEC_ANCIENT_TOMB 0x53 +#define MAPSEC_INSIDE_OF_TRUCK 0x54 +#define MAPSEC_SKY_PILLAR 0x55 +#define MAPSEC_SECRET_BASE 0x56 +#define MAPSEC_DYNAMIC 0x57 +#define MAPSEC_PALLET_TOWN 0x58 +#define MAPSEC_VIRIDIAN_CITY 0x59 +#define MAPSEC_PEWTER_CITY 0x5A +#define MAPSEC_CERULEAN_CITY 0x5B +#define MAPSEC_LAVENDER_TOWN 0x5C +#define MAPSEC_VERMILION_CITY 0x5D +#define MAPSEC_CELADON_CITY 0x5E +#define MAPSEC_FUCHSIA_CITY 0x5F +#define MAPSEC_CINNABAR_ISLAND 0x60 +#define MAPSEC_INDIGO_PLATEAU 0x61 +#define MAPSEC_SAFFRON_CITY 0x62 +#define MAPSEC_ROUTE_4_FLYDUP 0x63 +#define MAPSEC_ROUTE_10_FLYDUP 0x64 +#define MAPSEC_ROUTE_1 0x65 +#define MAPSEC_ROUTE_2 0x66 +#define MAPSEC_ROUTE_3 0x67 +#define MAPSEC_ROUTE_4 0x68 +#define MAPSEC_ROUTE_5 0x69 +#define MAPSEC_ROUTE_6 0x6A +#define MAPSEC_ROUTE_7 0x6B +#define MAPSEC_ROUTE_8 0x6C +#define MAPSEC_ROUTE_9 0x6D +#define MAPSEC_ROUTE_10 0x6E +#define MAPSEC_ROUTE_11 0x6F +#define MAPSEC_ROUTE_12 0x70 +#define MAPSEC_ROUTE_13 0x71 +#define MAPSEC_ROUTE_14 0x72 +#define MAPSEC_ROUTE_15 0x73 +#define MAPSEC_ROUTE_16 0x74 +#define MAPSEC_ROUTE_17 0x75 +#define MAPSEC_ROUTE_18 0x76 +#define MAPSEC_ROUTE_19 0x77 +#define MAPSEC_ROUTE_20 0x78 +#define MAPSEC_ROUTE_21 0x79 +#define MAPSEC_ROUTE_22 0x7A +#define MAPSEC_ROUTE_23 0x7B +#define MAPSEC_ROUTE_24 0x7C +#define MAPSEC_ROUTE_25 0x7D +#define MAPSEC_VIRIDIAN_FOREST 0x7E +#define MAPSEC_MT_MOON 0x7F +#define MAPSEC_S_S_ANNE 0x80 +#define MAPSEC_UNDERGROUND_PATH 0x81 +#define MAPSEC_UNDERGROUND_PATH_2 0x82 +#define MAPSEC_DIGLETTS_CAVE 0x83 +#define MAPSEC_KANTO_VICTORY_ROAD 0x84 +#define MAPSEC_ROCKET_HIDEOUT 0x85 +#define MAPSEC_SILPH_CO 0x86 +#define MAPSEC_POKEMON_MANSION 0x87 +#define MAPSEC_KANTO_SAFARI_ZONE 0x88 +#define MAPSEC_POKEMON_LEAGUE 0x89 +#define MAPSEC_ROCK_TUNNEL 0x8A +#define MAPSEC_SEAFOAM_ISLANDS 0x8B +#define MAPSEC_POKEMON_TOWER 0x8C +#define MAPSEC_CERULEAN_CAVE 0x8D +#define MAPSEC_POWER_PLANT 0x8E +#define MAPSEC_ONE_ISLAND 0x8F +#define MAPSEC_TWO_ISLAND 0x90 +#define MAPSEC_THREE_ISLAND 0x91 +#define MAPSEC_FOUR_ISLAND 0x92 +#define MAPSEC_FIVE_ISLAND 0x93 +#define MAPSEC_SEVEN_ISLAND 0x94 +#define MAPSEC_SIX_ISLAND 0x95 +#define MAPSEC_KINDLE_ROAD 0x96 +#define MAPSEC_TREASURE_BEACH 0x97 +#define MAPSEC_CAPE_BRINK 0x98 +#define MAPSEC_BOND_BRIDGE 0x99 +#define MAPSEC_THREE_ISLE_PORT 0x9A +#define MAPSEC_SEVII_ISLE_6 0x9B +#define MAPSEC_SEVII_ISLE_7 0x9C +#define MAPSEC_SEVII_ISLE_8 0x9D +#define MAPSEC_SEVII_ISLE_9 0x9E +#define MAPSEC_RESORT_GORGEOUS 0x9F +#define MAPSEC_WATER_LABYRINTH 0xA0 +#define MAPSEC_FIVE_ISLE_MEADOW 0xA1 +#define MAPSEC_MEMORIAL_PILLAR 0xA2 +#define MAPSEC_OUTCAST_ISLAND 0xA3 +#define MAPSEC_GREEN_PATH 0xA4 +#define MAPSEC_WATER_PATH 0xA5 +#define MAPSEC_RUIN_VALLEY 0xA6 +#define MAPSEC_TRAINER_TOWER 0xA7 +#define MAPSEC_CANYON_ENTRANCE 0xA8 +#define MAPSEC_SEVAULT_CANYON 0xA9 +#define MAPSEC_TANOBY_RUINS 0xAA +#define MAPSEC_SEVII_ISLE_22 0xAB +#define MAPSEC_SEVII_ISLE_23 0xAC +#define MAPSEC_SEVII_ISLE_24 0xAD +#define MAPSEC_NAVEL_ROCK 0xAE +#define MAPSEC_MT_EMBER 0xAF +#define MAPSEC_BERRY_FOREST 0xB0 +#define MAPSEC_ICEFALL_CAVE 0xB1 +#define MAPSEC_ROCKET_WAREHOUSE 0xB2 +#define MAPSEC_TRAINER_TOWER_2 0xB3 +#define MAPSEC_DOTTED_HOLE 0xB4 +#define MAPSEC_LOST_CAVE 0xB5 +#define MAPSEC_PATTERN_BUSH 0xB6 +#define MAPSEC_ALTERING_CAVE 0xB7 +#define MAPSEC_TANOBY_CHAMBERS 0xB8 +#define MAPSEC_THREE_ISLE_PATH 0xB9 +#define MAPSEC_TANOBY_KEY 0xBA +#define MAPSEC_BIRTH_ISLAND 0xBB +#define MAPSEC_MONEAN_CHAMBER 0xBC +#define MAPSEC_LIPTOO_CHAMBER 0xBD +#define MAPSEC_WEEPTH_CHAMBER 0xBE +#define MAPSEC_DILFORD_CHAMBER 0xBF +#define MAPSEC_SCUFIB_CHAMBER 0xC0 +#define MAPSEC_RIXY_CHAMBER 0xC1 +#define MAPSEC_VIAPOIS_CHAMBER 0xC2 +#define MAPSEC_EMBER_SPA 0xC3 +#define MAPSEC_SPECIAL_AREA 0xC4 +#define MAPSEC_NONE 0xC5 #endif //GUARD_CONSTANTS_REGION_MAP_H diff --git a/include/constants/songs.h b/include/constants/songs.h index e31a38fdc..193a57756 100644 --- a/include/constants/songs.h +++ b/include/constants/songs.h @@ -250,6 +250,103 @@ #define SE_W287B 245 #define SE_W114 246 #define SE_W063B 247 +#define SE_CASHIER 248 +#define SE_SHIP_HORN 249 +#define SE_HELP_OPEN 250 +#define SE_HELP_CLOSE 251 +#define SE_HELP_PAGE 252 + +#define MUS_ME_ASA 256 +#define MUS_FANFA1 257 +#define MUS_FANFA4 258 +#define MUS_FANFA5 259 +#define MUS_ME_BACHI 260 +#define MUS_ME_WAZA 261 +#define MUS_ME_KINOMI 262 +#define MUS_ME_SHINKA 263 +#define BGM_FRLG_SAFARI_ZONE 264 +#define MUS_SHINKA BGM_FRLG_SAFARI_ZONE +#define BGM_FRLG_CHANSEY_DANCE 267 +#define MUS_ME_B_BIG 268 +#define MUS_ME_B_SMALL 269 +#define MUS_ME_WASURE 270 +#define MUS_ME_ZANNEN 271 +#define BGM_FRLG_FOLLOW_ME 272 +#define BGM_FRLG_GAMECORNER 273 +#define BGM_FRLG_ROCKET_HIDEOUT 274 +#define BGM_FRLG_GYM 275 +#define BGM_FRLG_JIGGLYPUFF 276 +#define BGM_FRLG_OPENING 277 +#define BGM_FRLG_TITLE 278 +#define BGM_FRLG_CINNABAR_ISLAND 279 +#define BGM_FRLG_LAVENDER_TOWN 280 +#define BGM_FRLG_HEALING_TEST 281 +#define BGM_FRLG_BICYCLE 282 +#define BGM_FRLG_SUSPICIOUS_EYE 283 +#define BGM_FRLG_GIRL_EYE 284 +#define BGM_FRLG_BOY_EYE 285 +#define BGM_FRLG_CONGRATULATIONS_HALL_OF_FAME 286 +#define BGM_FRLG_VIRIDIAN_FOREST 287 +#define BGM_FRLG_MT_MOON 288 +#define BGM_FRLG_POKEMON_MANSION 289 +#define BGM_FRLG_CREDITS 290 +#define BGM_FRLG_ROUTE_1 291 +#define BGM_FRLG_ROUTE_24 292 +#define BGM_FRLG_ROUTE_3 293 +#define BGM_FRLG_ROUTE_11 294 +#define BGM_FRLG_INDIGO_PLATEAU 295 +#define BGM_FRLG_BATTLE_LEADER 296 +#define BGM_FRLG_BATTLE_TRAINER 297 +#define BGM_FRLG_BATTLE_WILD_POKEMON 298 +#define BGM_FRLG_BATTLE_CHAMPION 299 +#define BGM_FRLG_PALLET_TOWN 300 +#define BGM_FRLG_OAK_LAB 301 +#define BGM_FRLG_PROF_OAK 302 +#define BGM_FRLG_POKEMON_CENTER 303 +#define BGM_FRLG_SS_ANNE 304 +#define BGM_FRLG_SURF 305 +#define BGM_FRLG_POKEMON_TOWER 306 +#define BGM_FRLG_SILPH 307 +#define BGM_FRLG_CERULEAN_CITY 308 +#define BGM_FRLG_CELADON_CITY 309 +#define BGM_FRLG_KACHI_TRAINER 310 +#define BGM_FRLG_KACHI_WILD_POKEMON 311 +#define BGM_FRLG_KACHI_LEADER 312 +#define BGM_FRLG_VERMILION_CITY 313 +#define BGM_FRLG_VIRIDIAN_CITY 314 +#define BGM_FRLG_RIVAL 315 +#define BGM_FRLG_RIVAL_POSTBATTLE 316 +#define BGM_FRLG_ME_POKEDEX_EVAL 317 +#define BGM_FRLG_ME_KEYITEM 318 +#define BGM_FRLG_FANFA_POKEMON_CAUGHT 319 +#define BGM_FRLG_FANFA_TRAINERCARD_PHOTO 320 +#define BGM_FRLG_GAMEFREAK_LOGO 321 +#define BGM_FRLG_CAUGHT_POKEMON 322 +#define BGM_FRLG_GAME_EXPLANATION_START 323 +#define BGM_FRLG_GAME_EXPLANATION_MIDDLE 324 +#define BGM_FRLG_GAME_EXPLANATION_END 325 +#define BGM_FRLG_POKEMON_JUMP 326 +#define BGM_FRLG_UNION_ROOM 327 +#define BGM_FRLG_POKEMON_NETWORK_CENTER 328 +#define BGM_FRLG_MYSTERY_GIFT 329 +#define BGM_FRLG_DODRIO_BERRY_PICK 330 +#define BGM_FRLG_MT_EMBER 331 +#define BGM_FRLG_TEACHY_TV_EPISODE 332 +#define BGM_FRLG_SEVII_ISLANDS 333 +#define BGM_FRLG_TANOBY_RUINS 334 +#define BGM_FRLG_ISLAND_ONE 335 +#define BGM_FRLG_ISLAND_FOUR 336 +#define BGM_FRLG_ISLAND_SIX 337 +#define BGM_FRLG_FLUTE 338 +#define BGM_FRLG_BATTLE_DEOXYS 339 +#define BGM_FRLG_BATTLE_MEWTWO 340 +#define BGM_FRLG_BATTLE_LEGENDARY 341 +#define BGM_FRLG_LEADER_EYE 342 +#define BGM_FRLG_DEOXYS_EYE 343 +#define BGM_FRLG_TRAINER_TOWER 344 +#define BGM_FRLG_HALL_OF_FAME_PALLET_TOWN 345 +#define BGM_FRLG_TEACHY_TV 346 + #define BGM_STOP 349 #define BGM_TETSUJI 350 #define BGM_FIELD13 351 @@ -385,82 +482,6 @@ #define BGM_BATTLE35 481 #define BGM_BATTLE38 482 #define BGM_BATTLE30 483 -#define BGM_FRLG_FOLLOW_ME 484 -#define BGM_FRLG_GAMECORNER 485 -#define BGM_FRLG_ROCKET_HIDEOUT 486 -#define BGM_FRLG_GYM 487 -#define BGM_FRLG_JIGGLYPUFF 488 -#define BGM_FRLG_OPENING 489 -#define BGM_FRLG_TITLE 490 -#define BGM_FRLG_CINNABAR_ISLAND 491 -#define BGM_FRLG_LAVENDER_TOWN 492 -#define BGM_FRLG_HEALING_TEST 493 -#define BGM_FRLG_BICYCLE 494 -#define BGM_FRLG_SUSPICIOUS_EYE 495 -#define BGM_FRLG_GIRL_EYE 496 -#define BGM_FRLG_BOY_EYE 497 -#define BGM_FRLG_CONGRATULATIONS_HALL_OF_FAME 498 -#define BGM_FRLG_VIRIDIAN_FOREST 499 -#define BGM_FRLG_MT_MOON 500 -#define BGM_FRLG_POKEMON_MANSION 501 -#define BGM_FRLG_CREDITS 502 -#define BGM_FRLG_ROUTE_1 503 -#define BGM_FRLG_ROUTE_24 504 -#define BGM_FRLG_ROUTE_3 505 -#define BGM_FRLG_ROUTE_11 506 -#define BGM_FRLG_INDIGO_PLATEAU 507 -#define BGM_FRLG_BATTLE_LEADER 508 -#define BGM_FRLG_BATTLE_TRAINER 509 -#define BGM_FRLG_BATTLE_WILD_POKEMON 510 -#define BGM_FRLG_BATTLE_CHAMPION 511 -#define BGM_FRLG_PALLET_TOWN 512 -#define BGM_FRLG_OAK_LAB 513 -#define BGM_FRLG_PROF_OAK 514 -#define BGM_FRLG_POKEMON_CENTER 515 -#define BGM_FRLG_SS_ANNE 516 -#define BGM_FRLG_SURF 517 -#define BGM_FRLG_POKEMON_TOWER 518 -#define BGM_FRLG_SILPH 519 -#define BGM_FRLG_CERULEAN_CITY 520 -#define BGM_FRLG_CELADON_CITY 521 -#define BGM_FRLG_KACHI_TRAINER 522 -#define BGM_FRLG_KACHI_WILD_POKEMON 523 -#define BGM_FRLG_KACHI_LEADER 524 -#define BGM_FRLG_VERMILION_CITY 525 -#define BGM_FRLG_VIRIDIAN_CITY 526 -#define BGM_FRLG_RIVAL 527 -#define BGM_FRLG_RIVAL_POSTBATTLE 528 -#define BGM_FRLG_ME_POKEDEX_EVAL 529 -#define BGM_FRLG_ME_KEYITEM 530 -#define BGM_FRLG_FANFA_POKEMON_CAUGHT 531 -#define BGM_FRLG_FANFA_TRAINERCARD_PHOTO 532 -#define BGM_FRLG_GAMEFREAK_LOGO 533 -#define BGM_FRLG_CAUGHT_POKEMON 534 -#define BGM_FRLG_GAME_EXPLANATION_START 535 -#define BGM_FRLG_GAME_EXPLANATION_MIDDLE 536 -#define BGM_FRLG_GAME_EXPLANATION_END 537 -#define BGM_FRLG_POKEMON_JUMP 538 -#define BGM_FRLG_UNION_ROOM 539 -#define BGM_FRLG_POKEMON_NETWORK_CENTER 540 -#define BGM_FRLG_MYSTERY_GIFT 541 -#define BGM_FRLG_DODRIO_BERRY_PICK 542 -#define BGM_FRLG_MT_EMBER 543 -#define BGM_FRLG_TEACHY_TV_EPISODE 544 -#define BGM_FRLG_SEVII_ISLANDS 545 -#define BGM_FRLG_TANOBY_RUINS 546 -#define BGM_FRLG_ISLAND_ONE 547 -#define BGM_FRLG_ISLAND_FOUR 548 -#define BGM_FRLG_ISLAND_SIX 549 -#define BGM_FRLG_FLUTE 550 -#define BGM_FRLG_BATTLE_DEOXYS 551 -#define BGM_FRLG_BATTLE_MEWTWO 552 -#define BGM_FRLG_BATTLE_LEGENDARY 553 -#define BGM_FRLG_LEADER_EYE 554 -#define BGM_FRLG_DEOXYS_EYE 555 -#define BGM_FRLG_TRAINER_TOWER 556 -#define BGM_FRLG_HALL_OF_FAME_PALLET_TOWN 557 -#define BGM_FRLG_TEACHY_TV 558 - #define BGM_ROUTE_118 0x7FFF // What is this for? #endif // GUARD_CONSTANTS_SONGS_H diff --git a/include/constants/spawn_points.h b/include/constants/spawn_points.h new file mode 100644 index 000000000..eea133bd1 --- /dev/null +++ b/include/constants/spawn_points.h @@ -0,0 +1,26 @@ +#ifndef GUARD_CONSTANTS_SPAWN_POINTS_H +#define GUARD_CONSTANTS_SPAWN_POINTS_H + +#define SPAWN_PALLET_TOWN 1 +#define SPAWN_VIRIDIAN_CITY 2 +#define SPAWN_PEWTER_CITY 3 +#define SPAWN_CERULEAN_CITY 4 +#define SPAWN_LAVENDER_TOWN 5 +#define SPAWN_VERMILION_CITY 6 +#define SPAWN_CELADON_CITY 7 +#define SPAWN_FUCHSIA_CITY 8 +#define SPAWN_CINNABAR_ISLAND 9 +#define SPAWN_INDIGO_PLATEAU 10 +#define SPAWN_SAFFRON_CITY 11 +#define SPAWN_ROUTE4 12 +#define SPAWN_ROUTE10 13 +#define SPAWN_ONE_ISLAND 14 +#define SPAWN_TWO_ISLAND 15 +#define SPAWN_THREE_ISLAND 16 +#define SPAWN_FOUR_ISLAND 17 +#define SPAWN_FIVE_ISLAND 18 +#define SPAWN_SEVEN_ISLAND 19 +#define SPAWN_SIX_ISLAND 20 +#define NUM_SPAWN_POINTS 20 + +#endif //GUARD_CONSTANTS_SPAWN_POINTS_H diff --git a/include/constants/species.h b/include/constants/species.h index f698ada14..9cb239799 100644 --- a/include/constants/species.h +++ b/include/constants/species.h @@ -445,6 +445,9 @@ #define SPECIES_UNOWN_EMARK 438 #define SPECIES_UNOWN_QMARK 439 +#define SPECIES_OLD_UNOWN_EMARK 412 +#define SPECIES_OLD_UNOWN_QMARK 413 + #define NUM_SPECIES SPECIES_EGG #endif // GUARD_CONSTANTS_SPECIES_H diff --git a/include/constants/vars.h b/include/constants/vars.h index 886bae93c..989b27387 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -35,8 +35,8 @@ #define VAR_0x401D 0x401D #define VAR_0x401E 0x401E #define VAR_0x401F 0x401F -#define VAR_RECYCLE_GOODS 0x4020 -#define VAR_REPEL_STEP_COUNT 0x4021 +#define VAR_REPEL_STEP_COUNT 0x4020 +#define VAR_0x4021 0x4021 #define VAR_ICE_STEP_COUNT 0x4022 #define VAR_0x4023 0x4023 #define VAR_MIRAGE_RND_H 0x4024 @@ -54,7 +54,7 @@ #define VAR_0x402F 0x402F #define VAR_0x4030 0x4030 -#define VAR_0x4031 0x4031 +#define VAR_STARTER_MON 0x4031 #define VAR_0x4032 0x4032 #define VAR_ENIGMA_BERRY_AVAILABLE 0x4033 @@ -86,26 +86,26 @@ #define VAR_0x404D 0x404D #define VAR_0x404E 0x404E #define VAR_LOTAD_SIZE_RECORD 0x404F -#define VAR_0x4050 0x4050 +#define VAR_MAP_SCENE_PALLET_TOWN 0x4050 #define VAR_0x4051 0x4051 #define VAR_0x4052 0x4052 -#define VAR_0x4053 0x4053 +#define VAR_VERMILION_CITY_TICKET_CHECK_TRIGGER 0x4053 #define VAR_0x4054 0x4054 -#define VAR_0x4055 0x4055 -#define VAR_0x4056 0x4056 -#define VAR_0x4057 0x4057 +#define VAR_MAP_SCENE_PALLET_TOWN_PROFESSOR_OAKS_LAB 0x4055 +#define VAR_MAP_SCENE_PALLET_TOWN_PLAYERS_HOUSE_2F 0x4056 +#define VAR_MAP_SCENE_VIRIDIAN_CITY_MART 0x4057 #define VAR_0x4058 0x4058 #define VAR_0x4059 0x4059 #define VAR_0x405A 0x405A #define VAR_0x405B 0x405B #define VAR_0x405C 0x405C #define VAR_0x405D 0x405D -#define VAR_0x405E 0x405E +#define VAR_MAP_SCENE_ROUTE16 0x405E #define VAR_0x405F 0x405F #define VAR_0x4060 0x4060 #define VAR_0x4061 0x4061 #define VAR_0x4062 0x4062 -#define VAR_0x4063 0x4063 +#define VAR_MAP_SCENE_SEAFOAM_ISLANDS_B4F 0x4063 #define VAR_0x4064 0x4064 #define VAR_0x4065 0x4065 #define VAR_0x4066 0x4066 @@ -116,35 +116,35 @@ #define VAR_0x406B 0x406B #define VAR_0x406C 0x406C #define VAR_0x406D 0x406D -#define VAR_0x406E 0x406E +#define VAR_MAP_SCENE_FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE 0x406E #define VAR_0x406F 0x406F #define VAR_0x4070 0x4070 #define VAR_0x4071 0x4071 #define VAR_0x4072 0x4072 -#define VAR_0x4073 0x4073 -#define VAR_0x4074 0x4074 -#define VAR_0x4075 0x4075 -#define VAR_0x4076 0x4076 +#define VAR_MAP_SCENE_SAFFRON_CITY_POKEMON_TRAINER_FAN_CLUB 0x4073 +#define VAR_MAP_SCENE_SEVEN_ISLAND_HOUSE_ROOM1 0x4074 +#define VAR_MAP_SCENE_ONE_ISLAND_HARBOR 0x4075 +#define VAR_MAP_SCENE_ONE_ISLAND_POKEMON_CENTER_1F 0x4076 #define VAR_0x4077 0x4077 #define VAR_0x4078 0x4078 -#define VAR_0x4079 0x4079 +#define VAR_MAP_SCENE_TWO_ISLAND_JOYFUL_GAME_CORNER 0x4079 #define VAR_0x407A 0x407A #define VAR_0x407B 0x407B #define VAR_0x407C 0x407C #define VAR_0x407D 0x407D -#define VAR_0x407E 0x407E +#define VAR_MAP_SCENE_VERMILION_CITY 0x407E #define VAR_0x407F 0x407F #define VAR_0x4080 0x4080 #define VAR_0x4081 0x4081 #define VAR_0x4082 0x4082 -#define VAR_0x4083 0x4083 -#define VAR_0x4084 0x4084 -#define VAR_0x4085 0x4085 -#define VAR_0x4086 0x4086 +#define VAR_MAP_SCENE_FIVE_ISLAND_LOST_CAVE_ROOM10 0x4083 +#define VAR_MAP_SCENE_FIVE_ISLAND_RESORT_GORGEOUS 0x4084 +#define VAR_MAP_SCENE_INDIGO_PLATEAU_EXTERIOR 0x4085 +#define VAR_MAP_SCENE_FOUR_ISLAND 0x4086 #define VAR_0x4087 0x4087 #define VAR_0x4088 0x4088 -#define VAR_0x4089 0x4089 -#define VAR_0x408A 0x408A +#define VAR_MAP_SCENE_SIX_ISLAND_POKEMON_CENTER_1F 0x4089 +#define VAR_MAP_SCENE_CINNABAR_ISLAND 0x408A #define VAR_0x408B 0x408B #define VAR_0x408C 0x408C #define VAR_0x408D 0x408D diff --git a/include/constants/weather.h b/include/constants/weather.h new file mode 100644 index 000000000..a45d2e523 --- /dev/null +++ b/include/constants/weather.h @@ -0,0 +1,20 @@ +#ifndef GUARD_CONSTANTS_WEATHER_H +#define GUARD_CONSTANTS_WEATHER_H + +#define WEATHER_NONE 0 +#define WEATHER_SUNNY_CLOUDS 1 // unused +#define WEATHER_SUNNY 2 +#define WEATHER_RAIN 3 // unused +#define WEATHER_SNOW 4 // unused +#define WEATHER_RAIN_THUNDERSTORM 5 // unused +#define WEATHER_FOG_HORIZONTAL 6 +#define WEATHER_VOLCANIC_ASH 7 // unused +#define WEATHER_SANDSTORM 8 // unused +#define WEATHER_FOG_DIAGONAL 9 // unused +#define WEATHER_UNDERWATER 10 // unused +#define WEATHER_CLOUDY 11 +#define WEATHER_DROUGHT 12 // unused and broken in overworld +#define WEATHER_DOWNPOUR 13 // unused +#define WEATHER_UNDERWATER_BUBBLES 14 // unused + +#endif // GUARD_CONSTANTS_WEATHER_H diff --git a/include/daycare.h b/include/daycare.h index 6544ba21a..08ca11187 100644 --- a/include/daycare.h +++ b/include/daycare.h @@ -26,4 +26,10 @@ bool8 NameHasGenderSymbol(const u8 *name, u8 genderRatio); void ShowDaycareLevelMenu(void); void ChooseSendDaycareMon(void); +void ScriptHatchMon(void); +bool8 sub_8071614(void); +void EggHatch(void); +u8 GetEggStepsToSubtract(void); +u16 sub_80722E0(void); + #endif // GUARD_DAYCARE_H diff --git a/include/decompress.h b/include/decompress.h index 36672dcfd..19b507525 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -18,6 +18,8 @@ void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src); void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer); bool8 LoadCompressedObjectPaletteUsingHeap(const struct CompressedSpritePalette *src); +bool8 sub_800F078(const struct CompressedSpritePalette *src); + void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species); void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species); void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species); @@ -25,6 +27,7 @@ void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); void HandleLoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); +void sub_800ECC4(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); @@ -33,5 +36,6 @@ void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src u32 sub_8034974(const u8 *ptr); void sub_800F034(const struct CompressedSpriteSheet *src); +u32 GetDecompressedDataSize(const u8 *ptr); #endif // GUARD_DECOMPRESS_H diff --git a/include/event_data.h b/include/event_data.h index 13e388bf2..013579ab5 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -36,6 +36,7 @@ bool32 sub_806E2BC(void); void sub_806E6FC(void); void sub_806E2D0(void); void sub_806E370(void); +bool32 sub_806E25C(void); extern u16 gSpecialVar_0x8000; extern u16 gSpecialVar_0x8001; @@ -59,4 +60,7 @@ extern u16 gSpecialVar_0x8014; extern u16 gSpecialVar_Result; extern u16 gSpecialVar_0x8004; +extern u16 gUnknown_20370DA; +extern u16 gUnknown_20370DC; + #endif // GUARD_EVENT_DATA_H diff --git a/include/event_scripts.h b/include/event_scripts.h index b909566d0..d5ee57d56 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -705,4 +705,443 @@ extern const u8 gFameCheckerFlavorTextOriginObjectName_Giovanni3[]; extern const u8 gFameCheckerFlavorTextOriginObjectName_Giovanni4[]; extern const u8 gFameCheckerFlavorTextOriginObjectName_Giovanni5[]; +extern const u8 gOtherText_NewName[]; +extern const u8 gNameChoice_Green[]; +extern const u8 gNameChoice_Red[]; +extern const u8 gNameChoice_Red[]; +extern const u8 gNameChoice_Fire[]; +extern const u8 gNameChoice_Fire[]; +extern const u8 gNameChoice_Gary[]; +extern const u8 gNameChoice_Kaz[]; +extern const u8 gNameChoice_Toru[]; +extern const u8 gNameChoice_Ash[]; +extern const u8 gNameChoice_Kene[]; +extern const u8 gNameChoice_Geki[]; +extern const u8 gNameChoice_Jak[]; +extern const u8 gNameChoice_Janne[]; +extern const u8 gNameChoice_Jonn[]; +extern const u8 gNameChoice_Kamon[]; +extern const u8 gNameChoice_Karl[]; +extern const u8 gNameChoice_Taylor[]; +extern const u8 gNameChoice_Oscar[]; +extern const u8 gNameChoice_Hiro[]; +extern const u8 gNameChoice_Max[]; +extern const u8 gNameChoice_Jon[]; +extern const u8 gNameChoice_Ralph[]; +extern const u8 gNameChoice_Kay[]; +extern const u8 gNameChoice_Tosh[]; +extern const u8 gNameChoice_Roak[]; +extern const u8 gNameChoice_Omi[]; +extern const u8 gNameChoice_Jodi[]; +extern const u8 gNameChoice_Amanda[]; +extern const u8 gNameChoice_Hillary[]; +extern const u8 gNameChoice_Makey[]; +extern const u8 gNameChoice_Michi[]; +extern const u8 gNameChoice_Paula[]; +extern const u8 gNameChoice_June[]; +extern const u8 gNameChoice_Cassie[]; +extern const u8 gNameChoice_Rey[]; +extern const u8 gNameChoice_Seda[]; +extern const u8 gNameChoice_Kiko[]; +extern const u8 gNameChoice_Mina[]; +extern const u8 gNameChoice_Norie[]; +extern const u8 gNameChoice_Sai[]; +extern const u8 gNameChoice_Momo[]; +extern const u8 gNameChoice_Suzi[]; +extern const u8 gNewGame_HelpDocs1[]; +extern const u8 gNewGame_HelpDocs2[]; +extern const u8 gNewGame_HelpDocs3[]; +extern const u8 gNewGame_HelpDocs4[]; +extern const u8 gNewGame_HelpDocs5[]; +extern const u8 gNewGame_HelpDocs6[]; +extern const u8 gNewGame_HelpDocs7[]; +extern const u8 gOakText_AskPlayerGender[]; +extern const u8 gNewGameAdventureIntro1[]; +extern const u8 gNewGameAdventureIntro2[]; +extern const u8 gNewGameAdventureIntro3[]; +extern const u8 gOakText_WelcomeToTheWorld[]; +extern const u8 gOakText_WorldInhabited1[]; +extern const u8 gOakText_WorldInhabited2[]; +extern const u8 gOakText_PetsBattlingStudy[]; +extern const u8 gOakText_TellMeALittleAboutYourself[]; +extern const u8 gOakText_AskPlayerName[]; +extern const u8 gOakText_FinalizePlayerName[]; +extern const u8 gOakText_IntroduceRival[]; +extern const u8 gOakText_AskRivalName[]; +extern const u8 gOakText_ConfirmRivalName[]; +extern const u8 gOakText_RememberRivalName[]; +extern const u8 gOakText_LegendAboutToUnfold[]; + +// Help System +extern const u8 gUnknown_81B2DF8[]; +extern const u8 gUnknown_81B2E1C[]; +extern const u8 gUnknown_81B2E2E[]; +extern const u8 gUnknown_81B2E48[]; +extern const u8 gUnknown_81B2E58[]; +extern const u8 gUnknown_81B2E6A[]; +extern const u8 gUnknown_81B2E6F[]; +extern const u8 gUnknown_81B2E76[]; +extern const u8 gUnknown_81B2E88[]; +extern const u8 gUnknown_81B2EC8[]; +extern const u8 gUnknown_81B2F00[]; +extern const u8 gUnknown_81B2F43[]; +extern const u8 gUnknown_81B2F74[]; +extern const u8 gUnknown_81B2FA9[]; +extern const u8 gUnknown_81B2FC9[]; +extern const u8 gUnknown_81B301B[]; +extern const u8 gUnknown_81B3083[]; +extern const u8 gUnknown_81B30A9[]; +extern const u8 gUnknown_81B30C1[]; +extern const u8 gUnknown_81B30DC[]; +extern const u8 gUnknown_81B30FC[]; +extern const u8 gUnknown_81B311F[]; +extern const u8 gUnknown_81B3140[]; +extern const u8 gUnknown_81B314F[]; +extern const u8 gUnknown_81B3168[]; +extern const u8 gUnknown_81B3189[]; +extern const u8 gUnknown_81B31AE[]; +extern const u8 gUnknown_81B31D3[]; +extern const u8 gUnknown_81B31EC[]; +extern const u8 gUnknown_81B31FF[]; +extern const u8 gUnknown_81B3215[]; +extern const u8 gUnknown_81B3226[]; +extern const u8 gUnknown_81B3243[]; +extern const u8 gUnknown_81B3261[]; +extern const u8 gUnknown_81B3276[]; +extern const u8 gUnknown_81B3290[]; +extern const u8 gUnknown_81B32B6[]; +extern const u8 gUnknown_81B32CD[]; +extern const u8 gUnknown_81B32E3[]; +extern const u8 gUnknown_81B32F9[]; +extern const u8 gUnknown_81B330B[]; +extern const u8 gUnknown_81B332B[]; +extern const u8 gUnknown_81B3344[]; +extern const u8 gUnknown_81B335C[]; +extern const u8 gUnknown_81B3373[]; +extern const u8 gUnknown_81B338C[]; +extern const u8 gUnknown_81B33A6[]; +extern const u8 gUnknown_81B33CA[]; +extern const u8 gUnknown_81B33EA[]; +extern const u8 gUnknown_81B3402[]; +extern const u8 gUnknown_81B3427[]; +extern const u8 gUnknown_81B3440[]; +extern const u8 gUnknown_81B3457[]; +extern const u8 gUnknown_81B346F[]; +extern const u8 gUnknown_81B3481[]; +extern const u8 gUnknown_81B349B[]; +extern const u8 gUnknown_81B34B7[]; +extern const u8 gUnknown_81B34D6[]; +extern const u8 gUnknown_81B34F6[]; +extern const u8 gUnknown_81B3516[]; +extern const u8 gUnknown_81B3525[]; +extern const u8 gUnknown_81B35E6[]; +extern const u8 gUnknown_81B36EB[]; +extern const u8 gUnknown_81B379A[]; +extern const u8 gUnknown_81B3849[]; +extern const u8 gUnknown_81B3876[]; +extern const u8 gUnknown_81B3972[]; +extern const u8 gUnknown_81B3A51[]; +extern const u8 gUnknown_81B3ACC[]; +extern const u8 gUnknown_81B3BB6[]; +extern const u8 gUnknown_81B3C99[]; +extern const u8 gUnknown_81B3D1B[]; +extern const u8 gUnknown_81B3DE3[]; +extern const u8 gUnknown_81B3EBC[]; +extern const u8 gUnknown_81B3F7F[]; +extern const u8 gUnknown_81B406C[]; +extern const u8 gUnknown_81B410B[]; +extern const u8 gUnknown_81B41D7[]; +extern const u8 gUnknown_81B42B3[]; +extern const u8 gUnknown_81B439D[]; +extern const u8 gUnknown_81B4483[]; +extern const u8 gUnknown_81B457C[]; +extern const u8 gUnknown_81B4645[]; +extern const u8 gUnknown_81B470A[]; +extern const u8 gUnknown_81B47F0[]; +extern const u8 gUnknown_81B48C6[]; +extern const u8 gUnknown_81B497A[]; +extern const u8 gUnknown_81B4A72[]; +extern const u8 gUnknown_81B4B65[]; +extern const u8 gUnknown_81B4C54[]; +extern const u8 gUnknown_81B4D26[]; +extern const u8 gUnknown_81B4E0B[]; +extern const u8 gUnknown_81B4ED8[]; +extern const u8 gUnknown_81B4FB2[]; +extern const u8 gUnknown_81B4FFD[]; +extern const u8 gUnknown_81B50FF[]; +extern const u8 gUnknown_81B51B1[]; +extern const u8 gUnknown_81B5272[]; +extern const u8 gUnknown_81B5325[]; +extern const u8 gUnknown_81B5382[]; +extern const u8 gUnknown_81B547C[]; +extern const u8 gUnknown_81B54E1[]; +extern const u8 gUnknown_81B5589[]; +extern const u8 gUnknown_81B55F4[]; +extern const u8 gUnknown_81B56E3[]; +extern const u8 gUnknown_81B56F4[]; +extern const u8 gUnknown_81B5705[]; +extern const u8 gUnknown_81B5717[]; +extern const u8 gUnknown_81B5728[]; +extern const u8 gUnknown_81B5737[]; +extern const u8 gUnknown_81B5744[]; +extern const u8 gUnknown_81B5754[]; +extern const u8 gUnknown_81B5767[]; +extern const u8 gUnknown_81B577B[]; +extern const u8 gUnknown_81B5787[]; +extern const u8 gUnknown_81B5795[]; +extern const u8 gUnknown_81B57A5[]; +extern const u8 gUnknown_81B57B8[]; +extern const u8 gUnknown_81B57CF[]; +extern const u8 gUnknown_81B57DE[]; +extern const u8 gUnknown_81B57EE[]; +extern const u8 gUnknown_81B580D[]; +extern const u8 gUnknown_81B5824[]; +extern const u8 gUnknown_81B5834[]; +extern const u8 gUnknown_81B583F[]; +extern const u8 gUnknown_81B5850[]; +extern const u8 gUnknown_81B5863[]; +extern const u8 gUnknown_81B5875[]; +extern const u8 gUnknown_81B5884[]; +extern const u8 gUnknown_81B5893[]; +extern const u8 gUnknown_81B58A4[]; +extern const u8 gUnknown_81B58BC[]; +extern const u8 gUnknown_81B58D3[]; +extern const u8 gUnknown_81B58E5[]; +extern const u8 gUnknown_81B58FD[]; +extern const u8 gUnknown_81B590E[]; +extern const u8 gUnknown_81B591D[]; +extern const u8 gUnknown_81B592E[]; +extern const u8 gUnknown_81B593E[]; +extern const u8 gUnknown_81B5950[]; +extern const u8 gUnknown_81B595D[]; +extern const u8 gUnknown_81B5974[]; +extern const u8 gUnknown_81B5989[]; +extern const u8 gUnknown_81B59A7[]; +extern const u8 gUnknown_81B59BF[]; +extern const u8 gUnknown_81B59D6[]; +extern const u8 gUnknown_81B59E8[]; +extern const u8 gUnknown_81B59F5[]; +extern const u8 gUnknown_81B5A0D[]; +extern const u8 gUnknown_81B5A1B[]; +extern const u8 gUnknown_81B5A29[]; +extern const u8 gUnknown_81B5A37[]; +extern const u8 gUnknown_81B5A4D[]; +extern const u8 gUnknown_81B5B0C[]; +extern const u8 gUnknown_81B5B7D[]; +extern const u8 gUnknown_81B5C13[]; +extern const u8 gUnknown_81B5CDF[]; +extern const u8 gUnknown_81B5D87[]; +extern const u8 gUnknown_81B5E41[]; +extern const u8 gUnknown_81B5F10[]; +extern const u8 gUnknown_81B5FA6[]; +extern const u8 gUnknown_81B606C[]; +extern const u8 gUnknown_81B6140[]; +extern const u8 gUnknown_81B6203[]; +extern const u8 gUnknown_81B62E4[]; +extern const u8 gUnknown_81B6397[]; +extern const u8 gUnknown_81B6478[]; +extern const u8 gUnknown_81B6525[]; +extern const u8 gUnknown_81B65E7[]; +extern const u8 gUnknown_81B66BA[]; +extern const u8 gUnknown_81B678E[]; +extern const u8 gUnknown_81B6883[]; +extern const u8 gUnknown_81B68CD[]; +extern const u8 gUnknown_81B69B9[]; +extern const u8 gUnknown_81B6A9A[]; +extern const u8 gUnknown_81B6B6E[]; +extern const u8 gUnknown_81B6C4F[]; +extern const u8 gUnknown_81B6D4A[]; +extern const u8 gUnknown_81B6E02[]; +extern const u8 gUnknown_81B6EC1[]; +extern const u8 gUnknown_81B6FA8[]; +extern const u8 gUnknown_81B7075[]; +extern const u8 gUnknown_81B7108[]; +extern const u8 gUnknown_81B71EA[]; +extern const u8 gUnknown_81B723B[]; +extern const u8 gUnknown_81B7319[]; +extern const u8 gUnknown_81B73E8[]; +extern const u8 gUnknown_81B747E[]; +extern const u8 gUnknown_81B752C[]; +extern const u8 gUnknown_81B7611[]; +extern const u8 gUnknown_81B7692[]; +extern const u8 gUnknown_81B771E[]; +extern const u8 gUnknown_81B77DD[]; +extern const u8 gUnknown_81B7884[]; +extern const u8 gUnknown_81B7931[]; +extern const u8 gUnknown_81B79CB[]; +extern const u8 gUnknown_81B7A60[]; +extern const u8 gUnknown_81B7AEE[]; +extern const u8 gUnknown_81B7BBE[]; +extern const u8 gUnknown_81B7C57[]; +extern const u8 gUnknown_81B7CC1[]; +extern const u8 gUnknown_81B7CC4[]; +extern const u8 gUnknown_81B7CD9[]; +extern const u8 gUnknown_81B7CDF[]; +extern const u8 gUnknown_81B7CE6[]; +extern const u8 gUnknown_81B7CEE[]; +extern const u8 gUnknown_81B7CF6[]; +extern const u8 gUnknown_81B7CFE[]; +extern const u8 gUnknown_81B7D04[]; +extern const u8 gUnknown_81B7D12[]; +extern const u8 gUnknown_81B7D17[]; +extern const u8 gUnknown_81B7D1A[]; +extern const u8 gUnknown_81B7D1F[]; +extern const u8 gUnknown_81B7D27[]; +extern const u8 gUnknown_81B7D2D[]; +extern const u8 gUnknown_81B7D37[]; +extern const u8 gUnknown_81B7D3E[]; +extern const u8 gUnknown_81B7D45[]; +extern const u8 gUnknown_81B7D48[]; +extern const u8 gUnknown_81B7D4E[]; +extern const u8 gUnknown_81B7D57[]; +extern const u8 gUnknown_81B7D5B[]; +extern const u8 gUnknown_81B7D61[]; +extern const u8 gUnknown_81B7D6B[]; +extern const u8 gUnknown_81B7D76[]; +extern const u8 gUnknown_81B7D7E[]; +extern const u8 gUnknown_81B7D88[]; +extern const u8 gUnknown_81B7D8F[]; +extern const u8 gUnknown_81B7D9A[]; +extern const u8 gUnknown_81B7DA7[]; +extern const u8 gUnknown_81B7DB4[]; +extern const u8 gUnknown_81B7DBA[]; +extern const u8 gUnknown_81B7DC6[]; +extern const u8 gUnknown_81B7DCC[]; +extern const u8 gUnknown_81B7DD3[]; +extern const u8 gUnknown_81B7DD6[]; +extern const u8 gUnknown_81B7DD9[]; +extern const u8 gUnknown_81B7DE1[]; +extern const u8 gUnknown_81B7DEB[]; +extern const u8 gUnknown_81B7DFA[]; +extern const u8 gUnknown_81B7E02[]; +extern const u8 gUnknown_81B7E09[]; +extern const u8 gUnknown_81B7E0F[]; +extern const u8 gUnknown_81B7E16[]; +extern const u8 gUnknown_81B7F0A[]; +extern const u8 gUnknown_81B800A[]; +extern const u8 gUnknown_81B80EC[]; +extern const u8 gUnknown_81B81C2[]; +extern const u8 gUnknown_81B8256[]; +extern const u8 gUnknown_81B8348[]; +extern const u8 gUnknown_81B83EF[]; +extern const u8 gUnknown_81B847B[]; +extern const u8 gUnknown_81B8550[]; +extern const u8 gUnknown_81B8647[]; +extern const u8 gUnknown_81B86E2[]; +extern const u8 gUnknown_81B87B8[]; +extern const u8 gUnknown_81B8897[]; +extern const u8 gUnknown_81B8924[]; +extern const u8 gUnknown_81B8A04[]; +extern const u8 gUnknown_81B8A84[]; +extern const u8 gUnknown_81B8B62[]; +extern const u8 gUnknown_81B8C18[]; +extern const u8 gUnknown_81B8C94[]; +extern const u8 gUnknown_81B8D1D[]; +extern const u8 gUnknown_81B8DD4[]; +extern const u8 gUnknown_81B8E67[]; +extern const u8 gUnknown_81B8F4D[]; +extern const u8 gUnknown_81B901B[]; +extern const u8 gUnknown_81B90A7[]; +extern const u8 gUnknown_81B90E8[]; +extern const u8 gUnknown_81B9170[]; +extern const u8 gUnknown_81B91C2[]; +extern const u8 gUnknown_81B91F9[]; +extern const u8 gUnknown_81B92B8[]; +extern const u8 gUnknown_81B92ED[]; +extern const u8 gUnknown_81B93D8[]; +extern const u8 gUnknown_81B9439[]; +extern const u8 gUnknown_81B9497[]; +extern const u8 gUnknown_81B9560[]; +extern const u8 gUnknown_81B9656[]; +extern const u8 gUnknown_81B9749[]; +extern const u8 gUnknown_81B984F[]; +extern const u8 gUnknown_81B991C[]; +extern const u8 gUnknown_81B99C4[]; +extern const u8 gUnknown_81B9AA2[]; +extern const u8 gUnknown_81B9B2F[]; +extern const u8 gUnknown_81B9BB7[]; +extern const u8 gUnknown_81B9BC7[]; +extern const u8 gUnknown_81B9BD0[]; +extern const u8 gUnknown_81B9BE1[]; +extern const u8 gUnknown_81B9BF5[]; +extern const u8 gUnknown_81B9C09[]; +extern const u8 gUnknown_81B9C1D[]; +extern const u8 gUnknown_81B9C2F[]; +extern const u8 gUnknown_81B9D04[]; +extern const u8 gUnknown_81B9DC5[]; +extern const u8 gUnknown_81B9E75[]; +extern const u8 gUnknown_81B9F09[]; +extern const u8 gUnknown_81B9FCE[]; +extern const u8 gUnknown_81BA027[]; +extern const u8 gUnknown_81BA0F1[]; +extern const u8 gUnknown_81BA10D[]; +extern const u8 gUnknown_81BA121[]; +extern const u8 gUnknown_81BA138[]; +extern const u8 gUnknown_81BA14C[]; +extern const u8 gUnknown_81BA163[]; +extern const u8 gUnknown_81BA17A[]; +extern const u8 gUnknown_81BA194[]; +extern const u8 gUnknown_81BA1AC[]; +extern const u8 gUnknown_81BA1C7[]; +extern const u8 gUnknown_81BA1DC[]; +extern const u8 gUnknown_81BA1F4[]; +extern const u8 gUnknown_81BA209[]; +extern const u8 gUnknown_81BA221[]; +extern const u8 gUnknown_81BA234[]; +extern const u8 gUnknown_81BA24A[]; +extern const u8 gUnknown_81BA260[]; +extern const u8 gUnknown_81BA279[]; +extern const u8 gUnknown_81BA291[]; +extern const u8 gUnknown_81BA2AC[]; +extern const u8 gUnknown_81BA2C2[]; +extern const u8 gUnknown_81BA2DB[]; +extern const u8 gUnknown_81BA2F1[]; +extern const u8 gUnknown_81BA30A[]; +extern const u8 gUnknown_81BA320[]; +extern const u8 gUnknown_81BA339[]; +extern const u8 gUnknown_81BA34E[]; +extern const u8 gUnknown_81BA366[]; +extern const u8 gUnknown_81BA37C[]; +extern const u8 gUnknown_81BA395[]; +extern const u8 gUnknown_81BA3A9[]; +extern const u8 gUnknown_81BA3C0[]; +extern const u8 gUnknown_81BA3D5[]; +extern const u8 gUnknown_81BA3ED[]; +extern const u8 gUnknown_81BA400[]; +extern const u8 gUnknown_81BA416[]; +extern const u8 gUnknown_81BA4E6[]; +extern const u8 gUnknown_81BA539[]; +extern const u8 gUnknown_81BA595[]; +extern const u8 gUnknown_81BA5F2[]; +extern const u8 gUnknown_81BA66F[]; +extern const u8 gUnknown_81BA6C9[]; +extern const u8 gUnknown_81BA71F[]; +extern const u8 gUnknown_81BA796[]; +extern const u8 gUnknown_81BA7E9[]; +extern const u8 gUnknown_81BA862[]; +extern const u8 gUnknown_81BA8D3[]; +extern const u8 gUnknown_81BA92A[]; +extern const u8 gUnknown_81BA98D[]; +extern const u8 gUnknown_81BA9F1[]; +extern const u8 gUnknown_81BAA44[]; +extern const u8 gUnknown_81BAAB6[]; +extern const u8 gUnknown_81BAB18[]; +extern const u8 gUnknown_81BAB7A[]; +extern const u8 gUnknown_81BABCC[]; +extern const u8 gUnknown_81BAC29[]; +extern const u8 gUnknown_81BAC89[]; +extern const u8 gUnknown_81BACC4[]; +extern const u8 gUnknown_81BAD20[]; +extern const u8 gUnknown_81BAD60[]; +extern const u8 gUnknown_81BADA2[]; +extern const u8 gUnknown_81BADF7[]; +extern const u8 gUnknown_81BAEA8[]; +extern const u8 gUnknown_81BAF01[]; +extern const u8 gUnknown_81BAF6B[]; +extern const u8 gUnknown_81BAFCA[]; +extern const u8 gUnknown_81BB02E[]; +extern const u8 gUnknown_81BB084[]; +extern const u8 gUnknown_81BB0DF[]; +extern const u8 gUnknown_81BB156[]; + #endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/field_effect.h b/include/field_effect.h index bb5e0f1d5..426f77510 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -74,9 +74,14 @@ enum FieldEffectScriptIdx }; extern u32 gFieldEffectArguments[8]; +extern void (*gPostMenuFieldCallback)(void); +extern bool8 (*gFieldCallback2)(void); u8 FieldEffectStart(u8); bool8 FieldEffectActiveListContains(u8 id); void sub_80B69DC(void); +void CreateTeleportFieldEffectTask(void); +void FieldEffectActiveListRemove(u8 id); +void sub_8085620(void); #endif //GUARD_FIELD_EFFECTS_H diff --git a/include/field_fadetransition.h b/include/field_fadetransition.h index 051865210..4ba350491 100644 --- a/include/field_fadetransition.h +++ b/include/field_fadetransition.h @@ -3,14 +3,17 @@ #include "global.h" -void sub_80AF734(void); -void sp13E_warp_to_last_warp(void); -void sub_80AF7D0(void); -void sp13F_fall_to_last_warp(void); +void sub_807DF7C(void); +void DoWarp(void); +void DoDiveWarp(void); +void DoDoorWarp(void); -void sub_80AF848(void); -void sub_80AF87C(void); +void DoFallWarp(void); +void sub_807E59C(void); +void sub_807E500(void); void sub_807DF64(void); -void sub_807DF7C(void); +void sub_807DC18(void); +void FieldCallback_ReturnToEventScript2(void); +void sub_807DC00(void); #endif // GUARD_FIELD_FADETRANSITION_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index d2ec58979..27a7f23d7 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -35,7 +35,7 @@ u8 sub_808D4F4(void); void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8); void npc_load_two_palettes__no_record(u16, u8); void npc_load_two_palettes__and_record(u16, u8); -void sub_808EBA8(u8, u8, u8, s16, s16); +void sub_805F7C4(u8, u8, u8, s16, s16); void pal_patch_for_npc(u16, u8); void sub_808E16C(s16, s16); void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 decorCat); @@ -46,9 +46,9 @@ void FieldObjectClearAnim(struct MapObject *); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); void SpawnFieldObjectsInView(s16, s16); u8 sprite_new(u8, u8, s16, s16, u8, u8); -u8 AddPseudoFieldObject(u16, void (*)(struct Sprite *), s16, s16, u8); +u8 AddPseudoEventObject(u16, SpriteCallback, s16, s16, u8); u8 show_sprite(u8, u8, u8); -u8 SpawnSpecialFieldObjectParametrized(u8, u8, u8, s16, s16, u8); +u8 SpawnSpecialFieldObjectParameterized(u8, u8, u8, s16, s16, u8); u8 SpawnSpecialFieldObject(struct MapObjectTemplate *); void sub_8093038(s16, s16, s16 *, s16 *); void CameraObjectReset1(void); @@ -59,13 +59,13 @@ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8); void gpu_pal_allocator_reset__manage_upper_four(void); void sub_808E82C(u8, u8, u8, s16, s16); -void sub_808E7E4(u8, u8, u8); -void sub_808E78C(u8, u8, u8, u8); +void sub_805F400(u8, u8, u8); +void sub_805F3A8(u8, u8, u8, u8); void sub_808E75C(s16, s16); void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); void npc_coords_shift(struct MapObject *, s16, s16); void sub_808EB08(struct MapObject *, s16, s16); -void sub_808F254(u8, u8, u8); +void sub_805FE94(u8, u8, u8); void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *)); u8 FieldObjectFaceOppositeDirection(struct MapObject *, u8); u8 GetOppositeDirection(u8); @@ -92,5 +92,7 @@ void npc_paltag_set_load(u8 mode); // Exported data declarations extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; +extern const struct SpritePalette gUnknown_83A5348; +extern const struct SpriteTemplate * const gUnknown_83A0010[]; #endif //GUARD_FIELD_MAP_OBJ_H diff --git a/include/field_map_obj_helpers.h b/include/field_map_obj_helpers.h index 2d3f69d95..cd1b19eaf 100644 --- a/include/field_map_obj_helpers.h +++ b/include/field_map_obj_helpers.h @@ -4,6 +4,6 @@ #include "global.h" void UnfreezeMapObjects(void); -void sub_8097B78(u8, u8); +void sub_8069058(u8, u8); #endif diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 297d66441..4871bd082 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -20,5 +20,9 @@ u8 sub_805C808(u8); void SetPlayerAvatarStateMask(u8 mask); void sub_805D9C4(struct Sprite *sprite); void sub_805D154(u8 direction); +void sub_805DAE4(u8 direction); +void SetPlayerAvatarTransitionFlags(u16 a); +bool8 IsPlayerFacingSurfableFishableWater(void); +void sub_805D2C0(u8 secondaryId); #endif //GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index add61d57c..14d7e5d81 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -4,7 +4,7 @@ #include "global.h" void sub_80AF79C(void); -void sub_80B009C(u8); +void sub_807F028(u8); void sub_80B0244(void); #endif // GUARD_FIELD_SCREEN_EFFECT_H diff --git a/include/field_specials.h b/include/field_specials.h index 2b7991b55..a12fee575 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -4,6 +4,9 @@ #include "global.h" u8 GetLeadMonIndex(void); +u8 CountDigits(u16 number); void TV_PrintIntToStringVar(u8, int); +u16 ScrSpecial_GetStarter(void); +void sub_80CCB68(void); #endif // GUARD_FIELD_SPECIALS_H diff --git a/include/field_weather.h b/include/field_weather.h index b896259e9..13a1b4fcb 100644 --- a/include/field_weather.h +++ b/include/field_weather.h @@ -10,6 +10,9 @@ u8 GetSav1Weather(void); void sub_80AEDBC(void); void DoCurrentWeather(void); +void SetSav1WeatherFromCurrMapHeader(void); void sub_807B0C4(u16 *, u16 *, u32); +void PlayRainStoppingSoundEffect(void); +bool8 sub_807AA70(void); #endif // GUARD_WEATHER_H diff --git a/include/fieldmap.h b/include/fieldmap.h index c5abdb2e1..9903962a1 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -3,19 +3,25 @@ #include "global.h" -extern struct MapCoords { - int width; - int height; -} gUnknown_03005DC0; +#define NUM_TILES_IN_PRIMARY 640 +#define NUM_TILES_TOTAL 1024 +#define NUM_METATILES_IN_PRIMARY 640 +#define NUM_METATILES_TOTAL 1024 +#define NUM_PALS_IN_PRIMARY 7 +#define NUM_PALS_TOTAL 13 +#define VIRTUAL_MAP_SIZE 0x2800 + +extern struct BackupMapData VMap; +extern const struct MapData Route1_Layout; u32 MapGridGetMetatileIdAt(int, int); u32 MapGridGetMetatileBehaviorAt(int, int); void MapGridSetMetatileIdAt(int, int, u16); void MapGridSetMetatileEntryAt(int, int, u16); void GetCameraCoords(u16*, u16*); -bool8 MapGridIsImpassableAt(s16, s16); -s32 GetMapBorderIdAt(s16, s16); -bool32 CanCameraMoveInDirection(u8); -u16 GetBehaviorByMetatileId(u16 metatileId); +bool8 MapGridIsImpassableAt(s32, s32); +s32 GetMapBorderIdAt(s32, s32); +bool32 CanCameraMoveInDirection(s32); +u32 GetBehaviorByMetatileIdAndMapData(struct MapData *mapData, u16 metatile, u8 attr); #endif //GUARD_FIELDMAP_H diff --git a/include/fldeff.h b/include/fldeff.h new file mode 100644 index 000000000..364cb7550 --- /dev/null +++ b/include/fldeff.h @@ -0,0 +1,7 @@ +#ifndef GUARD_FLDEFF_H +#define GUARD_FLDEFF_H + +// rock smash +u8 oei_task_add(void); + +#endif // GUARD_FLDEFF_H diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index 89d5c1f5a..6f05a176a 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -100,7 +100,7 @@ struct CgbChannel u8 le; u8 sw; u32 fr; - u32 wp; + u32 * wp; u32 cp; u32 tp; u32 pp; diff --git a/include/gba/types.h b/include/gba/types.h index 480619d21..9f2594703 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -28,29 +28,42 @@ typedef u8 bool8; typedef u16 bool16; typedef u32 bool32; +struct BgCnt +{ + u16 priority:2; + u16 charBaseBlock:2; + u16 dummy:2; + u16 mosaic:1; + u16 palettes:1; + u16 screenBaseBlock:5; + u16 areaOverflowMode:1; + u16 screenSize:2; +}; +typedef volatile struct BgCnt vBgCnt; + struct PlttData { u16 r:5; // red u16 g:5; // green u16 b:5; // blue u16 unused_15:1; -} /*__attribute__((packed))*/; +}; struct OamData { /*0x00*/ u32 y:8; - /*0x01*/ u32 affineMode:2; // 0x1, 0x2 = 0x3 - u32 objMode:2; // 0x4, 0x8 = 0xC + /*0x01*/ u32 affineMode:2; // 0x1, 0x2 -> 0x4 + u32 objMode:2; // 0x4, 0x8 -> 0xC u32 mosaic:1; // 0x10 u32 bpp:1; // 0x20 - u32 shape:2; // 0x40, 0x80 + u32 shape:2; // 0x40, 0x80 -> 0xC0 /*0x02*/ u32 x:9; - u32 matrixNum:5; // bits 3/4 are h-flip/v-flip if not in affine mode - u32 size:2; + u32 matrixNum:5; // bits 3/4 are h-flip/v-flip if not in affine mode + u32 size:2; // 0x4000, 0x8000 -> 0xC000 - /*0x04*/ u16 tileNum:10; - u16 priority:2; + /*0x04*/ u16 tileNum:10; // 0x3FF + u16 priority:2; // 0x400, 0x800 -> 0xC00 u16 paletteNum:4; /*0x06*/ u16 affineParam; }; @@ -74,6 +87,29 @@ struct OamData #define ST_OAM_H_RECTANGLE 1 #define ST_OAM_V_RECTANGLE 2 +#define ST_OAM_SIZE_0 0 +#define ST_OAM_SIZE_1 1 +#define ST_OAM_SIZE_2 2 +#define ST_OAM_SIZE_3 3 + +#define SPRITE_SIZE_8x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_16x16 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_32x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_64x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_SQUARE)) + +#define SPRITE_SIZE_16x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_32x8 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_32x16 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_64x32 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_H_RECTANGLE)) + +#define SPRITE_SIZE_8x16 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_8x32 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_16x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_32x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_V_RECTANGLE)) + +#define SPRITE_SIZE(dim) ((SPRITE_SIZE_##dim >> 2) & 0x03) +#define SPRITE_SHAPE(dim) (SPRITE_SIZE_##dim & 0x03) + struct BgAffineSrcData { s32 texX; diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index ed5054b7d..3623737ea 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -51,8 +51,8 @@ struct Tileset /*0x04*/ void *tiles; /*0x08*/ void *palettes; /*0x0c*/ void *metatiles; - /*0x10*/ void *metatileAttributes; - /*0x14*/ TilesetCB callback; + /*0x10*/ TilesetCB callback; + /*0x14*/ void *metatileAttributes; }; struct MapData @@ -63,15 +63,25 @@ struct MapData /*0x0c*/ u16 *map; /*0x10*/ struct Tileset *primaryTileset; /*0x14*/ struct Tileset *secondaryTileset; + /*0x18*/ u8 unk18; + /*0x19*/ u8 unk19; }; struct BackupMapData { - s32 width; - s32 height; + s32 Xsize; + s32 Ysize; u16 *map; }; +union __attribute__((packed)) MapObjectRange { + u8 as_byte; + struct __attribute__((packed)) { + u8 x:4; + u8 y:4; + } __attribute__((aligned (1))) as_nybbles; +} __attribute__((aligned (1))); + struct MapObjectTemplate { /*0x00*/ u8 localId; @@ -81,8 +91,7 @@ struct MapObjectTemplate /*0x06*/ s16 y; /*0x08*/ u8 elevation; /*0x09*/ u8 movementType; - /*0x0A*/ u8 unkA_0:4; - u8 unkA_4:4; + /*0x0A*/ union MapObjectRange range; ///*0x0B*/ u8 fillerB[1]; /*0x0C*/ u16 unkC; /*0x0E*/ u16 unkE; @@ -149,9 +158,9 @@ struct MapEvents struct MapConnection { /*0x00*/ u8 direction; - /*0x01*/ u32 offset; - /*0x05*/ u8 mapGroup; - /*0x06*/ u8 mapNum; + /*0x04*/ u32 offset; + /*0x08*/ u8 mapGroup; + /*0x09*/ u8 mapNum; }; struct MapConnections @@ -226,13 +235,7 @@ struct MapObject /*0x14*/ struct Coords16 coords3; /*0x18*/ u8 mapobj_unk_18:4; //current direction? /*0x18*/ u8 placeholder18:4; - /*0x19*/ union __attribute__((packed)) { - u8 as_byte; - struct __attribute__((packed)) { - u8 x:4; - u8 y:4; - } __attribute__((aligned (1))) as_nybbles; - } __attribute__((aligned (1))) range; + /*0x19*/ union MapObjectRange range; /*0x1A*/ u8 mapobj_unk_1A; /*0x1B*/ u8 mapobj_unk_1B; /*0x1C*/ u8 mapobj_unk_1C; @@ -328,7 +331,7 @@ struct Camera }; extern struct MapObject gMapObjects[NUM_FIELD_OBJECTS]; -extern u8 gSelectedMapObject; +extern u8 gSelectedEventObject; extern struct MapHeader gMapHeader; extern struct PlayerAvatar gPlayerAvatar; extern struct Camera gCamera; diff --git a/include/global.h b/include/global.h index 858d95831..050c311e4 100644 --- a/include/global.h +++ b/include/global.h @@ -4,6 +4,7 @@ #include "config.h" #include "gba/gba.h" #include <string.h> +#include "constants/global.h" // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); @@ -39,10 +40,6 @@ // Converts a number to Q4.12 fixed-point format #define Q_4_12(n) ((s16)((n) * 4096)) -#define POKEMON_SLOTS_NUMBER 412 -#define POKEMON_NAME_LENGTH 10 -#define OT_NAME_LENGTH 7 - #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) >= (b) ? (a) : (b)) @@ -72,81 +69,13 @@ #define TEST_BUTTON(field, button) ({(field) & (button);}) #define JOY_NEW(button) TEST_BUTTON(gMain.newKeys, button) #define JOY_HELD(button) TEST_BUTTON(gMain.heldKeys, button) +#define JOY_REPT(button) TEST_BUTTON(gMain.newAndRepeatedKeys, button) extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; -enum -{ - VERSION_SAPPHIRE = 1, - VERSION_RUBY = 2, - VERSION_EMERALD = 3, - VERSION_FIRE_RED = 4, - VERSION_LEAF_GREEN = 5, -}; - -enum LanguageId { - LANGUAGE_JAPANESE = 1, - LANGUAGE_ENGLISH = 2, - LANGUAGE_FRENCH = 3, - LANGUAGE_ITALIAN = 4, - LANGUAGE_GERMAN = 5, - // 6 goes unused but the theory is it was meant to be Korean - LANGUAGE_SPANISH = 7, -}; - -#define GAME_LANGUAGE (LANGUAGE_ENGLISH) - -#define PC_ITEMS_COUNT 30 -#define BAG_ITEMS_COUNT 42 -#define BAG_KEYITEMS_COUNT 30 -#define BAG_POKEBALLS_COUNT 13 -#define BAG_TMHM_COUNT 58 -#define BAG_BERRIES_COUNT 43 - -enum -{ - MALE, - FEMALE -}; - -enum -{ - OPTIONS_BUTTON_MODE_NORMAL, - OPTIONS_BUTTON_MODE_LR, - OPTIONS_BUTTON_MODE_L_EQUALS_A -}; - -enum -{ - OPTIONS_TEXT_SPEED_SLOW, - OPTIONS_TEXT_SPEED_MID, - OPTIONS_TEXT_SPEED_FAST -}; - -enum -{ - OPTIONS_SOUND_MONO, - OPTIONS_SOUND_STEREO -}; - -enum -{ - OPTIONS_BATTLE_STYLE_SHIFT, - OPTIONS_BATTLE_STYLE_SET -}; - -enum -{ - BAG_ITEMS = 1, - BAG_POKEBALLS, - BAG_TMsHMs, - BAG_BERRIES, - BAG_KEYITEMS -}; - struct Coords16 { s16 x; @@ -241,33 +170,6 @@ struct LinkBattleRecords u8 languages[LINK_B_RECORDS_COUNT]; }; -struct BattleTowerPokemon -{ - u16 species; - u16 heldItem; - u16 moves[4]; - u8 level; - u8 ppBonuses; - u8 hpEV; - u8 attackEV; - u8 defenseEV; - u8 speedEV; - u8 spAttackEV; - u8 spDefenseEV; - u32 otId; - u32 hpIV:5; - u32 attackIV:5; - u32 defenseIV:5; - u32 speedIV:5; - u32 spAttackIV:5; - u32 spDefenseIV:5; - u32 gap:1; - u32 altAbility:1; - u32 personality; - u8 nickname[POKEMON_NAME_LENGTH + 1]; - u8 friendship; -}; - struct UnknownSaveBlock2Struct { u8 field_0; @@ -328,7 +230,8 @@ struct SaveBlock2 /*0x0AC*/ u8 filler_AC[0x3F4]; /*0x4A0*/ u32 unk_4A0[0x2F]; /*0x55c*/ struct UnkSaveBlock2Substruct_55C unk_55C; - /*0x574*/ u8 filler_574[0x524]; + /*0x574*/ u8 filler_574[0x324]; + /*0x898*/ u16 mapView[0x100]; /*0xA98*/ struct LinkBattleRecords linkBattleRecords; /*0xAF0*/ struct BerryCrush berryCrush; /*0xB00*/ u8 filler_B00[0x420]; @@ -524,9 +427,9 @@ struct ContestWinner u8 contestRank; }; -struct DaycareMiscMon +struct DayCareMail { - struct MailStruct mail; + struct MailStruct message; u8 OT_name[OT_NAME_LENGTH + 1]; u8 monName[POKEMON_NAME_LENGTH + 1]; u8 gameLanguage:4; @@ -536,7 +439,7 @@ struct DaycareMiscMon struct DaycareMon { struct BoxPokemon mon; - struct DaycareMiscMon misc; + struct DayCareMail mail; u32 steps; }; @@ -545,14 +448,8 @@ struct DaycareMon struct DayCare { struct DaycareMon mons[DAYCARE_MON_COUNT]; - u16 unk_118; - u8 unk_11A; -}; - -struct DayCareMail -{ - /*0x00*/ struct MailStruct message; - /*0x24*/ u8 names[19]; + u16 offspringPersonality; + u8 stepCounter; }; struct RecordMixingDayCareMail @@ -597,6 +494,12 @@ typedef union QuestLogScene QuestLogScene; // This name is a complete guess and may change. +#define MAP_OBJECTS_COUNT 16 +#define BERRY_TREES_COUNT 128 +#define FLAGS_COUNT 288 // 300 +#define VARS_COUNT 256 +#define MAIL_COUNT 16 + // Declare here so that it can be recursively referenced. union QuestLogMovement; @@ -610,6 +513,43 @@ union QuestLogMovement } ident_struct; }; +struct QuestLogMapObject +{ + /*0x00*/ u8 active:1; + /*0x00*/ u8 mapobj_bit_3:1; + /*0x00*/ u8 mapobj_bit_4:1; + /*0x00*/ u8 mapobj_bit_5:1; + /*0x00*/ u8 mapobj_bit_8:1; + /*0x00*/ u8 mapobj_bit_9:1; + /*0x00*/ u8 mapobj_bit_10:1; + /*0x00*/ u8 mapobj_bit_11:1; + /*0x01*/ u8 mapobj_bit_12:1; + /*0x01*/ u8 mapobj_bit_13:1; + /*0x01*/ u8 mapobj_bit_14:1; + /*0x01*/ u8 mapobj_bit_15:1; + /*0x01*/ u8 mapobj_bit_16:1; + /*0x01*/ u8 mapobj_bit_23:1; + /*0x01*/ u8 mapobj_bit_24:1; + /*0x01*/ u8 mapobj_bit_25:1; + /*0x02*/ u8 mapobj_bit_26:1; + /*0x02*/ u8 mapobj_unk_18:4; + /*0x02*/ u8 unused_02_5:3; + /*0x03*/ u8 mapobj_unk_0B_0:4; + /*0x03*/ u8 elevation:4; + /*0x04*/ u8 graphicsId; + /*0x05*/ u8 animPattern; + /*0x06*/ u8 trainerType; + /*0x07*/ u8 localId; + /*0x08*/ u8 mapNum; + /*0x09*/ u8 mapGroup; + /*0x0a*/ s16 x; + /*0x0c*/ s16 y; + /*0x0e*/ u8 trainerRange_berryTreeId; + /*0x0f*/ u8 mapobj_unk_1F; + /*0x10*/ u8 mapobj_unk_21; + /*0x11*/ u8 animId; +}; + struct QuestLog { /*0x0000*/ u8 unk_000; @@ -618,7 +558,7 @@ struct QuestLog /*0x0003*/ s8 unk_003; /*0x0004*/ s16 unk_004; /*0x0006*/ s16 unk_006; - /*0x0008*/ u8 filler_008[0x140]; + /*0x0008*/ struct QuestLogMapObject unk_008[MAP_OBJECTS_COUNT]; // These arrays hold the game state for // playing back the quest log @@ -638,12 +578,6 @@ struct FameCheckerSaveData u16 unk_0_E:2; }; -#define MAP_OBJECTS_COUNT 16 -#define BERRY_TREES_COUNT 128 -#define FLAGS_COUNT 288 // 300 -#define VARS_COUNT 256 -#define MAIL_COUNT 16 - #define NUM_EASY_CHAT_EXTRA_PHRASES 33 #define EASY_CHAT_EXTRA_PHRASES_SIZE ((NUM_EASY_CHAT_EXTRA_PHRASES >> 3) + (NUM_EASY_CHAT_EXTRA_PHRASES % 8 ? 1 : 0)) @@ -709,6 +643,27 @@ struct MEventBuffers /*0x344 0x3464*/ u32 unk_344[2][5]; }; // 0x36C 0x348C +struct TrainerTowerLog +{ + u32 unk0; + u32 unk4; + u8 unk8; + u8 unk9; + u8 unkA_0:1; + u8 unkA_1:1; + u8 unkA_2:1; + u8 unkA_3:1; + u8 unkA_4:1; + u8 unkA_5:1; + u8 unkA_6:2; +}; + +struct TrainerRematchState +{ + u16 stepCounter; + u8 rematches[100]; +}; + struct SaveBlock1 { /*0x0000*/ struct Coords16 pos; @@ -736,7 +691,7 @@ struct SaveBlock1 /*0x05F8*/ u8 seen1[DEX_FLAGS_NO]; /*0x062C*/ u16 berryBlenderRecords[3]; // unused /*0x0632*/ u8 field_632[6]; // unused? - /*0x0638*/ u8 trainerRematchStepCounter; + /*0x0638*/ u16 trainerRematchStepCounter; /*0x063A*/ u8 ALIGNED(2) trainerRematches[100]; /*0x06A0*/ struct MapObject mapObjects[MAP_OBJECTS_COUNT]; /*0x08E0*/ struct MapObjectTemplate mapObjectTemplates[64]; @@ -764,20 +719,15 @@ struct SaveBlock1 /*0x3A48*/ u8 filler_3a48[4]; /*0x3A4C*/ u8 rivalName[PLAYER_NAME_LENGTH]; /*0x3A54*/ struct FameCheckerSaveData fameChecker[NUM_FAMECHECKER_PERSONS]; - /*0x3A94*/ u8 filler3A94[0x2A0]; + /*0x3A94*/ u8 filler3A94[0x204]; + /*0x3C98*/ struct DaycareMon route5DayCareMon; + /*0x3D24*/ u8 filler3D24[0x10]; /*0x3D34*/ u32 unkArrayIdx; - /*0x3D38*/ u32 unkArray[4][3]; + /*0x3D38*/ struct TrainerTowerLog unkArray[4]; }; extern struct SaveBlock1* gSaveBlock1Ptr; -struct Bitmap // TODO: Find a better spot for this -{ - u8* pixels; - u32 width:16; - u32 height:16; -}; - extern u8 gReservedSpritePaletteCount; #endif // GUARD_GLOBAL_H diff --git a/include/graphics.h b/include/graphics.h index d249ece10..1b2913164 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -150,4 +150,814 @@ extern const u16 gFameCheckerBgTiles[0xa50]; extern const u16 gFameCheckerBg3Tilemap[0x400]; extern const u16 gFameCheckerBg2Tilemap[0x400]; +// tm_case +extern const u32 gUnknown_8E845D8[]; +extern const u32 gUnknown_8E84A24[]; +extern const u32 gUnknown_8E84B70[]; +extern const u32 gUnknown_8E84CB0[]; +extern const u32 gUnknown_8E84D20[]; +extern const u32 gTMCase_TMSpriteGfx[]; +extern const u32 gUnknown_8E84F20[]; +extern const u32 gUnknown_8E85068[]; +extern const u8 gUnknown_8E99118[]; +extern const u16 gTMCaseMainWindowPalette[]; + +// egg_hatch +extern const u32 gBattleTextboxTiles[]; +extern const u32 gFile_graphics_interface_menu_map_tilemap[]; +extern const u32 gBattleTextboxPalette[]; +extern const u32 gTradeGba2_Pal[]; +extern const u32 gTradeGba_Gfx[]; + +// teachy_tv +extern const u8 gUnknown_8E86240[]; +extern const u8 gUnknown_8E86BE8[]; +extern const u8 gUnknown_8E86D6C[]; +extern const u8 gUnknown_8E86F98[]; + +// berry_fix_program +extern const u8 gBerryFixGameboy_Gfx[]; +extern const u8 gBerryFixGameboy_Tilemap[]; +extern const u8 gBerryFixGameboy_Pal[]; +extern const u8 gBerryFixGameboyLogo_Gfx[]; +extern const u8 gBerryFixGameboyLogo_Tilemap[]; +extern const u8 gBerryFixGameboyLogo_Pal[]; +extern const u8 gBerryFixGbaTransfer_Gfx[]; +extern const u8 gBerryFixGbaTransfer_Tilemap[]; +extern const u8 gBerryFixGbaTransfer_Pal[]; +extern const u8 gBerryFixGbaTransferHighlight_Gfx[]; +extern const u8 gBerryFixGbaTransferHighlight_Tilemap[]; +extern const u8 gBerryFixGbaTransferHighlight_Pal[]; +extern const u8 gBerryFixGbaTransferError_Gfx[]; +extern const u8 gBerryFixGbaTransferError_Tilemap[]; +extern const u8 gBerryFixGbaTransferError_Pal[]; +extern const u8 gBerryFixWindow_Gfx[]; +extern const u8 gBerryFixWindow_Tilemap[]; +extern const u8 gBerryFixWindow_Pal[]; + +// item_pc + +extern const u8 gItemPcTiles[]; +extern const u8 gItemPcBgPals[]; +extern const u8 gItemPcTilemap[]; + +// item_menu_icons +extern const u8 gUnknown_8E8362C[]; +extern const u8 gUnknown_8E83DBC[]; +extern const u8 gUnknown_8E84560[]; +extern const u8 gFile_graphics_interface_bag_swap_sheet[]; +extern const u8 gFile_graphics_interface_bag_swap_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_master_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_master_ball_palette[]; +extern const u8 gFile_graphics_items_icons_ultra_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ultra_ball_palette[]; +extern const u8 gFile_graphics_items_icons_great_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_great_ball_palette[]; +extern const u8 gFile_graphics_items_icons_poke_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_poke_ball_palette[]; +extern const u8 gFile_graphics_items_icons_safari_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_safari_ball_palette[]; +extern const u8 gFile_graphics_items_icons_net_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_net_ball_palette[]; +extern const u8 gFile_graphics_items_icons_dive_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dive_ball_palette[]; +extern const u8 gFile_graphics_items_icons_nest_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_nest_ball_palette[]; +extern const u8 gFile_graphics_items_icons_repeat_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_repeat_ball_palette[]; +extern const u8 gFile_graphics_items_icons_timer_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_repeat_ball_palette[]; +extern const u8 gFile_graphics_items_icons_luxury_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_luxury_ball_palette[]; +extern const u8 gFile_graphics_items_icons_premier_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_luxury_ball_palette[]; +extern const u8 gFile_graphics_items_icons_potion_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_potion_palette[]; +extern const u8 gFile_graphics_items_icons_antidote_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_antidote_palette[]; +extern const u8 gFile_graphics_items_icons_status_heal_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_burn_heal_palette[]; +extern const u8 gFile_graphics_items_icons_status_heal_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ice_heal_palette[]; +extern const u8 gFile_graphics_items_icons_status_heal_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_awakening_palette[]; +extern const u8 gFile_graphics_items_icons_status_heal_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_paralyze_heal_palette[]; +extern const u8 gFile_graphics_items_icons_large_potion_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_full_restore_palette[]; +extern const u8 gFile_graphics_items_icons_large_potion_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_max_potion_palette[]; +extern const u8 gFile_graphics_items_icons_potion_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_hyper_potion_palette[]; +extern const u8 gFile_graphics_items_icons_potion_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_super_potion_palette[]; +extern const u8 gFile_graphics_items_icons_full_heal_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_full_heal_palette[]; +extern const u8 gFile_graphics_items_icons_revive_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_revive_palette[]; +extern const u8 gFile_graphics_items_icons_max_revive_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_revive_palette[]; +extern const u8 gFile_graphics_items_icons_fresh_water_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fresh_water_palette[]; +extern const u8 gFile_graphics_items_icons_soda_pop_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_soda_pop_palette[]; +extern const u8 gFile_graphics_items_icons_lemonade_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lemonade_palette[]; +extern const u8 gFile_graphics_items_icons_moomoo_milk_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_moomoo_milk_palette[]; +extern const u8 gFile_graphics_items_icons_powder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_energy_powder_palette[]; +extern const u8 gFile_graphics_items_icons_energy_root_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_energy_root_palette[]; +extern const u8 gFile_graphics_items_icons_powder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_heal_powder_palette[]; +extern const u8 gFile_graphics_items_icons_revival_herb_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_revival_herb_palette[]; +extern const u8 gFile_graphics_items_icons_ether_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ether_palette[]; +extern const u8 gFile_graphics_items_icons_ether_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_max_ether_palette[]; +extern const u8 gFile_graphics_items_icons_ether_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_elixir_palette[]; +extern const u8 gFile_graphics_items_icons_ether_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_max_elixir_palette[]; +extern const u8 gFile_graphics_items_icons_lava_cookie_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lava_cookie_and_letter_palette[]; +extern const u8 gFile_graphics_items_icons_flute_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_blue_flute_palette[]; +extern const u8 gFile_graphics_items_icons_flute_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_yellow_flute_palette[]; +extern const u8 gFile_graphics_items_icons_flute_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_red_flute_palette[]; +extern const u8 gFile_graphics_items_icons_flute_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_black_flute_palette[]; +extern const u8 gFile_graphics_items_icons_flute_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_white_flute_palette[]; +extern const u8 gFile_graphics_items_icons_berry_juice_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_berry_juice_palette[]; +extern const u8 gFile_graphics_items_icons_sacred_ash_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_sacred_ash_palette[]; +extern const u8 gFile_graphics_items_icons_powder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_shoal_salt_palette[]; +extern const u8 gFile_graphics_items_icons_shoal_shell_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_shell_palette[]; +extern const u8 gFile_graphics_items_icons_shard_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_red_shard_palette[]; +extern const u8 gFile_graphics_items_icons_shard_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_blue_shard_palette[]; +extern const u8 gFile_graphics_items_icons_shard_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_yellow_shard_palette[]; +extern const u8 gFile_graphics_items_icons_shard_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_green_shard_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_hp_up_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_hp_up_palette[]; +extern const u8 gFile_graphics_items_icons_vitamin_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_protein_palette[]; +extern const u8 gFile_graphics_items_icons_vitamin_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_iron_palette[]; +extern const u8 gFile_graphics_items_icons_vitamin_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_carbos_palette[]; +extern const u8 gFile_graphics_items_icons_vitamin_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_calcium_palette[]; +extern const u8 gFile_graphics_items_icons_rare_candy_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_rare_candy_palette[]; +extern const u8 gFile_graphics_items_icons_pp_up_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pp_up_palette[]; +extern const u8 gFile_graphics_items_icons_vitamin_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_zinc_palette[]; +extern const u8 gFile_graphics_items_icons_pp_max_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pp_max_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_guard_spec_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dire_hit_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_x_attack_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_x_defend_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_x_speed_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_x_accuracy_palette[]; +extern const u8 gFile_graphics_items_icons_battle_stat_item_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_x_special_palette[]; +extern const u8 gFile_graphics_items_icons_poke_doll_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_poke_doll_palette[]; +extern const u8 gFile_graphics_items_icons_fluffy_tail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fluffy_tail_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_repel_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_super_repel_palette[]; +extern const u8 gFile_graphics_items_icons_repel_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_max_repel_palette[]; +extern const u8 gFile_graphics_items_icons_escape_rope_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_escape_rope_palette[]; +extern const u8 gFile_graphics_items_icons_repel_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_repel_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_sun_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_sun_stone_palette[]; +extern const u8 gFile_graphics_items_icons_moon_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_moon_stone_palette[]; +extern const u8 gFile_graphics_items_icons_fire_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fire_stone_palette[]; +extern const u8 gFile_graphics_items_icons_thunder_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_thunder_stone_palette[]; +extern const u8 gFile_graphics_items_icons_water_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_water_stone_palette[]; +extern const u8 gFile_graphics_items_icons_leaf_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_leaf_stone_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_tiny_mushroom_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mushroom_palette[]; +extern const u8 gFile_graphics_items_icons_big_mushroom_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mushroom_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_pearl_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pearl_palette[]; +extern const u8 gFile_graphics_items_icons_big_pearl_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pearl_palette[]; +extern const u8 gFile_graphics_items_icons_stardust_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_star_palette[]; +extern const u8 gFile_graphics_items_icons_star_piece_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_star_palette[]; +extern const u8 gFile_graphics_items_icons_nugget_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_nugget_palette[]; +extern const u8 gFile_graphics_items_icons_heart_scale_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_heart_scale_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_orange_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_orange_mail_palette[]; +extern const u8 gFile_graphics_items_icons_harbor_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_harbor_mail_palette[]; +extern const u8 gFile_graphics_items_icons_glitter_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_glitter_mail_palette[]; +extern const u8 gFile_graphics_items_icons_mech_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mech_mail_palette[]; +extern const u8 gFile_graphics_items_icons_wood_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_wood_mail_palette[]; +extern const u8 gFile_graphics_items_icons_wave_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_wave_mail_palette[]; +extern const u8 gFile_graphics_items_icons_bead_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_bead_mail_palette[]; +extern const u8 gFile_graphics_items_icons_shadow_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_shadow_mail_palette[]; +extern const u8 gFile_graphics_items_icons_tropic_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_tropic_mail_palette[]; +extern const u8 gFile_graphics_items_icons_dream_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dream_mail_palette[]; +extern const u8 gFile_graphics_items_icons_fab_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fab_mail_palette[]; +extern const u8 gFile_graphics_items_icons_retro_mail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_retro_mail_palette[]; +extern const u8 gFile_graphics_items_icons_cheri_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_cheri_berry_palette[]; +extern const u8 gFile_graphics_items_icons_chesto_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_chesto_berry_palette[]; +extern const u8 gFile_graphics_items_icons_pecha_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pecha_berry_palette[]; +extern const u8 gFile_graphics_items_icons_rawst_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_rawst_berry_palette[]; +extern const u8 gFile_graphics_items_icons_aspear_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_aspear_berry_palette[]; +extern const u8 gFile_graphics_items_icons_leppa_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_leppa_berry_palette[]; +extern const u8 gFile_graphics_items_icons_oran_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_oran_berry_palette[]; +extern const u8 gFile_graphics_items_icons_persim_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_persim_berry_palette[]; +extern const u8 gFile_graphics_items_icons_lum_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lum_berry_palette[]; +extern const u8 gFile_graphics_items_icons_sitrus_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_sitrus_berry_palette[]; +extern const u8 gFile_graphics_items_icons_figy_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_figy_berry_palette[]; +extern const u8 gFile_graphics_items_icons_wiki_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_wiki_berry_palette[]; +extern const u8 gFile_graphics_items_icons_mago_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mago_berry_palette[]; +extern const u8 gFile_graphics_items_icons_aguav_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_aguav_berry_palette[]; +extern const u8 gFile_graphics_items_icons_iapapa_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_iapapa_berry_palette[]; +extern const u8 gFile_graphics_items_icons_razz_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_razz_berry_palette[]; +extern const u8 gFile_graphics_items_icons_bluk_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_bluk_berry_palette[]; +extern const u8 gFile_graphics_items_icons_nanab_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_nanab_berry_palette[]; +extern const u8 gFile_graphics_items_icons_wepear_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_wepear_berry_palette[]; +extern const u8 gFile_graphics_items_icons_pinap_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pinap_berry_palette[]; +extern const u8 gFile_graphics_items_icons_pomeg_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pomeg_berry_palette[]; +extern const u8 gFile_graphics_items_icons_kelpsy_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_kelpsy_berry_palette[]; +extern const u8 gFile_graphics_items_icons_qualot_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_qualot_berry_palette[]; +extern const u8 gFile_graphics_items_icons_hondew_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_hondew_berry_palette[]; +extern const u8 gFile_graphics_items_icons_grepa_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_grepa_berry_palette[]; +extern const u8 gFile_graphics_items_icons_tamato_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_tamato_berry_palette[]; +extern const u8 gFile_graphics_items_icons_cornn_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_cornn_berry_palette[]; +extern const u8 gFile_graphics_items_icons_magost_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_magost_berry_palette[]; +extern const u8 gFile_graphics_items_icons_rabuta_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_rabuta_berry_palette[]; +extern const u8 gFile_graphics_items_icons_nomel_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_nomel_berry_palette[]; +extern const u8 gFile_graphics_items_icons_spelon_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_spelon_berry_palette[]; +extern const u8 gFile_graphics_items_icons_pamtre_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pamtre_berry_palette[]; +extern const u8 gFile_graphics_items_icons_watmel_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_watmel_berry_palette[]; +extern const u8 gFile_graphics_items_icons_durin_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_durin_berry_palette[]; +extern const u8 gFile_graphics_items_icons_belue_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_belue_berry_palette[]; +extern const u8 gFile_graphics_items_icons_liechi_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_liechi_berry_palette[]; +extern const u8 gFile_graphics_items_icons_ganlon_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ganlon_berry_palette[]; +extern const u8 gFile_graphics_items_icons_salac_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_salac_berry_palette[]; +extern const u8 gFile_graphics_items_icons_petaya_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_petaya_berry_palette[]; +extern const u8 gFile_graphics_items_icons_apicot_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_apicot_berry_palette[]; +extern const u8 gFile_graphics_items_icons_lansat_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lansat_berry_palette[]; +extern const u8 gFile_graphics_items_icons_starf_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_starf_berry_palette[]; +extern const u8 gFile_graphics_items_icons_enigma_berry_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_enigma_berry_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_bright_powder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_bright_powder_palette[]; +extern const u8 gFile_graphics_items_icons_in_battle_herb_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_white_herb_palette[]; +extern const u8 gFile_graphics_items_icons_macho_brace_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_macho_brace_palette[]; +extern const u8 gFile_graphics_items_icons_exp_share_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_exp_share_palette[]; +extern const u8 gFile_graphics_items_icons_quick_claw_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_quick_claw_palette[]; +extern const u8 gFile_graphics_items_icons_soothe_bell_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_soothe_bell_palette[]; +extern const u8 gFile_graphics_items_icons_in_battle_herb_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mental_herb_palette[]; +extern const u8 gFile_graphics_items_icons_choice_band_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_choice_band_palette[]; +extern const u8 gFile_graphics_items_icons_kings_rock_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_kings_rock_palette[]; +extern const u8 gFile_graphics_items_icons_silver_powder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_silver_powder_palette[]; +extern const u8 gFile_graphics_items_icons_amulet_coin_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_amulet_coin_palette[]; +extern const u8 gFile_graphics_items_icons_cleanse_tag_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_cleanse_tag_palette[]; +extern const u8 gFile_graphics_items_icons_soul_dew_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_soul_dew_palette[]; +extern const u8 gFile_graphics_items_icons_deep_sea_tooth_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_deep_sea_tooth_palette[]; +extern const u8 gFile_graphics_items_icons_deep_sea_scale_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_deep_sea_scale_palette[]; +extern const u8 gFile_graphics_items_icons_smoke_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_smoke_ball_palette[]; +extern const u8 gFile_graphics_items_icons_everstone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_everstone_palette[]; +extern const u8 gFile_graphics_items_icons_focus_band_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_focus_band_palette[]; +extern const u8 gFile_graphics_items_icons_lucky_egg_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lucky_egg_palette[]; +extern const u8 gFile_graphics_items_icons_scope_lens_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_scope_lens_palette[]; +extern const u8 gFile_graphics_items_icons_metal_coat_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_metal_coat_palette[]; +extern const u8 gFile_graphics_items_icons_leftovers_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_leftovers_palette[]; +extern const u8 gFile_graphics_items_icons_dragon_scale_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dragon_scale_palette[]; +extern const u8 gFile_graphics_items_icons_light_ball_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_light_ball_palette[]; +extern const u8 gFile_graphics_items_icons_soft_sand_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_soft_sand_palette[]; +extern const u8 gFile_graphics_items_icons_hard_stone_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_hard_stone_palette[]; +extern const u8 gFile_graphics_items_icons_miracle_seed_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_miracle_seed_palette[]; +extern const u8 gFile_graphics_items_icons_black_glasses_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_black_type_enhancing_item_palette[]; +extern const u8 gFile_graphics_items_icons_black_belt_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_black_type_enhancing_item_palette[]; +extern const u8 gFile_graphics_items_icons_magnet_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_magnet_palette[]; +extern const u8 gFile_graphics_items_icons_mystic_water_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mystic_water_palette[]; +extern const u8 gFile_graphics_items_icons_sharp_beak_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_sharp_beak_palette[]; +extern const u8 gFile_graphics_items_icons_poison_barb_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_poison_barb_palette[]; +extern const u8 gFile_graphics_items_icons_never_melt_ice_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_never_melt_ice_palette[]; +extern const u8 gFile_graphics_items_icons_spell_tag_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_spell_tag_palette[]; +extern const u8 gFile_graphics_items_icons_twisted_spoon_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_twisted_spoon_palette[]; +extern const u8 gFile_graphics_items_icons_charcoal_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_charcoal_palette[]; +extern const u8 gFile_graphics_items_icons_dragon_fang_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dragon_fang_palette[]; +extern const u8 gFile_graphics_items_icons_silk_scarf_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_silk_scarf_palette[]; +extern const u8 gFile_graphics_items_icons_up_grade_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_up_grade_palette[]; +extern const u8 gFile_graphics_items_icons_shell_bell_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_shell_palette[]; +extern const u8 gFile_graphics_items_icons_sea_incense_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_sea_incense_palette[]; +extern const u8 gFile_graphics_items_icons_lax_incense_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lax_incense_palette[]; +extern const u8 gFile_graphics_items_icons_lucky_punch_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lucky_punch_palette[]; +extern const u8 gFile_graphics_items_icons_metal_powder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_metal_powder_palette[]; +extern const u8 gFile_graphics_items_icons_thick_club_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_thick_club_palette[]; +extern const u8 gFile_graphics_items_icons_stick_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_stick_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_scarf_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_red_scarf_palette[]; +extern const u8 gFile_graphics_items_icons_scarf_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_blue_scarf_palette[]; +extern const u8 gFile_graphics_items_icons_scarf_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pink_scarf_palette[]; +extern const u8 gFile_graphics_items_icons_scarf_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_green_scarf_palette[]; +extern const u8 gFile_graphics_items_icons_scarf_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_yellow_scarf_palette[]; +extern const u8 gFile_graphics_items_icons_mach_bike_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mach_bike_palette[]; +extern const u8 gFile_graphics_items_icons_coin_case_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_coin_case_palette[]; +extern const u8 gFile_graphics_items_icons_itemfinder_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_itemfinder_palette[]; +extern const u8 gFile_graphics_items_icons_old_rod_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_old_rod_palette[]; +extern const u8 gFile_graphics_items_icons_good_rod_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_good_rod_palette[]; +extern const u8 gFile_graphics_items_icons_super_rod_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_super_rod_palette[]; +extern const u8 gFile_graphics_items_icons_ss_ticket_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ss_ticket_palette[]; +extern const u8 gFile_graphics_items_icons_contest_pass_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_contest_pass_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_wailmer_pail_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_wailmer_pail_palette[]; +extern const u8 gFile_graphics_items_icons_devon_goods_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_devon_goods_palette[]; +extern const u8 gFile_graphics_items_icons_soot_sack_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_soot_sack_palette[]; +extern const u8 gFile_graphics_items_icons_basement_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_old_key_palette[]; +extern const u8 gFile_graphics_items_icons_acro_bike_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_acro_bike_palette[]; +extern const u8 gFile_graphics_items_icons_pokeblock_case_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_pokeblock_case_palette[]; +extern const u8 gFile_graphics_items_icons_letter_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_lava_cookie_and_letter_palette[]; +extern const u8 gFile_graphics_items_icons_eon_ticket_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_eon_ticket_palette[]; +extern const u8 gFile_graphics_items_icons_orb_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_red_orb_palette[]; +extern const u8 gFile_graphics_items_icons_orb_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_blue_orb_palette[]; +extern const u8 gFile_graphics_items_icons_scanner_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_scanner_palette[]; +extern const u8 gFile_graphics_items_icons_go_goggles_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_go_goggles_palette[]; +extern const u8 gFile_graphics_items_icons_meteorite_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_meteorite_palette[]; +extern const u8 gFile_graphics_items_icons_room1_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_key_palette[]; +extern const u8 gFile_graphics_items_icons_room2_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_key_palette[]; +extern const u8 gFile_graphics_items_icons_room4_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_key_palette[]; +extern const u8 gFile_graphics_items_icons_room6_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_key_palette[]; +extern const u8 gFile_graphics_items_icons_storage_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_old_key_palette[]; +extern const u8 gFile_graphics_items_icons_root_fossil_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_hoenn_fossil_palette[]; +extern const u8 gFile_graphics_items_icons_claw_fossil_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_hoenn_fossil_palette[]; +extern const u8 gFile_graphics_items_icons_devon_scope_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_devon_scope_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fighting_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dragon_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_water_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_psychic_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_poison_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ice_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fighting_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_grass_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fire_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dark_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ice_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ice_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_psychic_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_water_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_grass_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_grass_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_steel_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_electric_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_electric_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ground_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ground_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_psychic_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ghost_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fighting_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_psychic_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_electric_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fire_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_poison_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_rock_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fire_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_rock_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_flying_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dark_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_psychic_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dark_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_steel_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_psychic_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_dark_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fire_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_flying_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_water_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_normal_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fighting_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_water_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_tm_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_water_tm_hm_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_question_mark_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_question_mark_palette[]; +extern const u8 gFile_graphics_items_icons_oaks_parcel_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_oaks_parcel_palette[]; +extern const u8 gFile_graphics_items_icons_poke_flute_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_poke_flute_palette[]; +extern const u8 gFile_graphics_items_icons_secret_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_secret_key_palette[]; +extern const u8 gFile_graphics_items_icons_bike_voucher_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_bike_voucher_palette[]; +extern const u8 gFile_graphics_items_icons_gold_teeth_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_gold_teeth_palette[]; +extern const u8 gFile_graphics_items_icons_old_amber_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_old_amber_palette[]; +extern const u8 gFile_graphics_items_icons_card_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_card_key_palette[]; +extern const u8 gFile_graphics_items_icons_lift_key_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_key_palette[]; +extern const u8 gFile_graphics_items_icons_helix_fossil_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_kanto_fossil_palette[]; +extern const u8 gFile_graphics_items_icons_dome_fossil_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_kanto_fossil_palette[]; +extern const u8 gFile_graphics_items_icons_silph_scope_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_silph_scope_palette[]; +extern const u8 gFile_graphics_items_icons_bicycle_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_bicycle_palette[]; +extern const u8 gFile_graphics_items_icons_town_map_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_town_map_palette[]; +extern const u8 gFile_graphics_items_icons_vs_seeker_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_vs_seeker_palette[]; +extern const u8 gFile_graphics_items_icons_fame_checker_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_fame_checker_palette[]; +extern const u8 gFile_graphics_items_icons_tm_case_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_tm_case_palette[]; +extern const u8 gFile_graphics_items_icons_berry_pouch_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_berry_pouch_palette[]; +extern const u8 gFile_graphics_items_icons_teachy_tv_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_teachy_tv_palette[]; +extern const u8 gFile_graphics_items_icons_tri_pass_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_tri_pass_palette[]; +extern const u8 gFile_graphics_items_icons_rainbow_pass_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_rainbow_pass_palette[]; +extern const u8 gFile_graphics_items_icons_tea_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_tea_palette[]; +extern const u8 gFile_graphics_items_icons_mystic_ticket_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_mystic_ticket_palette[]; +extern const u8 gFile_graphics_items_icons_aurora_ticket_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_aurora_ticket_palette[]; +extern const u8 gFile_graphics_items_icons_powder_jar_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_powder_jar_palette[]; +extern const u8 gFile_graphics_items_icons_gem_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_ruby_palette[]; +extern const u8 gFile_graphics_items_icons_gem_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_sapphire_palette[]; +extern const u8 gFile_graphics_items_icons_return_to_field_arrow_sheet[]; +extern const u8 gFile_graphics_items_icon_palettes_return_to_field_arrow_palette[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/help_system.h b/include/help_system.h index 632788148..3ba0cf475 100644 --- a/include/help_system.h +++ b/include/help_system.h @@ -2,9 +2,92 @@ #define GUARD_HELP_SYSTEM_H #include "global.h" +#include "list_menu.h" +#include "blit.h" +struct HelpSystemListMenu_sub +{ + struct ListMenuItem * items; + u16 totalItems; + u16 maxShowed; + u8 left; + u8 top; +}; + +struct HelpSystemListMenu +{ + struct HelpSystemListMenu_sub sub; + u8 field_0C; + u8 field_0D; + u8 field_0E; + u8 filler_10[0xC]; +}; + +extern struct HelpSystemListMenu gHelpSystemListMenu; +extern struct ListMenuItem gHelpSystemListMenuItems[]; extern bool8 gUnknown_3005ECC; +extern u8 gUnknown_203F175; +// help_system_812B1E0 +void sub_812B1E0(u8); +void HelpSystem_SetSomeVariable2(u8); +bool8 sub_812B40C(void); +bool8 sub_812B45C(void); +void sub_812B478(void); void sub_812B484(void); +void sub_812B4B8(void); +bool8 sub_812BB9C(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BC54(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BC80(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BCA8(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BCD0(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BD2C(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BD64(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BD98(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +void sub_812BDEC(void); +bool8 sub_812BE10(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BEEC(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BF18(struct HelpSystemListMenu * a0, struct ListMenuItem * a1); +bool8 sub_812BF88(void); + +// help_system +bool8 RunHelpSystemCallback(void); +void SaveCallbacks(void); +void SaveMapGPURegs(void); +void SaveMapTiles(void); +void SaveMapTextColors(void); +void RestoreCallbacks(void); +void RestoreGPURegs(void); +void RestoreMapTiles(void); +void RestoreMapTextColors(void); +void CommitTilemap(void); +void sub_813BCF4(void); +void sub_813BD14(u8); +void sub_813BD5C(u8); +void sub_813BDA4(u8); +void sub_813BDE8(u8); +void sub_813BE30(u8); +void sub_813BE78(u8); +void sub_813BEE4(u8); +void sub_813BF50(u8); +void sub_813BFC0(u8); +void sub_813C004(u8, u8); +void HelpSystem_PrintTextRightAlign_Row52(const u8 *str); +void HelpSystem_PrintTextAt(const u8 *, u8, u8); +void HelpSystem_PrintTwoStrings(const u8 *a0, const u8 *a1); +void HelpSystem_PrintText_813C584(const u8 *str); +void HelpSystem_FillPanel2(void); +void HelpSystem_FillPanel1(void); +void HelpSystem_InitListMenuController(struct HelpSystemListMenu *, u8, u8); +void HelpSystem_SetInputDelay(u8); +s32 HelpSystem_GetMenuInput(void); +void sub_813C75C(void); + +void DecompressAndRenderGlyph(u8 font, u16 glyph, struct Bitmap *srcBlit, struct Bitmap *destBlit, u8 *destBuffer, u8 x, u8 y, u8 width, u8 height); +void HelpSystem_PrintText_Row61(const u8 * str); +void HelpSystem_FillPanel3(void); +void PrintListMenuItems(void); +void PlaceListMenuCursor(void); +bool8 MoveCursor(u8 by, u8 dirn); #endif //GUARD_HELP_SYSTEM_H diff --git a/include/item.h b/include/item.h index 75c56c94d..0f0adbca8 100644 --- a/include/item.h +++ b/include/item.h @@ -1,18 +1,20 @@ -#ifndef ITEM_H -#define ITEM_H +#ifndef GUARD_ITEM_H +#define GUARD_ITEM_H + +#include "global.h" typedef void (*ItemUseFunc)(u8); struct Item { - u8 name[14]; + u8 name[ITEM_NAME_LENGTH]; u16 itemId; u16 price; u8 holdEffect; u8 holdEffectParam; const u8 *description; u8 importance; - u8 unk19; + u8 exitsBagOnUse; u8 pocket; u8 type; ItemUseFunc fieldUseFunc; @@ -44,7 +46,7 @@ bool8 CheckPCHasItem(u16 itemId, u16 count); bool8 AddPCItem(u16 itemId, u16 count); void RemovePCItem(u8 index, u16 count); void SwapRegisteredBike(void); -const struct Item *ItemId_GetItem(u16 itemId); +const u8 *ItemId_GetName(u16 itemId); u16 ItemId_GetId(u16 itemId); u16 ItemId_GetPrice(u16 itemId); u8 ItemId_GetHoldEffect(u16 itemId); @@ -60,8 +62,20 @@ u8 ItemId_GetBattleUsage(u16 itemId); ItemUseFunc ItemId_GetBattleFunc(u16 itemId); u8 ItemId_GetSecondaryId(u16 itemId); u16 itemid_get_market_price(u16 itemId); -void sub_809A2DC(void); -void sub_809A2A4(void); -void sub_8099E90(u16, u8 *); +void ClearItemSlotsInAllBagPockets(void); +void ClearPCItemSlots(void); +void CopyItemName(u16, u8 *); +void sub_809A824(u16 itemId); +bool8 AddBagItem(u16 itemId, u16 amount); + +void SortPocketAndPlaceHMsFirst(struct BagPocket *); +u16 BagGetItemIdByPocketPosition(u8 a0, u16 a1); +u16 BagGetQuantityByPocketPosition(u8 a0, u16 a1); +bool8 itemid_is_unique(u16 itemId); +void BagPocketCompaction(struct ItemSlot * slots, u8 capacity); +u16 GetPcItemQuantity(u16 *); + +void ItemPcCompaction(void); +void RemoveItemFromPC(u16 itemId, u16 quantity); -#endif // ITEM_H +#endif // GUARD_ITEM_H diff --git a/include/item_icon.h b/include/item_icon.h deleted file mode 100644 index 75e2475f3..000000000 --- a/include/item_icon.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Created by scott on 10/20/2017. -// - -#ifndef GUARD_ITEM_ICON_H -#define GUARD_ITEM_ICON_H - -#include "global.h" - -extern EWRAM_DATA void *gUnknown_0203CEBC; -extern EWRAM_DATA void *gUnknown_0203CEC0; - -extern const struct SpriteTemplate gUnknown_08614FF4; - -bool8 AllocItemIconTemporaryBuffers(void); -void CopyItemIconPicTo4x4Buffer(void *src, void *dest); -void FreeItemIconTemporaryBuffers(void); - -#endif //GUARD_ITEM_ICON_H diff --git a/include/item_menu.h b/include/item_menu.h index a6128b9fb..2e83ed1f4 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -2,16 +2,40 @@ #define GUARD_ITEM_MENU_H #include "global.h" +#include "task.h" // Exported type declarations // Exported RAM declarations +struct BagStruct +{ + void (*bagCallback)(void); + u8 location; + u8 pocket; + u16 unk6; + u8 cursorPosition[6]; + u8 scrollPosition[6]; +}; + +extern struct BagStruct gUnknown_203ACFC; + extern u16 gSpecialVar_ItemId; // Exported ROM declarations void sub_81AAC50(void); void sub_81AAC70(void); -void UseFameCheckerFromMenu(void); +void sub_8108CF0(void); +void sub_810B108(u8); +void ReturnToBagFromKeyItem(void); +void ItemMenu_MoveItemSlotToNewPositionInArray(struct ItemSlot * slots, int pos1, int pos2); +void ItemMenu_StartFadeToExitCallback(u8 taskId); +void sub_8108CB4(void); +void ItemMenu_SetExitCallback(void (*)(void)); +void DisplayItemMessageInBag(u8 taskId, u8 bgId, const u8 * string, TaskFunc followUpFunc); +void sub_810A1F8(u8 taskId); +void sub_8107ECC(void); +void sub_8108DC8(u8 pocketId); +void sub_81089F4(u8 pocketId); #endif //GUARD_ITEM_MENU_H diff --git a/include/item_menu_icons.h b/include/item_menu_icons.h index 7fcd6d5e1..b5b5c6b0b 100644 --- a/include/item_menu_icons.h +++ b/include/item_menu_icons.h @@ -3,6 +3,28 @@ #include "global.h" -u8 sub_80D511C(u8 a0, u8 a1, u8 a2, u8 a3); +extern void * gUnknown_2039884; + +extern const struct CompressedSpriteSheet gUnknown_83D41E4; +extern const struct CompressedSpriteSheet gUnknown_83D41EC; +extern const struct CompressedSpritePalette gUnknown_83D41F4; + +extern const struct CompressedSpriteSheet gBagSwapSpriteSheet; +extern const struct CompressedSpritePalette gBagSwapSpritePalette; + +void ResetItemMenuIconState(void); +void sub_80985E4(void); +void DestroyItemMenuIcon(bool8 a0); +void CreateItemMenuIcon(u16 itemId, bool8 a0); +void CopyItemIconPicTo4x4Buffer(const void *src, void *dest); +u8 AddItemIconObject(u16 tilesTag, u16 paletteTag, u16 itemId); +u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origTemplate, u16 tilesTag, u16 paletteTag, u16 itemId); +void sub_80989A0(u16 itemId, u8 idx); +void sub_80986A8(s16 x, u16 y); +void sub_8098660(u8); +void sub_8098528(u8); +void sub_8098580(void); +const void * sub_8098974(u16 itemId, u8 ptrId); +void sub_80984FC(u8 animNum); #endif // GUARD_ITEM_MENU_ICONS diff --git a/include/item_pc.h b/include/item_pc.h new file mode 100644 index 000000000..2fecf69a8 --- /dev/null +++ b/include/item_pc.h @@ -0,0 +1,7 @@ +#ifndef GUARD_ITEM_PC_H +#define GUARD_ITEM_PC_H + +void ItemPc_Init(u8 a0, MainCallback callback); +void ItemPc_SetInitializedFlag(u8); + +#endif //GUARD_ITEM_PC_H diff --git a/include/item_use.h b/include/item_use.h index 5ec5f2b33..0a45762f7 100644 --- a/include/item_use.h +++ b/include/item_use.h @@ -4,6 +4,39 @@ #include "global.h" void sub_80A1E0C(u8); -void sub_80A2294(u8, u8, u16, u16); +void ItemUse_SetQuestLogEvent(u8, struct Pokemon *, u16, u16); + +void FieldUseFunc_OrangeMail(u8 taskId); +void FieldUseFunc_MachBike(u8 taskId); +void FieldUseFunc_OldRod(u8 taskId); +void FieldUseFunc_CoinCase(u8 taskId); +void FieldUseFunc_PowderJar(u8 taskId); +void FieldUseFunc_PokeFlute(u8 taskId); +void FieldUseFunc_Medicine(u8 taskId); +void FieldUseFunc_Ether(u8 taskId); +void FieldUseFunc_PpUp(u8 taskId); +void FieldUseFunc_RareCandy(u8 taskId); +void FieldUseFunc_EvoItem(u8 taskId); +void FieldUseFunc_SacredAsh(u8 taskId); +void FieldUseFunc_TmCase(u8 taskId); +void FieldUseFunc_BerryPouch(u8 taskId); +void BattleUseFunc_BerryPouch(u8 taskId); +void FieldUseFunc_TeachyTv(u8 taskId); +void FieldUseFunc_SuperRepel(u8 taskId); +void FieldUseFunc_BlackFlute(u8 taskId); +void FieldUseFunc_TownMap(u8 taskId); +void FieldUseFunc_FameChecker(u8 taskId); +void FieldUseFunc_VsSeeker(u8 taskId); +void BattleUseFunc_PokeBallEtc(u8 taskId); +void BattleUseFunc_PokeFlute(u8 taskId); +void BattleUseFunc_GuardSpec(u8 taskId); +void BattleUseFunc_Medicine(u8 taskId); +void BattleUseFunc_Ether(u8 taskId); +void BattleUseFunc_PokeDoll(u8 taskId); +void FieldUseFunc_OakStopsYou(u8 taskId); +void ItemUseOutOfBattle_EscapeRope(u8 taskId); +void ItemUseOutOfBattle_EnigmaBerry(u8 taskId); +void ItemUseInBattle_EnigmaBerry(u8 taskId); +void ItemUseOutOfBattle_Itemfinder(u8 taskId); #endif //GUARD_ITEM_USE_H diff --git a/include/itemfinder.h b/include/itemfinder.h new file mode 100644 index 000000000..2b882b144 --- /dev/null +++ b/include/itemfinder.h @@ -0,0 +1,6 @@ +#ifndef GUARD_ITEMFINDER_H +#define GUARD_ITEMFINDER_H + +void sub_813EC8C(u8 taskId); + +#endif //GUARD_ITEMFINDER_H diff --git a/include/librfu.h b/include/librfu.h index dbc8a41a6..90f69cb5a 100644 --- a/include/librfu.h +++ b/include/librfu.h @@ -67,6 +67,33 @@ union RfuPacket struct RfuPacket8 rfuPacket8; }; +struct UnkLinkRfuStruct_02022B14Substruct +{ + u16 unk_00_0:4; + u16 unk_00_4:1; + u16 unk_00_5:1; + u16 unk_00_6:1; + u16 unk_00_7:1; + u16 unk_01_0:1; + u16 unk_01_1:1; + u16 unk_01_2:4; + u16 unk_01_6:2; + u8 playerTrainerId[2]; +}; + +struct __attribute__((packed, aligned(2))) UnkLinkRfuStruct_02022B14 +{ + struct UnkLinkRfuStruct_02022B14Substruct unk_00; + u8 unk_04[4]; + u16 species:10; + u16 type:6; + u8 unk_0a_0:7; + u8 unk_0a_7:1; + u8 playerGender:1; + u8 unk_0b_1:7; + u8 unk_0c; +}; + struct RfuStruct { vs32 unk_0; diff --git a/include/link.h b/include/link.h index 93ad9dfe1..33f04a42a 100644 --- a/include/link.h +++ b/include/link.h @@ -147,7 +147,7 @@ extern bool8 gReceivedRemoteLinkPlayers; extern bool8 gLinkVSyncDisabled; extern u8 gUnknown_3003F84; -extern u64 gUnknown_3003FB4; +extern u64 gSioMlt_Recv; void Task_DestroySelf(u8); void OpenLink(void); @@ -204,7 +204,7 @@ bool8 sub_800AA48(void); void sub_800A5BC(void); void sub_800AA80(u8); void sub_80098D8(void); -void sub_80098B8(void); +void CloseLink(void); bool8 sub_800A4BC(void); #endif // GUARD_LINK_H diff --git a/include/link_rfu.h b/include/link_rfu.h index 6e54fcc6c..7e0ea2068 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -1,9 +1,22 @@ #ifndef GUARD_LINK_RFU_H #define GUARD_LINK_RFU_H -void sub_8142504(const u8 *str); -bool32 mevent_0814257C(u8 * cmdPtr, const u8 * src); +struct Padded_U8 +{ + u8 value; +}; + +void AddTextPrinterToWindow1(const u8 *str); +bool32 MG_PrintTextOnWindow1AndWaitButton(u8 * cmdPtr, const u8 * src); void sub_80FA190(void); -void sub_8142420(void); +void MG_DrawCheckerboardPattern(void); +void task_add_05_task_del_08FA224_when_no_RfuFunc(void); +bool8 IsNoOneConnected(void); +void DestroyWirelessStatusIndicatorSprite(void); +void MEvent_CreateTask_CardOrNewsWithFriend(u8); +void MEvent_CreateTask_CardOrNewsOverWireless(u8); +void MEvent_CreateTask_Leader(u8); +void sub_80F9E2C(void * data); +u8 sub_8116DE0(void); #endif //GUARD_LINK_RFU_H diff --git a/include/list_menu.h b/include/list_menu.h index 8834e5215..290b1d925 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -2,6 +2,7 @@ #define GUARD_LIST_MENU_H #include "global.h" +#include "window.h" // Exported type declarations @@ -9,8 +10,8 @@ struct ListMenuItem { - const u8 *unk_00; - s32 unk_04; + const u8 *label; + s32 index; }; struct ListMenu; @@ -43,19 +44,24 @@ struct ListMenu { u16 selectedRow; u8 unk_1C; u8 unk_1D; - u8 unk_1E; + u8 taskId; u8 unk_1F; }; extern struct ListMenuTemplate gUnknown_03006310; +extern struct ListMenuTemplate gMultiuseListMenuTemplate; // Exported ROM declarations u8 ListMenuInit(struct ListMenuTemplate *template, u16 a1, u16 a2); s32 ListMenuHandleInput(u8 id); -void get_coro_args_x18_x1A(u8 a0, u16 *a1, u16 *a2); +void ListMenuGetScrollAndRow(u8 a0, u16 *a1, u16 *a2); void sub_81AE6C8(u8 a0, u16 *a1, u16 *a2); -void sub_810713C(u8, u8, u8); +void DestroyListMenu(u8, u16 *, u16 *); u16 ListMenuGetYCoordForPrintingArrowCursor(u8); +void sub_8107D38(u8, u8); +s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum); +void ListMenuDefaultCursorMoveFunc(s32, u8, struct ListMenu *); +void sub_8107BD0(u8 taskId, u8 attr, s32 value); #endif //GUARD_LIST_MENU_H diff --git a/include/load_save.h b/include/load_save.h index 064e6dff2..bd33f89c8 100644 --- a/include/load_save.h +++ b/include/load_save.h @@ -24,5 +24,7 @@ void SetSaveBlocksPointers(void); void MoveSaveBlocks_ResetHeap(void); void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey); void ApplyNewEncryptionKeyToBagItems(u32 encryptionKey); +void ApplyNewEncryptionKeyToWord(u32 * word, u32 encryptionKey); +void ApplyNewEncryptionKeyToHword(u16 * hword, u32 encryptionKey); #endif // GUARD_LOAD_SAVE_H diff --git a/include/m4a.h b/include/m4a.h index 24b454104..2bb7f2124 100644 --- a/include/m4a.h +++ b/include/m4a.h @@ -5,6 +5,11 @@ #include "gba/m4a_internal.h" +extern struct MusicPlayerInfo gMPlayInfo_BGM; +extern struct MusicPlayerInfo gMPlayInfo_SE1; +extern struct MusicPlayerInfo gMPlayInfo_SE2; +extern struct MusicPlayerInfo gMPlayInfo_SE3; + void m4aSoundVSync(void); void m4aSoundVSyncOn(void); diff --git a/include/mail.h b/include/mail.h index 5d6ad559b..9ffccbb5b 100644 --- a/include/mail.h +++ b/include/mail.h @@ -21,5 +21,6 @@ bool8 MonHasMail(struct Pokemon *mon); void TakeMailFromMon(struct Pokemon *mon); u8 GiveMailToMon2(struct Pokemon *mon, struct MailStruct *mail); void ClearMailStruct(struct MailStruct *mail); +void sub_80BEBEC(struct MailStruct * mail, void (* callback)(void), u8 a2); #endif // GUARD_MAIL_H diff --git a/include/main.h b/include/main.h index 3fb254c95..a250475cb 100644 --- a/include/main.h +++ b/include/main.h @@ -3,8 +3,6 @@ #include "global.h" -#include "global.h" - typedef void (*MainCallback)(void); typedef void (*IntrCallback)(void); typedef void (*IntrFunc)(void); @@ -66,6 +64,7 @@ void DoSoftReset(void); void ClearPokemonCrySongs(void); void RestoreSerialTimer3IntrHandlers(void); void SetVBlankCounter1Ptr(u32 *ptr); +void DisableVBlankCounter1(void); extern const char RomHeaderGameCode[4]; extern const char RomHeaderSoftwareVersion; diff --git a/include/map_obj_80688E4.h b/include/map_obj_80688E4.h index 9ab76646d..bfac00378 100644 --- a/include/map_obj_80688E4.h +++ b/include/map_obj_80688E4.h @@ -4,5 +4,7 @@ #include "global.h" void player_bitmagic(void); +void FreezeMapObject(struct MapObject *); +void FreezeMapObjectsExceptOne(u8 mapObjectId); #endif //GUARD_MAP_OBJ_80688E4_H diff --git a/include/map_obj_lock.h b/include/map_obj_lock.h index c8e075658..0d130973b 100644 --- a/include/map_obj_lock.h +++ b/include/map_obj_lock.h @@ -3,12 +3,13 @@ #include "global.h" -bool8 sub_80983C4(void); +bool8 sub_8069590(void); void ScriptFreezeMapObjects(void); -bool8 sub_809847C(void); +bool8 sub_8069648(void); void LockSelectedMapObject(void); void sub_8098630(void); bool8 sub_8098734(void); void sub_80696C0(void); +bool8 walkrun_is_standing_still(void); #endif // GUARD_MAP_OBJ_LOCK_H diff --git a/include/map_preview_screen.h b/include/map_preview_screen.h new file mode 100644 index 000000000..8d9114b82 --- /dev/null +++ b/include/map_preview_screen.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MAP_PREVIEW_SCREEN_H +#define GUARD_MAP_PREVIEW_SCREEN_H + +void sub_80F85BC(u16 a0); + +#endif //GUARD_MAP_PREVIEW_SCREEN_H diff --git a/include/math_util.h b/include/math_util.h new file mode 100644 index 000000000..74dbbe98e --- /dev/null +++ b/include/math_util.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MATH_UTIL_H +#define GUARD_MATH_UTIL_H + +s16 sub_80D8B90(s16 y); + +#endif //GUARD_MATH_UTIL_H diff --git a/include/menews_jisan.h b/include/menews_jisan.h index 4db5a7be2..ca09d4347 100644 --- a/include/menews_jisan.h +++ b/include/menews_jisan.h @@ -3,7 +3,7 @@ #include "global.h" -void sub_8146C30(u32 a0); +void GenerateRandomNews(u32 a0); void sub_8146C88(void); void sub_8146CA4(void); diff --git a/include/menu.h b/include/menu.h index b932693f7..fa8552484 100644 --- a/include/menu.h +++ b/include/menu.h @@ -15,7 +15,7 @@ struct MenuAction } func; }; -void box_print(u8, u8, u8, u8, const void *, s8, const u8 *); +void AddTextPrinterParameterized3(u8, u8, u8, u8, const void *, s8, const u8 *); void sub_8198070(u8 windowId, bool8 copyToVram); void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette); @@ -30,12 +30,26 @@ void reset_temp_tile_data_buffers(void); int decompress_and_copy_tile_data_to_vram(u8 bg_id, const void *src, int size, u16 offset, u8 mode); bool8 free_temp_tile_data_buffers_if_possible(void); u64 sub_8198A50(struct WindowTemplate*, u8, u8, u8, u8, u8, u8, u16); // returns something but it isn't used, fix when menu.s is decomp'd -void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos); -s8 ProcessMenuInputNoWrap_(void); +//void CreateYesNoMenu(const struct WindowTemplate *windowTemplate, u16 borderFirstTileNum, u8 borderPalette, u8 initialCursorPos); +s8 Menu_ProcessInputNoWrapClearOnChoose(void); void do_scheduled_bg_tilemap_copies_to_vram(void); void clear_scheduled_bg_copies_to_vram(void); -void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str); +void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str); void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3); -void sub_810F4D8(u8 windowId, bool32 someBool); +void ClearMenuWindow(u8 windowId, bool8 copyToVram); +void *sub_80F68F0(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); +void CreateWindow_SnapRight_StdPal(u8, u8, u8, u8, u16); +void Menu_PrintHelpSystemUIHeader(const u8 *, const u8 *, u8, u32, u8); +void PrintTextOnRightSnappedWindow(const u8 *, u32, u8); +void sub_810F71C(void); +void sub_810F740(void); +u8 ProgramAndPlaceMenuCursorOnWindow(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPosition); +void CreateYesNoMenu(const struct WindowTemplate *, u8, u8, u8, u16, u8, u8); + +void StartBlendTask(u8 eva_start, u8 evb_start, u8 eva_end, u8 evb_end, u8 ev_step, u8 priority); +bool8 IsBlendTaskActive(void); +void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8); +void ClearMenuWindow_BorderThickness2(u8 windowId, u8 a1); +void PrintTextArray(u8, u8, u8, u8, u8, u8, const struct MenuAction *); #endif // GUARD_MENU_H diff --git a/include/menu_helpers.h b/include/menu_helpers.h index b193388e5..25ef3252e 100644 --- a/include/menu_helpers.h +++ b/include/menu_helpers.h @@ -2,6 +2,7 @@ #define GUARD_MENU_HELPERS_H #include "global.h" +#include "task.h" // Exported type declarations @@ -18,6 +19,14 @@ void sub_812225C(u16 *, u16 *, u8, u8); void sub_8122298(u16 *, u16 *, u8, u8, u8); void sub_8121F68(u8 taskId, const struct YesNoFuncTable *data); bool8 sub_81221AC(void); -bool8 sub_80BF708(void); +bool16 sub_80BF518(u8 textPrinterId); +bool8 sub_80BF72C(void); +bool8 MenuHelpers_LinkSomething(void); +void VblankHblankHandlerSetZero(void); +void InitBgReg(void); +u8 sub_80BF8E4(void); +u8 sub_80BF848(s16 * a0, u16 a1); +void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 arg2, u8 arg3, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc); +void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate * unk1, u8 unk2, u8 unk3, u8 unk4, u8 unk5, u8 unk6, const struct YesNoFuncTable *ptrs); #endif //GUARD_MENU_HELPERS_H diff --git a/include/menu_indicators.h b/include/menu_indicators.h index f195ceb6d..76f25224c 100644 --- a/include/menu_indicators.h +++ b/include/menu_indicators.h @@ -7,25 +7,24 @@ // Exported RAM declarations -struct ScrollIndicatorArrowPairTemplate +struct ScrollArrowsTemplate { - u8 unk_00; - u8 unk_01; - u8 unk_02; - u8 unk_03; - u8 unk_04; - u8 unk_05; - u16 unk_06; - u16 unk_08; - u16 unk_0a; - u16 unk_0c; - u16 unk_0e_0:4; - u16 unk_0e_4:12; + u8 firstArrowType; + u8 firstX; + u8 firstY; + u8 secondArrowType; + u8 secondX; + u8 secondY; + u16 fullyUpThreshold; + u16 fullyDownThreshold; + u16 tileTag; + u16 palTag; + u8 palNum; }; // Exported ROM declarations -u8 AddScrollIndicatorArrowPairParametrized(u8, u8, u8, u8, s32, u16, u16, u16 *); -u8 AddScrollIndicatorArrowPair(const struct ScrollIndicatorArrowPairTemplate * template, u16 * a1); +u8 AddScrollIndicatorArrowPairParameterized(u8, u8, u8, u8, s32, u16, u16, u16 *); +u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate * template, u16 * a1); void RemoveScrollIndicatorArrowPair(u8); #endif //GUARD_MENU_INDICATORS_H diff --git a/include/mevent.h b/include/mevent.h index d940b212c..b61fa732d 100644 --- a/include/mevent.h +++ b/include/mevent.h @@ -23,9 +23,9 @@ struct MEventStruct_Unk1442CC struct MEvent_Str_1 { - u16 unk_000; - size_t unk_004; - const void * unk_008; + u16 status; + size_t size; + const void * data; }; struct MEvent_Str_2 @@ -33,12 +33,13 @@ struct MEvent_Str_2 u8 fill_00[0x40]; }; -struct MEventBuffer_3120_Sub * sub_8143D58(void); -struct MEventBuffer_32E0_Sub * sav1_get_mevent_buffer_1(void); +struct MEventBuffer_3120_Sub * GetSavedWonderNews(void); +struct MEventBuffer_32E0_Sub * GetSavedWonderCard(void); struct MEventBuffer_3430_Sub * sav1_get_mevent_buffer_2(void); struct MysteryEventStruct * sub_8143D94(void); bool32 sub_8143DC8(const struct MEventBuffer_3120_Sub * src); -bool32 sub_8143E1C(void); +bool32 ValidateReceivedWonderNews(void); +bool32 ValidateReceivedWonderCard(void); bool32 sub_8143EF4(const u8 * src); bool32 sub_8143F68(const struct MEventBuffer_32E0_Sub * data); void sub_814410C(struct MEventBuffer_32E0_Sub * buffer); @@ -49,5 +50,21 @@ u32 sub_8144418(const u16 * a0, const struct MEventStruct_Unk1442CC * a1, void * u32 sub_8144434(const u16 * a0, const struct MEventStruct_Unk1442CC * a1, void * unused); bool32 sub_8144474(const struct MEventStruct_Unk1442CC * a0, const u16 * a1); u16 sub_81444B0(const struct MEventStruct_Unk1442CC * a0, u32 command); +bool32 InitWonderCardResources(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6); +bool32 InitWonderNewsResources(const struct MEventBuffer_3120_Sub * a0); +s32 FadeToWonderCardMenu(void); +s32 FadeToWonderNewsMenu(void); +void DestroyWonderCard(void); +void DestroyWonderNews(void); +void DestroyWonderCardResources(void); +void DestroyWonderNewsResources(void); +s32 FadeOutFromWonderCard(bool32 flag); +s32 FadeOutFromWonderNews(bool32 flag); +bool32 CheckReceivedGiftFromWonderCard(void); +void MENews_AddScrollIndicatorArrowPair(void); +void MENews_RemoveScrollIndicatorArrowPair(void); +bool32 WonderNews_Test_Unk_02(void); +bool32 WonderCard_Test_Unk_08_6(void); +u32 MENews_GetInput(u16 input); #endif //GUARD_MEVENT_H diff --git a/include/mevent_server.h b/include/mevent_server.h index e593b5dbd..10ee96401 100644 --- a/include/mevent_server.h +++ b/include/mevent_server.h @@ -37,7 +37,7 @@ struct mevent_cmd_ish u32 parameter; }; -struct mevent_srv_ish +struct mevent_client { u32 unk_00; u32 param; @@ -83,13 +83,13 @@ void mevent_srv_sub_init(struct mevent_srv_sub * svr, u32 sendPlayerNo, u32 recv void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void * src, u32 size); void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void * dest); -void mevent_srv_ish_do_init(void); -u32 mevent_srv_ish_do_exec(u16 * a0); -void mevent_srv_ish_inc_flag(void); -void * mevent_srv_ish_get_buffer(void); -void mevent_srv_ish_set_param(u32 a0); -void mevent_srv_common_do_init_1(void); -void mevent_srv_common_do_init_2(void); -u32 mevent_srv_init_do_exec(u16 * a0); +void mevent_client_do_init(void); +u32 mevent_client_do_exec(u16 * a0); +void mevent_client_inc_flag(void); +void * mevent_client_get_buffer(void); +void mevent_client_set_param(u32 a0); +void mevent_srv_init_wnews(void); +void mevent_srv_new_wcard(void); +u32 mevent_srv_common_do_exec(u16 * a0); #endif //GUARD_MEVENT_SERVER_H diff --git a/include/money.h b/include/money.h index fa63e321c..5bcef18d4 100644 --- a/include/money.h +++ b/include/money.h @@ -10,13 +10,14 @@ void AddMoney(u32* moneyPtr, u32 toAdd); void RemoveMoney(u32* moneyPtr, u32 toSub); bool8 IsEnoughForCostInVar0x8005(void); void SubtractMoneyFromVar0x8005(void); -void PrintMoneyAmountInMoneyBoxInMoneyBox(u8 windowId, int amount, u8 speed); -void PrintMoneyAmountInMoneyBox(u8 windowId, u8 x, u8 y, int amount, u8 speed); -void PrintMoneyAmountInMoneyBoxInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount); +void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed); +void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed); +void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount); void ChangeAmountInMoneyBox(int amount); void DrawMoneyBox(int amount, u8 x, u8 y); void HideMoneyBox(void); void AddMoneyLabelObject(u16 x, u16 y); void RemoveMoneyLabelObject(void); +void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed); #endif // GUARD_MONEY_H diff --git a/include/mystery_event_msg.h b/include/mystery_event_msg.h index e96c3069b..ac228576d 100644 --- a/include/mystery_event_msg.h +++ b/include/mystery_event_msg.h @@ -1,7 +1,7 @@ #ifndef GUARD_MYSTERY_EVENT_MSG_H #define GUARD_MYSTERY_EVENT_MSG_H -#include <gba/gba.h> +#include "gba/gba.h" extern const u8 gText_MysteryGiftBerry[]; extern const u8 gText_MysteryGiftBerryTransform[]; diff --git a/include/mystery_gift_menu.h b/include/mystery_gift_menu.h index 24bf85a13..c7b047f56 100644 --- a/include/mystery_gift_menu.h +++ b/include/mystery_gift_menu.h @@ -1,9 +1,9 @@ #ifndef GUARD_MYSTERY_GIFT_MENU_H #define GUARD_MYSTERY_GIFT_MENU_H -extern bool8 gUnknown_203F3B8; +extern bool8 gGiftIsFromEReader; -void sub_81422FC(void); -void sub_8142344(bool8, bool32); +void MainCB_FreeAllBuffersAndReturnToInitTitleScreen(void); +void PrintMysteryGiftOrEReaderTopMenu(bool8, bool32); #endif //GUARD_MYSTERY_GIFT_MENU_H diff --git a/include/new_menu_helpers.h b/include/new_menu_helpers.h index 2a68a35e6..ed933089f 100644 --- a/include/new_menu_helpers.h +++ b/include/new_menu_helpers.h @@ -9,15 +9,28 @@ void sub_81973A4(void); void sub_81973C4(u8, u8); void sub_819746C(u8 windowId, bool8 copyToVram); void sub_81973FC(u8, u8); -u16 AddTextPrinterParametrized(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor); +u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void ( *callback)(u16, struct TextPrinter *), u8 fgColor, u8 bgColor, u8 shadowColor); void DisplayItemMessageOnField(u8 taskId, u8 bgId, const u8 *src, TaskFunc callback); void sub_8197434(u8 a0, u8 a1); void SetStandardWindowBorderStyle(u8 a0, u8 a1); void sub_8197930(void); u8 GetPlayerTextSpeed(void); -void sub_80F6F54(u8, u8); -u8 sub_80F78A8(void); +void ClearDialogWindowAndFrame(u8, u8); +u8 GetTextSpeedSetting(void); void sub_80F6E9C(void); -void sub_80F6EE4(u8 windowId, bool8 transfer); +void DrawDialogueFrame(u8 windowId, bool8 transfer); +void sub_80F7974(const u8 *); +u8 GetStartMenuWindowId(void); +void sub_80F7998(void); +void sub_80F69E8(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); +void DrawStdWindowFrame(u8 windowId, bool8 copyNow); +void InitStandardTextBoxWindows(void); +void ResetBg0(void); +void Menu_LoadStdPalAt(u16); +void * malloc_and_decompress(const void * src, u32 * size); +u16 sub_80F796C(void); +void SetBgRectPal(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); +void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void * gfx, u32 size, u16 a3, u8 a4); +void ClearStdWindowAndFrame(u8 taskId, bool8 copyNow); #endif // GUARD_NEW_MENU_HELPERS_H diff --git a/include/oak_speech.h b/include/oak_speech.h new file mode 100644 index 000000000..d5d94bc83 --- /dev/null +++ b/include/oak_speech.h @@ -0,0 +1,6 @@ +#ifndef GUARD_OAK_SPEECH_H +#define GUARD_OAK_SPEECH_H + +void StartNewGameScene(void); + +#endif //GUARD_OAK_SPEECH_H diff --git a/include/overworld.h b/include/overworld.h index 50ac09d9e..ab77542c2 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -24,9 +24,15 @@ struct UCoords32 u32 x, y; }; +extern struct UCoords32 gDirectionToVectors[]; + extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4]; extern MainCallback gFieldCallback; +extern struct WarpData gUnknown_2031DBC; + +extern u8 gUnknown_2031DE0; + void IncrementGameStat(u8 index); void Overworld_SetMapObjTemplateCoords(u8, s16, s16); @@ -35,7 +41,10 @@ void Overworld_SetMapObjTemplateMovementType(u8, u8); void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); -void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetDynamicWarpWithCoords(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void Overworld_SetHealLocationWarp(u8); void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void sub_8084E2C(s8, s8, s8, s8, s8); @@ -58,7 +67,7 @@ void strange_npc_table_clear(void); const struct MapHeader *get_mapheader_by_bank_and_number(u16, u16); void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *); void sub_8086230(void); -void c2_exit_to_overworld_2_switch(void); +void CB2_ReturnToField(void); bool32 sub_8087598(void); void c2_exit_to_overworld_1_continue_scripts_restart_music(void); void warp_in(void); @@ -79,13 +88,33 @@ void sub_805726C(void); void sub_8057430(void); void sub_8055DC4(void); -u8 sav1_map_get_name(void); +u8 GetCurrentRegionMapSectionId(void); + +void SetCurrentMapLayout(u16 mapDataId); +void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y); +void ResetInitialPlayerAvatarState(void); void sub_8055D40(u16 mapDataId); +void CleanupOverworldWindowsAndTilemaps(void); extern u8 gUnknown_2031DD8; extern u8 gUnknown_2036E28; -extern bool8 (* gUnknown_3005024)(void); +extern void (*gFieldCallback)(void); +extern bool8 (* gFieldCallback2)(void); + +void SetLastHealLocationWarp(u8 healLocaionId); +void sub_8055864(u8 mapGroup, u8 mapNum); +void CB2_NewGame(void); +bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType); +void Overworld_ResetStateAfterTeleport(void); + +void Overworld_FadeOutMapMusic(void); +void sub_805671C(void); +void sub_8055DC4(void); +bool8 sub_8055FC4(void); +bool8 is_light_level_8_or_9(u8 mapType); +bool32 sub_8055C9C(void); +void sub_8054D70(void); #endif //GUARD_ROM4_H diff --git a/include/palette.h b/include/palette.h index 3af0d5d7b..31c8ffefe 100644 --- a/include/palette.h +++ b/include/palette.h @@ -70,6 +70,8 @@ void BeginHardwarePaletteFade(u8, u8, u8, u8, u8); void BlendPalettes(u32, u8, u16); void BlendPalettesUnfaded(u32, u8, u16); void sub_80716F8(const u16 *, u16 *, u16, u8); +void TintPalette_GrayScale(u16 *, u16); +void TintPalette_SepiaTone(u16 *, u16); extern struct PaletteFadeControl gPaletteFade; diff --git a/include/party_menu.h b/include/party_menu.h index 19e1f7d4e..3b620c3b0 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -1,7 +1,8 @@ #ifndef GUARD_PARTY_MENU_H #define GUARD_PARTY_MENU_H -#include "global.h" +#include "main.h" +#include "task.h" enum { AILMENT_NONE, @@ -12,10 +13,53 @@ enum { AILMENT_BRN }; -bool8 pokemon_has_move(struct Pokemon *, u16); +struct Struct203B0A0 +{ + MainCallback exitCallback; + TaskFunc unk4; + u8 unk8_0:4; + u8 mode:2; + u8 unk8_2:2; + s8 unk9; + s8 unkA; + u8 unkB; + u16 unkC; + s16 unkE; + s16 unk10; +}; + +extern struct Struct203B0A0 gUnknown_203B0A0; + +extern void (*gUnknown_3005E98)(u8 taskId, TaskFunc func); + +bool8 FieldCallback_PrepareFadeInFromMenu(void); +bool8 MonKnowsMove(struct Pokemon *, u16); void sub_81B58A8(void); void DoWallyTutorialBagMenu(void); u8 pokemon_ailments_get_primary(u32 status); u16 ItemIdToBattleMoveId(u16 itemId); +void sub_8125B40(u8 taskId, TaskFunc func); +void sub_8124C8C(void); +void sub_8126EDC(void); +void c2_8123744(void); +u8 GetCursorSelectionMonId(void); +void sub_8128370(void); +void sub_811F818(u8 monId, u8 a1); +void sub_8121D0C(u8); +void sub_811FB28(u8 taskId); +void sub_8120760(u8 taskId, u8 a1, s8 a2, s16 amount, TaskFunc followupFunc); +void GetMonNickname(const struct Pokemon * mon, u8 * dest); +void sub_81202F8(const u8 * src, u8 a1); +bool8 sub_8120370(void); +void PartyMenuInit(u8 a, u8 b, u8 c, u8 d, u8 messageId, TaskFunc task, MainCallback callback); +void sub_81252D0(u8 taskId, TaskFunc followUpFunc); +void ItemUseCB_PpRestore(u8 taskId, TaskFunc followUpFunc); +void dp05_pp_up(u8 taskId, TaskFunc followUpFunc); +void dp05_rare_candy(u8 taskId, TaskFunc followUpFunc); +void sub_8126B60(u8 taskId, TaskFunc followUpFunc); +void sub_8126894(u8 taskId, TaskFunc followUpFunc); +void sub_81279E0(void); +void ItemUseCB_Medicine(u8 taskId, TaskFunc followUpFunc); +u8 GetItemEffectType(u16 itemId); #endif // GUARD_PARTY_MENU_H diff --git a/include/pc_screen_effect.h b/include/pc_screen_effect.h new file mode 100644 index 000000000..6d68de2d3 --- /dev/null +++ b/include/pc_screen_effect.h @@ -0,0 +1,9 @@ +#ifndef GUARD_PC_SCREEN_EFFECT_H +#define GUARD_PC_SCREEN_EFFECT_H + +void sub_80A0A48(u16, u16, u8); +void sub_80A0A70(u16, u16, u8); +bool8 sub_80A0AAC(void); +bool8 sub_80A0A98(void); + +#endif //GUARD_PC_SCREEN_EFFECT_H diff --git a/include/pokeball.h b/include/pokeball.h index 10a9529b9..5545f8870 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -24,7 +24,8 @@ enum #define POKEBALL_OPPONENT_SENDOUT 0xFE u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow); -void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 bank, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h, u16 species); +void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 bank, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h); +u8 sub_804BB98(u8 monSpriteId, u8 bank, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h); u8 sub_807671C(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h); void sub_8076918(u8 bank); void DoHitAnimHealthboxEffect(u8 bank); diff --git a/include/pokedex.h b/include/pokedex.h index ca642ed1a..b389bf821 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -21,5 +21,6 @@ enum s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId); u16 pokedex_count(u8); u16 sub_80C0844(u8); +u16 sub_8088EDC(u8); #endif // GUARD_POKEDEX_H diff --git a/include/pokemon.h b/include/pokemon.h index e8782af98..ed0108159 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -7,9 +7,9 @@ #define MON_DATA_OT_ID 1 #define MON_DATA_NICKNAME 2 #define MON_DATA_LANGUAGE 3 -#define MON_DATA_SANITY_BIT1 4 -#define MON_DATA_SANITY_BIT2 5 -#define MON_DATA_SANITY_BIT3 6 +#define MON_DATA_SANITY_IS_BAD_EGG 4 +#define MON_DATA_SANITY_HAS_SPECIES 5 +#define MON_DATA_SANITY_IS_EGG 6 #define MON_DATA_OT_NAME 7 #define MON_DATA_MARKINGS 8 #define MON_DATA_CHECKSUM 9 @@ -310,31 +310,31 @@ struct PokemonStorage /*0x83C2*/ u8 boxWallpapers[14]; }; -struct UnknownPokemonStruct +struct BattleTowerPokemon { - u16 species; - u16 heldItem; - u16 moves[4]; - u8 level; - u8 ppBonuses; - u8 hpEV; - u8 attackEV; - u8 defenseEV; - u8 speedEV; - u8 spAttackEV; - u8 spDefenseEV; - u32 otId; - u32 hpIV:5; - u32 attackIV:5; - u32 defenseIV:5; - u32 speedIV:5; - u32 spAttackIV:5; - u32 spDefenseIV:5; - u32 gap:1; - u32 altAbility:1; - u32 personality; - u8 nickname[POKEMON_NAME_LENGTH + 1]; - u8 friendship; + /*0x00*/ u16 species; + /*0x02*/ u16 heldItem; + /*0x04*/ u16 moves[4]; + /*0x0C*/ u8 level; + /*0x0D*/ u8 ppBonuses; + /*0x0E*/ u8 hpEV; + /*0x0F*/ u8 attackEV; + /*0x10*/ u8 defenseEV; + /*0x11*/ u8 speedEV; + /*0x12*/ u8 spAttackEV; + /*0x13*/ u8 spDefenseEV; + /*0x14*/ u32 otId; + /*0x18*/ u32 hpIV:5; + u32 attackIV:5; + u32 defenseIV:5; + u32 speedIV:5; + u32 spAttackIV:5; + u32 spDefenseIV:5; + u32 gap:1; + u32 altAbility:1; + /*0x1C*/ u32 personality; + /*0x20*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; + /*0x2B*/ u8 friendship; }; #define BATTLE_STATS_NO 8 @@ -445,6 +445,8 @@ struct BattleMove u8 flags; }; +extern const struct BattleMove gBattleMoves[]; + #define FLAG_MAKES_CONTACT 0x1 #define FLAG_PROTECT_AFFECTED 0x2 #define FLAG_MAGICCOAT_AFFECTED 0x4 @@ -631,6 +633,7 @@ void SetWildMonHeldItem(void); u16 GetMonEVCount(struct Pokemon *); const struct CompressedSpritePalette *sub_806E794(struct Pokemon *mon); +const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon); const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16 species, u32 otId , u32 personality); bool32 IsHMMove2(u16 move); bool8 IsPokeSpriteNotFlipped(u16 species); @@ -670,4 +673,11 @@ void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); void BattleAnimateBackSprite(struct Sprite* sprite, u16 species); +void PlayMapChosenOrBattleBGM(u16 songId); +u8 GetMonsStateToDoubles(void); +void sub_803E0A4(struct Pokemon *mon, struct BattleTowerPokemon *src); +void SetMultiuseSpriteTemplateToPokemon(u16 trainerSpriteId, u8 battlerPosition); + +const u8 * Battle_PrintStatBoosterEffectMessage(u16 itemId); + #endif // GUARD_POKEMON_H diff --git a/include/pokemon_3.h b/include/pokemon_3.h index cffc9780b..e65bc85fc 100644 --- a/include/pokemon_3.h +++ b/include/pokemon_3.h @@ -5,5 +5,8 @@ const u8* GetTrainerClassNameFromId(u16 trainerId); const u8* GetTrainerNameFromId(u16 trainerId); +void * SetUpMonSpriteManagerMaybe(u8, u8); +void sub_8044D80(void); +void * sub_8044E00(u8 buffId); #endif // GUARD_POKEMON_3_H diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 5b2d2052b..f2fbe85a7 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -12,5 +12,7 @@ void SetBoxMonNickFromAnyBox(u8 boxId, u8 monPosition, u8 * newNick); void CompactPartySlots(void); u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request); void sub_808BCB4(u8 boxId, u8 monPosition); +u8 * GetBoxNamePtr(u8 boxId); +void sub_808CE60(void); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/include/quest_log.h b/include/quest_log.h index 9f8a0ea21..cdd28371f 100644 --- a/include/quest_log.h +++ b/include/quest_log.h @@ -18,8 +18,15 @@ extern u8 gUnknown_3005E88; extern u16 gUnknown_3005E8C; extern struct UnkStruct_3005E90 gUnknown_3005E90; extern struct UnkStruct_203AE98 * gUnknown_3005E94; +extern const u16 gUnknown_84566A8[]; void sub_8112720(u8); void sub_8113550(u16, const u16 *); +void sub_8115748(u16); +u8 sub_8112CAC(void); +bool8 sub_81119D4(void (*func)(void)); +void sub_8111F38(u16, u16); + +extern u8 gUnknown_203ADFA; #endif //GUARD_QUEST_LOG_H diff --git a/include/region_map.h b/include/region_map.h index ea8a8130e..394fee469 100644 --- a/include/region_map.h +++ b/include/region_map.h @@ -95,5 +95,6 @@ void CreateRegionMapCursor(u16 tileTag, u16 paletteTag); u8 *GetMapName(u8 *, u16, u16); bool32 sub_8124668(u8 mapSecId); void sub_80C4DF8(u8 *, u8); +void sub_80BFF50(u8 a0, void (*a1)(void)); #endif //GUARD_REGION_MAP_H diff --git a/include/roulette_util.h b/include/roulette_util.h new file mode 100644 index 000000000..764a3df10 --- /dev/null +++ b/include/roulette_util.h @@ -0,0 +1,84 @@ +#ifndef GUARD_ROULETTE_H +#define GUARD_ROULETTE_H + +struct UnkStruct1 +{ + u16 var00; + u16 var02; + u8 var04; + u8 var05; + u8 var06; + s8 var07_0:5; + s8 var07_5:2; + s8 var07_7:1; +}; + +struct UnkStruct3 +{ + u8 var00_0:7; + u8 var00_7:1; + u8 var01; + s8 var02; + s8 var03; + struct UnkStruct1 var04; +}; + +struct UnkStruct0 +{ + u8 var00; + u8 var01; + u16 var02; //flag for each UnkStruct3 + struct UnkStruct3 var04[0x10]; +}; + +struct PulseBlendSettings +{ + u16 blendColor; + u16 paletteOffset; + u8 numColors; + u8 delay; + u8 numFadeCycles; + s8 maxBlendCoeff:4; + s8 fadeType:2; + s8 restorePaletteOnUnload:1; + s8 unk7_7:1; +}; + +struct PulseBlendPalette +{ + u8 paletteSelector; + u8 blendCoeff:4; + u8 fadeDirection:1; + s8 unk1_5:1; + s8 available:1; + u32 inUse:1; + u8 delayCounter; + u8 fadeCycleCounter; + struct PulseBlendSettings pulseBlendSettings; +}; + +struct PulseBlend +{ + u16 usedPulseBlendPalettes; + struct PulseBlendPalette pulseBlendPalettes[16]; +}; + +void sub_80D8BE4(struct UnkStruct0 *); +u8 sub_80D8BF8(struct UnkStruct0 *, u8, const struct UnkStruct1 *); +u8 sub_80D8C7C(struct UnkStruct0 *, u8); +u8 sub_80D8CB0(struct UnkStruct3 *); +u8 sub_80D8EB8(struct UnkStruct3 *); +void task_tutorial_controls_fadein(struct UnkStruct0 *); +void sub_80D8FB4(struct UnkStruct0 *, u16); +void sub_80D9008(struct UnkStruct0 *, u16); +void InitPulseBlend(struct PulseBlend *); +int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *); +static void ClearPulseBlendPalettesSettings(struct PulseBlendPalette *); +void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); +void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); +void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8); +void UpdatePulseBlend(struct PulseBlend *); +void sub_80D9574(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height); +void sub_80D95C4(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height); + +#endif // GUARD_ROULETTE_H diff --git a/include/save.h b/include/save.h index f547230b9..7a74373c8 100644 --- a/include/save.h +++ b/include/save.h @@ -121,7 +121,7 @@ u8 Save_LoadGameData(u8 a1); u32 TryCopySpecialSaveSection(u8 sector, u8* dst); u32 sub_8153634(u8 sector, u8* src); void sub_8153688(u8 taskId); -u32 sub_80DA5E0(u8 sector, u8* src); +u32 TryWriteSpecialSaveSection(u8 sector, u8* src); void sub_80DA634(u8 taskId); #endif // GUARD_SAVE_H diff --git a/include/save_location.h b/include/save_location.h index 69b39ea53..cd499643e 100644 --- a/include/save_location.h +++ b/include/save_location.h @@ -7,5 +7,6 @@ bool32 sub_81AFCEC(void); void TrySetMapSaveWarpStatus(void); void sub_81AFDA0(void); void sub_81AFDD0(void); +bool32 IsCurMapPokeCenter(void); #endif // GUARD_SAVE_LOCATION_H diff --git a/include/scanline_effect.h b/include/scanline_effect.h index d49f5b4d6..5bd8b5546 100644 --- a/include/scanline_effect.h +++ b/include/scanline_effect.h @@ -1,6 +1,48 @@ #ifndef GUARD_SCANLINE_EFFECT_H #define GUARD_SCANLINE_EFFECT_H -void remove_some_task(void); +// DMA control value to transfer a single 16-bit value at HBlank +#define SCANLINE_EFFECT_DMACNT_16BIT (((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_INC | DMA_16BIT | DMA_DEST_RELOAD) << 16) | 1) +#define SCANLINE_EFFECT_DMACNT_32BIT (((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_SRC_INC | DMA_DEST_INC | DMA_32BIT | DMA_DEST_RELOAD) << 16) | 1) -#endif //GUARD_SCANLINE_EFFECT_H +#define SCANLINE_EFFECT_REG_BG0HOFS (REG_ADDR_BG0HOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG0VOFS (REG_ADDR_BG0VOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG1HOFS (REG_ADDR_BG1HOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG1VOFS (REG_ADDR_BG1VOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG2HOFS (REG_ADDR_BG2HOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG2VOFS (REG_ADDR_BG2VOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG3HOFS (REG_ADDR_BG3HOFS - REG_ADDR_BG0HOFS) +#define SCANLINE_EFFECT_REG_BG3VOFS (REG_ADDR_BG3VOFS - REG_ADDR_BG0HOFS) + +struct ScanlineEffectParams +{ + volatile void *dmaDest; + u32 dmaControl; + u8 initState; + u8 unused9; +}; + +struct ScanlineEffect +{ + void *dmaSrcBuffers[2]; + volatile void *dmaDest; + u32 dmaControl; + void (*setFirstScanlineReg)(void); + u8 srcBuffer; + u8 state; + u8 unused16; + u8 unused17; + u8 waveTaskId; +}; + +extern struct ScanlineEffect gScanlineEffect; + +extern u16 gScanlineEffectRegBuffers[2][0x3C0]; + +void ScanlineEffect_Stop(void); +void ScanlineEffect_Clear(void); +void ScanlineEffect_SetParams(struct ScanlineEffectParams); +void ScanlineEffect_InitHBlankDmaTransfer(void); +u8 ScanlineEffect_InitWave(u8 startLine, u8 endLine, u8 frequency, u8 amplitude, u8 delayInterval, u8 regOffset, bool8 a7); + +#endif // GUARD_SCANLINE_EFFECT_H diff --git a/include/scrcmd.h b/include/scrcmd.h new file mode 100644 index 000000000..0ef357ece --- /dev/null +++ b/include/scrcmd.h @@ -0,0 +1,6 @@ +#ifndef GUARD_SCRCMD_H +#define GUARD_SCRCMD_H + +extern struct ScriptContext * gUnknown_3005070; + +#endif //GUARD_SCRCMD_H diff --git a/include/script.h b/include/script.h index ebb4caa86..8ffbe1563 100644 --- a/include/script.h +++ b/include/script.h @@ -65,5 +65,14 @@ void sub_80992A0(u8 *script, u16 scriptSize); bool32 sub_8069DFC(void); void sub_8069EA4(u8 * script, u16 scriptSize); u8 * sub_8069E48(void); +void sub_8069998(u8 var); +void sub_80699F8(void); +void sub_8069964(void); +void sub_80699A4(void); +void sub_8069970(void); +void sub_8069A20(void); +void sub_8069A2C(void); + +extern const u8 *gRAMScriptPtr; #endif // GUARD_SCRIPT_H diff --git a/include/script_menu.h b/include/script_menu.h index 1e95570b3..f82b061a5 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -3,7 +3,7 @@ #include "global.h" -extern const u8 *const gUnknown_0858BAF0[9]; +extern const u8 *const gStdStringPtrs[9]; bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 var3, u8 var4); bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 var5); @@ -11,5 +11,6 @@ bool8 ScriptMenu_YesNo(u8 var1, u8 var2); bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount); bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3); bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void); +void sub_809D6D4(void); #endif //GUARD_SCRIPT_MENU_H diff --git a/include/script_movement.h b/include/script_movement.h index ae446812e..2a6dbd2a7 100644 --- a/include/script_movement.h +++ b/include/script_movement.h @@ -5,6 +5,6 @@ bool8 ScriptMovement_StartObjectMovementScript(u8, u8, u8, const u8 *); bool8 ScriptMovement_IsObjectMovementFinished(u8, u8, u8); -void sub_80D338C(void); +void sub_80974D8(void); #endif // GUARD_SCRIPT_MOVEMENT_H diff --git a/include/script_pokemon_util_80A0058.h b/include/script_pokemon_util_80A0058.h new file mode 100644 index 000000000..e1d228589 --- /dev/null +++ b/include/script_pokemon_util_80A0058.h @@ -0,0 +1,8 @@ +#ifndef GUARD_SCRIPT_POKEMON_UTIL_80A0058_H +#define GUARD_SCRIPT_POKEMON_UTIL_80A0058_H + +bool8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unk1, u32 unk2, u8 unk3); +bool8 ScriptGiveEgg(u16 species); +void ScriptSetMonMoveSlot(u8 partyIdx, u16 move, u8 slot); + +#endif //GUARD_SCRIPT_POKEMON_UTIL_80A0058_H diff --git a/include/seagallop.h b/include/seagallop.h new file mode 100644 index 000000000..cce6da8ff --- /dev/null +++ b/include/seagallop.h @@ -0,0 +1,21 @@ +#ifndef GUARD_SEAGALLOP_H +#define GUARD_SEAGALLOP_H + +enum SeaGallopDestinations +{ + SEAGALLOP_VERMILION_CITY, + SEAGALLOP_ONE_ISLAND, + SEAGALLOP_TWO_ISLAND, + SEAGALLOP_THREE_ISLAND, + SEAGALLOP_FOUR_ISLAND, + SEAGALLOP_FIVE_ISLAND, + SEAGALLOP_SIX_ISLAND, + SEAGALLOP_SEVEN_ISLAND, + SEAGALLOP_CINNABAR_ISLAND, + SEAGALLOP_NAVEL_ROCK, + SEAGALLOP_BIRTH_ISLAND +}; + +void ScrSpecial_SeaGallopFerry(void); + +#endif //GUARD_SEAGALLOP_H diff --git a/include/shop.h b/include/shop.h index 1046a590a..05f5160e6 100644 --- a/include/shop.h +++ b/include/shop.h @@ -8,5 +8,6 @@ extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3]; void CreatePokemartMenu(const u16 *); void CreateDecorationShop1Menu(const u16 *); void CreateDecorationShop2Menu(const u16 *); +void sub_809C09C(u16, u16, u8); #endif // GUARD_SHOP_H diff --git a/include/songs.h b/include/songs.h deleted file mode 100644 index f8d0fbf5b..000000000 --- a/include/songs.h +++ /dev/null @@ -1,468 +0,0 @@ -#ifndef GUARD_SONGS_H -#define GUARD_SONGS_H - -#include "global.h" - -enum -{ - /*0x00*/ SE_STOP, - /*0x01*/ SE_KAIFUKU, - /*0x02*/ SE_PC_LOGON, - /*0x03*/ SE_PC_OFF, - /*0x04*/ SE_PC_ON, - /*0x05*/ SE_SELECT, - /*0x06*/ SE_WIN_OPEN, - /*0x07*/ SE_WALL_HIT, - /*0x08*/ SE_DOOR, - /*0x09*/ SE_KAIDAN, - /*0x0A*/ SE_DANSA, - /*0x0B*/ SE_JITENSYA, - /*0x0C*/ SE_KOUKA_L, // Goggle told me Kouka means 'effectiveness' which makes sense, because - /*0x0D*/ SE_KOUKA_M, // those three sounds play whenever you use a move - /*0x0E*/ SE_KOUKA_H, - /*0x0F*/ SE_BOWA2, - /*0x10*/ SE_POKE_DEAD, - /*0x11*/ SE_NIGERU, - /*0x12*/ SE_JIDO_DOA, - /*0x13*/ SE_NAMINORI, - /*0x14*/ SE_BAN, - /*0x15*/ SE_PIN, - /*0x16*/ SE_BOO, - /*0x17*/ SE_BOWA, - /*0x18*/ SE_JYUNI, - /*0x19*/ SE_A, - /*0x1A*/ SE_I, - /*0x1B*/ SE_U, - /*0x1C*/ SE_E, - /*0x1D*/ SE_O, - /*0x1E*/ SE_N, - /*0x1F*/ SE_SEIKAI, - /*0x20*/ SE_HAZURE, - /*0x21*/ SE_EXP, - /*0x22*/ SE_JITE_PYOKO, - /*0x23*/ SE_MU_PACHI, - /*0x24*/ SE_TK_KASYA, - /*0x25*/ SE_FU_ZAKU, - /*0x26*/ SE_FU_ZAKU2, - /*0x27*/ SE_FU_ZUZUZU, - /*0x28*/ SE_RU_GASHIN, - /*0x29*/ SE_RU_GASYAN, - /*0x2A*/ SE_RU_BARI, - /*0x2B*/ SE_RU_HYUU, - /*0x2C*/ SE_KI_GASYAN, - /*0x2D*/ SE_TK_WARPIN, - /*0x2E*/ SE_TK_WARPOUT, - /*0x2F*/ SE_TU_SAA, - /*0x30*/ SE_HI_TURUN, - /*0x31*/ SE_TRACK_MOVE, - /*0x32*/ SE_TRACK_STOP, - /*0x33*/ SE_TRACK_HAIK, - /*0x34*/ SE_TRACK_DOOR, - /*0x35*/ SE_MOTER, - /*0x36*/ SE_CARD, - /*0x37*/ SE_SAVE, - /*0x38*/ SE_KON, - /*0x39*/ SE_KON2, - /*0x3A*/ SE_KON3, - /*0x3B*/ SE_KON4, - /*0x3C*/ SE_SUIKOMU, - /*0x3D*/ SE_NAGERU, - SE_TOY_C, - SE_TOY_D, - SE_TOY_E, - SE_TOY_F, - SE_TOY_G, - SE_TOY_A, - SE_TOY_B, - SE_TOY_C1, - SE_MIZU, - SE_HASHI, - SE_DAUGI, - SE_PINPON, - SE_FUUSEN1, - SE_FUUSEN2, - SE_FUUSEN3, - SE_TOY_KABE, - SE_TOY_DANGO, - SE_DOKU, - SE_ESUKA, - SE_T_AME, - SE_T_AME_E, - SE_T_OOAME, - SE_T_OOAME_E, - SE_T_KOAME, - SE_T_KOAME_E, - SE_T_KAMI, - SE_T_KAMI2, - SE_ELEBETA, - /*0x5A*/ SE_HINSI, - /*0x5B*/ SE_EXPMAX, - /*0x5C*/ SE_TAMAKORO, - /*0x5D*/ SE_TAMAKORO_E, - /*0x5E*/ SE_BASABASA, - /*0x5F*/ SE_REGI, - SE_C_GAJI, - SE_C_MAKU_U, - SE_C_MAKU_D, - SE_C_PASI, - SE_C_SYU, - SE_C_PIKON, - /*0x66*/ SE_REAPOKE, - /*0x67*/ SE_OP_BASYU, - /*0x68*/ SE_BT_START, - SE_DENDOU, - SE_JIHANKI, - SE_TAMA, - SE_Z_SCROLL, - /*0x6D*/ SE_Z_PAGE, - /*0x6E*/ SE_PN_ON, - /*0x6F*/ SE_PN_OFF, - /*0x70*/ SE_Z_SEARCH, - /*0x71*/ SE_TAMAGO, - /*0x72*/ SE_TB_START, - /*0x73*/ SE_TB_KON, - /*0x74*/ SE_TB_KARA, - /*0x75*/ SE_BIDORO, - /*0x76*/ SE_W085, - /*0x77*/ SE_W085B, - /*0x78*/ SE_W231, - /*0x79*/ SE_W171, - /*0x7A*/ SE_W233, - /*0x7B*/ SE_W233B, - /*0x7C*/ SE_W145, - /*0x7D*/ SE_W145B, - /*0x7E*/ SE_W145C, - /*0x7F*/ SE_W240, - /*0x80*/ SE_W015, - /*0x81*/ SE_W081, - /*0x82*/ SE_W081B, - /*0x83*/ SE_W088, - /*0x84*/ SE_W016, - /*0x85*/ SE_W016B, - /*0x86*/ SE_W003, - /*0x87*/ SE_W104, - /*0x88*/ SE_W013, - /*0x89*/ SE_W196, - /*0x8A*/ SE_W086, - /*0x8B*/ SE_W004, - /*0x8C*/ SE_W025, - /*0x8D*/ SE_W025B, - SE_W152, - SE_W026, - SE_W172, - SE_W172B, - SE_W053, - SE_W007, - SE_W092, - SE_W221, - SE_W221B, - SE_W052, - SE_W036, - SE_W059, - SE_W059B, - SE_W010, - SE_W011, - SE_W017, - SE_W019, - SE_W028, - SE_W013B, - SE_W044, - SE_W029, - SE_W057, - SE_W056, - SE_W250, - SE_W030, - SE_W039, - SE_W054, - SE_W077, - SE_W020, - SE_W082, - SE_W047, - SE_W195, - SE_W006, - SE_W091, - SE_W146, - SE_W120, - SE_W153, - SE_W071B, - SE_W071, - SE_W103, - /*0xB6*/ SE_W062, - /*0xB7*/ SE_W062B, - /*0xB8*/ SE_W048, - /*0xB9*/ SE_W187, - /*0xBA*/ SE_W118, - /*0xBB*/ SE_W155, - /*0xBC*/ SE_W122, - /*0xBD*/ SE_W060, - /*0xBE*/ SE_W185, - /*0xBF*/ SE_W014, - /*0xC0*/ SE_W043, - /*0xC1*/ SE_W207, - /*0xC2*/ SE_W207B, - /*0xC3*/ SE_W215, - /*0xC4*/ SE_W109, - /*0xC5*/ SE_W173, - /*0xC6*/ SE_W280, - /*0xC7*/ SE_W202, - /*0xC8*/ SE_W060B, - /*0xC9*/ SE_W076, - /*0xCA*/ SE_W080, - /*0xCB*/ SE_W100, - /*0xCC*/ SE_W107, - SE_W166, - SE_W129, - SE_W115, - SE_W112, - SE_W197, - SE_W199, - SE_W236, - SE_W204, - SE_W268, - SE_W070, - SE_W063, - SE_W127, - SE_W179, - SE_W151, - SE_W201, - SE_W161, - SE_W161B, - SE_W227, - SE_W227B, - SE_W226, - SE_W208, - SE_W213, - SE_W213B, - SE_W234, - SE_W260, - SE_W328, - SE_W320, - SE_W255, - SE_W291, - SE_W089, - SE_W239, - SE_W230, - SE_W281, - SE_W327, - SE_W287, - SE_W257, - SE_W253, - SE_W258, - SE_W322, - SE_W298, - SE_W287B, - SE_W114, - SE_W063B, - BGM_STOP = 349, - /*0x15E*/ BGM_TETSUJI, - /*0x15F*/ BGM_FIELD13, - /*0x160*/ BGM_KACHI22, - /*0x161*/ BGM_KACHI2, - /*0x162*/ BGM_KACHI3, - /*0x163*/ BGM_KACHI5, - /*0x164*/ BGM_PCC, - /*0x165*/ BGM_NIBI, - /*0x166*/ BGM_SUIKUN, - /*0x167*/ BGM_DOORO1, - /*0x168*/ BGM_DOORO_X1, - /*0x169*/ BGM_DOORO_X3, - /*0x16A*/ BGM_MACHI_S2, - /*0x16B*/ BGM_MACHI_S4, - /*0x16C*/ BGM_GIM, - /*0x16D*/ BGM_NAMINORI, - /*0x16E*/ BGM_DAN01, - /*0x16F*/ BGM_FANFA1, - /*0x170*/ BGM_ME_ASA, - /*0x171*/ BGM_ME_BACHI, - /*0x172*/ BGM_FANFA4, - /*0x173*/ BGM_FANFA5, - /*0x174*/ BGM_ME_WAZA, - /*0x175*/ BGM_BIJYUTU, - /*0x176*/ BGM_DOORO_X4, - /*0x177*/ BGM_FUNE_KAN, - /*0x178*/ BGM_ME_SHINKA, - /*0x179*/ BGM_SHINKA, - /*0x17A*/ BGM_ME_WASURE, - /*0x17B*/ BGM_SYOUJOEYE, - /*0x17C*/ BGM_BOYEYE, - /*0x17D*/ BGM_DAN02, - /*0x17E*/ BGM_MACHI_S3, - /*0x17F*/ BGM_ODAMAKI, - /*0x180*/ BGM_B_TOWER, - /*0x181*/ BGM_SWIMEYE, - /*0x182*/ BGM_DAN03, - /*0x183*/ BGM_ME_KINOMI, - /*0x184*/ BGM_ME_TAMA, - /*0x185*/ BGM_ME_B_BIG, - /*0x186*/ BGM_ME_B_SMALL, - /*0x187*/ BGM_ME_ZANNEN, - /*0x188*/ BGM_BD_TIME, - /*0x189*/ BGM_TEST1, - /*0x18A*/ BGM_TEST2, - /*0x18B*/ BGM_TEST3, - /*0x18C*/ BGM_TEST4, - /*0x18D*/ BGM_TEST, - /*0x18E*/ BGM_GOMACHI0, - /*0x18F*/ BGM_GOTOWN, - /*0x190*/ BGM_POKECEN, - /*0x191*/ BGM_NEXTROAD, - /*0x192*/ BGM_GRANROAD, - /*0x193*/ BGM_CYCLING, - /*0x194*/ BGM_FRIENDLY, - /*0x195*/ BGM_MISHIRO, - /*0x196*/ BGM_TOZAN, - /*0x197*/ BGM_GIRLEYE, - /*0x198*/ BGM_MINAMO, - /*0x199*/ BGM_ASHROAD, - /*0x19A*/ BGM_EVENT0, - /*0x19B*/ BGM_DEEPDEEP, - /*0x19C*/ BGM_KACHI1, - /*0x19D*/ BGM_TITLE3, - /*0x19E*/ BGM_DEMO1, - /*0x19F*/ BGM_GIRL_SUP, - /*0x1A0*/ BGM_HAGESHII, - /*0x1A1*/ BGM_KAKKOII, - /*0x1A2*/ BGM_KAZANBAI, - /*0x1A3*/ BGM_AQA_0, - /*0x1A4*/ BGM_TSURETEK, - /*0x1A5*/ BGM_BOY_SUP, - /*0x1A6*/ BGM_RAINBOW, - /*0x1A7*/ BGM_AYASII, - /*0x1A8*/ BGM_KACHI4, - /*0x1A9*/ BGM_ROPEWAY, - /*0x1AA*/ BGM_CASINO, - /*0x1AB*/ BGM_HIGHTOWN, - /*0x1AC*/ BGM_SAFARI, - BGM_C_ROAD, - BGM_AJITO, - BGM_M_BOAT, - BGM_M_DUNGON, - BGM_FINECITY, - BGM_MACHUPI, - BGM_P_SCHOOL, - BGM_DENDOU, - BGM_TONEKUSA, - BGM_MABOROSI, - BGM_CON_FAN, - BGM_CONTEST0, - BGM_MGM0, - BGM_T_BATTLE, - BGM_OOAME, - BGM_HIDERI, - BGM_RUNECITY, - BGM_CON_K, - BGM_EIKOU_R, - BGM_KARAKURI, - BGM_HUTAGO, - BGM_SITENNOU, - BGM_YAMA_EYE, - BGM_CONLOBBY, - BGM_INTER_V, - BGM_DAIGO, - BGM_THANKFOR, - BGM_END, - /*0x1C9*/ BGM_BATTLE_FRONTIER, // human-readable names start here because we don't know the actual filenames - BGM_BATTLE_ARENA, - BGM_ME_BATTLE_POINTS, // ME_ as in messagebox? Used for KINOMI (berries) and stuff above - BGM_ME_MATCH_CALL, - BGM_BATTLE_PYRAMID, - BGM_BATTLE_PYRAMID_SUMMIT, - BGM_BATTLE_PALACE, - BGM_FANFA_RAYQUAZA, - BGM_BATTLE_TOWER, - BGM_ME_BATTLE_SYMBOL, - BGM_BATTLE_DOME_TOURNAMENT, - BGM_BATTLE_PIKE, - BGM_BATTLE_FACTORY, - BGM_BATTLE_LEGENDARY, - BGM_BATTLE_FRONTIER_BRAIN, - BGM_BATTLE_MEW, - BGM_BATTLE_DOME, // end of the human-readable names - /*0x1DA*/ BGM_BATTLE27, // wild - BGM_BATTLE31, // aqua/magma grunt - BGM_BATTLE20, // trainer - BGM_BATTLE32, // gym leader - BGM_BATTLE33, // champion - BGM_BATTLE36, // regi - BGM_BATTLE34, // weather trio - BGM_BATTLE35, // rival - BGM_BATTLE38, // elite four - BGM_BATTLE30, // aqua/magma leader - /*0x1E4*/ BGM_FRLG_FOLLOW_ME, // FR/LG names not known, human-readable again! - BGM_FRLG_GAMECORNER, - BGM_FRLG_ROCKET_HIDEOUT, - BGM_FRLG_GYM, - BGM_FRLG_JIGGLYPUFF, - BGM_FRLG_OPENING, - BGM_FRLG_TITLE, - BGM_FRLG_CINNABAR_ISLAND, - BGM_FRLG_LAVENDER_TOWN, - BGM_FRLG_HEALING_TEST, - BGM_FRLG_BICYCLE, - BGM_FRLG_SUSPICIOUS_EYE, - BGM_FRLG_GIRL_EYE, - BGM_FRLG_BOY_EYE, - BGM_FRLG_CONGRATULATIONS_HALL_OF_FAME, - BGM_FRLG_VIRIDIAN_FOREST, - BGM_FRLG_MT_MOON, - BGM_FRLG_POKEMON_MANSION, - BGM_FRLG_CREDITS, - BGM_FRLG_ROUTE_1, - BGM_FRLG_ROUTE_24, - BGM_FRLG_ROUTE_3, - BGM_FRLG_ROUTE_11, - BGM_FRLG_INDIGO_PLATEAU, - BGM_FRLG_BATTLE_LEADER, - BGM_FRLG_BATTLE_TRAINER, - BGM_FRLG_BATTLE_WILD_POKEMON, - BGM_FRLG_BATTLE_CHAMPION, - BGM_FRLG_PALLET_TOWN, - BGM_FRLG_OAK_LAB, - BGM_FRLG_PROF_OAK, - BGM_FRLG_POKEMON_CENTER, - BGM_FRLG_SS_ANNE, - BGM_FRLG_SURF, - BGM_FRLG_POKEMON_TOWER, - BGM_FRLG_SILPH, - BGM_FRLG_CERULEAN_CITY, - BGM_FRLG_CELADON_CITY, - BGM_FRLG_KACHI_TRAINER, // KACHI used in RS test - victory - BGM_FRLG_KACHI_WILD_POKEMON, - BGM_FRLG_KACHI_LEADER, - BGM_FRLG_VERMILION_CITY, - BGM_FRLG_VIRIDIAN_CITY, - BGM_FRLG_RIVAL, - BGM_FRLG_RIVAL_POSTBATTLE, - BGM_FRLG_ME_POKEDEX_EVAL, - BGM_FRLG_ME_KEYITEM, - BGM_FRLG_FANFA_POKEMON_CAUGHT, - BGM_FRLG_FANFA_TRAINERCARD_PHOTO, - BGM_FRLG_GAMEFREAK_LOGO, - BGM_FRLG_CAUGHT_POKEMON, - BGM_FRLG_GAME_EXPLANATION_START, - BGM_FRLG_GAME_EXPLANATION_MIDDLE, - BGM_FRLG_GAME_EXPLANATION_END, - BGM_FRLG_POKEMON_JUMP, - BGM_FRLG_UNION_ROOM, - BGM_FRLG_POKEMON_NETWORK_CENTER, - BGM_FRLG_MYSTERY_GIFT, - BGM_FRLG_DODRIO_BERRY_PICK, - BGM_FRLG_MT_EMBER, - BGM_FRLG_TEACHY_TV_EPISODE, - BGM_FRLG_SEVII_ISLANDS, - BGM_FRLG_TANOBY_RUINS, - BGM_FRLG_ISLAND_ONE, - BGM_FRLG_ISLAND_FOUR, - BGM_FRLG_ISLAND_SIX, - BGM_FRLG_FLUTE, - BGM_FRLG_BATTLE_DEOXYS, - BGM_FRLG_BATTLE_MEWTWO, - BGM_FRLG_BATTLE_LEGENDARY, - BGM_FRLG_LEADER_EYE, - BGM_FRLG_DEOXYS_EYE, - BGM_FRLG_TRAINER_TOWER, - BGM_FRLG_HALL_OF_FAME_PALLET_TOWN, - /*0x22E*/BGM_FRLG_TEACHY_TV, -}; - -#endif // GUARD_SONGS_H diff --git a/include/sound.h b/include/sound.h index 34fdfc839..e720fc1a2 100644 --- a/include/sound.h +++ b/include/sound.h @@ -31,6 +31,7 @@ void PlayCry3(u16 species, s8 pan, u8 mode); void PlayCry4(u16 species, s8 pan, u8 mode); void PlayCry5(u16 species, u8 mode); void PlayCry6(u16 species, s8 pan, u8 mode); +void PlayCry7(u16 species, u8 mode); void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode); bool8 IsCryFinished(void); void StopCryAndClearCrySongs(void); diff --git a/include/sprite.h b/include/sprite.h index bc47f7100..5fa85ee21 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -232,6 +232,8 @@ struct OamMatrix s16 d; }; +typedef void (*SpriteCallback)(struct Sprite *); + extern const struct OamData gDummyOamData; extern const union AnimCmd *const gDummySpriteAnimTable[]; extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[]; @@ -300,5 +302,6 @@ void CopyFromSprites(u8 *dest); u8 SpriteTileAllocBitmapOp(u16 bit, u8 op); void ClearSpriteCopyRequests(void); void ResetAffineAnimData(void); +void sub_8007FFC(struct Sprite* sprite, s16 a2, s16 a3); #endif //GUARD_SPRITE_H diff --git a/include/strings.h b/include/strings.h index 40021a01d..1aa858e82 100644 --- a/include/strings.h +++ b/include/strings.h @@ -92,4 +92,89 @@ extern const u8 gText_Coins[]; extern const u8 gText_EggNickname[]; extern const u8 gText_Pokemon[]; +extern const u8 gOtherText_Use[]; +extern const u8 gOtherText_Give[]; +extern const u8 gOtherText_Exit[]; +extern const u8 gText_ThreeHyphens[]; +extern const u8 gOtherText_UnkF9_08_Clear_01[]; +extern const u8 gFameCheckerText_ListMenuCursor[]; +extern const u8 gText_TimesStrVar1[]; +extern const u8 gText_IsSelected[]; +extern const u8 gText_ThereIsNoPokemon[]; +extern const u8 gText_ItemCantBeHeld[]; +extern const u8 gText_TMCase[]; +extern const u8 gText_Close[]; +extern const u8 gText_TMCaseWillBePutAway[]; +extern const u8 gText_FontSize0[]; +extern const u8 gText_FontSize2[]; +extern const u8 gText_OhNoICantBuyThat[]; +extern const u8 gText_HowManyWouldYouLikeToSell[]; +extern const u8 gText_ICanPayThisMuch_WouldThatBeOkay[]; +extern const u8 gText_TurnedOverItemsWorthYen[]; +extern const u8 gPokeDudeText_TMTypes[]; +extern const u8 gPokeDudeText_ReadTMDescription[]; +extern const u8 gFameCheckerText_Cancel[]; + +// teachy_tv +extern const u8 gTeachyTvString_TeachBattle[]; +extern const u8 gTeachyTvString_StatusProblems[]; +extern const u8 gTeachyTvString_TypeMatchups[]; +extern const u8 gTeachyTvString_CatchPkmn[]; +extern const u8 gTeachyTvString_AboutTMs[]; +extern const u8 gTeachyTvString_RegisterItem[]; +extern const u8 gTeachyTvString_Cancel[]; +extern const u8 gTeachyTvText_PokeDudeSaysHello[]; +extern const u8 gTeachyTvText_BattleScript1[]; +extern const u8 gTeachyTvText_StatusScript1[]; +extern const u8 gTeachyTvText_MatchupsScript1[]; +extern const u8 gTeachyTvText_CatchingScript1[]; +extern const u8 gTeachyTvText_TMsScript1[]; +extern const u8 gTeachyTvText_RegisterScript1[]; +extern const u8 gTeachyTvText_BattleScript2[]; +extern const u8 gTeachyTvText_StatusScript2[]; +extern const u8 gTeachyTvText_MatchupsScript2[]; +extern const u8 gTeachyTvText_CatchingScript2[]; +extern const u8 gTeachyTvText_TMsScript2[]; +extern const u8 gTeachyTvText_RegisterScript2[]; + +// help_system_812B1E0 +extern const u8 gUnknown_841DFA5[]; +extern const u8 gUnknown_841DFAC[]; +extern const u8 gUnknown_841DFBE[]; +extern const u8 gUnknown_841DFC9[]; + +// help_system +extern const u8 gString_Bill[]; +extern const u8 gString_Someone[]; +extern const u8 gString_Help[]; +extern const u8 gString_HelpSystem_ClearTo8[]; + +extern const u8 gOtherText_Give[]; +extern const u8 gFameCheckerText_Cancel[]; +extern const u8 gOtherText_StrVar1[]; +extern const u8 gOtherText_WhereShouldTheStrVar1BePlaced[]; +extern const u8 gOtherText_Powder[]; +extern const u8 gText_NoMoreRoomInBag[]; +extern const u8 gText_WithdrawHowMany[]; +extern const u8 gText_WithdrewQuantItem[]; +extern const u8 gText_WithdrawItem[]; +extern const u8 gText_Withdraw[]; +extern const u8 gText_ReturnToPC[]; + +extern const u8 gUnknown_8416425[]; +extern const u8 gUnknown_8416451[]; +extern const u8 gUnknown_8416537[]; +extern const u8 gUnknown_841658C[]; +extern const u8 gUnknown_841659E[]; +extern const u8 gUnknown_84165D2[]; +extern const u8 gUnknown_8416600[]; +extern const u8 gUnknown_8416631[]; +extern const u8 gUnknown_8416644[]; +extern const u8 gUnknown_841665C[]; +extern const u8 gUnknown_8416690[]; +extern const u8 gUnknown_84166A7[]; +extern const u8 gUnknown_84169DC[]; + +extern const u8 gUnknown_84162BD[]; + #endif //GUARD_STRINGS_H diff --git a/include/teachy_tv.h b/include/teachy_tv.h new file mode 100644 index 000000000..36bac6a67 --- /dev/null +++ b/include/teachy_tv.h @@ -0,0 +1,8 @@ +#ifndef GUARD_TEACHY_TV_H +#define GUARD_TEACHY_TV_H + +void InitTeachyTvController(u8 mode, void (*cb)()); +void CB2_ReturnToTeachyTV(void); +void SetTeachyTvControllerModeToResume(void); + +#endif //GUARD_TEACHY_TV_H diff --git a/include/text.h b/include/text.h index e127f103a..2e6a8c837 100644 --- a/include/text.h +++ b/include/text.h @@ -68,7 +68,8 @@ #define CHAR_y 0xED #define CHAR_z 0xEE #define CHAR_SPECIAL_F7 0xF7 -#define CHAR_SPECIAL_F9 0xF9 +#define CHAR_KEYPAD_ICON 0xF8 +#define CHAR_EXTRA_EMOJI 0xF9 #define CHAR_COLON 0xF0 #define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog #define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog @@ -90,6 +91,18 @@ #define TEXT_SPEED_FF 0xFF +enum +{ + FONTATTR_MAX_LETTER_WIDTH, + FONTATTR_MAX_LETTER_HEIGHT, + FONTATTR_LETTER_SPACING, + FONTATTR_LINE_SPACING, + FONTATTR_UNKNOWN, // dunno what this is yet + FONTATTR_COLOR_FOREGROUND, + FONTATTR_COLOR_BACKGROUND, + FONTATTR_COLOR_SHADOW +}; + struct TextPrinterSubStruct { u8 font_type:4; // 0x14 @@ -106,9 +119,9 @@ struct TextPrinterSubStruct u8 active; }; -struct TextSubPrinter // TODO: Better name +struct TextPrinterTemplate // TODO: Better name { - const u8* current_text_offset; + const u8* currentChar; u8 windowId; u8 fontId; u8 x; @@ -117,17 +130,17 @@ struct TextSubPrinter // TODO: Better name u8 currentY; u8 letterSpacing; u8 lineSpacing; - u8 fontColor_l:4; // 0xC - u8 fontColor_h:4; + u8 unk:4; // 0xC + u8 fgColor:4; u8 bgColor:4; u8 shadowColor:4; }; struct TextPrinter { - struct TextSubPrinter subPrinter; + struct TextPrinterTemplate subPrinter; - void (*callback)(struct TextSubPrinter *, u16); // 0x10 + void (*callback)(struct TextPrinterTemplate *, u16); // 0x10 union { struct TextPrinterSubStruct sub; @@ -150,8 +163,8 @@ struct FontInfo u8 maxLetterHeight; u8 letterSpacing; u8 lineSpacing; - u8 fontColor_l:4; - u8 fontColor_h:4; + u8 unk:4; + u8 fgColor:4; u8 bgColor:4; u8 shadowColor:4; }; @@ -172,10 +185,10 @@ struct KeypadIcon }; typedef struct { - u8 flag_0:1; - u8 flag_1:1; - u8 flag_2:1; - u8 flag_3:1; + u8 canABSpeedUpPrint:1; + u8 useAlternateDownArrow:1; + u8 autoScroll:1; + u8 forceMidTextSpeed:1; } TextFlags; extern TextFlags gTextFlags; @@ -192,10 +205,12 @@ extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; +extern const u8 gKeypadIconTiles[]; + void SetFontsPointer(const struct FontInfo *fonts); void DeactivateAllTextPrinters(void); -u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); -bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); +u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); +bool16 AddTextPrinter(struct TextPrinterTemplate *textSubPrinter, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)); void RunTextPrinters(void); bool16 IsTextPrinterActive(u8 id); u32 RenderFont(struct TextPrinter *textPrinter); @@ -248,7 +263,10 @@ s32 GetGlyphWidthFont1(u16 glyphId, bool32 isJapanese); void DecompressGlyphFont9(u16 glyphId); s32 GetGlyphWidthFont3(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont4(u16 glyphId, bool32 isJapanese); +void DecompressGlyphFont5(u16 glyphId, bool32 isJapanese); s32 GetGlyphWidthFont5(u16 glyphId, bool32 isJapanese); void sub_80062B0(struct Sprite *sprite); +u8 CreateTextCursorSpriteForOakSpeech(u8 sheetId, u16 x, u16 y, u8 priority, u8 subpriority); +void sub_8006398(u8 spriteId); #endif // GUARD_TEXT_H diff --git a/include/text_window.h b/include/text_window.h index 72ce50efc..cc1de56ae 100644 --- a/include/text_window.h +++ b/include/text_window.h @@ -20,6 +20,11 @@ void rbox_fill_rectangle(u8 windowId); const u16* stdpal_get(u8 id); const u16* GetOverworldTextboxPalettePtr(void); void sub_8098C6C(u8 bg, u16 destOffset, u8 palOffset); -void sub_814FF2C(u8 windowId, u16 tileStart, u8 palette); +void TextWindow_SetBubbleFrame_841F1C8(u8 windowId, u16 tileStart, u8 palette); +void TextWindow_SetStdFrame0_WithPal(u8 windowId, u16 tileStart, u8 palette); +void TextWindow_SetUserSelectedFrame(u8 windowId, u16 tileStart, u8 palette); +void LoadUserWindowBorderGfx(u8 windowId, u16 tileStart, u8 palette); +void sub_814FDA0(u8 windowId, u16 tileStart, u8 palette); +void DrawTextBorderOuter(u8 windowId, u16 tileStart, u8 palette); #endif // GUARD_TEXT_WINDOW_H diff --git a/include/text_window_graphics.h b/include/text_window_graphics.h new file mode 100644 index 000000000..17e919705 --- /dev/null +++ b/include/text_window_graphics.h @@ -0,0 +1,19 @@ +#ifndef GUARD_TEXT_WINDOW_GRAPHICS_H +#define GUARD_TEXT_WINDOW_GRAPHICS_H + +struct TextWindowGraphics +{ + const void * tiles; + const void * palette; +}; + +extern const u16 gUnknown_8470B0C[]; +extern const u16 gStdFrame0[]; +extern const u16 gStdFrame1[]; +extern const u16 gUnknown_8471DEC[][16]; + +extern const struct TextWindowGraphics gUserFrames[]; + +const struct TextWindowGraphics * sub_8069788(u8 idx); + +#endif //GUARD_TEXT_WINDOW_GRAPHICS_H diff --git a/include/title_screen.h b/include/title_screen.h new file mode 100644 index 000000000..8e7a6a275 --- /dev/null +++ b/include/title_screen.h @@ -0,0 +1,6 @@ +#ifndef GUARD_TITLE_SCREEN_H +#define GUARD_TITLE_SCREEN_H + +void CB2_InitTitleScreen(void); + +#endif //GUARD_TITLE_SCREEN_H diff --git a/include/tm_case.h b/include/tm_case.h new file mode 100644 index 000000000..f77eae457 --- /dev/null +++ b/include/tm_case.h @@ -0,0 +1,8 @@ +#ifndef GUARD_TM_CASE_H +#define GUARD_TM_CASE_H + +void InitTMCase(u8 a0, void (* a1)(void), u8 a2); +void ResetTMCaseCursorPos(void); +void PokeDude_InitTMCase(void); + +#endif //GUARD_TM_CASE_H diff --git a/include/battle_dome_cards.h b/include/trainer_pokemon_sprites.h index 94c9876f3..3ae75ed0f 100644 --- a/include/battle_dome_cards.h +++ b/include/trainer_pokemon_sprites.h @@ -3,7 +3,7 @@ #include "global.h" -bool16 dp13_810BB8C(void); +bool16 ResetAllPicSprites(void); u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); u16 sub_818D820(u16 spriteId); @@ -11,7 +11,7 @@ u16 sub_818D8AC(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 u16 sub_818D8F0(u16 spriteId); u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId); u8 sub_818D97C(u8 a0, u8 a1); -u8 sub_810C2A4(u16, u8, s16, s16, u8, u16); -void sub_810C2E8(u16); +u16 CreateTrainerPicSprite(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 FreeAndDestroyTrainerPicSprite(u16); #endif //GUARD_BATTLE_DOME_CARDS_H diff --git a/include/union_room.h b/include/union_room.h new file mode 100644 index 000000000..2e97d87f4 --- /dev/null +++ b/include/union_room.h @@ -0,0 +1,149 @@ +#ifndef GUARD_UNION_ROOM_H +#define GUARD_UNION_ROOM_H + +struct UnkStruct_Shared +{ + struct UnkLinkRfuStruct_02022B14 field_0; + u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH]; +}; + +struct UnkStruct_x1C +{ + struct UnkStruct_Shared unk0; + u8 unk18:1; +}; + +struct UnkStruct_x20 +{ + struct UnkStruct_Shared unk; + u16 field_18; + u8 field_1A_0:2; + u8 field_1A_1:1; + u8 field_1B; + u8 field_1D; + u8 field_1E; + u8 field_1F; +}; + +struct UnkStruct_Main0 +{ + struct UnkStruct_x20 arr[8]; +}; + +struct UnkStruct_Main4 +{ + struct UnkStruct_x1C arr[5]; +}; + +struct UnkStruct_Main8 +{ + struct UnkStruct_x20 arr[5]; +}; + +struct UnkStruct_Leader +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + struct UnkStruct_Main8 *field_8; + u8 state; + u8 textState; + u8 field_E; + u8 listWindowId; + u8 field_10; + u8 field_11; + u8 listTaskId; + u8 field_13; + u8 field_14; + u8 field_15; + u8 field_16; + u8 field_17; + u8 field_18; + u8 field_19; + u16 field_1A; +}; + +struct UnkStruct_Group +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + u8 state; + u8 textState; + u8 field_A; + u8 listWindowId; + u8 field_C; + u8 field_D; + u8 listTaskId; + u8 field_F; + u8 field_10; + u8 field_11; + u8 field_12; + u8 field_13; + u8 field_14; + u8 field_15; +}; + +struct UnkStruct_8019BA8 +{ + u8 field_0; + u8 field_1; + s8 field_2; + u8 field_3; +}; + +struct UnkStruct_URoom +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + struct UnkStruct_Main0 *field_8; + struct UnkStruct_Main4 *field_C; + u16 field_10; + u16 field_12; + u8 state; + u8 stateAfterPrint; + u8 textState; + u8 field_17; + u8 field_18; + u8 field_19; + u8 field_1A; + u8 field_1B; + u8 field_1C; + u8 field_1D; + u8 field_1E; + u8 field_1F; + u8 field_20; + u8 spriteIds[40]; + u8 field_49; + u8 field_4A; + u16 field_4C[6]; + u8 field_58[0x98 - 0x58]; + u16 field_98; + u16 field_9A[3]; + struct UnkStruct_8019BA8 field_A0[8]; + u8 field_C0[12][15]; + u8 field_174[48]; + u8 field_1A4[200]; +}; + +union UnkUnion_Main +{ + struct UnkStruct_Leader *leader; + struct UnkStruct_Group *group; + struct UnkStruct_URoom *uRoom; +}; + +struct TradeUnkStruct +{ + u16 field_0; + u16 type; + u32 playerPersonality; + u8 field_8; + u8 field_9; + u16 playerSpecies; + u16 playerLevel; + u16 species; + u16 level; + u16 field_12; + u32 personality; +}; + +#endif //GUARD_UNION_ROOM_H diff --git a/include/unk_810c3a4.h b/include/unk_810c3a4.h index 3f85ab00f..11a91b5ef 100644 --- a/include/unk_810c3a4.h +++ b/include/unk_810c3a4.h @@ -1,6 +1,25 @@ #ifndef GUARD_UNK_810C3A4_H #define GUARD_UNK_810C3A4_H +#define GET_VS_SEEKER_COUNTER_0() (gSaveBlock1Ptr->trainerRematch.stepCounter & 0xFF) +#define GET_VS_SEEKER_COUNTER_1() (gSaveBlock1Ptr->trainerRematch.stepCounter >> 8) +#define SET_VS_SEEKER_COUNTER_0(x) ({\ + gSaveBlock1Ptr->trainerRematch.stepCounter &= 0xFF00;\ + gSaveBlock1Ptr->trainerRematch.stepCounter |= (x);\ +}) +#define SET_VS_SEEKER_COUNTER_1(x) ({\ + gSaveBlock1Ptr->trainerRematch.stepCounter &= 0x00FF;\ + gSaveBlock1Ptr->trainerRematch.stepCounter |= ((x) << 8);\ +}) +#define INC_VS_SEEKER_COUNTER_0() ({\ + u8 x = GET_VS_SEEKER_COUNTER_0();\ + if (x < 100) gSaveBlock1Ptr->trainerRematch.stepCounter++;\ +}) +#define INC_VS_SEEKER_COUNTER_1() ({\ + u8 x = GET_VS_SEEKER_COUNTER_1();\ + if (x < 100) {x++; SET_VS_SEEKER_COUNTER_1(x);}\ +}) + void sub_810C604(void); void sub_810C640(void); diff --git a/include/unk_8159F40.h b/include/unk_8159F40.h index f0e85d416..7f6a98c3a 100644 --- a/include/unk_8159F40.h +++ b/include/unk_8159F40.h @@ -3,6 +3,7 @@ #include "global.h" +void sub_8159F40(void); void sub_815A008(struct QuestLog *); void sub_815A1F8(struct QuestLog *, struct MapObjectTemplate *); diff --git a/include/unk_815C980.h b/include/unk_815C980.h new file mode 100644 index 000000000..a3249a8e2 --- /dev/null +++ b/include/unk_815C980.h @@ -0,0 +1,24 @@ +#ifndef GUARD_UNK_815C980_H +#define GUARD_UNK_815C980_H + +struct UnkStruct3 +{ + u8 field_0_0:2; + u8 shape:2; + u8 size:2; + u8 priority:2; + u8 field_1; + u8 xDelta; + s16 x; + s16 y; + const struct SpriteSheet *spriteSheet; + const struct SpritePalette *spritePal; +}; + +void sub_815C9F4(void); +void sub_815D108(u32 id); +void sub_815D1A8(u32 id, bool32 arg1); +bool32 sub_815CA40(u32 id, s32 arg1, const struct UnkStruct3 *arg2); +void sub_815CD70(u32 id, s32 arg1); + +#endif //GUARD_UNK_815C980_H diff --git a/include/unk_815c27c.h b/include/unk_815c27c.h index cc1cbb7ce..02c886895 100644 --- a/include/unk_815c27c.h +++ b/include/unk_815c27c.h @@ -1,11 +1,11 @@ #ifndef GUARD_UNK_815C27C_H #define GUARD_UNK_815C27C_H -void sub_815C6D4(void); -void sub_815C6C4(void); -void sub_815C8C8(void); -void sub_815C960(void); -void sub_815C91C(void); -u16 sub_815C498(u8, size_t, const void *, u8); +void EReaderHelper_SerialCallback(void); +void EReaderHelper_Timer3Callback(void); +void EReaderHelper_SaveRegsState(void); +void EReaderHelper_ClearsSendRecvMgr(void); +void EReaderHelper_RestoreRegsState(void); +u16 EReaderHandleTransfer(u8, size_t, const void *, void *); #endif //GUARD_UNK_815C27C_H diff --git a/include/unknown_task.h b/include/unknown_task.h deleted file mode 100644 index 429e58aad..000000000 --- a/include/unknown_task.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef GUARD_unknown_task_H -#define GUARD_unknown_task_H - -#include "global.h" - -// Exported type declarations -struct UnknownTaskStruct -{ - volatile void *dest; - u32 control; - u8 unk8; - u8 unk9; -}; - -extern struct UnknownTaskStruct gUnknown_0831AC70; - -// Exported RAM declarations - -// Exported ROM declarations -void remove_some_task(void); -void sub_80BA038(struct UnknownTaskStruct arg0); -void sub_80BA0A8(void); - -#endif // GUARD_unknown_task_H diff --git a/include/util.h b/include/util.h index e0034d816..3884ab21c 100644 --- a/include/util.h +++ b/include/util.h @@ -12,8 +12,9 @@ u8 CreateInvisibleSpriteWithCallback(void (*)(struct Sprite *)); void StoreWordInTwoHalfwords(u16 *, u32); void LoadWordFromTwoHalfwords(u16 *, u32 *); int CountTrailingZeroBits(u32 value); -u16 CalcCRC16(const u8 *data, s32 length); +u16 CalcCRC16(const u8 *data, u32 length); u16 CalcCRC16WithTable(const u8 *data, u32 length); u32 CalcByteArraySum(const u8* data, u32 length); +void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor); #endif // GUARD_UTIL_H diff --git a/include/wild_encounter.h b/include/wild_encounter.h index 2186e0b4f..b4c42116a 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -43,5 +43,6 @@ u16 GetLocalWildMon(bool8 *isWaterMon); u16 GetLocalWaterMon(void); bool8 UpdateRepelCounter(void); void sub_8082740(u8); +u8 GetUnownLetterByPersonality(u32 personality); #endif // GUARD_WILD_ENCOUNTER_H diff --git a/include/window.h b/include/window.h index 2705a7895..30e73dd32 100644 --- a/include/window.h +++ b/include/window.h @@ -3,9 +3,11 @@ #include "global.h" +#define PIXEL_FILL(num) ((num) | ((num) << 4)) + enum { - WINDOW_PRIORITY, + WINDOW_BG, WINDOW_TILEMAP_LEFT, WINDOW_TILEMAP_TOP, WINDOW_WIDTH, @@ -17,7 +19,7 @@ enum struct WindowTemplate { - u8 priority; + u8 bg; u8 tilemapLeft; u8 tilemapTop; u8 width; @@ -45,6 +47,8 @@ struct Window u8 *tileData; }; +typedef void (*WindowFunc)(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum); + bool16 InitWindows(const struct WindowTemplate *templates); u16 AddWindow(const struct WindowTemplate *template); int AddWindowWithoutTileMap(const struct WindowTemplate *template); @@ -56,13 +60,13 @@ void PutWindowTilemap(u8 windowId); void PutWindowRectTilemapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 palette); void ClearWindowTilemap(u8 windowId); void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height); -void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height); +void BlitBitmapToWindow(u8 windowId, const u8 *pixels, u16 x, u16 y, u16 width, u16 height); void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight); void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset); void FillWindowPixelBuffer(u8 windowId, u8 fillValue); void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue); -void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8)); +void CallWindowFunction(u8 windowId, WindowFunc func); bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value); u32 GetWindowAttribute(u8 windowId, u8 attributeId); u16 AddWindow8Bit(struct WindowTemplate *template); |