diff options
author | Cameron Hall <camthesaxman@users.noreply.github.com> | 2017-11-27 14:07:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-27 14:07:31 -0600 |
commit | 5498eaf94849bbc7b56d8c280862b61ecefa0643 (patch) | |
tree | 518b0b12e669c09c31a33c7a071f10bcd4ea76b9 /src/field | |
parent | 66f2ac4ba38cb32eb210545536a487969b593d10 (diff) | |
parent | 5d74d11d3e3047b4b53153365325db9e6999c627 (diff) |
Merge pull request #477 from camthesaxman/constant_headers
Use common headers for constants in assembly and C
Diffstat (limited to 'src/field')
55 files changed, 235 insertions, 231 deletions
diff --git a/src/field/battle_tower.c b/src/field/battle_tower.c index 2b45766dd..db822f71b 100644 --- a/src/field/battle_tower.c +++ b/src/field/battle_tower.c @@ -5,25 +5,26 @@ #include "battle_transition.h" #include "data2.h" #include "easy_chat.h" +#include "constants/easy_chat.h" #include "event_data.h" #include "item.h" -#include "items.h" +#include "constants/items.h" #include "main.h" -#include "map_object_constants.h" -#include "moves.h" +#include "constants/map_objects.h" +#include "constants/moves.h" #include "new_game.h" #include "overworld.h" #include "pokedex.h" #include "random.h" #include "save.h" #include "script_pokemon_80C4.h" -#include "species.h" +#include "constants/species.h" #include "string_util.h" #include "task.h" #include "text.h" #include "trainer.h" #include "tv.h" -#include "vars.h" +#include "constants/vars.h" #include "ewram.h" #if ENGLISH diff --git a/src/field/berry.c b/src/field/berry.c index 973bc56ff..874a60aa7 100644 --- a/src/field/berry.c +++ b/src/field/berry.c @@ -6,7 +6,7 @@ #include "item.h" #include "item_menu.h" #include "item_use.h" -#include "items.h" +#include "constants/items.h" #include "main.h" #include "random.h" #include "text.h" diff --git a/src/field/berry_tag_screen.c b/src/field/berry_tag_screen.c index 55405138d..694599680 100644 --- a/src/field/berry_tag_screen.c +++ b/src/field/berry_tag_screen.c @@ -4,14 +4,14 @@ #include "decompress.h" #include "field_map_obj.h" #include "item_menu.h" -#include "items.h" +#include "constants/items.h" #include "item_use.h" #include "main.h" #include "menu.h" #include "menu_helpers.h" #include "palette.h" #include "overworld.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "string_util.h" diff --git a/src/field/bike.c b/src/field/bike.c index e36ae1798..8db01b4b4 100644 --- a/src/field/bike.c +++ b/src/field/bike.c @@ -3,11 +3,11 @@ #include "field_map_obj.h" #include "field_player_avatar.h" #include "fieldmap.h" -#include "flags.h" +#include "constants/flags.h" #include "global.fieldmap.h" #include "metatile_behavior.h" #include "overworld.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" extern bool8 gBikeCyclingChallenge; diff --git a/src/field/birch_pc.c b/src/field/birch_pc.c index 9872dd54d..4b0025504 100644 --- a/src/field/birch_pc.c +++ b/src/field/birch_pc.c @@ -2,7 +2,7 @@ #include "event_data.h" #include "field_message_box.h" #include "pokedex.h" -#include "species.h" +#include "constants/species.h" extern u16 gSpecialVar_0x8004; extern u16 gSpecialVar_0x8005; diff --git a/src/field/braille_puzzles.c b/src/field/braille_puzzles.c index b11b1ff3a..e6ab316d2 100644 --- a/src/field/braille_puzzles.c +++ b/src/field/braille_puzzles.c @@ -4,16 +4,16 @@ #include "field_camera.h" #include "field_effect.h" #include "fieldmap.h" -#include "flags.h" +#include "constants/flags.h" #include "main.h" -#include "map_constants.h" +#include "constants/maps.h" #include "map_obj_lock.h" #include "menu.h" #include "rom6.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" -#include "species.h" +#include "constants/species.h" #include "task.h" #include "text.h" @@ -25,8 +25,8 @@ extern u8 S_OpenRegiceChamber[]; // regiice event script bool8 ShouldDoBrailleDigEffect(void) { if (!FlagGet(SYS_BRAILLE_DIG) - && (gSaveBlock1.location.mapGroup == MAP_GROUP_SEALED_CHAMBER_OUTER_ROOM - && gSaveBlock1.location.mapNum == MAP_ID_SEALED_CHAMBER_OUTER_ROOM)) + && (gSaveBlock1.location.mapGroup == MAP_GROUP(SEALED_CHAMBER_OUTER_ROOM) + && gSaveBlock1.location.mapNum == MAP_NUM(SEALED_CHAMBER_OUTER_ROOM))) { if (gSaveBlock1.pos.x == 10 && gSaveBlock1.pos.y == 3) return TRUE; @@ -68,7 +68,7 @@ bool8 CheckRelicanthWailord(void) bool8 ShouldDoBrailleStrengthEffect(void) { - if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1.location.mapGroup == MAP_GROUP_DESERT_RUINS && gSaveBlock1.location.mapNum == MAP_ID_DESERT_RUINS)) + if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1.location.mapGroup == MAP_GROUP(DESERT_RUINS) && gSaveBlock1.location.mapNum == MAP_NUM(DESERT_RUINS))) { if (gSaveBlock1.pos.x == 10 && gSaveBlock1.pos.y == 23) return TRUE; @@ -98,7 +98,7 @@ void DoBrailleStrengthEffect(void) bool8 ShouldDoBrailleFlyEffect(void) { - if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1.location.mapGroup == MAP_GROUP_ANCIENT_TOMB && gSaveBlock1.location.mapNum == MAP_ID_ANCIENT_TOMB)) + if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1.location.mapGroup == MAP_GROUP(ANCIENT_TOMB) && gSaveBlock1.location.mapNum == MAP_NUM(ANCIENT_TOMB))) { if (gSaveBlock1.pos.x == 8 && gSaveBlock1.pos.y == 25) return TRUE; diff --git a/src/field/choose_party.c b/src/field/choose_party.c index e16da3a58..d278eda4a 100644 --- a/src/field/choose_party.c +++ b/src/field/choose_party.c @@ -11,7 +11,7 @@ #include "pokemon_summary_screen.h" #include "overworld.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "strings.h" #include "string_util.h" diff --git a/src/field/daycare.c b/src/field/daycare.c index 9f7e3b989..9ac63b3c7 100644 --- a/src/field/daycare.c +++ b/src/field/daycare.c @@ -2,11 +2,11 @@ #include "daycare.h" #include "event_data.h" #include "field_effect.h" -#include "items.h" +#include "constants/items.h" #include "mail_data.h" #include "main.h" #include "menu.h" -#include "moves.h" +#include "constants/moves.h" #include "name_string_util.h" #include "overworld.h" #include "party_menu.h" @@ -14,9 +14,9 @@ #include "pokemon_storage_system.h" #include "random.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" -#include "species.h" +#include "constants/species.h" #include "string_util.h" #include "strings2.h" #include "text.h" diff --git a/src/field/decoration.c b/src/field/decoration.c index 8e6276a2f..c7647f98d 100644 --- a/src/field/decoration.c +++ b/src/field/decoration.c @@ -1,9 +1,10 @@ #include "global.h" +#include "constants/decorations.h" #include "main.h" -#include "map_object_constants.h" +#include "constants/map_objects.h" #include "overworld.h" #include "sound.h" -#include "songs.h" +#include "constants/songs.h" #include "string_util.h" #include "menu.h" #include "menu_helpers.h" diff --git a/src/field/decoration_inventory.c b/src/field/decoration_inventory.c index 687589373..dd0e972aa 100644 --- a/src/field/decoration_inventory.c +++ b/src/field/decoration_inventory.c @@ -1,8 +1,5 @@ -// - -// - #include "global.h" +#include "constants/decorations.h" #include "sprite.h" #include "task.h" #include "decoration.h" diff --git a/src/field/dewford_trend.c b/src/field/dewford_trend.c index bdcd76ec5..90ea74f77 100644 --- a/src/field/dewford_trend.c +++ b/src/field/dewford_trend.c @@ -1,6 +1,7 @@ #include "global.h" #include "dewford_trend.h" #include "easy_chat.h" +#include "constants/easy_chat.h" #include "event_data.h" #include "link.h" #include "random.h" diff --git a/src/field/easy_chat.c b/src/field/easy_chat.c index 7a4ae045e..1dce5863e 100644 --- a/src/field/easy_chat.c +++ b/src/field/easy_chat.c @@ -1,5 +1,6 @@ #include "global.h" #include "easy_chat.h" +#include "constants/easy_chat.h" #include "data2.h" #include "event_data.h" #include "field_message_box.h" diff --git a/src/field/field_control_avatar.c b/src/field/field_control_avatar.c index c7b4861d5..c4e53b13f 100644 --- a/src/field/field_control_avatar.c +++ b/src/field/field_control_avatar.c @@ -10,18 +10,18 @@ #include "field_poison.h" #include "field_specials.h" #include "fieldmap.h" -#include "flags.h" +#include "constants/flags.h" #include "item_menu.h" #include "metatile_behavior.h" #include "overworld.h" #include "safari_zone.h" #include "script.h" #include "secret_base.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "start_menu.h" #include "trainer_see.h" -#include "vars.h" +#include "constants/vars.h" #include "wild_encounter.h" struct Coords32 diff --git a/src/field/field_door.c b/src/field/field_door.c index ef349bca7..89dae725c 100644 --- a/src/field/field_door.c +++ b/src/field/field_door.c @@ -3,7 +3,7 @@ #include "field_camera.h" #include "fieldmap.h" #include "metatile_behavior.h" -#include "songs.h" +#include "constants/songs.h" #include "task.h" const u8 DoorAnimTiles_04[][0x100] = diff --git a/src/field/field_effect.c b/src/field/field_effect.c index 0ccbb6230..4337300da 100644 --- a/src/field/field_effect.c +++ b/src/field/field_effect.c @@ -12,7 +12,7 @@ #include "overworld.h" #include "task.h" #include "sound.h" -#include "songs.h" +#include "constants/songs.h" #include "decoration.h" #include "field_player_avatar.h" #include "field_map_obj_helpers.h" diff --git a/src/field/field_effect_helpers.c b/src/field/field_effect_helpers.c index c5b67fd9d..1d831d2e9 100644 --- a/src/field/field_effect_helpers.c +++ b/src/field/field_effect_helpers.c @@ -2,7 +2,7 @@ #include "sprite.h" #include "fieldmap.h" #include "metatile_behavior.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "field_map_obj.h" #include "field_camera.h" diff --git a/src/field/field_fadetransition.c b/src/field/field_fadetransition.c index 82776d18c..829ce2dfa 100644 --- a/src/field/field_fadetransition.c +++ b/src/field/field_fadetransition.c @@ -17,7 +17,7 @@ #include "palette.h" #include "overworld.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "start_menu.h" #include "task.h" diff --git a/src/field/field_map_obj.c b/src/field/field_map_obj.c index 20edbc34f..0e6794ed7 100644 --- a/src/field/field_map_obj.c +++ b/src/field/field_map_obj.c @@ -14,8 +14,8 @@ #include "overworld.h" #include "sprite.h" #include "metatile_behavior.h" -#include "map_constants.h" -#include "map_object_constants.h" +#include "constants/maps.h" +#include "constants/map_objects.h" #include "trainer_see.h" // rodata @@ -7054,7 +7054,7 @@ bool8 sub_8062088(struct MapObject *mapObject, struct Sprite *sprite) bool8 sub_80620B0(struct MapObject *mapObject, struct Sprite *sprite) { u8 objectId; - if (!TryGetFieldObjectIdByLocalIdAndMap(0xFF, MAP_GROUP_PETALBURG_CITY, MAP_ID_PETALBURG_CITY, &objectId)) + if (!TryGetFieldObjectIdByLocalIdAndMap(0xFF, MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), &objectId)) { an_look_any(mapObject, sprite, sub_805FE90(mapObject->coords2.x, mapObject->coords2.y, gMapObjects[objectId].coords2.x, gMapObjects[objectId].coords2.y)); } @@ -7065,7 +7065,7 @@ bool8 sub_80620B0(struct MapObject *mapObject, struct Sprite *sprite) bool8 sub_806210C(struct MapObject *mapObject, struct Sprite *sprite) { u8 objectId; - if (!TryGetFieldObjectIdByLocalIdAndMap(0xFF, MAP_GROUP_PETALBURG_CITY, MAP_ID_PETALBURG_CITY, &objectId)) + if (!TryGetFieldObjectIdByLocalIdAndMap(0xFF, MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), &objectId)) { an_look_any(mapObject, sprite, GetOppositeDirection(sub_805FE90(mapObject->coords2.x, mapObject->coords2.y, gMapObjects[objectId].coords2.x, gMapObjects[objectId].coords2.y))); } diff --git a/src/field/field_player_avatar.c b/src/field/field_player_avatar.c index a26638b39..437d16208 100644 --- a/src/field/field_player_avatar.c +++ b/src/field/field_player_avatar.c @@ -9,7 +9,7 @@ #include "field_map_obj_helpers.h" #include "fieldmap.h" #include "main.h" -#include "map_object_constants.h" +#include "constants/map_objects.h" #include "menu.h" #include "metatile_behavior.h" #include "party_menu.h" @@ -17,7 +17,7 @@ #include "overworld.h" #include "rotating_gate.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "strings2.h" #include "task.h" diff --git a/src/field/field_special_scene.c b/src/field/field_special_scene.c index 5758929b6..6ef98f5e9 100644 --- a/src/field/field_special_scene.c +++ b/src/field/field_special_scene.c @@ -11,7 +11,7 @@ #include "overworld.h" #include "script.h" #include "script_movement.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "task.h" diff --git a/src/field/field_specials.c b/src/field/field_specials.c index e5bb1b798..d654d10f5 100644 --- a/src/field/field_specials.c +++ b/src/field/field_specials.c @@ -11,22 +11,22 @@ #include "field_camera.h" #include "field_player_avatar.h" #include "main.h" -#include "map_constants.h" +#include "constants/maps.h" #include "overworld.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "string_util.h" #include "strings.h" #include "pokeblock.h" -#include "species.h" -#include "abilities.h" -#include "moves.h" +#include "constants/species.h" +#include "constants/abilities.h" +#include "constants/moves.h" #include "text.h" #include "wallclock.h" #include "tv.h" #include "rtc.h" #include "link.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "menu.h" #include "starter_choose.h" @@ -207,7 +207,7 @@ u16 GetRecordedCyclingRoadResults(void) { } void UpdateCyclingRoadState(void) { - if (gUnknown_020297F0.mapNum == MAP_ID_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE && gUnknown_020297F0.mapGroup == MAP_GROUP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE) + if (gUnknown_020297F0.mapNum == MAP_NUM(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE) && gUnknown_020297F0.mapGroup == MAP_GROUP(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE)) { return; } @@ -259,38 +259,38 @@ u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y) case 2: if (*varCruiseStepCount < 60) { - *mapNum = MAP_ID_ROUTE134; + *mapNum = MAP_NUM(ROUTE134); *x = *varCruiseStepCount + 19; } else if (*varCruiseStepCount < 140) { - *mapNum = MAP_ID_ROUTE133; + *mapNum = MAP_NUM(ROUTE133); *x = *varCruiseStepCount - 60; } else { - *mapNum = MAP_ID_ROUTE132; + *mapNum = MAP_NUM(ROUTE132); *x = *varCruiseStepCount - 140; } break; case 7: if (*varCruiseStepCount < 66) { - *mapNum = MAP_ID_ROUTE132; + *mapNum = MAP_NUM(ROUTE132); *x = 65 - *varCruiseStepCount; } else if (*varCruiseStepCount < 146) { - *mapNum = MAP_ID_ROUTE133; + *mapNum = MAP_NUM(ROUTE133); *x = 145 - *varCruiseStepCount; } else { - *mapNum = MAP_ID_ROUTE134; + *mapNum = MAP_NUM(ROUTE134); *x = 224 - *varCruiseStepCount; } break; } - *mapGroup = MAP_GROUP_ROUTE132; + *mapGroup = MAP_GROUP(ROUTE132); *y = 20; return 0; } @@ -702,11 +702,11 @@ void CableCarWarp(void) { if (gSpecialVar_0x8004 != 0) { - Overworld_SetWarpDestination(MAP_GROUP_ROUTE112_CABLE_CAR_STATION, MAP_ID_ROUTE112_CABLE_CAR_STATION, -1, 6, 4); + Overworld_SetWarpDestination(MAP_GROUP(ROUTE112_CABLE_CAR_STATION), MAP_NUM(ROUTE112_CABLE_CAR_STATION), -1, 6, 4); } else { - Overworld_SetWarpDestination(MAP_GROUP_MT_CHIMNEY_CABLE_CAR_STATION, MAP_ID_MT_CHIMNEY_CABLE_CAR_STATION, -1, 6, 4); + Overworld_SetWarpDestination(MAP_GROUP(MT_CHIMNEY_CABLE_CAR_STATION), MAP_NUM(MT_CHIMNEY_CABLE_CAR_STATION), -1, 6, 4); } } @@ -1001,22 +1001,22 @@ void SetDepartmentStoreFloorVar(void) u8 deptStoreFloor; switch (gSaveBlock1.warp2.mapNum) { - case MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_1F: + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_1F): deptStoreFloor = 0; break; - case MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_2F: + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_2F): deptStoreFloor = 1; break; - case MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_3F: + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_3F): deptStoreFloor = 2; break; - case MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_4F: + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_4F): deptStoreFloor = 3; break; - case MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_5F: + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_5F): deptStoreFloor = 4; break; - case MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP: + case MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP): deptStoreFloor = 15; break; default: @@ -1881,7 +1881,7 @@ bool8 ScrSpecial_AreLeadMonEVsMaxedOut(void) u8 sub_810F5BC(void) { - if (!FlagGet(0xc7) && gSaveBlock1.location.mapGroup == MAP_GROUP_RUSTURF_TUNNEL && gSaveBlock1.location.mapNum == MAP_ID_RUSTURF_TUNNEL) + if (!FlagGet(0xc7) && gSaveBlock1.location.mapGroup == MAP_GROUP(RUSTURF_TUNNEL) && gSaveBlock1.location.mapNum == MAP_NUM(RUSTURF_TUNNEL)) { if (FlagGet(0x3a3)) { diff --git a/src/field/field_tasks.c b/src/field/field_tasks.c index e938a57ef..108ba64ba 100644 --- a/src/field/field_tasks.c +++ b/src/field/field_tasks.c @@ -1,10 +1,10 @@ #include "global.h" #include "task.h" #include "main.h" -#include "vars.h" +#include "constants/vars.h" #include "bike.h" #include "item.h" -#include "items.h" +#include "constants/items.h" #include "event_data.h" #include "overworld.h" #include "clock.h" @@ -16,7 +16,7 @@ #include "fieldmap.h" #include "field_player_avatar.h" #include "field_camera.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "field_tasks.h" diff --git a/src/field/field_weather.c b/src/field/field_weather.c index ff7c2e4c4..19ccca3bf 100644 --- a/src/field/field_weather.c +++ b/src/field/field_weather.c @@ -5,7 +5,7 @@ #include "palette.h" #include "random.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "task.h" diff --git a/src/field/field_weather_effects.c b/src/field/field_weather_effects.c index b1dca6396..31eda4393 100644 --- a/src/field/field_weather_effects.c +++ b/src/field/field_weather_effects.c @@ -4,7 +4,7 @@ #include "overworld.h" #include "random.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "task.h" diff --git a/src/field/fldeff_cut.c b/src/field/fldeff_cut.c index 599c916a2..edf38d800 100644 --- a/src/field/fldeff_cut.c +++ b/src/field/fldeff_cut.c @@ -11,7 +11,7 @@ #include "overworld.h" #include "rom6.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "task.h" diff --git a/src/field/fldeff_decoration.c b/src/field/fldeff_decoration.c index b0ac30062..d58f53a3c 100644 --- a/src/field/fldeff_decoration.c +++ b/src/field/fldeff_decoration.c @@ -6,7 +6,7 @@ #include "field_player_avatar.h" #include "fieldmap.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "string_util.h" #include "strings.h" diff --git a/src/field/fldeff_flash.c b/src/field/fldeff_flash.c index 30423a3f9..920791ce2 100644 --- a/src/field/fldeff_flash.c +++ b/src/field/fldeff_flash.c @@ -7,7 +7,7 @@ #include "overworld.h" #include "rom6.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "task.h" diff --git a/src/field/fldeff_poison.c b/src/field/fldeff_poison.c index 0a0cf5539..b0052d59d 100644 --- a/src/field/fldeff_poison.c +++ b/src/field/fldeff_poison.c @@ -1,7 +1,7 @@ #include "global.h" #include "fldeff_poison.h" #include "task.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" static void Task_FieldPoisonEffect(u8 taskId) diff --git a/src/field/fldeff_secret_base_pc.c b/src/field/fldeff_secret_base_pc.c index ead970b27..8d71a4fb9 100644 --- a/src/field/fldeff_secret_base_pc.c +++ b/src/field/fldeff_secret_base_pc.c @@ -5,7 +5,7 @@ #include "field_player_avatar.h" #include "fieldmap.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "task.h" diff --git a/src/field/fldeff_secretpower.c b/src/field/fldeff_secretpower.c index 5ec4407ae..cd9a2ae36 100644 --- a/src/field/fldeff_secretpower.c +++ b/src/field/fldeff_secretpower.c @@ -10,7 +10,7 @@ #include "rom6.h" #include "script.h" #include "secret_base.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" extern u8 gUnknown_081A2CE6[]; diff --git a/src/field/fldeff_softboiled.c b/src/field/fldeff_softboiled.c index c2a315233..a574232a8 100644 --- a/src/field/fldeff_softboiled.c +++ b/src/field/fldeff_softboiled.c @@ -4,7 +4,7 @@ #include "party_menu.h" #include "pokemon.h" #include "pokemon_menu.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "strings.h" diff --git a/src/field/heal_location.c b/src/field/heal_location.c index 42bc18567..a10c7a7b8 100644 --- a/src/field/heal_location.c +++ b/src/field/heal_location.c @@ -1,33 +1,33 @@ #include "global.h" #include "heal_location.h" -#include "map_constants.h" +#include "constants/maps.h" #define NUM_HEAL_LOCATIONS 22 static const struct HealLocation sHealLocations[] = { - {MAP_GROUP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, MAP_ID_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 4, 2}, - {MAP_GROUP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, MAP_ID_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 4, 2}, - {MAP_GROUP_PETALBURG_CITY, MAP_ID_PETALBURG_CITY, 20, 17}, - {MAP_GROUP_SLATEPORT_CITY, MAP_ID_SLATEPORT_CITY, 19, 20}, - {MAP_GROUP_MAUVILLE_CITY, MAP_ID_MAUVILLE_CITY, 22, 6}, - {MAP_GROUP_RUSTBORO_CITY, MAP_ID_RUSTBORO_CITY, 16, 39}, - {MAP_GROUP_FORTREE_CITY, MAP_ID_FORTREE_CITY, 5, 7}, - {MAP_GROUP_LILYCOVE_CITY, MAP_ID_LILYCOVE_CITY, 24, 15}, - {MAP_GROUP_MOSSDEEP_CITY, MAP_ID_MOSSDEEP_CITY, 28, 17}, - {MAP_GROUP_SOOTOPOLIS_CITY, MAP_ID_SOOTOPOLIS_CITY, 43, 32}, - {MAP_GROUP_EVER_GRANDE_CITY, MAP_ID_EVER_GRANDE_CITY, 27, 49}, - {MAP_GROUP_LITTLEROOT_TOWN, MAP_ID_LITTLEROOT_TOWN, 5, 9}, - {MAP_GROUP_LITTLEROOT_TOWN, MAP_ID_LITTLEROOT_TOWN, 14, 9}, - {MAP_GROUP_OLDALE_TOWN, MAP_ID_OLDALE_TOWN, 6, 17}, - {MAP_GROUP_DEWFORD_TOWN, MAP_ID_DEWFORD_TOWN, 2, 11}, - {MAP_GROUP_LAVARIDGE_TOWN, MAP_ID_LAVARIDGE_TOWN, 9, 7}, - {MAP_GROUP_FALLARBOR_TOWN, MAP_ID_FALLARBOR_TOWN, 14, 8}, - {MAP_GROUP_VERDANTURF_TOWN, MAP_ID_VERDANTURF_TOWN, 16, 4}, - {MAP_GROUP_PACIFIDLOG_TOWN, MAP_ID_PACIFIDLOG_TOWN, 8, 16}, - {MAP_GROUP_EVER_GRANDE_CITY, MAP_ID_EVER_GRANDE_CITY, 18, 6}, - {MAP_GROUP_BATTLE_TOWER_OUTSIDE, MAP_ID_BATTLE_TOWER_OUTSIDE, 14, 9}, - {MAP_GROUP_SOUTHERN_ISLAND_EXTERIOR, MAP_ID_SOUTHERN_ISLAND_EXTERIOR, 15, 20}, + {MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_2F), 4, 2}, + {MAP_GROUP(LITTLEROOT_TOWN_MAYS_HOUSE_2F), MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_2F), 4, 2}, + {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), 20, 17}, + {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), 19, 20}, + {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), 22, 6}, + {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), 16, 39}, + {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), 5, 7}, + {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), 24, 15}, + {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), 28, 17}, + {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), 43, 32}, + {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 27, 49}, + {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 5, 9}, + {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), 14, 9}, + {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), 6, 17}, + {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), 2, 11}, + {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), 9, 7}, + {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), 14, 8}, + {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), 16, 4}, + {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), 8, 16}, + {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), 18, 6}, + {MAP_GROUP(BATTLE_TOWER_OUTSIDE), MAP_NUM(BATTLE_TOWER_OUTSIDE), 14, 9}, + {MAP_GROUP(SOUTHERN_ISLAND_EXTERIOR), MAP_NUM(SOUTHERN_ISLAND_EXTERIOR), 15, 20}, }; u32 GetHealLocationIndexByMap(u16 mapGroup, u16 mapNum) diff --git a/src/field/item.c b/src/field/item.c index fd49f5c39..66d7d65df 100644 --- a/src/field/item.c +++ b/src/field/item.c @@ -1,7 +1,7 @@ #include "global.h" -#include "hold_effects.h" +#include "constants/hold_effects.h" #include "item.h" -#include "items.h" +#include "constants/items.h" #include "item_use.h" #include "berry.h" #include "string_util.h" diff --git a/src/field/item_menu.c b/src/field/item_menu.c index 67362d5f3..8f7cb3d90 100644 --- a/src/field/item_menu.c +++ b/src/field/item_menu.c @@ -8,7 +8,7 @@ #include "field_player_avatar.h" #include "graphics.h" #include "item.h" -#include "items.h" +#include "constants/items.h" #include "item_menu.h" #include "item_use.h" #include "link.h" @@ -25,7 +25,7 @@ #include "pokemon_menu.h" #include "overworld.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "strings.h" diff --git a/src/field/item_use.c b/src/field/item_use.c index 14b13ca3b..48b159c1c 100644 --- a/src/field/item_use.c +++ b/src/field/item_use.c @@ -14,7 +14,7 @@ #include "fieldmap.h" #include "item.h" #include "item_menu.h" -#include "items.h" +#include "constants/items.h" #include "mail.h" #include "main.h" #include "map_obj_lock.h" @@ -29,12 +29,12 @@ #include "overworld.h" #include "rom_8094928.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "string_util.h" #include "strings.h" #include "task.h" -#include "vars.h" +#include "constants/vars.h" extern void (*gFieldItemUseCallback)(u8); extern void (*gFieldCallback)(void); diff --git a/src/field/lottery_corner.c b/src/field/lottery_corner.c index 5f0ce2907..2cfdb7f88 100644 --- a/src/field/lottery_corner.c +++ b/src/field/lottery_corner.c @@ -1,9 +1,9 @@ #include "global.h" #include "lottery_corner.h" #include "event_data.h" -#include "items.h" +#include "constants/items.h" #include "random.h" -#include "species.h" +#include "constants/species.h" #include "string_util.h" #include "text.h" diff --git a/src/field/mauville_man.c b/src/field/mauville_man.c index a27c54df7..fad6674db 100644 --- a/src/field/mauville_man.c +++ b/src/field/mauville_man.c @@ -2,6 +2,7 @@ #include "bard_music.h" #include "mauville_man.h" #include "easy_chat.h" +#include "constants/easy_chat.h" #include "event_data.h" #include "field_message_box.h" #include "m4a.h" @@ -9,7 +10,7 @@ #include "overworld.h" #include "random.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "string_util.h" #include "strings.h" diff --git a/src/field/menu_helpers.c b/src/field/menu_helpers.c index 8e13e5546..e3ef0c790 100644 --- a/src/field/menu_helpers.c +++ b/src/field/menu_helpers.c @@ -1,14 +1,14 @@ #include "global.h" #include "item_menu.h" -#include "items.h" +#include "constants/items.h" #include "link.h" #include "mail_data.h" #include "main.h" -#include "map_constants.h" +#include "constants/maps.h" #include "menu.h" #include "menu_helpers.h" #include "overworld.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "task.h" @@ -261,7 +261,7 @@ bool8 sub_80F92F4(u16 itemId) return TRUE; } - if (!(gSaveBlock1.location.mapGroup == MAP_GROUP_TRADE_CENTER && gSaveBlock1.location.mapNum == MAP_ID_TRADE_CENTER)) + if (!(gSaveBlock1.location.mapGroup == MAP_GROUP(TRADE_CENTER) && gSaveBlock1.location.mapNum == MAP_NUM(TRADE_CENTER))) { return TRUE; } diff --git a/src/field/overworld.c b/src/field/overworld.c index ca59426fa..21f3f98ef 100644 --- a/src/field/overworld.c +++ b/src/field/overworld.c @@ -25,7 +25,7 @@ #include "link.h" #include "load_save.h" #include "main.h" -#include "map_constants.h" +#include "constants/maps.h" #include "map_name_popup.h" #include "menu.h" #include "metatile_behavior.h" @@ -39,9 +39,9 @@ #include "script.h" #include "script_pokemon_80C4.h" #include "secret_base.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" -#include "species.h" +#include "constants/species.h" #include "start_menu.h" #include "task.h" #include "tileset_anim.h" @@ -738,9 +738,9 @@ u16 cur_mapdata_block_role_at_screen_center_acc_to_sav1(void) bool32 Overworld_IsBikingAllowed(void) { // is player in cycling road entrance? - if (gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE - && (gSaveBlock1.location.mapNum == MAP_ID_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE - || gSaveBlock1.location.mapNum == MAP_ID_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE)) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE) + && (gSaveBlock1.location.mapNum == MAP_NUM(ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE) + || gSaveBlock1.location.mapNum == MAP_NUM(ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE))) return TRUE; // is player indoor, in a secret base, or underwater? @@ -752,11 +752,11 @@ bool32 Overworld_IsBikingAllowed(void) return FALSE; // Thou shalt not bike on the sacred resting grounds of Kyogre/Groudon. - if (gSaveBlock1.location.mapGroup == MAP_GROUP_SEAFLOOR_CAVERN_ROOM9 - && gSaveBlock1.location.mapNum == MAP_ID_SEAFLOOR_CAVERN_ROOM9) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(SEAFLOOR_CAVERN_ROOM9) + && gSaveBlock1.location.mapNum == MAP_NUM(SEAFLOOR_CAVERN_ROOM9)) return FALSE; - if (gSaveBlock1.location.mapGroup == MAP_GROUP_CAVE_OF_ORIGIN_B4F - && gSaveBlock1.location.mapNum == MAP_ID_CAVE_OF_ORIGIN_B4F) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(CAVE_OF_ORIGIN_B4F) + && gSaveBlock1.location.mapNum == MAP_NUM(CAVE_OF_ORIGIN_B4F)) return FALSE; return TRUE; @@ -798,16 +798,16 @@ static bool16 ShouldLegendaryMusicPlayAtLocation(struct WarpData *warp) { switch (warp->mapNum) { - case MAP_ID_LILYCOVE_CITY: - case MAP_ID_MOSSDEEP_CITY: - case MAP_ID_SOOTOPOLIS_CITY: - case MAP_ID_EVER_GRANDE_CITY: + case MAP_NUM(LILYCOVE_CITY): + case MAP_NUM(MOSSDEEP_CITY): + case MAP_NUM(SOOTOPOLIS_CITY): + case MAP_NUM(EVER_GRANDE_CITY): return TRUE; - case MAP_ID_ROUTE124: - case MAP_ID_ROUTE125: - case MAP_ID_ROUTE126: - case MAP_ID_ROUTE127: - case MAP_ID_ROUTE128: + case MAP_NUM(ROUTE124): + case MAP_NUM(ROUTE125): + case MAP_NUM(ROUTE126): + case MAP_NUM(ROUTE127): + case MAP_NUM(ROUTE128): return TRUE; } } @@ -818,10 +818,10 @@ static bool16 IsInfiltratedWeatherInstitute(struct WarpData *warp) { if (VarGet(VAR_WEATHER_INSTITUTE_CLEARED)) return FALSE; - if (warp->mapGroup != MAP_GROUP_ROUTE119_WEATHER_INSTITUTE_1F) + if (warp->mapGroup != MAP_GROUP(ROUTE119_WEATHER_INSTITUTE_1F)) return FALSE; - if (warp->mapNum == MAP_ID_ROUTE119_WEATHER_INSTITUTE_1F - || warp->mapNum == MAP_ID_ROUTE119_WEATHER_INSTITUTE_2F) + if (warp->mapNum == MAP_NUM(ROUTE119_WEATHER_INSTITUTE_1F) + || warp->mapNum == MAP_NUM(ROUTE119_WEATHER_INSTITUTE_2F)) return TRUE; return FALSE; } @@ -841,8 +841,8 @@ u16 GetCurrLocationDefaultMusic(void) u16 music; // Play the desert music only when the sandstorm is active on Route 111. - if (gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE111 - && gSaveBlock1.location.mapNum == MAP_ID_ROUTE111 + if (gSaveBlock1.location.mapGroup == MAP_GROUP(ROUTE111) + && gSaveBlock1.location.mapNum == MAP_NUM(ROUTE111) && GetSav1Weather() == 8) return BGM_ASHROAD; @@ -869,8 +869,8 @@ u16 GetWarpDestinationMusic(void) } else { - if (gSaveBlock1.location.mapGroup == MAP_GROUP_MAUVILLE_CITY - && gSaveBlock1.location.mapNum == MAP_ID_MAUVILLE_CITY) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(MAUVILLE_CITY) + && gSaveBlock1.location.mapNum == MAP_NUM(MAUVILLE_CITY)) return BGM_DOORO_X1; else return BGM_GRANROAD; @@ -1024,8 +1024,8 @@ void UpdateAmbientCry(s16 *state, u16 *delayCounter) void ChooseAmbientCrySpecies(void) { - if ((gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE130 - && gSaveBlock1.location.mapNum == MAP_ID_ROUTE130) + if ((gSaveBlock1.location.mapGroup == MAP_GROUP(ROUTE130) + && gSaveBlock1.location.mapNum == MAP_NUM(ROUTE130)) && !IsMirageIslandPresent()) { // Only play water pokemon cries on this route diff --git a/src/field/party_menu.c b/src/field/party_menu.c index bee64fb27..dc817f8c9 100644 --- a/src/field/party_menu.c +++ b/src/field/party_menu.c @@ -11,12 +11,12 @@ #include "item.h" #include "item_use.h" #include "item_menu.h" -#include "items.h" +#include "constants/items.h" #include "mail_data.h" #include "main.h" #include "menu.h" #include "menu_helpers.h" -#include "moves.h" +#include "constants/moves.h" #include "palette.h" #include "pokemon.h" #include "pokemon_icon.h" @@ -25,9 +25,9 @@ #include "pokemon_summary_screen.h" #include "rom_8077ABC.h" #include "rom_8094928.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" -#include "species.h" +#include "constants/species.h" #include "sprite.h" #include "string_util.h" #include "strings.h" diff --git a/src/field/player_pc.c b/src/field/player_pc.c index ce78a88d8..d92d13ce4 100644 --- a/src/field/player_pc.c +++ b/src/field/player_pc.c @@ -5,7 +5,7 @@ #include "field_weather.h" #include "item.h" #include "item_menu.h" -#include "items.h" +#include "constants/items.h" #include "main.h" #include "menu.h" #include "menu_helpers.h" @@ -15,7 +15,7 @@ #include "string_util.h" #include "strings.h" #include "task.h" -#include "songs.h" +#include "constants/songs.h" #include "name_string_util.h" #include "mail.h" #include "overworld.h" diff --git a/src/field/pokeblock.c b/src/field/pokeblock.c index 5aa03ff7a..3b70e7d76 100644 --- a/src/field/pokeblock.c +++ b/src/field/pokeblock.c @@ -21,9 +21,9 @@ #include "item_menu.h" #include "item_use.h" #include "item.h" -#include "items.h" +#include "constants/items.h" #include "sound.h" -#include "songs.h" +#include "constants/songs.h" #include "safari_zone.h" #include "event_data.h" #include "pokeblock.h" diff --git a/src/field/region_map.c b/src/field/region_map.c index 241b38bf6..f2e4b3251 100644 --- a/src/field/region_map.c +++ b/src/field/region_map.c @@ -4,14 +4,14 @@ #include "field_specials.h" #include "m4a.h" #include "main.h" -#include "map_constants.h" +#include "constants/maps.h" #include "menu.h" #include "palette.h" #include "pokemon_menu.h" #include "region_map.h" #include "overworld.h" #include "secret_base.h" -#include "songs.h" +#include "constants/songs.h" #include "sprite.h" #include "strings.h" #include "string_util.h" @@ -707,9 +707,9 @@ static void InitializeCursorPosition(void) u16 r9; if (gSaveBlock1.location.mapGroup == 25 - && (gSaveBlock1.location.mapNum == MAP_ID_SS_TIDAL_CORRIDOR - || gSaveBlock1.location.mapNum == MAP_ID_SS_TIDAL_LOWER_DECK - || gSaveBlock1.location.mapNum == MAP_ID_SS_TIDAL_ROOMS)) + && (gSaveBlock1.location.mapNum == MAP_NUM(SS_TIDAL_CORRIDOR) + || gSaveBlock1.location.mapNum == MAP_NUM(SS_TIDAL_LOWER_DECK) + || gSaveBlock1.location.mapNum == MAP_NUM(SS_TIDAL_ROOMS))) { sub_80FB600(); return; diff --git a/src/field/roamer.c b/src/field/roamer.c index d8ea1ef52..2eb26ef9d 100644 --- a/src/field/roamer.c +++ b/src/field/roamer.c @@ -2,7 +2,7 @@ #include "roamer.h" #include "pokemon.h" #include "random.h" -#include "species.h" +#include "constants/species.h" #ifdef SAPPHIRE #define ROAMER_SPECIES SPECIES_LATIAS diff --git a/src/field/rotating_gate.c b/src/field/rotating_gate.c index a672f3489..00008c69c 100644 --- a/src/field/rotating_gate.c +++ b/src/field/rotating_gate.c @@ -3,8 +3,8 @@ #include "event_data.h" #include "field_map_obj.h" #include "fieldmap.h" -#include "map_constants.h" -#include "songs.h" +#include "constants/maps.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" @@ -622,14 +622,14 @@ static EWRAM_DATA u8 gRotatingGate_PuzzleCount = 0; static int GetCurrentMapRotatingGatePuzzleType(void) { - if (gSaveBlock1.location.mapGroup == MAP_GROUP_FORTREE_CITY_GYM && - gSaveBlock1.location.mapNum == MAP_ID_FORTREE_CITY_GYM) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(FORTREE_CITY_GYM) && + gSaveBlock1.location.mapNum == MAP_NUM(FORTREE_CITY_GYM)) { return PUZZLE_FORTREE_CITY_GYM; } - if (gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE6 && - gSaveBlock1.location.mapNum == MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE6) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(ROUTE110_TRICK_HOUSE_PUZZLE6) && + gSaveBlock1.location.mapNum == MAP_NUM(ROUTE110_TRICK_HOUSE_PUZZLE6)) { return PUZZLE_ROUTE110_TRICK_HOUSE_PUZZLE6; } diff --git a/src/field/script_menu.c b/src/field/script_menu.c index e25e74d8c..caa1d7562 100644 --- a/src/field/script_menu.c +++ b/src/field/script_menu.c @@ -6,7 +6,7 @@ #include "menu.h" #include "palette.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "strings.h" diff --git a/src/field/secret_base.c b/src/field/secret_base.c index 34352f39a..fee79a18c 100644 --- a/src/field/secret_base.c +++ b/src/field/secret_base.c @@ -1,9 +1,10 @@ #include "global.h" +#include "constants/decorations.h" #include "secret_base.h" #include "decoration.h" -#include "species.h" -#include "items.h" -#include "moves.h" +#include "constants/species.h" +#include "constants/items.h" +#include "constants/moves.h" #include "event_data.h" #include "field_camera.h" #include "field_effect.h" @@ -16,8 +17,8 @@ #include "link.h" #include "main.h" #include "sound.h" -#include "songs.h" -#include "map_constants.h" +#include "constants/songs.h" +#include "constants/maps.h" #include "map_name_popup.h" #include "menu.h" #include "menu_helpers.h" @@ -27,12 +28,12 @@ #include "overworld.h" #include "script.h" #include "sound.h" -#include "species.h" +#include "constants/species.h" #include "string_util.h" #include "strings.h" #include "task.h" #include "text.h" -#include "vars.h" +#include "constants/vars.h" static void sub_80BC7D8(u8 taskId); @@ -68,30 +69,30 @@ const struct const u8 gUnknown_083D1374[] = { - MAP_ID_SECRET_BASE_RED_CAVE1, 0, 1, 3, - MAP_ID_SECRET_BASE_RED_CAVE2, 0, 5, 9, - MAP_ID_SECRET_BASE_RED_CAVE3, 0, 1, 3, - MAP_ID_SECRET_BASE_RED_CAVE4, 0, 7, 13, - MAP_ID_SECRET_BASE_BROWN_CAVE1, 0, 2, 3, - MAP_ID_SECRET_BASE_BROWN_CAVE2, 0, 9, 2, - MAP_ID_SECRET_BASE_BROWN_CAVE3, 0, 13, 4, - MAP_ID_SECRET_BASE_BROWN_CAVE4, 0, 1, 2, - MAP_ID_SECRET_BASE_BLUE_CAVE1, 0, 1, 3, - MAP_ID_SECRET_BASE_BLUE_CAVE2, 0, 1, 2, - MAP_ID_SECRET_BASE_BLUE_CAVE3, 0, 3, 15, - MAP_ID_SECRET_BASE_BLUE_CAVE4, 0, 3, 14, - MAP_ID_SECRET_BASE_YELLOW_CAVE1, 0, 9, 3, - MAP_ID_SECRET_BASE_YELLOW_CAVE2, 0, 8, 7, - MAP_ID_SECRET_BASE_YELLOW_CAVE3, 0, 3, 6, - MAP_ID_SECRET_BASE_YELLOW_CAVE4, 0, 5, 9, - MAP_ID_SECRET_BASE_TREE1, 0, 2, 3, - MAP_ID_SECRET_BASE_TREE2, 0, 5, 6, - MAP_ID_SECRET_BASE_TREE3, 0, 15, 3, - MAP_ID_SECRET_BASE_TREE4, 0, 4, 10, - MAP_ID_SECRET_BASE_SHRUB1, 0, 3, 3, - MAP_ID_SECRET_BASE_SHRUB2, 0, 1, 2, - MAP_ID_SECRET_BASE_SHRUB3, 0, 7, 8, - MAP_ID_SECRET_BASE_SHRUB4, 0, 9, 6 + MAP_NUM(SECRET_BASE_RED_CAVE1), 0, 1, 3, + MAP_NUM(SECRET_BASE_RED_CAVE2), 0, 5, 9, + MAP_NUM(SECRET_BASE_RED_CAVE3), 0, 1, 3, + MAP_NUM(SECRET_BASE_RED_CAVE4), 0, 7, 13, + MAP_NUM(SECRET_BASE_BROWN_CAVE1), 0, 2, 3, + MAP_NUM(SECRET_BASE_BROWN_CAVE2), 0, 9, 2, + MAP_NUM(SECRET_BASE_BROWN_CAVE3), 0, 13, 4, + MAP_NUM(SECRET_BASE_BROWN_CAVE4), 0, 1, 2, + MAP_NUM(SECRET_BASE_BLUE_CAVE1), 0, 1, 3, + MAP_NUM(SECRET_BASE_BLUE_CAVE2), 0, 1, 2, + MAP_NUM(SECRET_BASE_BLUE_CAVE3), 0, 3, 15, + MAP_NUM(SECRET_BASE_BLUE_CAVE4), 0, 3, 14, + MAP_NUM(SECRET_BASE_YELLOW_CAVE1), 0, 9, 3, + MAP_NUM(SECRET_BASE_YELLOW_CAVE2), 0, 8, 7, + MAP_NUM(SECRET_BASE_YELLOW_CAVE3), 0, 3, 6, + MAP_NUM(SECRET_BASE_YELLOW_CAVE4), 0, 5, 9, + MAP_NUM(SECRET_BASE_TREE1), 0, 2, 3, + MAP_NUM(SECRET_BASE_TREE2), 0, 5, 6, + MAP_NUM(SECRET_BASE_TREE3), 0, 15, 3, + MAP_NUM(SECRET_BASE_TREE4), 0, 4, 10, + MAP_NUM(SECRET_BASE_SHRUB1), 0, 3, 3, + MAP_NUM(SECRET_BASE_SHRUB2), 0, 1, 2, + MAP_NUM(SECRET_BASE_SHRUB3), 0, 7, 8, + MAP_NUM(SECRET_BASE_SHRUB4), 0, 9, 6 }; const struct MenuAction2 gUnknown_083D13D4[] = { @@ -316,7 +317,7 @@ void sub_80BB970(struct MapEvents *events) void sub_80BBA14(void) { s8 idx = 4 * (gUnknown_020387DC / 10); - warp1_set_2(MAP_GROUP_SECRET_BASE_RED_CAVE1, gUnknown_083D1374[idx], gUnknown_083D1374[idx + 1]); + warp1_set_2(MAP_GROUP(SECRET_BASE_RED_CAVE1), gUnknown_083D1374[idx], gUnknown_083D1374[idx + 1]); } void sub_80BBA48(u8 taskid) @@ -401,7 +402,7 @@ void sub_80BBC78(void) bool8 CurrentMapIsSecretBase(void) { - if (gSaveBlock1.location.mapGroup == MAP_GROUP_SECRET_BASE_SHRUB4 && (u8)(gSaveBlock1.location.mapNum) <= MAP_ID_SECRET_BASE_SHRUB4) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(SECRET_BASE_SHRUB4) && (u8)(gSaveBlock1.location.mapNum) <= MAP_NUM(SECRET_BASE_SHRUB4)) return TRUE; return FALSE; } diff --git a/src/field/shop.c b/src/field/shop.c index 493d8c748..23d668fc7 100644 --- a/src/field/shop.c +++ b/src/field/shop.c @@ -21,8 +21,8 @@ #include "fieldmap.h" #include "item.h" #include "decoration.h" -#include "items.h" -#include "songs.h" +#include "constants/items.h" +#include "constants/songs.h" #include "overworld.h" #include "decoration_inventory.h" #include "field_camera.h" diff --git a/src/field/start_menu.c b/src/field/start_menu.c index 6e44090df..7913e5527 100644 --- a/src/field/start_menu.c +++ b/src/field/start_menu.c @@ -20,7 +20,7 @@ #include "save.h" #include "save_menu_util.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "sprite.h" #include "string_util.h" diff --git a/src/field/starter_choose.c b/src/field/starter_choose.c index 49590f83a..149eaa03d 100644 --- a/src/field/starter_choose.c +++ b/src/field/starter_choose.c @@ -6,9 +6,9 @@ #include "menu.h" #include "palette.h" #include "pokedex.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" -#include "species.h" +#include "constants/species.h" #include "sprite.h" #include "string_util.h" #include "strings.h" diff --git a/src/field/trader.c b/src/field/trader.c index 61f48fad8..c4fe73ba1 100644 --- a/src/field/trader.c +++ b/src/field/trader.c @@ -1,4 +1,5 @@ #include "global.h" +#include "constants/decorations.h" #include "decoration.h" #include "decoration_inventory.h" #include "event_data.h" @@ -7,7 +8,7 @@ #include "menu.h" #include "menu_helpers.h" #include "script.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "string_util.h" #include "strings.h" diff --git a/src/field/tv.c b/src/field/tv.c index e58adebc9..71d6455bd 100644 --- a/src/field/tv.c +++ b/src/field/tv.c @@ -8,25 +8,25 @@ #include "fieldmap.h" #include "field_message_box.h" #include "field_camera.h" -#include "flags.h" +#include "constants/flags.h" #include "random.h" #include "string_util.h" #include "text.h" -#include "species.h" +#include "constants/species.h" #include "pokedex.h" #include "naming_screen.h" #include "overworld.h" -#include "map_constants.h" +#include "constants/maps.h" #include "strings.h" #include "battle.h" #include "link.h" -#include "easy_chat.h" +#include "constants/easy_chat.h" #include "field_map_obj.h" #include "field_specials.h" #include "item.h" -#include "items.h" +#include "constants/items.h" #include "link.h" -#include "map_constants.h" +#include "constants/maps.h" #include "naming_screen.h" #include "pokedex.h" #include "region_map.h" @@ -34,12 +34,12 @@ #include "overworld.h" #include "rtc.h" #include "script_menu.h" -#include "species.h" +#include "constants/species.h" #include "string_util.h" #include "strings.h" #include "text.h" #include "ewram.h" -#include "moves.h" +#include "constants/moves.h" #include "region_map_sections.h" struct UnkTvStruct @@ -551,8 +551,8 @@ void UpdateTVScreensOnMap(int width, int height) case 2: break; default: - if (gSaveBlock1.location.mapGroup == MAP_GROUP_LILYCOVE_CITY_COVE_LILY_MOTEL_1F - && gSaveBlock1.location.mapNum == MAP_ID_LILYCOVE_CITY_COVE_LILY_MOTEL_1F) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(LILYCOVE_CITY_COVE_LILY_MOTEL_1F) + && gSaveBlock1.location.mapNum == MAP_NUM(LILYCOVE_CITY_COVE_LILY_MOTEL_1F)) { SetTVMetatilesOnMap(width, height, 0x3); } @@ -1460,16 +1460,16 @@ bool8 IsPriceDiscounted(u8 arg0) switch (arg0) { case 1: - if (gSaveBlock1.location.mapGroup == MAP_GROUP_SLATEPORT_CITY - && gSaveBlock1.location.mapNum == MAP_ID_SLATEPORT_CITY + if (gSaveBlock1.location.mapGroup == MAP_GROUP(SLATEPORT_CITY) + && gSaveBlock1.location.mapNum == MAP_NUM(SLATEPORT_CITY) && gScriptLastTalked == 0x1a) return TRUE; else return FALSE; break; case 3: - if (gSaveBlock1.location.mapGroup == MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP - && gSaveBlock1.location.mapNum == MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP) + && gSaveBlock1.location.mapNum == MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP)) return TRUE; else return FALSE; @@ -2121,16 +2121,16 @@ u32 GetPlayerTrainerId(void) u8 CheckForBigMovieOrEmergencyNewsOnTV(void) { - if (gSaveBlock1.location.mapGroup != MAP_GROUP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F) + if (gSaveBlock1.location.mapGroup != MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F)) return 0; if (gSaveBlock2.playerGender == MALE) { - if (gSaveBlock1.location.mapNum != MAP_ID_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F) + if (gSaveBlock1.location.mapNum != MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F)) return 0; } else { - if (gSaveBlock1.location.mapNum != MAP_ID_LITTLEROOT_TOWN_MAYS_HOUSE_1F) + if (gSaveBlock1.location.mapNum != MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_1F)) return 0; } if (FlagGet(SYS_TV_LATI) == 1) @@ -2142,11 +2142,11 @@ u8 CheckForBigMovieOrEmergencyNewsOnTV(void) void GetMomOrDadStringForTVMessage(void) { - if (gSaveBlock1.location.mapGroup == MAP_GROUP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F)) { if (gSaveBlock2.playerGender == MALE) { - if (gSaveBlock1.location.mapNum == MAP_ID_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F) + if (gSaveBlock1.location.mapNum == MAP_NUM(LITTLEROOT_TOWN_BRENDANS_HOUSE_1F)) { StringCopy(gStringVar1, gOtherText_Mom); VarSet(VAR_0x4003, 1); @@ -2154,7 +2154,7 @@ void GetMomOrDadStringForTVMessage(void) } else { - if (gSaveBlock1.location.mapNum == MAP_ID_LITTLEROOT_TOWN_MAYS_HOUSE_1F) + if (gSaveBlock1.location.mapNum == MAP_NUM(LITTLEROOT_TOWN_MAYS_HOUSE_1F)) { StringCopy(gStringVar1, gOtherText_Mom); VarSet(VAR_0x4003, 1); diff --git a/src/field/use_pokeblock.c b/src/field/use_pokeblock.c index d301d93d6..8155b4216 100644 --- a/src/field/use_pokeblock.c +++ b/src/field/use_pokeblock.c @@ -15,7 +15,7 @@ #include "text.h" #include "menu.h" #include "sound.h" -#include "songs.h" +#include "constants/songs.h" #include "pokeblock.h" #define GFX_TAG_CONDITIONUPDOWN 0 diff --git a/src/field/wallclock.c b/src/field/wallclock.c index d86b1bc95..2892d09f9 100644 --- a/src/field/wallclock.c +++ b/src/field/wallclock.c @@ -5,7 +5,7 @@ #include "menu.h" #include "palette.h" #include "rtc.h" -#include "songs.h" +#include "constants/songs.h" #include "sound.h" #include "strings2.h" #include "task.h" diff --git a/src/field/wild_encounter.c b/src/field/wild_encounter.c index df0b12207..9b3db1a52 100644 --- a/src/field/wild_encounter.c +++ b/src/field/wild_encounter.c @@ -1,11 +1,11 @@ #include "global.h" #include "wild_encounter.h" -#include "abilities.h" +#include "constants/abilities.h" #include "battle_setup.h" #include "event_data.h" #include "field_player_avatar.h" #include "fieldmap.h" -#include "map_constants.h" +#include "constants/maps.h" #include "metatile_behavior.h" #include "pokeblock.h" #include "random.h" @@ -13,7 +13,7 @@ #include "overworld.h" #include "safari_zone.h" #include "script.h" -#include "species.h" +#include "constants/species.h" #include "tv.h" const struct WildPokemon PetalburgCity_WaterMons [] = @@ -2953,8 +2953,8 @@ static bool8 CheckFeebas(void) u8 route119section = 0; u16 waterTileNum; - if (gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE119 - && gSaveBlock1.location.mapNum == MAP_ID_ROUTE119) + if (gSaveBlock1.location.mapGroup == MAP_GROUP(ROUTE119) + && gSaveBlock1.location.mapNum == MAP_NUM(ROUTE119)) { GetXYCoordsOneStepInFrontOfPlayer(&x, &y); x -= 7; |