From ad365a35c1536740cbcbc10bee66e5dd908c39e7 Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 18 Jul 2019 14:29:48 -0400 Subject: name metatiles --- data-de/event_scripts.s | 1 + data/event_scripts.s | 85 ++--- data/maps/AbandonedShip_Corridors_B1F/scripts.inc | 4 +- .../AbandonedShip_HiddenFloorCorridors/scripts.inc | 16 +- data/maps/AncientTomb/scripts.inc | 12 +- data/maps/BattleTower_Corridor/scripts.inc | 8 +- data/maps/DesertRuins/scripts.inc | 12 +- data/maps/EverGrandeCity_ChampionsRoom/scripts.inc | 4 +- data/maps/FallarborTown_ContestLobby/scripts.inc | 8 +- data/maps/InsideOfTruck/scripts.inc | 6 +- data/maps/IslandCave/scripts.inc | 24 +- data/maps/LilycoveCity/scripts.inc | 64 ++-- data/maps/LilycoveCity_ContestLobby/scripts.inc | 16 +- .../LilycoveCity_LilycoveMuseum_2F/scripts.inc | 20 +- .../LittlerootTown_BrendansHouse_1F/scripts.inc | 6 +- data/maps/LittlerootTown_MaysHouse_1F/scripts.inc | 6 +- data/maps/MauvilleCity_Gym/scripts.inc | 50 +-- data/maps/MossdeepCity_GameCorner_1F/scripts.inc | 4 +- data/maps/MossdeepCity_Gym/scripts.inc | 48 +-- data/maps/MossdeepCity_StevensHouse/scripts.inc | 2 +- data/maps/NewMauville_Entrance/scripts.inc | 24 +- data/maps/NewMauville_Inside/scripts.inc | 166 +++++----- data/maps/PetalburgCity_Gym/scripts.inc | 48 +-- data/maps/Route105/scripts.inc | 4 +- data/maps/Route110_TrickHouseEnd/scripts.inc | 2 +- data/maps/Route110_TrickHouseEntrance/scripts.inc | 18 +- data/maps/Route110_TrickHousePuzzle1/scripts.inc | 2 +- data/maps/Route110_TrickHousePuzzle2/scripts.inc | 16 +- data/maps/Route110_TrickHousePuzzle3/scripts.inc | 356 ++++++++++----------- data/maps/Route110_TrickHousePuzzle7/scripts.inc | 40 +-- data/maps/Route111/scripts.inc | 4 +- data/maps/Route120/scripts.inc | 20 +- data/maps/SealedChamber_OuterRoom/scripts.inc | 12 +- data/maps/ShoalCave_LowTideInnerRoom/scripts.inc | 24 +- data/maps/ShoalCave_LowTideStairsRoom/scripts.inc | 4 +- data/maps/SlateportCity_ContestLobby/scripts.inc | 8 +- data/maps/SootopolisCity/scripts.inc | 20 +- data/maps/SootopolisCity_Gym_1F/scripts.inc | 12 +- data/maps/Underwater_SeafloorCavern/scripts.inc | 24 +- data/maps/VerdanturfTown_ContestLobby/scripts.inc | 8 +- data/scripts/cable_club.inc | 18 +- include/constants/metatile_labels.h | 346 ++++++++++++++++++++ include/global.fieldmap.h | 9 + src/braille_puzzles.c | 37 +-- src/field_special_scene.c | 13 +- src/field_specials.c | 268 ++++++++-------- src/field_tasks.c | 64 ++-- src/fldeff_cut.c | 79 ++--- src/fldeff_escalator.c | 63 +++- src/scrcmd.c | 2 +- src/tv.c | 11 +- 51 files changed, 1264 insertions(+), 854 deletions(-) create mode 100644 include/constants/metatile_labels.h diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 6a1071df0..cbec54125 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -12,6 +12,7 @@ #include "constants/weather.h" #include "constants/heal_locations.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" .include "include/macros.inc" .include "include/macros/event.inc" .include "constants/constants.inc" diff --git a/data/event_scripts.s b/data/event_scripts.s index 30cf27d13..bbcbe9818 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -12,6 +12,7 @@ #include "constants/weather.h" #include "constants/heal_locations.h" #include "constants/vars.h" +#include "constants/metatile_labels.h" .include "include/macros.inc" .include "include/macros/event.inc" .include "constants/constants.inc" @@ -2548,18 +2549,18 @@ EverGrandeCity_SidneysRoom_EventScript_1A0693:: @ 81A0693 applymovement 255, EverGrandeCity_SidneysRoom_Movement_1A0853 waitmovement 0 playse SE_DOOR - setmetatile 6, 1, 836, 0 - setmetatile 6, 2, 837, 0 - setmetatile 0, 2, 734, 1 - setmetatile 1, 2, 733, 1 - setmetatile 2, 2, 734, 1 - setmetatile 3, 2, 733, 1 - setmetatile 4, 2, 734, 1 - setmetatile 8, 2, 733, 1 - setmetatile 9, 2, 734, 1 - setmetatile 10, 2, 733, 1 - setmetatile 11, 2, 734, 1 - setmetatile 12, 2, 733, 1 + setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, 0 + setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, 0 + setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, 1 special DrawWholeMapView return @@ -2570,12 +2571,12 @@ EverGrandeCity_SidneysRoom_EventScript_1A0710:: @ 81A0710 applymovement 255, EverGrandeCity_SidneysRoom_Movement_1A0847 waitmovement 0 playse SE_TRACK_DOOR - setmetatile 5, 12, 518, 1 - setmetatile 6, 12, 518, 1 - setmetatile 7, 12, 518, 1 - setmetatile 5, 13, 526, 1 - setmetatile 6, 13, 526, 1 - setmetatile 7, 13, 526, 1 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 special DrawWholeMapView return @@ -2583,36 +2584,36 @@ EverGrandeCity_DrakesRoom_EventScript_1A0757:: @ 81A0757 EverGrandeCity_GlaciasRoom_EventScript_1A0757:: @ 81A0757 EverGrandeCity_PhoebesRoom_EventScript_1A0757:: @ 81A0757 EverGrandeCity_SidneysRoom_EventScript_1A0757:: @ 81A0757 - setmetatile 6, 1, 836, 0 - setmetatile 6, 2, 837, 0 - setmetatile 5, 12, 518, 1 - setmetatile 6, 12, 518, 1 - setmetatile 7, 12, 518, 1 - setmetatile 5, 13, 526, 1 - setmetatile 6, 13, 526, 1 - setmetatile 7, 13, 526, 1 - setmetatile 0, 2, 734, 1 - setmetatile 1, 2, 733, 1 - setmetatile 2, 2, 734, 1 - setmetatile 3, 2, 733, 1 - setmetatile 4, 2, 734, 1 - setmetatile 8, 2, 733, 1 - setmetatile 9, 2, 734, 1 - setmetatile 10, 2, 733, 1 - setmetatile 11, 2, 734, 1 - setmetatile 12, 2, 733, 1 + setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, 0 + setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, 0 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, 1 + setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, 1 + setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, 1 return EverGrandeCity_DrakesRoom_EventScript_1A07FA:: @ 81A07FA EverGrandeCity_GlaciasRoom_EventScript_1A07FA:: @ 81A07FA EverGrandeCity_PhoebesRoom_EventScript_1A07FA:: @ 81A07FA EverGrandeCity_SidneysRoom_EventScript_1A07FA:: @ 81A07FA - setmetatile 5, 12, 518, 1 - setmetatile 6, 12, 518, 1 - setmetatile 7, 12, 518, 1 - setmetatile 5, 13, 526, 1 - setmetatile 6, 13, 526, 1 - setmetatile 7, 13, 526, 1 + setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, 1 + setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 + setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, 1 return SlateportCity_Movement_1A0831:: @ 81A0831 diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc index f1b7240db..7b3923a86 100644 --- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc +++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc @@ -13,11 +13,11 @@ AbandonedShip_Corridors_B1F_MapScript1_15E9A3:: @ 815E9A3 end AbandonedShip_Corridors_B1F_EventScript_15E9B6:: @ 815E9B6 - setmetatile 11, 4, 563, 1 + setmetatile 11, 4, METATILE_InsideShip_InTactDoor0_Bottom, 1 return AbandonedShip_Corridors_B1F_EventScript_15E9C0:: @ 815E9C0 - setmetatile 11, 4, 555, 1 + setmetatile 11, 4, METATILE_InsideShip_InTactDoor1_Bottom, 1 return AbandonedShip_Corridors_B1F_EventScript_15E9CA:: @ 815E9CA diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc index e8e48a6f6..6a71ee049 100644 --- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc +++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc @@ -19,35 +19,35 @@ AbandonedShip_HiddenFloorCorridors_MapScript1_15EB5A:: @ 815EB5A end AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3:: @ 815EBA3 - setmetatile 3, 8, 555, 1 + setmetatile 3, 8, METATILE_InsideShip_InTactDoor1_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBAD:: @ 815EBAD - setmetatile 6, 8, 555, 1 + setmetatile 6, 8, METATILE_InsideShip_InTactDoor1_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBB7:: @ 815EBB7 - setmetatile 3, 3, 538, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent1, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBC1:: @ 815EBC1 - setmetatile 9, 3, 538, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent1, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBCB:: @ 815EBCB - setmetatile 3, 8, 563, 1 + setmetatile 3, 8, METATILE_InsideShip_InTactDoor0_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBD5:: @ 815EBD5 - setmetatile 6, 8, 563, 1 + setmetatile 6, 8, METATILE_InsideShip_InTactDoor0_Bottom, 1 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBDF:: @ 815EBDF - setmetatile 3, 3, 564, 0 + setmetatile 3, 3, METATILE_InsideShip_DoorIndent0, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9:: @ 815EBE9 - setmetatile 9, 3, 564, 0 + setmetatile 9, 3, METATILE_InsideShip_DoorIndent0, 0 return AbandonedShip_HiddenFloorCorridors_EventScript_15EBF3:: @ 815EBF3 diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc index 8ff39c0a4..c8d5e13b2 100644 --- a/data/maps/AncientTomb/scripts.inc +++ b/data/maps/AncientTomb/scripts.inc @@ -21,12 +21,12 @@ AncientTomb_MapScript1_15EFE0:: @ 815EFE0 end AncientTomb_EventScript_15EFEA:: @ 815EFEA - setmetatile 7, 19, 553, 1 - setmetatile 8, 19, 553, 1 - setmetatile 9, 19, 553, 1 - setmetatile 7, 20, 565, 1 - setmetatile 8, 20, 565, 1 - setmetatile 9, 20, 565, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return AncientTomb_EventScript_15F021:: @ 815F021 diff --git a/data/maps/BattleTower_Corridor/scripts.inc b/data/maps/BattleTower_Corridor/scripts.inc index d9d73b832..6511d0333 100644 --- a/data/maps/BattleTower_Corridor/scripts.inc +++ b/data/maps/BattleTower_Corridor/scripts.inc @@ -6,13 +6,13 @@ BattleTower_Corridor_MapScripts:: @ 8160845 BattleTower_Corridor_MapScript1_160850:: @ 8160850 compare VAR_SPECIAL_6, 1 goto_if_eq BattleTower_Corridor_EventScript_16086E - setmetatile 12, 0, 519, 0 - setmetatile 12, 1, 527, 0 + setmetatile 12, 0, METATILE_BattleTower_CorridorOpenDoor_Top, 0 + setmetatile 12, 1, METATILE_BattleTower_CorridorOpenDoor_Bottom, 0 end BattleTower_Corridor_EventScript_16086E:: @ 816086E - setmetatile 15, 0, 519, 0 - setmetatile 15, 1, 527, 0 + setmetatile 15, 0, METATILE_BattleTower_CorridorOpenDoor_Top, 0 + setmetatile 15, 1, METATILE_BattleTower_CorridorOpenDoor_Bottom, 0 end BattleTower_Corridor_MapScript2_160881:: @ 8160881 diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc index 2627a8261..cf1ae8e72 100644 --- a/data/maps/DesertRuins/scripts.inc +++ b/data/maps/DesertRuins/scripts.inc @@ -17,12 +17,12 @@ DesertRuins_MapScript1_15CB11:: @ 815CB11 end DesertRuins_EventScript_15CB1B:: @ 815CB1B - setmetatile 7, 19, 553, 1 - setmetatile 8, 19, 553, 1 - setmetatile 9, 19, 553, 1 - setmetatile 7, 20, 565, 1 - setmetatile 8, 20, 565, 1 - setmetatile 9, 20, 565, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return DesertRuins_MapScript1_15CB52:: @ 815CB52 diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc index 01b2cc970..55597b1f8 100644 --- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc +++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc @@ -46,8 +46,8 @@ EverGrandeCity_ChampionsRoom_EventScript_15B805:: @ 815B805 EverGrandeCity_ChampionsRoom_EventScript_15B821:: @ 815B821 playse SE_DOOR - setmetatile 6, 1, 838, 0 - setmetatile 6, 2, 839, 0 + setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, 0 + setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, 0 special DrawWholeMapView msgbox EverGrandeCity_ChampionsRoom_Text_1910FE, 4 closemessage diff --git a/data/maps/FallarborTown_ContestLobby/scripts.inc b/data/maps/FallarborTown_ContestLobby/scripts.inc index 5386fec4f..9a82f89e2 100644 --- a/data/maps/FallarborTown_ContestLobby/scripts.inc +++ b/data/maps/FallarborTown_ContestLobby/scripts.inc @@ -23,14 +23,14 @@ FallarborTown_ContestLobby_EventScript_1539F8:: @ 81539F8 applymovement 1, FallarborTown_ContestLobby_Movement_153A7C waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 545, 1 - setmetatile 4, 3, 609, 1 + setmetatile 4, 2, METATILE_Contest_WallShadow, 1 + setmetatile 4, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 1, FallarborTown_ContestLobby_Movement_153A7F waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 721, 1 - setmetatile 4, 3, 729, 1 + setmetatile 4, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 4, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 1, FallarborTown_ContestLobby_Movement_153A8C diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc index b2617c8f7..629db8bf5 100644 --- a/data/maps/InsideOfTruck/scripts.inc +++ b/data/maps/InsideOfTruck/scripts.inc @@ -4,9 +4,9 @@ InsideOfTruck_MapScripts:: @ 815FBFF .byte 0 InsideOfTruck_MapScript1_15FC0A:: @ 815FC0A - setmetatile 4, 1, 520, 0 - setmetatile 4, 2, 528, 0 - setmetatile 4, 3, 536, 0 + setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, 0 + setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, 0 + setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, 0 end InsideOfTruck_MapScript1_15FC26:: @ 815FC26 diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc index d8576e883..41496fcc8 100644 --- a/data/maps/IslandCave/scripts.inc +++ b/data/maps/IslandCave/scripts.inc @@ -17,12 +17,12 @@ IslandCave_MapScript1_15EED4:: @ 815EED4 end IslandCave_EventScript_15EEDE:: @ 815EEDE - setmetatile 7, 19, 553, 1 - setmetatile 8, 19, 553, 1 - setmetatile 9, 19, 553, 1 - setmetatile 7, 20, 565, 1 - setmetatile 8, 20, 565, 1 - setmetatile 9, 20, 565, 1 + setmetatile 7, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 8, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 19, METATILE_Cave_EntranceCover, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, 1 return IslandCave_MapScript1_15EF15:: @ 815EF15 @@ -30,12 +30,12 @@ IslandCave_MapScript1_15EF15:: @ 815EF15 end S_OpenRegiceChamber:: @ 815EF19 - setmetatile 7, 19, 554, 1 - setmetatile 8, 19, 555, 1 - setmetatile 9, 19, 556, 1 - setmetatile 7, 20, 562, 1 - setmetatile 8, 20, 563, 0 - setmetatile 9, 20, 564, 1 + setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, 1 + setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, 1 + setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, 1 + setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, 1 + setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, 0 + setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, 1 special DrawWholeMapView playse SE_BAN setflag FLAG_SYS_BRAILLE_WAIT diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc index e32582b24..53b05fad9 100644 --- a/data/maps/LilycoveCity/scripts.inc +++ b/data/maps/LilycoveCity/scripts.inc @@ -14,47 +14,47 @@ LilycoveCity_MapScript1_14CA20:: @ 814CA20 LilycoveCity_MapScript1_14CA3F:: @ 814CA3F .ifndef SAPPHIRE - setmetatile 69, 4, 169, 1 - setmetatile 70, 4, 680, 1 - setmetatile 71, 4, 681, 1 - setmetatile 72, 4, 682, 1 - setmetatile 69, 5, 145, 1 - setmetatile 70, 5, 688, 1 - setmetatile 71, 5, 689, 0 - setmetatile 72, 5, 690, 1 - setmetatile 69, 6, 446, 0 - setmetatile 70, 6, 447, 0 - setmetatile 71, 6, 368, 0 - setmetatile 72, 6, 445, 0 + setmetatile 69, 4, METATILE_General_RockWall_WaterBase, 1 + setmetatile 70, 4, METATILE_Lilycove_AquaHideout_Entrance_TopLeft, 1 + setmetatile 71, 4, METATILE_Lilycove_AquaHideout_Entrance_TopMid, 1 + setmetatile 72, 4, METATILE_Lilycove_AquaHideout_Entrance_TopRight, 1 + setmetatile 69, 5, METATILE_General_RockWall_SandBase, 1 + setmetatile 70, 5, METATILE_Lilycove_AquaHideout_Entrance_BottomLeft, 1 + setmetatile 71, 5, METATILE_Lilycove_AquaHideout_Entrance_BottomMid, 0 + setmetatile 72, 5, METATILE_Lilycove_AquaHideout_Entrance_BottomRight, 1 + setmetatile 69, 6, METATILE_General_Shore_BottomMid, 0 + setmetatile 70, 6, METATILE_General_Shore_BottomRight, 0 + setmetatile 71, 6, METATILE_General_CalmWater, 0 + setmetatile 72, 6, METATILE_General_Shore_BottomLeft, 0 .endif call_if_unset FLAG_EVIL_TEAM_ESCAPED_IN_SUBMARINE, LilycoveCity_EventScript_14CABE call_if_set FLAG_BADGE07_GET, LilycoveCity_EventScript_14CB2B end LilycoveCity_EventScript_14CABE:: @ 814CABE - setmetatile 76, 12, 656, 1 - setmetatile 77, 12, 657, 1 - setmetatile 76, 13, 672, 1 - setmetatile 77, 13, 673, 1 - setmetatile 76, 14, 664, 1 - setmetatile 77, 14, 665, 1 - setmetatile 76, 15, 672, 1 - setmetatile 77, 15, 673, 1 - setmetatile 77, 16, 664, 1 - setmetatile 78, 16, 665, 1 - setmetatile 77, 17, 672, 1 - setmetatile 78, 17, 673, 1 + setmetatile 76, 12, METATILE_Lilycove_Wailmer0, 1 + setmetatile 77, 12, METATILE_Lilycove_Wailmer1, 1 + setmetatile 76, 13, METATILE_Lilycove_Wailmer2, 1 + setmetatile 77, 13, METATILE_Lilycove_Wailmer3, 1 + setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, 1 + setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, 1 + setmetatile 76, 15, METATILE_Lilycove_Wailmer2, 1 + setmetatile 77, 15, METATILE_Lilycove_Wailmer3, 1 + setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, 1 + setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, 1 + setmetatile 77, 17, METATILE_Lilycove_Wailmer2, 1 + setmetatile 78, 17, METATILE_Lilycove_Wailmer3, 1 return LilycoveCity_EventScript_14CB2B:: @ 814CB2B - setmetatile 69, 4, 169, 1 - setmetatile 70, 4, 169, 1 - setmetatile 71, 4, 169, 1 - setmetatile 72, 4, 169, 1 - setmetatile 69, 5, 145, 1 - setmetatile 70, 5, 145, 1 - setmetatile 71, 5, 145, 1 - setmetatile 72, 5, 145, 1 + setmetatile 69, 4, METATILE_General_RockWall_WaterBase, 1 + setmetatile 70, 4, METATILE_General_RockWall_WaterBase, 1 + setmetatile 71, 4, METATILE_General_RockWall_WaterBase, 1 + setmetatile 72, 4, METATILE_General_RockWall_WaterBase, 1 + setmetatile 69, 5, METATILE_General_RockWall_SandBase, 1 + setmetatile 70, 5, METATILE_General_RockWall_SandBase, 1 + setmetatile 71, 5, METATILE_General_RockWall_SandBase, 1 + setmetatile 72, 5, METATILE_General_RockWall_SandBase, 1 return LilycoveCity_EventScript_14CB74:: @ 814CB74 diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc index 8b098ed64..27c19ec39 100644 --- a/data/maps/LilycoveCity_ContestLobby/scripts.inc +++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc @@ -493,14 +493,14 @@ LilycoveCity_ContestLobby_EventScript_158E0B:: @ 8158E0B applymovement 2, LilycoveCity_ContestLobby_Movement_158E9C waitmovement 0 playse SE_HASHI - setmetatile 9, 2, 545, 1 - setmetatile 9, 3, 609, 1 + setmetatile 9, 2, METATILE_Contest_WallShadow, 1 + setmetatile 9, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 2, LilycoveCity_ContestLobby_Movement_158EA0 waitmovement 0 playse SE_HASHI - setmetatile 9, 2, 721, 1 - setmetatile 9, 3, 729, 1 + setmetatile 9, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 9, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 2, LilycoveCity_ContestLobby_Movement_158EAE @@ -632,14 +632,14 @@ LilycoveCity_ContestLobby_EventScript_158F86:: @ 8158F86 applymovement 1, LilycoveCity_ContestLobby_Movement_15900B waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 545, 1 - setmetatile 4, 3, 609, 1 + setmetatile 4, 2, METATILE_Contest_WallShadow, 1 + setmetatile 4, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 1, LilycoveCity_ContestLobby_Movement_15900F waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 721, 1 - setmetatile 4, 3, 729, 1 + setmetatile 4, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 4, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 1, LilycoveCity_ContestLobby_Movement_15901C diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc index 1643c3a8b..2ef07a1e9 100644 --- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc +++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc @@ -28,32 +28,32 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3:: @ 81585F3 end LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD:: @ 81585FD - setmetatile 10, 6, 606, 1 - setmetatile 11, 6, 607, 1 + setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, 1 + setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6 end LilycoveCity_LilycoveMuseum_2F_EventScript_158615:: @ 8158615 - setmetatile 18, 6, 604, 1 - setmetatile 19, 6, 605, 1 + setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, 1 + setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5 end LilycoveCity_LilycoveMuseum_2F_EventScript_15862D:: @ 815862D - setmetatile 14, 10, 608, 1 - setmetatile 15, 10, 609, 1 + setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, 1 + setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4 end LilycoveCity_LilycoveMuseum_2F_EventScript_158645:: @ 8158645 - setmetatile 6, 10, 602, 1 - setmetatile 7, 10, 603, 1 + setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, 1 + setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, 1 goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3 end LilycoveCity_LilycoveMuseum_2F_EventScript_15865D:: @ 815865D - setmetatile 2, 6, 610, 1 - setmetatile 3, 6, 611, 1 + setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, 1 + setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, 1 end LilycoveCity_LilycoveMuseum_2F_MapScript2_158670:: @ 8158670 diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc index 340f50894..deaeb6f59 100644 --- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc @@ -11,8 +11,8 @@ LittlerootTown_BrendansHouse_1F_MapScript1_15264B:: @ 815264B end LittlerootTown_BrendansHouse_1F_EventScript_152660:: @ 8152660 - setmetatile 5, 4, 624, 1 - setmetatile 5, 2, 616, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 return LittlerootTown_BrendansHouse_1F_EventScript_152673:: @ 8152673 @@ -22,7 +22,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_152673:: @ 8152673 return LittlerootTown_BrendansHouse_1F_EventScript_152680:: @ 8152680 - setmetatile 3, 7, 659, 1 + setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 return LittlerootTown_BrendansHouse_1F_MapScript1_15268A:: @ 815268A diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc index ad7257e0b..fa018ca54 100644 --- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc +++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc @@ -11,8 +11,8 @@ LittlerootTown_MaysHouse_1F_MapScript1_152889:: @ 8152889 end LittlerootTown_MaysHouse_1F_EventScript_15289E:: @ 815289E - setmetatile 5, 4, 624, 1 - setmetatile 5, 2, 616, 1 + setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1 + setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1 return LittlerootTown_MaysHouse_1F_EventScript_1528B1:: @ 81528B1 @@ -22,7 +22,7 @@ LittlerootTown_MaysHouse_1F_EventScript_1528B1:: @ 81528B1 return LittlerootTown_MaysHouse_1F_EventScript_1528BE:: @ 81528BE - setmetatile 6, 7, 659, 1 + setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1 return LittlerootTown_MaysHouse_1F_MapScript1_1528C8:: @ 81528C8 diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc index ae10eadfd..9fb3042f7 100644 --- a/data/maps/MauvilleCity_Gym/scripts.inc +++ b/data/maps/MauvilleCity_Gym/scripts.inc @@ -16,31 +16,31 @@ MauvilleCity_Gym_EventScript_156491:: @ 8156491 end MauvilleCity_Gym_EventScript_15649B:: @ 815649B - setmetatile 4, 7, 560, 0 - setmetatile 4, 8, 568, 0 - setmetatile 5, 7, 561, 0 - setmetatile 5, 8, 569, 0 - setmetatile 3, 8, 578, 1 - setmetatile 3, 9, 538, 0 - setmetatile 3, 10, 593, 0 - setmetatile 1, 10, 546, 0 - setmetatile 1, 11, 554, 1 - setmetatile 2, 10, 547, 0 - setmetatile 2, 11, 555, 1 - setmetatile 4, 10, 546, 0 - setmetatile 4, 11, 554, 1 - setmetatile 5, 10, 547, 0 - setmetatile 5, 11, 555, 1 - setmetatile 6, 11, 578, 1 - setmetatile 6, 12, 538, 0 - setmetatile 6, 13, 593, 0 - setmetatile 3, 11, 577, 1 - setmetatile 3, 12, 585, 1 - setmetatile 3, 13, 592, 1 - setmetatile 4, 13, 560, 0 - setmetatile 4, 14, 568, 0 - setmetatile 5, 13, 561, 0 - setmetatile 5, 14, 569, 0 + setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH1_Off, 0 + setmetatile 4, 8, METATILE_MauvilleGym_GreenBeamH3_Off, 0 + setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH2_Off, 0 + setmetatile 5, 8, METATILE_MauvilleGym_GreenBeamH4_Off, 0 + setmetatile 3, 8, METATILE_MauvilleGym_PoleBottom_On, 1 + setmetatile 3, 9, METATILE_MauvilleGym_FloorTile, 0 + setmetatile 3, 10, METATILE_MauvilleGym_PoleTop_Off, 0 + setmetatile 1, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 + setmetatile 1, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 + setmetatile 2, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 + setmetatile 2, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 + setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, 0 + setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, 1 + setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, 0 + setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, 1 + setmetatile 6, 11, METATILE_MauvilleGym_PoleBottom_On, 1 + setmetatile 6, 12, METATILE_MauvilleGym_FloorTile, 0 + setmetatile 6, 13, METATILE_MauvilleGym_PoleTop_Off, 0 + setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, 1 + setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, 1 + setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, 1 + setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, 0 + setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, 0 + setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, 0 + setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, 0 end MauvilleCity_Gym_EventScript_15657D:: @ 815657D diff --git a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc index 4d9989d82..7e147c48f 100644 --- a/data/maps/MossdeepCity_GameCorner_1F/scripts.inc +++ b/data/maps/MossdeepCity_GameCorner_1F/scripts.inc @@ -11,8 +11,8 @@ MossdeepCity_GameCorner_1F_MapScript1_15AC62:: @ 815AC62 end MossdeepCity_GameCorner_1F_EventScript_15AC71:: @ 815AC71 - setmetatile 3, 0, 653, 1 - setmetatile 3, 1, 661, 1 + setmetatile 3, 0, METATILE_GenericBuilding_Doorway_ClosedTop, 1 + setmetatile 3, 1, METATILE_GenericBuilding_Doorway_ClosedBottom, 1 return MossdeepCity_GameCorner_1F_MapScript1_15AC84:: @ 815AC84 diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc index 0fa79a6ec..aabfd73ec 100644 --- a/data/maps/MossdeepCity_Gym/scripts.inc +++ b/data/maps/MossdeepCity_Gym/scripts.inc @@ -22,26 +22,26 @@ MossdeepCity_Gym_EventScript_15A506:: @ 815A506 end MossdeepCity_Gym_EventScript_15A510:: @ 815A510 - setmetatile 5, 5, 516, 0 - setmetatile 2, 7, 569, 1 + setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A4E8 end MossdeepCity_Gym_EventScript_15A528:: @ 815A528 - setmetatile 8, 14, 516, 0 - setmetatile 8, 10, 569, 1 + setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A4F7 end MossdeepCity_Gym_EventScript_15A540:: @ 815A540 - setmetatile 15, 17, 524, 0 - setmetatile 17, 15, 569, 1 + setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0 + setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A506 end MossdeepCity_Gym_EventScript_15A558:: @ 815A558 - setmetatile 1, 23, 525, 0 - setmetatile 5, 24, 569, 1 + setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0 + setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1 end MossdeepCity_Gym_EventScript_15A56B:: @ 815A56B @@ -81,8 +81,8 @@ MossdeepCity_Gym_EventScript_15A5EA:: @ 815A5EA setflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 5, 5, 516, 0 - setmetatile 2, 7, 569, 1 + setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 2, 7, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -96,8 +96,8 @@ MossdeepCity_Gym_EventScript_15A621:: @ 815A621 clearflag FLAG_MOSSDEEP_GYM_SWITCH_1 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 5, 5, 524, 0 - setmetatile 2, 7, 568, 1 + setmetatile 5, 5, METATILE_MossdeepGym_Obelisk_Base, 0 + setmetatile 2, 7, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -107,8 +107,8 @@ MossdeepCity_Gym_EventScript_15A646:: @ 815A646 setflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 8, 14, 516, 0 - setmetatile 8, 10, 569, 1 + setmetatile 8, 14, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 8, 10, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -116,8 +116,8 @@ MossdeepCity_Gym_EventScript_15A675:: @ 815A675 clearflag FLAG_MOSSDEEP_GYM_SWITCH_2 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 8, 14, 517, 0 - setmetatile 8, 10, 568, 1 + setmetatile 8, 14, METATILE_MossdeepGym_OuterWall_RightCorner, 0 + setmetatile 8, 10, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -127,8 +127,8 @@ MossdeepCity_Gym_EventScript_15A69A:: @ 815A69A setflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 15, 17, 524, 0 - setmetatile 17, 15, 569, 1 + setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Base, 0 + setmetatile 17, 15, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -136,8 +136,8 @@ MossdeepCity_Gym_EventScript_15A6C9:: @ 815A6C9 clearflag FLAG_MOSSDEEP_GYM_SWITCH_3 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 15, 17, 516, 0 - setmetatile 17, 15, 568, 1 + setmetatile 15, 17, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 17, 15, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -147,8 +147,8 @@ MossdeepCity_Gym_EventScript_15A6EE:: @ 815A6EE setflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 1, 23, 525, 0 - setmetatile 5, 24, 569, 1 + setmetatile 1, 23, METATILE_MossdeepGym_Wall_LeftCorner, 0 + setmetatile 5, 24, METATILE_MossdeepGym_Empty1, 1 goto MossdeepCity_Gym_EventScript_15A619 end @@ -156,8 +156,8 @@ MossdeepCity_Gym_EventScript_15A71D:: @ 815A71D clearflag FLAG_MOSSDEEP_GYM_SWITCH_4 applymovement 255, MossdeepCity_Gym_Movement_15A7F7 waitmovement 0 - setmetatile 1, 23, 516, 0 - setmetatile 5, 24, 568, 1 + setmetatile 1, 23, METATILE_MossdeepGym_Obelisk_Top, 0 + setmetatile 5, 24, METATILE_MossdeepGym_Empty0, 1 goto MossdeepCity_Gym_EventScript_15A619 end diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc index eb719a33a..073416b5a 100644 --- a/data/maps/MossdeepCity_StevensHouse/scripts.inc +++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc @@ -9,7 +9,7 @@ MossdeepCity_StevensHouse_MapScript1_15A9D5:: @ 815A9D5 end MossdeepCity_StevensHouse_EventScript_15A9DF:: @ 815A9DF - setmetatile 6, 4, 753, 1 + setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, 1 return MossdeepCity_StevensHouse_MapScript1_15A9E9:: @ 815A9E9 diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc index 1c8bdfb3f..da46a8053 100644 --- a/data/maps/NewMauville_Entrance/scripts.inc +++ b/data/maps/NewMauville_Entrance/scripts.inc @@ -9,12 +9,12 @@ NewMauville_Entrance_MapScript1_15E495:: @ 815E495 end NewMauville_Entrance_EventScript_15E4A1:: @ 815E4A1 - setmetatile 3, 0, 788, 1 - setmetatile 4, 0, 789, 1 - setmetatile 5, 0, 790, 1 - setmetatile 3, 1, 796, 1 - setmetatile 4, 1, 797, 1 - setmetatile 5, 1, 798, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, 1 + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, 1 + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, 1 + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, 1 + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, 1 + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, 1 return NewMauville_Entrance_MapScript1_15E4D8:: @ 815E4D8 @@ -33,12 +33,12 @@ NewMauville_Entrance_EventScript_15E4DC:: @ 815E4DC compare RESULT, NO goto_if_eq NewMauville_Entrance_EventScript_15E55D msgbox NewMauville_Entrance_Text_1982EA, 4 - setmetatile 3, 0, 707, 0 - setmetatile 4, 0, 708, 0 - setmetatile 5, 0, 709, 0 - setmetatile 3, 1, 715, 1 - setmetatile 4, 1, 716, 0 - setmetatile 5, 1, 717, 1 + setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, 0 + setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, 0 + setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, 0 + setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, 1 + setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, 0 + setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, 1 special DrawWholeMapView playse SE_BAN setvar VAR_NEW_MAUVILLE_STATE, 1 diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc index e045cda5d..02d17a3ef 100644 --- a/data/maps/NewMauville_Inside/scripts.inc +++ b/data/maps/NewMauville_Inside/scripts.inc @@ -47,83 +47,83 @@ NewMauville_Inside_EventScript_15E5C2:: @ 815E5C2 end NewMauville_Inside_EventScript_15E5DA:: @ 815E5DA - setmetatile 23, 34, 617, 1 - setmetatile 23, 35, 625, 1 - setmetatile 23, 36, 621, 0 - setmetatile 23, 37, 641, 0 - setmetatile 10, 16, 617, 1 - setmetatile 10, 17, 625, 1 - setmetatile 10, 18, 621, 0 - setmetatile 10, 19, 641, 0 - setmetatile 10, 0, 617, 1 - setmetatile 10, 1, 625, 1 - setmetatile 10, 2, 621, 0 - setmetatile 10, 3, 641, 0 - setmetatile 37, 33, 694, 1 - setmetatile 37, 34, 702, 1 - setmetatile 37, 35, 710, 1 - setmetatile 37, 36, 718, 1 - setmetatile 28, 22, 694, 1 - setmetatile 28, 23, 702, 1 - setmetatile 28, 24, 710, 1 - setmetatile 28, 25, 718, 1 - setmetatile 10, 24, 694, 1 - setmetatile 10, 25, 702, 1 - setmetatile 10, 26, 710, 1 - setmetatile 10, 27, 718, 1 - setmetatile 21, 2, 694, 1 - setmetatile 21, 3, 702, 1 - setmetatile 21, 4, 710, 1 - setmetatile 21, 5, 718, 1 - setmetatile 6, 11, 591, 0 - setmetatile 13, 10, 591, 0 - setmetatile 16, 22, 591, 0 - setmetatile 4, 26, 591, 0 - setmetatile 30, 38, 591, 0 - setmetatile 2, 11, 558, 0 - setmetatile 17, 10, 558, 0 - setmetatile 25, 18, 558, 0 - setmetatile 18, 36, 558, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, 1 + setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, 1 + setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, 1 + setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, 1 + setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 2, 11, METATILE_BikeShop_Button_Green, 0 + setmetatile 17, 10, METATILE_BikeShop_Button_Green, 0 + setmetatile 25, 18, METATILE_BikeShop_Button_Green, 0 + setmetatile 18, 36, METATILE_BikeShop_Button_Green, 0 return NewMauville_Inside_EventScript_15E728:: @ 815E728 - setmetatile 23, 34, 695, 1 - setmetatile 23, 35, 703, 1 - setmetatile 23, 36, 711, 1 - setmetatile 23, 37, 719, 1 - setmetatile 10, 16, 695, 1 - setmetatile 10, 17, 703, 1 - setmetatile 10, 18, 711, 1 - setmetatile 10, 19, 719, 1 - setmetatile 10, 0, 695, 1 - setmetatile 10, 1, 703, 1 - setmetatile 10, 2, 711, 1 - setmetatile 10, 3, 719, 1 - setmetatile 37, 33, 617, 1 - setmetatile 37, 34, 625, 1 - setmetatile 37, 35, 621, 0 - setmetatile 37, 36, 641, 0 - setmetatile 28, 22, 617, 1 - setmetatile 28, 23, 625, 1 - setmetatile 28, 24, 621, 0 - setmetatile 28, 25, 641, 0 - setmetatile 10, 24, 617, 1 - setmetatile 10, 25, 625, 1 - setmetatile 10, 26, 621, 0 - setmetatile 10, 27, 641, 0 - setmetatile 21, 2, 617, 1 - setmetatile 21, 3, 625, 1 - setmetatile 21, 4, 621, 0 - setmetatile 21, 5, 641, 0 - setmetatile 2, 11, 591, 0 - setmetatile 17, 10, 591, 0 - setmetatile 25, 18, 591, 0 - setmetatile 18, 36, 591, 0 - setmetatile 6, 11, 566, 0 - setmetatile 13, 10, 566, 0 - setmetatile 16, 22, 566, 0 - setmetatile 4, 26, 566, 0 - setmetatile 30, 38, 566, 0 + setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, 1 + setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, 1 + setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 + setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, 1 + setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, 1 + setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, 1 + setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 + setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, 1 + setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, 1 + setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, 1 + setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, 1 + setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, 1 + setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, 1 + setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, 1 + setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, 0 + setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, 0 + setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 6, 11, METATILE_BikeShop_Button_Blue, 0 + setmetatile 13, 10, METATILE_BikeShop_Button_Blue, 0 + setmetatile 16, 22, METATILE_BikeShop_Button_Blue, 0 + setmetatile 4, 26, METATILE_BikeShop_Button_Blue, 0 + setmetatile 30, 38, METATILE_BikeShop_Button_Blue, 0 return NewMauville_Inside_EventScript_15E876:: @ 815E876 @@ -135,15 +135,15 @@ NewMauville_Inside_EventScript_15E876:: @ 815E876 end NewMauville_Inside_EventScript_15E88B:: @ 815E88B - setmetatile 33, 6, 591, 0 - setmetatile 32, 2, 752, 1 - setmetatile 33, 2, 753, 1 - setmetatile 34, 2, 754, 1 - setmetatile 35, 2, 755, 1 - setmetatile 32, 3, 756, 1 - setmetatile 33, 3, 757, 1 - setmetatile 34, 3, 758, 1 - setmetatile 35, 3, 759, 1 + setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, 0 + setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, 1 + setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, 1 + setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, 1 + setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, 1 + setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, 1 + setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, 1 + setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, 1 + setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, 1 special DrawWholeMapView return diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 44398e6d5..c7efb49ae 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -935,51 +935,51 @@ PetalburgCity_Gym_EventScript_155081:: @ 8155081 return PetalburgCity_Gym_EventScript_1550A2:: @ 81550A2 - setmetatile 6, 85, 528, 0 - setmetatile 7, 85, 529, 0 - setmetatile 1, 98, 528, 0 - setmetatile 2, 98, 529, 0 + setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_1550C7:: @ 81550C7 - setmetatile 6, 46, 528, 0 - setmetatile 7, 46, 529, 0 - setmetatile 1, 59, 528, 0 - setmetatile 2, 59, 529, 0 + setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_1550EC:: @ 81550EC - setmetatile 6, 59, 528, 0 - setmetatile 7, 59, 529, 0 - setmetatile 1, 72, 528, 0 - setmetatile 2, 72, 529, 0 + setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_155111:: @ 8155111 - setmetatile 1, 20, 528, 0 - setmetatile 2, 20, 529, 0 + setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_155124:: @ 8155124 - setmetatile 6, 20, 528, 0 - setmetatile 7, 20, 529, 0 - setmetatile 1, 33, 528, 0 - setmetatile 2, 33, 529, 0 + setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0 + setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_155149:: @ 8155149 - setmetatile 6, 33, 528, 0 - setmetatile 7, 33, 529, 0 + setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_15515C:: @ 815515C - setmetatile 1, 7, 528, 0 - setmetatile 2, 7, 529, 0 + setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_15516F:: @ 815516F - setmetatile 6, 7, 528, 0 - setmetatile 7, 7, 529, 0 + setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0 + setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0 return PetalburgCity_Gym_EventScript_155182:: @ 8155182 diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc index e628c4761..7d0eeb62d 100644 --- a/data/maps/Route105/scripts.inc +++ b/data/maps/Route105/scripts.inc @@ -7,8 +7,8 @@ Route105_MapScript1_14F29E:: @ 814F29E end Route105_EventScript_14F2A8:: @ 814F2A8 - setmetatile 9, 19, 124, 1 - setmetatile 9, 20, 145, 1 + setmetatile 9, 19, METATILE_General_RockWall_RockBase, 1 + setmetatile 9, 20, METATILE_General_RockWall_SandBase, 1 return Route105_EventScript_14F2BB:: @ 814F2BB diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc index ca992427c..4817f3f2e 100644 --- a/data/maps/Route110_TrickHouseEnd/scripts.inc +++ b/data/maps/Route110_TrickHouseEnd/scripts.inc @@ -37,7 +37,7 @@ Route110_TrickHouseEnd_EventScript_161986:: @ 8161986 end Route110_TrickHouseEnd_EventScript_161994:: @ 8161994 - setmetatile 10, 1, 539, 1 + setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, 1 return Route110_TrickHouseEnd_EventScript_16199E:: @ 816199E diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc index 79f52f7bf..19d5a606d 100644 --- a/data/maps/Route110_TrickHouseEntrance/scripts.inc +++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc @@ -494,7 +494,7 @@ Route110_TrickHouseEntrance_EventScript_1615C7:: @ 81615C7 end Route110_TrickHouseEntrance_EventScript_1615DD:: @ 81615DD - setmetatile 5, 1, 537, 0 + setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, 0 special DrawWholeMapView delay 20 applymovement 255, Route110_TrickHouseEntrance_Movement_1A0856 @@ -600,7 +600,7 @@ Route110_TrickHouseEntrance_EventScript_161740:: @ 8161740 msgbox UnknownString_819CAD1, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -611,7 +611,7 @@ Route110_TrickHouseEntrance_EventScript_161769:: @ 8161769 msgbox UnknownString_819CCCB, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -622,7 +622,7 @@ Route110_TrickHouseEntrance_EventScript_161792:: @ 8161792 msgbox UnknownString_819CEF9, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -633,7 +633,7 @@ Route110_TrickHouseEntrance_EventScript_1617BB:: @ 81617BB msgbox UnknownString_819D164, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -644,7 +644,7 @@ Route110_TrickHouseEntrance_EventScript_1617E4:: @ 81617E4 msgbox UnknownString_819D3A5, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -655,7 +655,7 @@ Route110_TrickHouseEntrance_EventScript_16180D:: @ 816180D msgbox UnknownString_819DC0A, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -666,7 +666,7 @@ Route110_TrickHouseEntrance_EventScript_161836:: @ 8161836 msgbox UnknownString_819DE8D, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end @@ -677,7 +677,7 @@ Route110_TrickHouseEntrance_EventScript_16185F:: @ 816185F msgbox UnknownString_819E0FF, 4 playse SE_PIN setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2 - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 special DrawWholeMapView releaseall end diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc index 547160a92..dc66b71f4 100644 --- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc @@ -8,7 +8,7 @@ Route110_TrickHousePuzzle1_MapScript1_161CFE:: @ 8161CFE end Route110_TrickHousePuzzle1_EventScript_161D0A:: @ 8161D0A - setmetatile 13, 1, 523, 0 + setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0 end Route110_TrickHousePuzzle1_EventScript_161D14:: @ 8161D14 diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc index b8e00f385..f1044e388 100644 --- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc @@ -70,23 +70,23 @@ Route110_TrickHousePuzzle2_EventScript_161E19:: @ 8161E19 end Route110_TrickHousePuzzle2_EventScript_161E2C:: @ 8161E2C - setmetatile 14, 21, 601, 0 - setmetatile 1, 12, 618, 0 + setmetatile 14, 21, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 1, 12, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_161E3F:: @ 8161E3F - setmetatile 8, 17, 601, 0 - setmetatile 12, 13, 618, 0 + setmetatile 8, 17, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_161E52:: @ 8161E52 - setmetatile 4, 10, 601, 0 - setmetatile 8, 4, 618, 0 + setmetatile 4, 10, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_161E65:: @ 8161E65 - setmetatile 5, 2, 601, 0 - setmetatile 12, 5, 618, 0 + setmetatile 5, 2, METATILE_TrickHousePuzzle_Button_Pressed, 0 + setmetatile 12, 5, METATILE_TrickHousePuzzle_Door_Shuttered, 0 return Route110_TrickHousePuzzle2_EventScript_161E78:: @ 8161E78 diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc index 0bb582c5d..b8d8383fc 100644 --- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc @@ -24,13 +24,13 @@ Route110_TrickHousePuzzle3_MapScript1_161EE4:: @ 8161EE4 end Route110_TrickHousePuzzle3_EventScript_161F12:: @ 8161F12 - setmetatile 5, 20, 600, 0 - setmetatile 4, 12, 600, 0 - setmetatile 11, 10, 600, 0 - setmetatile 3, 8, 600, 0 - setmetatile 13, 7, 600, 0 - setmetatile 1, 3, 600, 0 - setmetatile 10, 2, 600, 0 + setmetatile 5, 20, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 4, 12, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 11, 10, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 3, 8, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 13, 7, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 1, 3, METATILE_TrickHousePuzzle_Button_Up, 0 + setmetatile 10, 2, METATILE_TrickHousePuzzle_Button_Up, 0 compare VAR_TEMP_8, 1 call_if_eq Route110_TrickHousePuzzle3_EventScript_161F9F compare VAR_TEMP_8, 2 @@ -48,201 +48,201 @@ Route110_TrickHousePuzzle3_EventScript_161F12:: @ 8161F12 return Route110_TrickHousePuzzle3_EventScript_161F9F:: @ 8161F9F - setmetatile 5, 20, 601, 0 + setmetatile 5, 20, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FA9:: @ 8161FA9 - setmetatile 4, 12, 601, 0 + setmetatile 4, 12, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FB3:: @ 8161FB3 - setmetatile 11, 10, 601, 0 + setmetatile 11, 10, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FBD:: @ 8161FBD - setmetatile 3, 8, 601, 0 + setmetatile 3, 8, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FC7:: @ 8161FC7 - setmetatile 13, 7, 601, 0 + setmetatile 13, 7, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FD1:: @ 8161FD1 - setmetatile 1, 3, 601, 0 + setmetatile 1, 3, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FDB:: @ 8161FDB - setmetatile 10, 2, 601, 0 + setmetatile 10, 2, METATILE_TrickHousePuzzle_Button_Pressed, 0 return Route110_TrickHousePuzzle3_EventScript_161FE5:: @ 8161FE5 - setmetatile 1, 6, 587, 0 - setmetatile 2, 6, 588, 0 - setmetatile 1, 7, 595, 0 - setmetatile 2, 7, 596, 0 - setmetatile 4, 9, 587, 0 - setmetatile 5, 9, 588, 0 - setmetatile 4, 10, 595, 0 - setmetatile 5, 10, 596, 0 - setmetatile 4, 18, 587, 0 - setmetatile 5, 18, 588, 0 - setmetatile 4, 19, 595, 0 - setmetatile 5, 19, 596, 0 - setmetatile 7, 3, 587, 0 - setmetatile 8, 3, 588, 0 - setmetatile 7, 4, 595, 0 - setmetatile 8, 4, 596, 0 - setmetatile 7, 9, 587, 0 - setmetatile 8, 9, 588, 0 - setmetatile 7, 10, 595, 0 - setmetatile 8, 10, 596, 0 - setmetatile 7, 18, 587, 0 - setmetatile 8, 18, 588, 0 - setmetatile 7, 19, 595, 0 - setmetatile 8, 19, 596, 0 - setmetatile 13, 3, 587, 0 - setmetatile 14, 3, 588, 0 - setmetatile 13, 4, 595, 0 - setmetatile 14, 4, 596, 0 - setmetatile 13, 9, 587, 0 - setmetatile 14, 9, 588, 0 - setmetatile 13, 10, 595, 0 - setmetatile 14, 10, 596, 0 - setmetatile 13, 15, 587, 0 - setmetatile 14, 15, 588, 0 - setmetatile 13, 16, 595, 0 - setmetatile 14, 16, 596, 0 - setmetatile 3, 13, 589, 1 - setmetatile 3, 14, 597, 0 - setmetatile 6, 7, 589, 1 - setmetatile 6, 8, 597, 0 - setmetatile 9, 16, 589, 1 - setmetatile 9, 17, 597, 0 - setmetatile 12, 4, 589, 1 - setmetatile 12, 5, 597, 0 - setmetatile 12, 10, 589, 1 - setmetatile 12, 11, 597, 0 - setmetatile 1, 15, 568, 0 - setmetatile 2, 15, 569, 0 - setmetatile 1, 16, 576, 1 - setmetatile 2, 16, 577, 1 - setmetatile 4, 6, 568, 0 - setmetatile 5, 6, 569, 0 - setmetatile 4, 7, 576, 1 - setmetatile 5, 7, 577, 1 - setmetatile 7, 12, 568, 0 - setmetatile 8, 12, 569, 0 - setmetatile 7, 13, 576, 1 - setmetatile 8, 13, 577, 1 - setmetatile 10, 12, 568, 0 - setmetatile 11, 12, 569, 0 - setmetatile 10, 13, 576, 1 - setmetatile 11, 13, 577, 1 - setmetatile 10, 18, 568, 0 - setmetatile 11, 18, 569, 0 - setmetatile 10, 19, 576, 1 - setmetatile 11, 19, 577, 1 - setmetatile 3, 4, 570, 1 - setmetatile 3, 5, 578, 1 - setmetatile 6, 10, 570, 1 - setmetatile 6, 11, 578, 1 - setmetatile 6, 13, 570, 1 - setmetatile 6, 14, 578, 1 - setmetatile 6, 16, 570, 1 - setmetatile 6, 17, 578, 1 - setmetatile 9, 4, 570, 1 - setmetatile 9, 5, 578, 1 - setmetatile 9, 7, 570, 1 - setmetatile 9, 8, 578, 1 - setmetatile 12, 13, 570, 1 - setmetatile 12, 14, 578, 1 - setmetatile 12, 16, 570, 1 - setmetatile 12, 17, 578, 1 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 4, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 5, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 4, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 5, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 4, 18, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 5, 18, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 4, 19, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 5, 19, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 7, 3, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 8, 3, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 7, 4, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 8, 4, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 7, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 8, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 7, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 8, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 7, 18, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 8, 18, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 7, 19, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 8, 19, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 13, 3, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 14, 3, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 13, 4, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 14, 4, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0 + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0 + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0 + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0 + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 6, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 6, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 12, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 12, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 12, 10, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1 + setmetatile 12, 11, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0 + setmetatile 1, 15, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 2, 15, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 1, 16, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 2, 16, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 8, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 7, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 8, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0 + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0 + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1 + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1 + setmetatile 3, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 3, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 6, 10, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 6, 11, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 6, 13, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 6, 14, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 6, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 6, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 9, 7, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 9, 8, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 12, 14, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 + setmetatile 12, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1 + setmetatile 12, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1 return Route110_TrickHousePuzzle3_EventScript_1622C8:: @ 81622C8 - setmetatile 1, 6, 571, 0 - setmetatile 2, 6, 572, 0 - setmetatile 1, 7, 579, 1 - setmetatile 2, 7, 580, 1 - setmetatile 4, 9, 571, 0 - setmetatile 5, 9, 572, 0 - setmetatile 4, 10, 579, 1 - setmetatile 5, 10, 580, 1 - setmetatile 4, 18, 571, 0 - setmetatile 5, 18, 572, 0 - setmetatile 4, 19, 579, 1 - setmetatile 5, 19, 580, 1 - setmetatile 7, 3, 571, 0 - setmetatile 8, 3, 572, 0 - setmetatile 7, 4, 579, 1 - setmetatile 8, 4, 580, 1 - setmetatile 7, 9, 571, 0 - setmetatile 8, 9, 572, 0 - setmetatile 7, 10, 579, 1 - setmetatile 8, 10, 580, 1 - setmetatile 7, 18, 571, 0 - setmetatile 8, 18, 572, 0 - setmetatile 7, 19, 579, 1 - setmetatile 8, 19, 580, 1 - setmetatile 13, 3, 571, 0 - setmetatile 14, 3, 572, 0 - setmetatile 13, 4, 579, 1 - setmetatile 14, 4, 580, 1 - setmetatile 13, 9, 571, 0 - setmetatile 14, 9, 572, 0 - setmetatile 13, 10, 579, 1 - setmetatile 14, 10, 580, 1 - setmetatile 13, 15, 571, 0 - setmetatile 14, 15, 572, 0 - setmetatile 13, 16, 579, 1 - setmetatile 14, 16, 580, 1 - setmetatile 3, 13, 573, 1 - setmetatile 3, 14, 581, 1 - setmetatile 6, 7, 573, 1 - setmetatile 6, 8, 581, 1 - setmetatile 9, 16, 573, 1 - setmetatile 9, 17, 581, 1 - setmetatile 12, 4, 573, 1 - setmetatile 12, 5, 581, 1 - setmetatile 12, 10, 573, 1 - setmetatile 12, 11, 581, 1 - setmetatile 1, 15, 584, 0 - setmetatile 2, 15, 585, 0 - setmetatile 1, 16, 592, 0 - setmetatile 2, 16, 593, 0 - setmetatile 4, 6, 584, 0 - setmetatile 5, 6, 585, 0 - setmetatile 4, 7, 592, 0 - setmetatile 5, 7, 593, 0 - setmetatile 7, 12, 584, 0 - setmetatile 8, 12, 585, 0 - setmetatile 7, 13, 592, 0 - setmetatile 8, 13, 593, 0 - setmetatile 10, 12, 584, 0 - setmetatile 11, 12, 585, 0 - setmetatile 10, 13, 592, 0 - setmetatile 11, 13, 593, 0 - setmetatile 10, 18, 584, 0 - setmetatile 11, 18, 585, 0 - setmetatile 10, 19, 592, 0 - setmetatile 11, 19, 593, 0 - setmetatile 3, 4, 586, 1 - setmetatile 3, 5, 594, 0 - setmetatile 6, 10, 586, 1 - setmetatile 6, 11, 594, 0 - setmetatile 6, 13, 586, 1 - setmetatile 6, 14, 594, 0 - setmetatile 6, 16, 586, 1 - setmetatile 6, 17, 594, 0 - setmetatile 9, 4, 586, 1 - setmetatile 9, 5, 594, 0 - setmetatile 9, 7, 586, 1 - setmetatile 9, 8, 594, 0 - setmetatile 12, 13, 586, 1 - setmetatile 12, 14, 594, 0 - setmetatile 12, 16, 586, 1 - setmetatile 12, 17, 594, 0 + setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 4, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 5, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 4, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 5, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 4, 18, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 5, 18, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 4, 19, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 5, 19, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 7, 3, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 8, 3, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 7, 4, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 7, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 8, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 7, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 8, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 7, 18, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 8, 18, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 7, 19, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 8, 19, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 13, 3, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 14, 3, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 13, 4, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 14, 4, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0 + setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0 + setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1 + setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1 + setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 6, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 6, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 12, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 12, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 12, 10, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1 + setmetatile 12, 11, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1 + setmetatile 1, 15, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 2, 15, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 1, 16, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 2, 16, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 7, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 8, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 7, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 8, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0 + setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0 + setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0 + setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0 + setmetatile 3, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 3, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 6, 10, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 6, 11, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 6, 13, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 6, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 6, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 6, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 9, 7, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 9, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 12, 13, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 12, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 + setmetatile 12, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1 + setmetatile 12, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, 0 return Route110_TrickHousePuzzle3_EventScript_1625AB:: @ 81625AB diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc index 43bce5ceb..ac113fe81 100644 --- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc +++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc @@ -18,53 +18,53 @@ Route110_TrickHousePuzzle7_EventScript_163167:: @ 8163167 return Route110_TrickHousePuzzle7_EventScript_163195:: @ 8163195 - setmetatile 13, 17, 610, 0 - setmetatile 12, 16, 575, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_1631A8:: @ 81631A8 - setmetatile 12, 13, 610, 0 - setmetatile 12, 11, 575, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_1631BB:: @ 81631BB - setmetatile 7, 12, 610, 0 - setmetatile 5, 10, 575, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0 + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_1631CE:: @ 81631CE - setmetatile 6, 6, 636, 0 - setmetatile 4, 4, 575, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, 0 + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_1631E1:: @ 81631E1 - setmetatile 8, 4, 609, 0 - setmetatile 7, 5, 575, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, 1 return Route110_TrickHousePuzzle7_EventScript_1631F4:: @ 81631F4 - setmetatile 13, 17, 611, 0 - setmetatile 12, 16, 574, 1 + setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 + setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_163207:: @ 8163207 - setmetatile 12, 13, 609, 0 - setmetatile 12, 11, 574, 1 + setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0 + setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_16321A:: @ 816321A - setmetatile 7, 12, 611, 0 - setmetatile 5, 10, 574, 1 + setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0 + setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_16322D:: @ 816322D - setmetatile 6, 6, 635, 0 - setmetatile 4, 4, 574, 1 + setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, 0 + setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_EventScript_163240:: @ 8163240 - setmetatile 8, 4, 608, 0 - setmetatile 7, 5, 574, 1 + setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, 0 + setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, 1 return Route110_TrickHousePuzzle7_MapScript1_163253:: @ 8163253 diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc index 9aa8894f4..4f223e37e 100644 --- a/data/maps/Route111/scripts.inc +++ b/data/maps/Route111/scripts.inc @@ -8,8 +8,8 @@ Route111_MapScript1_14FF9C:: @ 814FF9C end Route111_EventScript_14FFA6:: @ 814FFA6 - setmetatile 29, 86, 124, 1 - setmetatile 29, 87, 145, 1 + setmetatile 29, 86, METATILE_General_RockWall_RockBase, 1 + setmetatile 29, 87, METATILE_General_RockWall_SandBase, 1 return Route111_MapScript1_14FFB9:: @ 814FFB9 diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc index f3081fc8c..4d2eca797 100644 --- a/data/maps/Route120/scripts.inc +++ b/data/maps/Route120/scripts.inc @@ -55,15 +55,15 @@ Route120_MapScript1_151686:: @ 8151686 end Route120_EventScript_1516A2:: @ 81516A2 - setmetatile 7, 54, 124, 1 - setmetatile 7, 55, 145, 1 + setmetatile 7, 54, METATILE_General_RockWall_RockBase, 1 + setmetatile 7, 55, METATILE_General_RockWall_SandBase, 1 return Route120_EventScript_1516B5:: @ 81516B5 - setmetatile 13, 15, 663, 0 - setmetatile 12, 16, 671, 0 - setmetatile 12, 17, 161, 0 - setmetatile 13, 17, 161, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge_Kecleon0, 0 + setmetatile 12, 16, METATILE_Fortree_WoodBridge_Kecleon1, 0 + setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 return Route120_EventScript_1516DA:: @ 81516DA @@ -244,10 +244,10 @@ Route120_EventScript_151908:: @ 8151908 delay 15 removeobject 31 waitfieldeffect FLDEFF_NPCFLY_OUT - setmetatile 13, 15, 663, 0 - setmetatile 12, 16, 671, 0 - setmetatile 12, 17, 161, 0 - setmetatile 13, 17, 161, 0 + setmetatile 13, 15, METATILE_Fortree_WoodBridge_Kecleon0, 0 + setmetatile 12, 16, METATILE_Fortree_WoodBridge_Kecleon1, 0 + setmetatile 12, 17, METATILE_General_ReflectiveWater, 0 + setmetatile 13, 17, METATILE_General_ReflectiveWater, 0 special DrawWholeMapView release end diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc index 1f2159010..d62a37f6a 100644 --- a/data/maps/SealedChamber_OuterRoom/scripts.inc +++ b/data/maps/SealedChamber_OuterRoom/scripts.inc @@ -18,12 +18,12 @@ SealedChamber_OuterRoom_MapScript1_15F0EB:: @ 815F0EB end SealedChamber_OuterRoom_EventScript_15F0F5:: @ 815F0F5 - setmetatile 9, 1, 553, 1 - setmetatile 10, 1, 553, 1 - setmetatile 11, 1, 553, 1 - setmetatile 9, 2, 565, 1 - setmetatile 10, 2, 565, 1 - setmetatile 11, 2, 565, 1 + setmetatile 9, 1, METATILE_Cave_EntranceCover, 1 + setmetatile 10, 1, METATILE_Cave_EntranceCover, 1 + setmetatile 11, 1, METATILE_Cave_EntranceCover, 1 + setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 + setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, 1 return SealedChamber_OuterRoom_EventScript_15F12C:: @ 815F12C diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc index 21997d076..546481765 100644 --- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc @@ -22,38 +22,38 @@ ShoalCave_LowTideInnerRoom_MapScript1_15E1B3:: @ 815E1B3 ShoalCave_LowTideInnerRoom_EventScript_15E1B9:: @ 815E1B9 goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_15E1DA goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_15E1DA - setmetatile 31, 8, 856, 1 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_15E1DA end ShoalCave_LowTideInnerRoom_EventScript_15E1DA:: @ 815E1DA goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_15E1FB goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_15E1FB - setmetatile 14, 26, 856, 1 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_15E1FB end ShoalCave_LowTideInnerRoom_EventScript_15E1FB:: @ 815E1FB goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_15E213 - setmetatile 41, 20, 857, 1 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_15E213 end ShoalCave_LowTideInnerRoom_EventScript_15E213:: @ 815E213 goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_15E22B - setmetatile 41, 10, 857, 1 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_15E22B end ShoalCave_LowTideInnerRoom_EventScript_15E22B:: @ 815E22B goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_15E243 - setmetatile 6, 9, 857, 1 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, 1 goto ShoalCave_LowTideInnerRoom_EventScript_15E243 end ShoalCave_LowTideInnerRoom_EventScript_15E243:: @ 815E243 goto_if_set FLAG_HIDE_TOOK_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_15E256 - setmetatile 16, 13, 857, 1 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, 1 return ShoalCave_LowTideInnerRoom_EventScript_15E256:: @ 815E256 @@ -65,7 +65,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E257:: @ 815E257 giveitem_std ITEM_SHOAL_SHELL compare RESULT, 0 goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B - setmetatile 41, 20, 859, 0 + setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SHELL_1 releaseall @@ -82,7 +82,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E293:: @ 815E293 giveitem_std ITEM_SHOAL_SHELL compare RESULT, 0 goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B - setmetatile 41, 10, 859, 0 + setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SHELL_2 releaseall @@ -94,7 +94,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2C5:: @ 815E2C5 giveitem_std ITEM_SHOAL_SHELL compare RESULT, 0 goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B - setmetatile 6, 9, 859, 0 + setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SHELL_3 releaseall @@ -106,7 +106,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2F7:: @ 815E2F7 giveitem_std ITEM_SHOAL_SHELL compare RESULT, 0 goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B - setmetatile 16, 13, 859, 0 + setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SHELL_4 releaseall @@ -118,7 +118,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E329:: @ 815E329 giveitem_std ITEM_SHOAL_SALT compare RESULT, 0 goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B - setmetatile 31, 8, 858, 0 + setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SALT_1 releaseall @@ -135,7 +135,7 @@ ShoalCave_LowTideInnerRoom_EventScript_15E365:: @ 815E365 giveitem_std ITEM_SHOAL_SALT compare RESULT, 0 goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B - setmetatile 14, 26, 858, 0 + setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SALT_2 releaseall diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc index 5f9726038..f3a629582 100644 --- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc +++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideStairsRoom_MapScript1_15E39D:: @ 815E39D ShoalCave_LowTideStairsRoom_EventScript_15E3A3:: @ 815E3A3 goto_if_set FLAG_HIDE_TOOK_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_15E3B6 - setmetatile 11, 11, 856, 1 + setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, 1 return ShoalCave_LowTideStairsRoom_EventScript_15E3B6:: @ 815E3B6 @@ -20,7 +20,7 @@ ShoalCave_LowTideStairsRoom_EventScript_15E3B7:: @ 815E3B7 giveitem_std ITEM_SHOAL_SALT compare RESULT, 0 goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_1A029B - setmetatile 11, 11, 858, 0 + setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, 0 special DrawWholeMapView setflag FLAG_HIDE_TOOK_SHOAL_SALT_3 releaseall diff --git a/data/maps/SlateportCity_ContestLobby/scripts.inc b/data/maps/SlateportCity_ContestLobby/scripts.inc index fd26671dd..356b64518 100644 --- a/data/maps/SlateportCity_ContestLobby/scripts.inc +++ b/data/maps/SlateportCity_ContestLobby/scripts.inc @@ -23,14 +23,14 @@ SlateportCity_ContestLobby_EventScript_155448:: @ 8155448 applymovement 1, SlateportCity_ContestLobby_Movement_1554CC waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 545, 1 - setmetatile 4, 3, 609, 1 + setmetatile 4, 2, METATILE_Contest_WallShadow, 1 + setmetatile 4, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 1, SlateportCity_ContestLobby_Movement_1554CF waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 721, 1 - setmetatile 4, 3, 729, 1 + setmetatile 4, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 4, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 1, SlateportCity_ContestLobby_Movement_1554DC diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc index e18eca17c..af4934b2f 100644 --- a/data/maps/SootopolisCity/scripts.inc +++ b/data/maps/SootopolisCity/scripts.inc @@ -11,7 +11,7 @@ SootopolisCity_MapScript1_14D08D:: @ 814D08D SootopolisCity_EventScript_14D0A0:: @ 814D0A0 setobjectxyperm 3, 31, 18 - setmetatile 31, 32, 592, 1 + setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, 1 return SootopolisCity_EventScript_14D0B1:: @ 814D0B1 @@ -19,15 +19,15 @@ SootopolisCity_EventScript_14D0B1:: @ 814D0B1 return SootopolisCity_EventScript_14D0BB:: @ 814D0BB - setmetatile 9, 6, 584, 1 - setmetatile 9, 17, 584, 1 - setmetatile 9, 26, 584, 1 - setmetatile 44, 17, 584, 1 - setmetatile 8, 35, 584, 1 - setmetatile 53, 28, 584, 1 - setmetatile 45, 6, 584, 1 - setmetatile 48, 25, 584, 1 - setmetatile 31, 32, 592, 1 + setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, 1 + setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, 1 return SootopolisCity_MapScript1_14D10D:: @ 814D10D diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc index a918c0568..c54dec972 100644 --- a/data/maps/SootopolisCity_Gym_1F/scripts.inc +++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc @@ -25,16 +25,16 @@ SootopolisCity_Gym_1F_EventScript_15AF2E:: @ 815AF2E goto_if_lt SootopolisCity_Gym_1F_EventScript_15AF73 compare VAR_ICE_STEP_COUNT, 69 goto_if_lt SootopolisCity_Gym_1F_EventScript_15AF61 - setmetatile 8, 4, 519, 0 - setmetatile 8, 5, 519, 0 + setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0 SootopolisCity_Gym_1F_EventScript_15AF61:: @ 815AF61 - setmetatile 8, 10, 519, 0 - setmetatile 8, 11, 519, 0 + setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0 SootopolisCity_Gym_1F_EventScript_15AF73:: @ 815AF73 - setmetatile 8, 15, 519, 0 - setmetatile 8, 16, 519, 0 + setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0 + setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0 SootopolisCity_Gym_1F_EventScript_15AF85:: @ 815AF85 return diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc index d34558e40..e66631fd6 100644 --- a/data/maps/Underwater_SeafloorCavern/scripts.inc +++ b/data/maps/Underwater_SeafloorCavern/scripts.inc @@ -18,18 +18,18 @@ Underwater_SeafloorCavern_MapScript1_15D9BF:: @ 815D9BF end Underwater_SeafloorCavern_EventScript_15D9C9:: @ 815D9C9 - setmetatile 5, 3, 542, 1 - setmetatile 6, 3, 542, 1 - setmetatile 7, 3, 542, 1 - setmetatile 8, 3, 542, 1 - setmetatile 5, 4, 552, 0 - setmetatile 6, 4, 552, 0 - setmetatile 7, 4, 552, 0 - setmetatile 8, 4, 552, 0 - setmetatile 5, 5, 552, 0 - setmetatile 6, 5, 552, 0 - setmetatile 7, 5, 552, 0 - setmetatile 8, 5, 552, 0 + setmetatile 5, 3, METATILE_Underwater_RockWall, 1 + setmetatile 6, 3, METATILE_Underwater_RockWall, 1 + setmetatile 7, 3, METATILE_Underwater_RockWall, 1 + setmetatile 8, 3, METATILE_Underwater_RockWall, 1 + setmetatile 5, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 6, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 7, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 8, 4, METATILE_Underwater_FloorShadow, 0 + setmetatile 5, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 6, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 7, 5, METATILE_Underwater_FloorShadow, 0 + setmetatile 8, 5, METATILE_Underwater_FloorShadow, 0 return Underwater_SeafloorCavern_MapScript1_15DA36:: @ 815DA36 diff --git a/data/maps/VerdanturfTown_ContestLobby/scripts.inc b/data/maps/VerdanturfTown_ContestLobby/scripts.inc index 32661485d..1ee3708ac 100644 --- a/data/maps/VerdanturfTown_ContestLobby/scripts.inc +++ b/data/maps/VerdanturfTown_ContestLobby/scripts.inc @@ -23,14 +23,14 @@ VerdanturfTown_ContestLobby_EventScript_153DA1:: @ 8153DA1 applymovement 1, VerdanturfTown_ContestLobby_Movement_153E25 waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 545, 1 - setmetatile 4, 3, 609, 1 + setmetatile 4, 2, METATILE_Contest_WallShadow, 1 + setmetatile 4, 3, METATILE_Contest_FloorShadow, 1 special DrawWholeMapView applymovement 1, VerdanturfTown_ContestLobby_Movement_153E28 waitmovement 0 playse SE_HASHI - setmetatile 4, 2, 721, 1 - setmetatile 4, 3, 729, 1 + setmetatile 4, 2, METATILE_Contest_CounterFlap_Top, 1 + setmetatile 4, 3, METATILE_Contest_CounterFlap_Bottom, 1 special DrawWholeMapView delay 20 applymovement 1, VerdanturfTown_ContestLobby_Movement_153E35 diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index a6fa56078..4e29db7c9 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -52,15 +52,15 @@ VerdanturfTown_PokemonCenter_2F_MapScript1_1A3D32:: @ 81A3D32 end OldaleTown_PokemonCenter_2F_EventScript_1A3D6A:: @ 81A3D6A - setmetatile 5, 3, 514, 0 + setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 end OldaleTown_PokemonCenter_2F_EventScript_1A3D74:: @ 81A3D74 - setmetatile 8, 3, 514, 0 + setmetatile 8, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 end OldaleTown_PokemonCenter_2F_EventScript_1A3D7E:: @ 81A3D7E - setmetatile 11, 3, 514, 0 + setmetatile 11, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 end DewfordTown_PokemonCenter_2F_MapScript2_1A3D88:: @ 81A3D88 @@ -119,7 +119,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E0C:: @ 81A3E0C OldaleTown_PokemonCenter_2F_EventScript_1A3E17:: @ 81A3E17 lockall call OldaleTown_PokemonCenter_2F_EventScript_1A3E30 - setmetatile 8, 3, 605, 1 + setmetatile 8, 3, METATILE_PokemonCenter_CounterBarrier, 1 special DrawWholeMapView erasebox 0, 0, 29, 19 releaseall @@ -147,14 +147,14 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E30:: @ 81A3E30 OldaleTown_PokemonCenter_2F_EventScript_1A3E7B:: @ 81A3E7B call OldaleTown_PokemonCenter_2F_EventScript_1A3DB2 - setmetatile 11, 3, 605, 1 + setmetatile 11, 3, METATILE_PokemonCenter_CounterBarrier, 1 special DrawWholeMapView end OldaleTown_PokemonCenter_2F_EventScript_1A3E8D:: @ 81A3E8D lockall call OldaleTown_PokemonCenter_2F_EventScript_1A3DDA - setmetatile 5, 3, 605, 1 + setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, 1 special DrawWholeMapView erasebox 0, 0, 29, 19 releaseall @@ -220,7 +220,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3F5E:: @ 81A3F5E copyvar VAR_CABLE_CLUB_STATE, VAR_SPECIAL_4 messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22 waitmessage - setmetatile 5, 3, 514, 0 + setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 special DrawWholeMapView delay 60 applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 @@ -384,7 +384,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4166:: @ 81A4166 copyvar VAR_CABLE_CLUB_STATE, VAR_SPECIAL_4 messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22 waitmessage - setmetatile 8, 3, 514, 0 + setmetatile 8, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 special DrawWholeMapView delay 60 applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 @@ -481,7 +481,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4294:: @ 81A4294 copyvar VAR_CABLE_CLUB_STATE, VAR_SPECIAL_4 messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22 waitmessage - setmetatile 11, 3, 514, 0 + setmetatile 11, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0 special DrawWholeMapView delay 60 applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h new file mode 100644 index 000000000..0995d5309 --- /dev/null +++ b/include/constants/metatile_labels.h @@ -0,0 +1,346 @@ +#ifndef GUARD_METATILE_LABELS_H +#define GUARD_METATILE_LABELS_H + +// gTileset_General +#define METATILE_General_Grass 0x001 +#define METATILE_General_TallGrass 0x00D +#define METATILE_General_LongGrass 0x015 +#define METATILE_General_TallGrass_TreeUp 0x025 +#define METATILE_General_Grass_TreeUp 0x00E +#define METATILE_General_TallGrass_TreeLeft 0x1C6 +#define METATILE_General_TallGrass_TreeRight 0x1C7 +#define METATILE_General_Grass_TreeLeft 0x1CE +#define METATILE_General_Grass_TreeRight 0x1CF +#define METATILE_General_MuddySlope_Frame0 0x0E8 +#define METATILE_General_MuddySlope_Frame1 0x0E9 +#define METATILE_General_MuddySlope_Frame2 0x0EA +#define METATILE_General_MuddySlope_Frame3 0x0EB +#define METATILE_General_SandPit_Center 0x121 +#define METATILE_General_CaveEntrance_Top 0x09F +#define METATILE_General_CaveEntrance_Bottom 0x0A7 +#define METATILE_General_RockWall_GrassBase 0x079 +#define METATILE_General_RockWall_RockBase 0x07C +#define METATILE_General_RockWall_SandBase 0x091 +#define METATILE_General_RockWall_WaterBase 0x0A9 +#define METATILE_General_CalmWater 0x170 +#define METATILE_General_RoughWater 0x14E +#define METATILE_General_RoughDeepWater 0x14F +#define METATILE_General_ReflectiveWater 0x0A1 +#define METATILE_General_Shore_BottomLeft 0x1BD +#define METATILE_General_Shore_BottomMid 0x1BE +#define METATILE_General_Shore_BottomRight 0x1BF + +// gTileset_Fortree +#define METATILE_Fortree_LongGrass_Root 0x208 +#define METATILE_Fortree_BridgeOverGrass_Raised 0x24E +#define METATILE_Fortree_BridgeOverGrass_Lowered 0x24F +#define METATILE_Fortree_BridgeOverTrees_Raised 0x256 +#define METATILE_Fortree_BridgeOverTrees_Lowered 0x257 +#define METATILE_Fortree_SecretBase_LongGrass_TopLeft 0x279 +#define METATILE_Fortree_SecretBase_LongGrass_TopMid 0x27A +#define METATILE_Fortree_SecretBase_LongGrass_TopRight 0x27B +#define METATILE_Fortree_SecretBase_LongGrass_BottomLeft 0x281 +#define METATILE_Fortree_SecretBase_LongGrass_BottomMid 0x282 +#define METATILE_Fortree_SecretBase_LongGrass_BottomRight 0x283 +#define METATILE_Fortree_WoodBridge_Kecleon0 0x297 +#define METATILE_Fortree_WoodBridge_Kecleon1 0x29F + +// gTileset_Pacifidlog +#define METATILE_Pacifidlog_FloatingLogs_Horizontal0 0x250 +#define METATILE_Pacifidlog_FloatingLogs_Horizontal1 0x251 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0 0x252 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1 0x253 +#define METATILE_Pacifidlog_SubmergedLogs_Horizontal0 0x254 +#define METATILE_Pacifidlog_SubmergedLogs_Horizontal1 0x255 +#define METATILE_Pacifidlog_FloatingLogs_Vertical0 0x258 +#define METATILE_Pacifidlog_FloatingLogs_Vertical1 0x260 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0 0x259 +#define METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1 0x261 +#define METATILE_Pacifidlog_SubmergedLogs_Vertical0 0x25A +#define METATILE_Pacifidlog_SubmergedLogs_Vertical1 0x262 + +// gTileset_Fallarbor +#define METATILE_Fallarbor_AshGrass 0x20A +#define METATILE_Fallarbor_NormalGrass 0x212 +#define METATILE_Fallarbor_AshField 0x218 + +// gTileset_Lavaridge +#define METATILE_Lavaridge_NormalGrass 0x206 +#define METATILE_Lavaridge_AshGrass 0x207 +#define METATILE_Lavaridge_LavaField 0x271 + +// gTileset_EliteFour +#define METATILE_EliteFour_OpenDoor_Frame 0x344 +#define METATILE_EliteFour_OpenDoor_Opening 0x345 +#define METATILE_EliteFour_OpenDoorChampion_Frame 0x346 +#define METATILE_EliteFour_OpenDoorChampion_Opening 0x347 +#define METATILE_EliteFour_LeftSpotlightOff 0x2DD +#define METATILE_EliteFour_RightSpotlightOff 0x2DE +#define METATILE_EliteFour_EntryDoor_ClosedTop 0x206 +#define METATILE_EliteFour_EntryDoor_ClosedBottom 0x20E + +// gTileset_InsideShip +#define METATILE_InsideShip_InTactDoor0_Bottom 0x233 +#define METATILE_InsideShip_InTactDoor1_Bottom 0x22B +#define METATILE_InsideShip_DoorIndent1 0x21A +#define METATILE_InsideShip_DoorIndent0 0x234 + +// gTileset_Cave +#define METATILE_Cave_EntranceCover 0x229 +#define METATILE_Cave_SealedChamberEntrance_TopLeft 0x22A +#define METATILE_Cave_SealedChamberEntrance_TopMid 0x22B +#define METATILE_Cave_SealedChamberEntrance_TopRight 0x22C +#define METATILE_Cave_SealedChamberEntrance_BottomLeft 0x232 +#define METATILE_Cave_SealedChamberEntrance_BottomMid 0x233 +#define METATILE_Cave_SealedChamberEntrance_BottomRight 0x234 +#define METATILE_Cave_SealedChamberBraille_Mid 0x235 +#define METATILE_Cave_ShoalCave_DirtPile_Large 0x358 +#define METATILE_Cave_ShoalCave_DirtPile_Small 0x35A +#define METATILE_Cave_ShoalCave_BlueStone_Large 0x359 +#define METATILE_Cave_ShoalCave_BlueStone_Small 0x35B + +// gTileset_BattleTower +#define METATILE_BattleTower_CorridorOpenDoor_Top 0x207 +#define METATILE_BattleTower_CorridorOpenDoor_Bottom 0x20F +#define METATILE_BattleTower_Elevator_Top0 0x268 +#define METATILE_BattleTower_Elevator_Top1 0x269 +#define METATILE_BattleTower_Elevator_Top2 0x26A +#define METATILE_BattleTower_Elevator_Mid0 0x270 +#define METATILE_BattleTower_Elevator_Mid1 0x271 +#define METATILE_BattleTower_Elevator_Mid2 0x272 +#define METATILE_BattleTower_Elevator_Bottom0 0x278 +#define METATILE_BattleTower_Elevator_Bottom1 0x279 +#define METATILE_BattleTower_Elevator_Bottom2 0x27A + +// gTileset_Contest +#define METATILE_Contest_WallShadow 0x221 +#define METATILE_Contest_FloorShadow 0x261 +#define METATILE_Contest_CounterFlap_Top 0x2D1 +#define METATILE_Contest_CounterFlap_Bottom 0x2D9 + +// gTileset_LilycoveMuseum +#define METATILE_LilycoveMuseum_Painting0_Left 0x25A +#define METATILE_LilycoveMuseum_Painting0_Right 0x25B +#define METATILE_LilycoveMuseum_Painting1_Left 0x25C +#define METATILE_LilycoveMuseum_Painting1_Right 0x25D +#define METATILE_LilycoveMuseum_Painting2_Left 0x25E +#define METATILE_LilycoveMuseum_Painting2_Right 0x25F +#define METATILE_LilycoveMuseum_Painting3_Left 0x260 +#define METATILE_LilycoveMuseum_Painting3_Right 0x261 +#define METATILE_LilycoveMuseum_Painting4_Left 0x262 +#define METATILE_LilycoveMuseum_Painting4_Right 0x263 + +// gTileset_InsideOfTruck +#define METATILE_InsideOfTruck_ExitLight_Top 0x208 +#define METATILE_InsideOfTruck_ExitLight_Mid 0x210 +#define METATILE_InsideOfTruck_ExitLight_Bottom 0x218 +#define METATILE_InsideOfTruck_DoorClosedFloor_Top 0x20D +#define METATILE_InsideOfTruck_DoorClosedFloor_Mid 0x215 +#define METATILE_InsideOfTruck_DoorClosedFloor_Bottom 0x21D + +// gTileset_BrendansMaysHouse +#define METATILE_BrendansMaysHouse_BrendanPC_Off 0x25A +#define METATILE_BrendansMaysHouse_BrendanPC_On 0x27F +#define METATILE_BrendansMaysHouse_MayPC_Off 0x259 +#define METATILE_BrendansMaysHouse_MayPC_On 0x27E +#define METATILE_BrendansMaysHouse_MovingBox_Closed 0x268 +#define METATILE_BrendansMaysHouse_MovingBox_Open 0x270 +#define METATILE_BrendansMaysHouse_BookOnTable 0x293 + +// gTileset_Lilycove +#define METATILE_Lilycove_AquaHideout_Entrance_TopLeft 0x2A8 +#define METATILE_Lilycove_AquaHideout_Entrance_TopMid 0x2A9 +#define METATILE_Lilycove_AquaHideout_Entrance_TopRight 0x2AA +#define METATILE_Lilycove_AquaHideout_Entrance_BottomLeft 0x2B0 +#define METATILE_Lilycove_AquaHideout_Entrance_BottomMid 0x2B1 +#define METATILE_Lilycove_AquaHideout_Entrance_BottomRight 0x2B2 +#define METATILE_Lilycove_Wailmer0 0x290 +#define METATILE_Lilycove_Wailmer1 0x291 +#define METATILE_Lilycove_Wailmer2 0x2A0 +#define METATILE_Lilycove_Wailmer3 0x2A1 +#define METATILE_Lilycove_Wailmer0_Alt 0x298 +#define METATILE_Lilycove_Wailmer1_Alt 0x299 + +// gTileset_MauvilleGym +#define METATILE_MauvilleGym_RaisedSwitch 0x205 +#define METATILE_MauvilleGym_PressedSwitch 0x206 +#define METATILE_MauvilleGym_FloorTile 0x21A +#define METATILE_MauvilleGym_GreenBeamH1_On 0x220 +#define METATILE_MauvilleGym_GreenBeamH2_On 0x221 +#define METATILE_MauvilleGym_GreenBeamH3_On 0x228 +#define METATILE_MauvilleGym_GreenBeamH4_On 0x229 +#define METATILE_MauvilleGym_GreenBeamH1_Off 0x230 +#define METATILE_MauvilleGym_GreenBeamH2_Off 0x231 +#define METATILE_MauvilleGym_GreenBeamH3_Off 0x238 +#define METATILE_MauvilleGym_GreenBeamH4_Off 0x239 +#define METATILE_MauvilleGym_RedBeamH1_On 0x222 +#define METATILE_MauvilleGym_RedBeamH2_On 0x223 +#define METATILE_MauvilleGym_RedBeamH3_On 0x22A +#define METATILE_MauvilleGym_RedBeamH4_On 0x22B +#define METATILE_MauvilleGym_RedBeamH1_Off 0x232 +#define METATILE_MauvilleGym_RedBeamH2_Off 0x233 +#define METATILE_MauvilleGym_RedBeamH3_Off 0x23A +#define METATILE_MauvilleGym_RedBeamH4_Off 0x23B +#define METATILE_MauvilleGym_GreenBeamV1_On 0x240 +#define METATILE_MauvilleGym_GreenBeamV2_On 0x248 +#define METATILE_MauvilleGym_RedBeamV1_On 0x241 +#define METATILE_MauvilleGym_RedBeamV2_On 0x249 +#define METATILE_MauvilleGym_PoleTop_On 0x250 +#define METATILE_MauvilleGym_PoleTop_Off 0x251 +#define METATILE_MauvilleGym_PoleBottom_On 0x242 +#define METATILE_MauvilleGym_PoleBottom_Off 0x243 + +// gTileset_MossdeepGym +#define METATILE_MossdeepGym_Obelisk_Top 0x204 +#define METATILE_MossdeepGym_Obelisk_Base 0x20C +#define METATILE_MossdeepGym_Wall_LeftCorner 0x20D +#define METATILE_MossdeepGym_OuterWall_RightCorner 0x205 +#define METATILE_MossdeepGym_Empty0 0x238 +#define METATILE_MossdeepGym_Empty1 0x239 + +// gTileset_Building +#define METATILE_Building_TV_Off 0x002 +#define METATILE_Building_TV_On 0x003 +#define METATILE_Building_PC_Off 0x004 +#define METATILE_Building_PC_On 0x005 + +// gTileset_GenericBuilding +#define METATILE_GenericBuilding_Doorway_ClosedTop 0x28D +#define METATILE_GenericBuilding_Doorway_ClosedBottom 0x295 +#define METATILE_GenericBuilding_TableEdge 0x2F1 +#define METATILE_GenericBuilding_TrickHouse_Door_Closed 0x21B +#define METATILE_GenericBuilding_TrickHouse_Stairs_Down 0x219 + +// gTileset_Shop +#define METATILE_Shop_Laptop1_Normal 0x29D +#define METATILE_Shop_Laptop2_Normal 0x2A5 +#define METATILE_Shop_Laptop1_Flash 0x258 +#define METATILE_Shop_Laptop2_Flash 0x260 + +// gTileset_Facility +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile0 0x314 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile1 0x315 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile2 0x316 +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile3 0x31C +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile4 0x31D +#define METATILE_Facility_NewMauvilleDoor_Closed_Tile5 0x31E +#define METATILE_Facility_NewMauvilleDoor_Open_Tile0 0x2C3 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile1 0x2C4 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile2 0x2C5 +#define METATILE_Facility_NewMauvilleDoor_Open_Tile3 0x2CB +#define METATILE_Facility_NewMauvilleDoor_Open_Tile4 0x2CC +#define METATILE_Facility_NewMauvilleDoor_Open_Tile5 0x2CD +#define METATILE_Facility_DataPad 0x3E4 + +// gTileset_TrickHousePuzzle +#define METATILE_TrickHousePuzzle_Stairs_Down 0x20B +#define METATILE_TrickHousePuzzle_Lever_Off 0x23E +#define METATILE_TrickHousePuzzle_Lever_On 0x23F +#define METATILE_TrickHousePuzzle_Button_Up 0x258 +#define METATILE_TrickHousePuzzle_Button_Pressed 0x259 +#define METATILE_TrickHousePuzzle_Door_Shuttered 0x26A +#define METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt 0x252 +#define METATILE_TrickHousePuzzle_Floor_ShadowTop 0x255 +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0 0x24B +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1 0x24C +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2 0x253 +#define METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3 0x254 +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0 0x23B +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1 0x23C +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2 0x243 +#define METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3 0x244 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0 0x248 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1 0x249 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2 0x250 +#define METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3 0x251 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0 0x238 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1 0x239 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2 0x240 +#define METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3 0x241 +#define METATILE_TrickHousePuzzle_BlueDoorV_Retracted 0x24D +#define METATILE_TrickHousePuzzle_RedDoorV_Retracted 0x24A +#define METATILE_TrickHousePuzzle_RedDoorV_Open0 0x23A +#define METATILE_TrickHousePuzzle_RedDoorV_Open1 0x242 +#define METATILE_TrickHousePuzzle_BlueDoorV_Open0 0x23D +#define METATILE_TrickHousePuzzle_BlueDoorV_Open1 0x245 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right 0x260 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left 0x261 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up 0x262 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down 0x263 +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt 0x27B +#define METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt 0x27C + +// gTileset_BikeShop +#define METATILE_BikeShop_Barrier_Hidden_Top 0x269 +#define METATILE_BikeShop_Barrier_Hidden_Bottom 0x271 +#define METATILE_BikeShop_Floor_Shadow_Top 0x26D +#define METATILE_BikeShop_Wall_Edge_Top 0x281 +#define METATILE_BikeShop_Button_Pressed 0x24F +#define METATILE_BikeShop_Button_Green 0x22E +#define METATILE_BikeShop_Button_Blue 0x236 +#define METATILE_BikeShop_Barrier_Green_Top 0x2B6 +#define METATILE_BikeShop_Barrier_Green_TopMid 0x2BE +#define METATILE_BikeShop_Barrier_Green_BottomMid 0x2C6 +#define METATILE_BikeShop_Barrier_Green_Bottom 0x2CE +#define METATILE_BikeShop_Barrier_Blue_Top 0x2B7 +#define METATILE_BikeShop_Barrier_Blue_TopMid 0x2BF +#define METATILE_BikeShop_Barrier_Blue_BottomMid 0x2C7 +#define METATILE_BikeShop_Barrier_Blue_Bottom 0x2CF +#define METATILE_BikeShop_Generator_Off_Tile0 0x2F0 +#define METATILE_BikeShop_Generator_Off_Tile1 0x2F1 +#define METATILE_BikeShop_Generator_Off_Tile2 0x2F2 +#define METATILE_BikeShop_Generator_Off_Tile3 0x2F3 +#define METATILE_BikeShop_Generator_Off_Tile4 0x2F4 +#define METATILE_BikeShop_Generator_Off_Tile5 0x2F5 +#define METATILE_BikeShop_Generator_Off_Tile6 0x2F6 +#define METATILE_BikeShop_Generator_Off_Tile7 0x2F7 + +// gTileset_PetalburgGym +#define METATILE_PetalburgGym_RoomEntrance_Left 0x210 +#define METATILE_PetalburgGym_RoomEntrance_Right 0x211 +#define METATILE_PetalburgGym_SlidingDoor_Frame0 0x218 +#define METATILE_PetalburgGym_SlidingDoor_Frame1 0x219 +#define METATILE_PetalburgGym_SlidingDoor_Frame2 0x21A +#define METATILE_PetalburgGym_SlidingDoor_Frame3 0x21B +#define METATILE_PetalburgGym_SlidingDoor_Frame4 0x21C + +// gTileset_Sootopolis +#define METATILE_Sootopolis_Door_Closed 0x248 +#define METATILE_Sootopolis_GymDoor_Closed 0x250 +#define METATILE_Sootopolis_RoughWater 0x290 + +// gTileset_SootopolisGym +#define METATILE_SootopolisGym_Ice_Cracked 0x20E +#define METATILE_SootopolisGym_Ice_Broken 0x206 +#define METATILE_SootopolisGym_Stairs 0x207 + +// gTileset_Underwater +#define METATILE_Underwater_RockWall 0x21E +#define METATILE_Underwater_FloorShadow 0x228 + +// gTileset_PokemonCenter +#define METATILE_PokemonCenter_Floor_Plain_Alt 0x202 +#define METATILE_PokemonCenter_CounterBarrier 0x25D +#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame0 0x280 +#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame1 0x282 +#define METATILE_PokemonCenter_Escalator1F_Tile0_Frame2 0x284 +#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame0 0x281 +#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame1 0x283 +#define METATILE_PokemonCenter_Escalator1F_Tile1_Frame2 0x285 +#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame0 0x288 +#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame1 0x28A +#define METATILE_PokemonCenter_Escalator1F_Tile2_Frame2 0x28C +#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame0 0x289 +#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame1 0x28B +#define METATILE_PokemonCenter_Escalator1F_Tile3_Frame2 0x28D +#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame0 0x2A0 +#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame1 0x2A2 +#define METATILE_PokemonCenter_Escalator2F_Tile0_Frame2 0x2A4 +#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame0 0x2A1 +#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame1 0x2A3 +#define METATILE_PokemonCenter_Escalator2F_Tile1_Frame2 0x2A5 +#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame0 0x2A8 +#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame1 0x2AA +#define METATILE_PokemonCenter_Escalator2F_Tile2_Frame2 0x2AC + +#endif // GUARD_METATILE_LABELS_H diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 81f805ee2..6a583d6e4 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -1,6 +1,15 @@ #ifndef GUARD_GLOBAL_FIELDMAP_H #define GUARD_GLOBAL_FIELDMAP_H +#define METATILE_COLLISION_MASK 0x0C00 +#define METATILE_ID_MASK 0x03FF +#define METATILE_ID_UNDEFINED 0x03FF +#define METATILE_ELEVATION_SHIFT 0x000C +#define METATILE_COLLISION_SHIFT 0x000A +#define METATILE_ELEVATION_MASK 0xF000 + +#define METATILE_ID(tileset, name) (METATILE_##tileset##_##name) + enum { CONNECTION_SOUTH = 1, diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 7f26f0a9b..b413d7d1b 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -17,6 +17,7 @@ #include "constants/maps.h" #include "constants/songs.h" #include "constants/species.h" +#include "constants/metatile_labels.h" extern u8 gPlayerPartyCount; extern u8 gLastFieldPokeMenuOpened; @@ -42,12 +43,12 @@ bool8 ShouldDoBrailleDigEffect(void) void DoBrailleDigEffect(void) { - MapGridSetMetatileIdAt(16, 8, 554); - MapGridSetMetatileIdAt(17, 8, 555); - MapGridSetMetatileIdAt(18, 8, 556); - MapGridSetMetatileIdAt(16, 9, 3634); - MapGridSetMetatileIdAt(17, 9, 563); - MapGridSetMetatileIdAt(18, 9, 3636); + MapGridSetMetatileIdAt(16, 8, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(17, 8, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(16, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(17, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_DIG); @@ -85,12 +86,12 @@ bool8 ShouldDoBrailleStrengthEffect(void) void DoBrailleStrengthEffect(void) { FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH); - MapGridSetMetatileIdAt(14, 26, 554); - MapGridSetMetatileIdAt(15, 26, 555); - MapGridSetMetatileIdAt(16, 26, 556); - MapGridSetMetatileIdAt(14, 27, 3634); - MapGridSetMetatileIdAt(15, 27, 563); - MapGridSetMetatileIdAt(16, 27, 3636); + MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_STRENGTH); @@ -131,12 +132,12 @@ void UseFlyAncientTomb_Callback(void) void UseFlyAncientTomb_Finish(void) { - MapGridSetMetatileIdAt(14, 26, 554); - MapGridSetMetatileIdAt(15, 26, 555); - MapGridSetMetatileIdAt(16, 26, 556); - MapGridSetMetatileIdAt(14, 27, 3634); - MapGridSetMetatileIdAt(15, 27, 563); - MapGridSetMetatileIdAt(16, 27, 3636); + MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); + MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); + MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_FLY); diff --git a/src/field_special_scene.c b/src/field_special_scene.c index cf67aa361..8f98d8187 100644 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -12,6 +12,7 @@ #include "script.h" #include "script_movement.h" #include "constants/songs.h" +#include "constants/metatile_labels.h" #include "sound.h" #include "sprite.h" #include "task.h" @@ -239,9 +240,9 @@ void Task_HandleTruckSequence(u8 taskId) data[1]++; if (data[1] == 120) { - MapGridSetMetatileIdAt(11, 8, 520); - MapGridSetMetatileIdAt(11, 9, 528); - MapGridSetMetatileIdAt(11, 10, 536); + MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, ExitLight_Top)); + MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, ExitLight_Mid)); + MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, ExitLight_Bottom)); DrawWholeMapView(); PlaySE(SE_TRACK_DOOR); DestroyTask(taskId); @@ -253,9 +254,9 @@ void Task_HandleTruckSequence(u8 taskId) void ExecuteTruckSequence(void) { - MapGridSetMetatileIdAt(11, 8, 525); - MapGridSetMetatileIdAt(11, 9, 533); - MapGridSetMetatileIdAt(11, 10, 541); + MapGridSetMetatileIdAt(11, 8, METATILE_ID(InsideOfTruck, DoorClosedFloor_Top)); + MapGridSetMetatileIdAt(11, 9, METATILE_ID(InsideOfTruck, DoorClosedFloor_Mid)); + MapGridSetMetatileIdAt(11, 10, METATILE_ID(InsideOfTruck, DoorClosedFloor_Bottom)); DrawWholeMapView(); ScriptContext2_Enable(); CpuFastFill(0, gPlttBufferFaded, 0x400); diff --git a/src/field_specials.c b/src/field_specials.c index 0e8fe06d9..c24df157a 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -34,6 +34,7 @@ #include "random.h" #include "constants/abilities.h" #include "constants/event_object_movement_constants.h" +#include "constants/metatile_labels.h" #include "constants/moves.h" #include "constants/species.h" #include "constants/weather.h" @@ -379,7 +380,7 @@ struct Coords8 { u8 y; }; -const struct Coords8 gUnknown_083F8364[3] = { +const struct Coords8 sMauvilleGymSwitchCoords[3] = { { 7, 16}, {15, 18}, {11, 22} @@ -388,15 +389,15 @@ const struct Coords8 gUnknown_083F8364[3] = { void MauvilleGymSpecial1(void) { u8 i; - for (i=0; i<3; i++) + for (i = 0; i < ARRAY_COUNT(sMauvilleGymSwitchCoords); i++) { if (i == gSpecialVar_0x8004) { - MapGridSetMetatileIdAt(gUnknown_083F8364[i].x, gUnknown_083F8364[i].y, 0x206); + MapGridSetMetatileIdAt(sMauvilleGymSwitchCoords[i].x, sMauvilleGymSwitchCoords[i].y, METATILE_ID(MauvilleGym, PressedSwitch)); } else { - MapGridSetMetatileIdAt(gUnknown_083F8364[i].x, gUnknown_083F8364[i].y, 0x205); + MapGridSetMetatileIdAt(sMauvilleGymSwitchCoords[i].x, sMauvilleGymSwitchCoords[i].y, METATILE_ID(MauvilleGym, RaisedSwitch)); } } } @@ -404,93 +405,93 @@ void MauvilleGymSpecial1(void) void MauvilleGymSpecial2(void) { int x, y; - for (y=12; y<24; y++) + for (y = 12; y < 24; y++) { - for (x=7; x<16; x++) + for (x = 7; x < 16; x++) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x220: - MapGridSetMetatileIdAt(x, y, 0x230); + case METATILE_ID(MauvilleGym, GreenBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_Off)); break; - case 0x221: - MapGridSetMetatileIdAt(x, y, 0x231); + case METATILE_ID(MauvilleGym, GreenBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_Off)); break; - case 0x228: - MapGridSetMetatileIdAt(x, y, 0x238); + case METATILE_ID(MauvilleGym, GreenBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_Off)); break; - case 0x229: - MapGridSetMetatileIdAt(x, y, 0x239); + case METATILE_ID(MauvilleGym, GreenBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_Off)); break; - case 0x230: - MapGridSetMetatileIdAt(x, y, 0x220); + case METATILE_ID(MauvilleGym, GreenBeamH1_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_On)); break; - case 0x231: - MapGridSetMetatileIdAt(x, y, 0x221); + case METATILE_ID(MauvilleGym, GreenBeamH2_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_On)); break; - case 0x238: - MapGridSetMetatileIdAt(x, y, 0xe28); + case METATILE_ID(MauvilleGym, GreenBeamH3_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_On) | METATILE_COLLISION_MASK); break; - case 0x239: - MapGridSetMetatileIdAt(x, y, 0xe29); + case METATILE_ID(MauvilleGym, GreenBeamH4_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_On) | METATILE_COLLISION_MASK); break; - case 0x222: - MapGridSetMetatileIdAt(x, y, 0x232); + case METATILE_ID(MauvilleGym, RedBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off)); break; - case 0x223: - MapGridSetMetatileIdAt(x, y, 0x233); + case METATILE_ID(MauvilleGym, RedBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_Off)); break; - case 0x22a: - MapGridSetMetatileIdAt(x, y, 0x23a); + case METATILE_ID(MauvilleGym, RedBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_Off)); break; - case 0x22b: - MapGridSetMetatileIdAt(x, y, 0x23b); + case METATILE_ID(MauvilleGym, RedBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off)); break; - case 0x232: - MapGridSetMetatileIdAt(x, y, 0x222); + case METATILE_ID(MauvilleGym, RedBeamH1_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_On)); break; - case 0x233: - MapGridSetMetatileIdAt(x, y, 0x223); + case METATILE_ID(MauvilleGym, RedBeamH2_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_On)); break; - case 0x23a: - MapGridSetMetatileIdAt(x, y, 0xe2a); + case METATILE_ID(MauvilleGym, RedBeamH3_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_On) | METATILE_COLLISION_MASK); break; - case 0x23b: - MapGridSetMetatileIdAt(x, y, 0xe2b); + case METATILE_ID(MauvilleGym, RedBeamH4_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_On) | METATILE_COLLISION_MASK); break; - case 0x240: - MapGridSetMetatileIdAt(x, y, 0xe42); + case METATILE_ID(MauvilleGym, GreenBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK); break; - case 0x248: - MapGridSetMetatileIdAt(x, y, 0x21a); + case METATILE_ID(MauvilleGym, GreenBeamV2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; - case 0x241: - MapGridSetMetatileIdAt(x, y, 0xe43); + case METATILE_ID(MauvilleGym, RedBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK); break; - case 0x249: - MapGridSetMetatileIdAt(x, y, 0x21a); + case METATILE_ID(MauvilleGym, RedBeamV2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; - case 0x242: - MapGridSetMetatileIdAt(x, y, 0xe40); + case METATILE_ID(MauvilleGym, PoleBottom_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV1_On) | METATILE_COLLISION_MASK); break; - case 0x21a: - if (MapGridGetMetatileIdAt(x, y - 1) == 0x240) + case METATILE_ID(MauvilleGym, FloorTile): + if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_ID(MauvilleGym, GreenBeamV1_On)) { - MapGridSetMetatileIdAt(x, y, 0xe48); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV2_On) | METATILE_COLLISION_MASK); } else { - MapGridSetMetatileIdAt(x, y, 0xe49); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV2_On) | METATILE_COLLISION_MASK); } break; - case 0x243: - MapGridSetMetatileIdAt(x, y, 0xe41); + case METATILE_ID(MauvilleGym, PoleBottom_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV1_On) | METATILE_COLLISION_MASK); break; - case 0x251: - MapGridSetMetatileIdAt(x, y, 0xe50); + case METATILE_ID(MauvilleGym, PoleTop_Off): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_On) | METATILE_COLLISION_MASK); break; - case 0x250: - MapGridSetMetatileIdAt(x, y, 0x251); + case METATILE_ID(MauvilleGym, PoleTop_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off)); break; } } @@ -500,54 +501,54 @@ void MauvilleGymSpecial2(void) void MauvilleGymSpecial3(void) { int i, x, y; - const struct Coords8 *switchCoords = gUnknown_083F8364; - for (i=ARRAY_COUNT(gUnknown_083F8364)-1; i>=0; i--) + const struct Coords8 *switchCoords = sMauvilleGymSwitchCoords; + for (i = ARRAY_COUNT(sMauvilleGymSwitchCoords) - 1; i >= 0; i--) { - MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, 0x206); + MapGridSetMetatileIdAt(switchCoords->x, switchCoords->y, METATILE_ID(MauvilleGym, PressedSwitch)); switchCoords++; } - for (y=12; y<24; y++) + for (y = 12; y < 24; y++) { - for (x=7; x<16; x++) + for (x = 7; x < 16; x++) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x220: - MapGridSetMetatileIdAt(x, y, 0x230); + case METATILE_ID(MauvilleGym, GreenBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH1_Off)); break; - case 0x221: - MapGridSetMetatileIdAt(x, y, 0x231); + case METATILE_ID(MauvilleGym, GreenBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_Off)); break; - case 0x228: - MapGridSetMetatileIdAt(x, y, 0x238); + case METATILE_ID(MauvilleGym, GreenBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_Off)); break; - case 0x229: - MapGridSetMetatileIdAt(x, y, 0x239); + case METATILE_ID(MauvilleGym, GreenBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_Off)); break; - case 0x222: - MapGridSetMetatileIdAt(x, y, 0x232); + case METATILE_ID(MauvilleGym, RedBeamH1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off)); break; - case 0x223: - MapGridSetMetatileIdAt(x, y, 0x233); + case METATILE_ID(MauvilleGym, RedBeamH2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_Off)); break; - case 0x22a: - MapGridSetMetatileIdAt(x, y, 0x23a); + case METATILE_ID(MauvilleGym, RedBeamH3_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_Off)); break; - case 0x22b: - MapGridSetMetatileIdAt(x, y, 0x23b); + case METATILE_ID(MauvilleGym, RedBeamH4_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off)); break; - case 0x240: - MapGridSetMetatileIdAt(x, y, 0xe42); + case METATILE_ID(MauvilleGym, GreenBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK); break; - case 0x241: - MapGridSetMetatileIdAt(x, y, 0xe43); + case METATILE_ID(MauvilleGym, RedBeamV1_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK); break; - case 0x248: - case 0x249: - MapGridSetMetatileIdAt(x, y, 0x21a); + case METATILE_ID(MauvilleGym, GreenBeamV2_On): + case METATILE_ID(MauvilleGym, RedBeamV2_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; - case 0x250: - MapGridSetMetatileIdAt(x, y, 0x251); + case METATILE_ID(MauvilleGym, PoleTop_On): + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off)); break; } } @@ -557,7 +558,14 @@ void MauvilleGymSpecial3(void) static void Task_SlideOpenPetalburgGymDoors(u8); static void SetPetalburgGymDoorTiles(u8, u16); const u8 gUnknown_083F8370[] = {0, 1, 1, 1, 1}; -const u16 gPetalburgGymSlidingDoorMetatiles[] = {0x218, 0x219, 0x21a, 0x21b, 0x21c}; + +const u16 gPetalburgGymSlidingDoorMetatiles[] = { + METATILE_ID(PetalburgGym, SlidingDoor_Frame0), + METATILE_ID(PetalburgGym, SlidingDoor_Frame1), + METATILE_ID(PetalburgGym, SlidingDoor_Frame2), + METATILE_ID(PetalburgGym, SlidingDoor_Frame3), + METATILE_ID(PetalburgGym, SlidingDoor_Frame4), +}; void PetalburgGymSlideOpenDoors(void) { @@ -838,30 +846,30 @@ static void PCTurnOffEffect_1(s16 flag, s8 dx, s8 dy) { if (gSpecialVar_0x8004 == 0) { - tileId = 0x4; + tileId = METATILE_ID(Building, PC_Off); } else if (gSpecialVar_0x8004 == 1) { - tileId = 0x25a; + tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off); } else if (gSpecialVar_0x8004 == 2) { - tileId = 0x259; + tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off); } } else { if (gSpecialVar_0x8004 == 0) { - tileId = 0x5; + tileId = METATILE_ID(Building, PC_On); } else if (gSpecialVar_0x8004 == 1) { - tileId = 0x27f; + tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_On); } else if (gSpecialVar_0x8004 == 2) { - tileId = 0x27e; + tileId = METATILE_ID(BrendansMaysHouse, MayPC_On); } } MapGridSetMetatileIdAt(gSaveBlock1.pos.x + dx + 7, gSaveBlock1.pos.y + dy + 7, tileId | 0xc00); @@ -895,17 +903,17 @@ static void PCTurnOffEffect(void) } if (gSpecialVar_0x8004 == 0) { - tileId = 0x4; + tileId = METATILE_ID(Building, PC_Off); } else if (gSpecialVar_0x8004 == 1) { - tileId = 0x25a; + tileId = METATILE_ID(BrendansMaysHouse, BrendanPC_Off); } else if (gSpecialVar_0x8004 == 2) { - tileId = 0x259; + tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off); } - MapGridSetMetatileIdAt(gSaveBlock1.pos.x + dx + 7, gSaveBlock1.pos.y + dy + 7, tileId | 0xc00); + MapGridSetMetatileIdAt(gSaveBlock1.pos.x + dx + 7, gSaveBlock1.pos.y + dy + 7, tileId | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -941,13 +949,13 @@ static void LotteryCornerComputerEffect(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt(18, 8, 0xe9d); - MapGridSetMetatileIdAt(18, 9, 0xea5); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK); } else { - MapGridSetMetatileIdAt(18, 8, 0xe58); - MapGridSetMetatileIdAt(18, 9, 0xe60); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Flash) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Flash) | METATILE_COLLISION_MASK); } DrawWholeMapView(); task->data[4] ^= 1; @@ -961,8 +969,8 @@ static void LotteryCornerComputerEffect(struct Task *task) void EndLotteryCornerComputerEffect(void) { - MapGridSetMetatileIdAt(18, 8, 0xe9d); - MapGridSetMetatileIdAt(18, 9, 0xea5); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK); DrawWholeMapView(); } @@ -1035,7 +1043,7 @@ void ScriptAddElevatorMenuItem(u8 a0, u8 a1, u8 a2, u8 a3) u8 i; if (gSpecialVar_0x8004 == 0) { - for (i=0; i<20; i++) + for (i = 0; i < 20; i++) { gUnknown_03000760[i].var0 = 16; } @@ -1294,33 +1302,33 @@ void sub_810ED60(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt( 7, 7, 0xe68); - MapGridSetMetatileIdAt( 8, 7, 0xe69); - MapGridSetMetatileIdAt( 9, 7, 0xe69); - MapGridSetMetatileIdAt(10, 7, 0xe6a); - MapGridSetMetatileIdAt( 7, 8, 0xe70); - MapGridSetMetatileIdAt( 8, 8, 0xe71); - MapGridSetMetatileIdAt( 9, 8, 0xe71); - MapGridSetMetatileIdAt(10, 8, 0xe72); - MapGridSetMetatileIdAt( 7, 9, 0xe78); - MapGridSetMetatileIdAt( 8, 9, 0xe79); - MapGridSetMetatileIdAt( 9, 9, 0xe79); - MapGridSetMetatileIdAt(10, 9, 0xe7a); + MapGridSetMetatileIdAt( 7, 7, METATILE_BattleTower_Elevator_Top0 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 8, 7, METATILE_BattleTower_Elevator_Top1 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9, 7, METATILE_BattleTower_Elevator_Top1 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10, 7, METATILE_BattleTower_Elevator_Top2 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 7, 8, METATILE_BattleTower_Elevator_Mid0 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 8, 8, METATILE_BattleTower_Elevator_Mid1 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9, 8, METATILE_BattleTower_Elevator_Mid1 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10, 8, METATILE_BattleTower_Elevator_Mid2 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 7, 9, METATILE_BattleTower_Elevator_Bottom0 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 8, 9, METATILE_BattleTower_Elevator_Bottom1 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9, 9, METATILE_BattleTower_Elevator_Bottom1 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10, 9, METATILE_BattleTower_Elevator_Bottom2 | METATILE_COLLISION_MASK); } else { - MapGridSetMetatileIdAt( 7, 7, 0xe6b); - MapGridSetMetatileIdAt( 8, 7, 0xe6c); - MapGridSetMetatileIdAt( 9, 7, 0xe6c); - MapGridSetMetatileIdAt(10, 7, 0xe6d); - MapGridSetMetatileIdAt( 7, 8, 0xe73); - MapGridSetMetatileIdAt( 8, 8, 0xe74); - MapGridSetMetatileIdAt( 9, 8, 0xe74); - MapGridSetMetatileIdAt(10, 8, 0xe75); - MapGridSetMetatileIdAt( 7, 9, 0xe7b); - MapGridSetMetatileIdAt( 8, 9, 0xe7c); - MapGridSetMetatileIdAt( 9, 9, 0xe7c); - MapGridSetMetatileIdAt(10, 9, 0xe7d); + MapGridSetMetatileIdAt( 7, 7, (METATILE_BattleTower_Elevator_Top0 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 8, 7, (METATILE_BattleTower_Elevator_Top1 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9, 7, (METATILE_BattleTower_Elevator_Top1 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10, 7, (METATILE_BattleTower_Elevator_Top2 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 7, 8, (METATILE_BattleTower_Elevator_Mid0 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 8, 8, (METATILE_BattleTower_Elevator_Mid1 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9, 8, (METATILE_BattleTower_Elevator_Mid1 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10, 8, (METATILE_BattleTower_Elevator_Mid2 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 7, 9, (METATILE_BattleTower_Elevator_Bottom0 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 8, 9, (METATILE_BattleTower_Elevator_Bottom1 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 9, 9, (METATILE_BattleTower_Elevator_Bottom1 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(10, 9, (METATILE_BattleTower_Elevator_Bottom2 + 3) | METATILE_COLLISION_MASK); } DrawWholeMapView(); task->data[4] ^= 1; diff --git a/src/field_tasks.c b/src/field_tasks.c index 12167eb85..a56de5746 100644 --- a/src/field_tasks.c +++ b/src/field_tasks.c @@ -17,6 +17,7 @@ #include "field_player_avatar.h" #include "field_camera.h" #include "constants/songs.h" +#include "constants/metatile_labels.h" #include "sound.h" #include "field_tasks.h" @@ -147,24 +148,24 @@ void ResetFieldTasksArgs(void) } const struct MetatileOffset gUnknown_08376384[][2] = { - {{ 0, 0,0x259}, { 0, 1,0x261}}, - {{ 0, -1,0x259}, { 0, 0,0x261}}, - {{ 0, 0,0x252}, { 1, 0,0x253}}, - {{ -1, 0,0x252}, { 0, 0,0x253}} + {{ 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, { 0, 1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)}}, + {{ 0, -1, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical0)}, { 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Vertical1)}}, + {{ 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, { 1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)}}, + {{ -1, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal0)}, { 0, 0, METATILE_ID(Pacifidlog, HalfSubmergedLogs_Horizontal1)}} }; const struct MetatileOffset gUnknown_083763A4[][2] = { - {{ 0, 0,0x25A}, { 0, 1,0x262}}, - {{ 0, -1,0x25A}, { 0, 0,0x262}}, - {{ 0, 0,0x254}, { 1, 0,0x255}}, - {{ -1, 0,0x254}, { 0, 0,0x255}} + {{ 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, { 0, 1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)}}, + {{ 0, -1, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical0)}, { 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Vertical1)}}, + {{ 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, { 1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)}}, + {{ -1, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal0)}, { 0, 0, METATILE_ID(Pacifidlog, SubmergedLogs_Horizontal1)}} }; const struct MetatileOffset gUnknown_083763C4[][2] = { - {{ 0, 0,0x258}, { 0, 1,0x260}}, - {{ 0, -1,0x258}, { 0, 0,0x260}}, - {{ 0, 0,0x250}, { 1, 0,0x251}}, - {{ -1, 0,0x250}, { 0, 0,0x251}} + {{ 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, { 0, 1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)}}, + {{ 0, -1, METATILE_ID(Pacifidlog, FloatingLogs_Vertical0)}, { 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Vertical1)}}, + {{ 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, { 1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)}}, + {{ -1, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal0)}, { 0, 0, METATILE_ID(Pacifidlog, FloatingLogs_Horizontal1)}} }; void DummyPerStepCallback(u8 taskId) {} @@ -432,11 +433,11 @@ void sub_80699D8(s16 x, s16 y) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x24e: - MapGridSetMetatileIdAt(x, y, 0x24f); + case METATILE_ID(Fortree, BridgeOverGrass_Raised): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Lowered)); break; - case 0x256: - MapGridSetMetatileIdAt(x, y, 0x257); + case METATILE_ID(Fortree, BridgeOverTrees_Raised): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Lowered)); break; } } @@ -449,11 +450,11 @@ void sub_8069A3C(s16 x, s16 y) { switch (MapGridGetMetatileIdAt(x, y)) { - case 0x24f: - MapGridSetMetatileIdAt(x, y, 0x24e); + case METATILE_ID(Fortree, BridgeOverGrass_Lowered): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverGrass_Raised)); break; - case 0x257: - MapGridSetMetatileIdAt(x, y, 0x256); + case METATILE_ID(Fortree, BridgeOverTrees_Lowered): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, BridgeOverTrees_Raised)); break; } } @@ -619,7 +620,7 @@ void SetSootopolisGymCrackedIceMetatiles(void) { if (sub_8069D34(x, y) == TRUE) { - MapGridSetMetatileIdAt(x + 7, y + 7, 0x20e); + MapGridSetMetatileIdAt(x + 7, y + 7, METATILE_ID(SootopolisGym, Ice_Cracked)); } } } @@ -675,7 +676,7 @@ void PerStepCallback_8069DD4(u8 taskId) x = data[4]; y = data[5]; PlaySE(SE_RU_BARI); - MapGridSetMetatileIdAt(x, y, 0x20e); + MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Cracked)); CurrentMapDrawMetatileAt(x, y); sub_8069CFC(x - 7, y - 7); data[1] = 1; @@ -691,7 +692,7 @@ void PerStepCallback_8069DD4(u8 taskId) x = data[4]; y = data[5]; PlaySE(SE_RU_GASYAN); - MapGridSetMetatileIdAt(x, y, 0x206); + MapGridSetMetatileIdAt(x, y, METATILE_ID(SootopolisGym, Ice_Broken)); CurrentMapDrawMetatileAt(x, y); data[1] = 1; } @@ -711,13 +712,13 @@ void PerStepCallback_8069F64(u8 taskId) data[2] = y; if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y))) { - if (MapGridGetMetatileIdAt(x, y) == 0x20a) + if (MapGridGetMetatileIdAt(x, y) == METATILE_ID(Fallarbor, AshGrass)) { - StartAshFieldEffect(x, y, 0x212, 4); + StartAshFieldEffect(x, y, METATILE_ID(Fallarbor, NormalGrass), 4); } else { - StartAshFieldEffect(x, y, 0x206, 4); + StartAshFieldEffect(x, y, METATILE_ID(Lavaridge, NormalGrass), 4); } if (CheckBagHasItem(ITEM_SOOT_SACK, 1)) { @@ -782,13 +783,18 @@ void PerStepCallback_806A07C(u8 taskId) } } -static const u16 sMuddySlopeAnimationMetatiles[] = {0xe8, 0xeb, 0xea, 0xe9}; +static const u16 sMuddySlopeAnimationMetatiles[] = { + METATILE_ID(General, MuddySlope_Frame0), + METATILE_ID(General, MuddySlope_Frame3), + METATILE_ID(General, MuddySlope_Frame2), + METATILE_ID(General, MuddySlope_Frame1) +}; static void SetMuddySlopeAnimatedMetatile(s16 *counter, s16 x, s16 y) { u16 tile; if (--(*counter) == 0) - tile = 0xe8; + tile = METATILE_ID(General, MuddySlope_Frame0); else tile = sMuddySlopeAnimationMetatiles[*counter / 8]; @@ -798,7 +804,7 @@ static void SetMuddySlopeAnimatedMetatile(s16 *counter, s16 x, s16 y) // Immediately set the metatile back to the original muddy slope metatile // but don't actualy draw it on the screen. This is so the underlying metatile // behvior on the map is not changed. - MapGridSetMetatileIdAt(x, y, 0xe8); + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, MuddySlope_Frame0)); } // Checks for the player traversing on muddy slope metatiles. diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index 0a8c252e0..8d76ecccb 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -18,6 +18,7 @@ #include "constants/field_effects.h" #include "constants/event_objects.h" #include "constants/metatile_behaviors.h" +#include "constants/metatile_labels.h" #include "constants/songs.h" extern void (*gFieldCallback)(void); @@ -251,36 +252,36 @@ static void SetCutGrassMetatile(s16 x, s16 y) switch(metatileId) { - case 0x208: - case 0x15: - case 0xD: - MapGridSetMetatileIdAt(x, y, 0x1); + case METATILE_ID(Fortree, LongGrass_Root): + case METATILE_ID(General, LongGrass): + case METATILE_ID(General, TallGrass): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass)); break; - case 0x1C6: - MapGridSetMetatileIdAt(x, y, 0x1CE); + case METATILE_ID(General, TallGrass_TreeLeft): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeLeft)); break; - case 0x1C7: - MapGridSetMetatileIdAt(x, y, 0x1CF); + case METATILE_ID(General, TallGrass_TreeRight): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeRight)); break; - case 0x281: - MapGridSetMetatileIdAt(x, y, 0x279); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); break; - case 0x282: - MapGridSetMetatileIdAt(x, y, 0x27A); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); break; - case 0x283: - MapGridSetMetatileIdAt(x, y, 0x27B); + case METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); break; - case 0x206: - case 0x207: - MapGridSetMetatileIdAt(x, y, 0x271); + case METATILE_ID(Lavaridge, NormalGrass): + case METATILE_ID(Lavaridge, AshGrass): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Lavaridge, LavaField)); break; - case 0x212: - case 0x20A: - MapGridSetMetatileIdAt(x, y, 0x218); + case METATILE_ID(Fallarbor, NormalGrass): + case METATILE_ID(Fallarbor, AshGrass): + MapGridSetMetatileIdAt(x, y, METATILE_ID(Fallarbor, AshField)); break; - case 0x25: - MapGridSetMetatileIdAt(x, y, 0xE); + case METATILE_ID(General, TallGrass_TreeUp): + MapGridSetMetatileIdAt(x, y, METATILE_ID(General, Grass_TreeUp)); break; } } @@ -289,13 +290,13 @@ static s32 sub_80A28A0(s16 x, s16 y) { u16 metatileId = MapGridGetMetatileIdAt(x, y); - if(metatileId == 1) + if(metatileId == METATILE_ID(General, Grass)) return 1; - else if(metatileId == 633) + else if(metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)) return 2; - else if(metatileId == 634) + else if(metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)) return 3; - else if(metatileId == 635) + else if(metatileId == METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)) return 4; else return 0; @@ -310,34 +311,34 @@ static void SetCutGrassMetatiles(s16 x, s16 y) { u16 currentX = x + i; s16 currentXsigned = x + i; - if (MapGridGetMetatileIdAt(currentXsigned, y) == 21) + if (MapGridGetMetatileIdAt(currentXsigned, y) == METATILE_ID(General, LongGrass)) { switch ((u8)sub_80A28A0(currentXsigned, y + 1)) { case 1: - MapGridSetMetatileIdAt(currentXsigned, y + 1, 0x208); + MapGridSetMetatileIdAt(currentXsigned, y + 1, METATILE_ID(Fortree, LongGrass_Root)); break; case 2: - MapGridSetMetatileIdAt(currentXsigned, y + 1, 0x281); + MapGridSetMetatileIdAt(currentXsigned, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)); break; case 3: - MapGridSetMetatileIdAt(currentXsigned, y + 1, 0x282); + MapGridSetMetatileIdAt(currentXsigned, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)); break; case 4: - MapGridSetMetatileIdAt(currentXsigned, y + 1, 0x283); + MapGridSetMetatileIdAt(currentXsigned, y + 1, METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)); break; } } if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY) == 1) { - if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == 0x208) - MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, 0x1); - if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == 0x281) - MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, 0x279); - if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == 0x282) - MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, 0x27A); - if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == 0x283) - MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, 0x27B); + if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == METATILE_ID(Fortree, LongGrass_Root)) + MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, METATILE_ID(General, Grass)); + if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomLeft)) + MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopLeft)); + if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomMid)) + MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopMid)); + if (MapGridGetMetatileIdAt((s16)currentX, (s16)lowerY + 1) == METATILE_ID(Fortree, SecretBase_LongGrass_BottomRight)) + MapGridSetMetatileIdAt((s16)currentX, (s16)lowerY + 1, METATILE_ID(Fortree, SecretBase_LongGrass_TopRight)); } } } diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 981233480..34a11b7c6 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -3,6 +3,7 @@ #include "fieldmap.h" #include "field_camera.h" #include "field_player_avatar.h" +#include "constants/metatile_labels.h" extern u8 gUnknown_02038731; @@ -52,13 +53,47 @@ void sub_80B45B4(u8 taskId, const s16 *list, u16 c) } } -const u16 gUnknown_083CC714[] = {0x284, 0x282, 0x280}; -const u16 gUnknown_083CC71A[] = {0x285, 0x283, 0x281}; -const u16 gUnknown_083CC720[] = {0x28C, 0x28A, 0x288}; -const u16 gUnknown_083CC726[] = {0x28D, 0x28B, 0x289}; -const u16 gUnknown_083CC72C[] = {0x2A0, 0x2A2, 0x2A4}; -const u16 gUnknown_083CC732[] = {0x2A1, 0x2A3, 0x2A5}; -const u16 gUnknown_083CC738[] = {0x2A8, 0x2AA, 0x2AC}; +const u16 sEscalatorMetatiles_1F_0[] = { + METATILE_ID(PokemonCenter, Escalator1F_Tile0_Frame2), + METATILE_ID(PokemonCenter, Escalator1F_Tile0_Frame1), + METATILE_ID(PokemonCenter, Escalator1F_Tile0_Frame0) +}; + +const u16 sEscalatorMetatiles_1F_1[] = { + METATILE_ID(PokemonCenter, Escalator1F_Tile1_Frame2), + METATILE_ID(PokemonCenter, Escalator1F_Tile1_Frame1), + METATILE_ID(PokemonCenter, Escalator1F_Tile1_Frame0) +}; + +const u16 sEscalatorMetatiles_1F_2[] = { + METATILE_ID(PokemonCenter, Escalator1F_Tile2_Frame2), + METATILE_ID(PokemonCenter, Escalator1F_Tile2_Frame1), + METATILE_ID(PokemonCenter, Escalator1F_Tile2_Frame0) +}; + +const u16 sEscalatorMetatiles_1F_3[] = { + METATILE_ID(PokemonCenter, Escalator1F_Tile3_Frame2), + METATILE_ID(PokemonCenter, Escalator1F_Tile3_Frame1), + METATILE_ID(PokemonCenter, Escalator1F_Tile3_Frame0) +}; + +const u16 sEscalatorMetatiles_2F_0[] = { + METATILE_ID(PokemonCenter, Escalator2F_Tile0_Frame0), + METATILE_ID(PokemonCenter, Escalator2F_Tile0_Frame1), + METATILE_ID(PokemonCenter, Escalator2F_Tile0_Frame2) +}; + +const u16 sEscalatorMetatiles_2F_1[] = { + METATILE_ID(PokemonCenter, Escalator2F_Tile1_Frame0), + METATILE_ID(PokemonCenter, Escalator2F_Tile1_Frame1), + METATILE_ID(PokemonCenter, Escalator2F_Tile1_Frame2) +}; + +const u16 sEscalatorMetatiles_2F_2[] = { + METATILE_ID(PokemonCenter, Escalator2F_Tile2_Frame0), + METATILE_ID(PokemonCenter, Escalator2F_Tile2_Frame1), + METATILE_ID(PokemonCenter, Escalator2F_Tile2_Frame2) +}; void sub_80B4710(u8 taskId) { @@ -69,25 +104,25 @@ void sub_80B4710(u8 taskId) switch (data[0]) { case 0: - sub_80B45B4(taskId, gUnknown_083CC714, 0); + sub_80B45B4(taskId, sEscalatorMetatiles_1F_0, 0); break; case 1: - sub_80B45B4(taskId, gUnknown_083CC71A, 0); + sub_80B45B4(taskId, sEscalatorMetatiles_1F_1, 0); break; case 2: - sub_80B45B4(taskId, gUnknown_083CC720, 0xC00); + sub_80B45B4(taskId, sEscalatorMetatiles_1F_2, METATILE_COLLISION_MASK); break; case 3: - sub_80B45B4(taskId, gUnknown_083CC726, 0); + sub_80B45B4(taskId, sEscalatorMetatiles_1F_3, 0); break; case 4: - sub_80B45B4(taskId, gUnknown_083CC72C, 0xC00); + sub_80B45B4(taskId, sEscalatorMetatiles_2F_0, METATILE_COLLISION_MASK); break; case 5: - sub_80B45B4(taskId, gUnknown_083CC732, 0); + sub_80B45B4(taskId, sEscalatorMetatiles_2F_1, 0); break; case 6: - sub_80B45B4(taskId, gUnknown_083CC738, 0); + sub_80B45B4(taskId, sEscalatorMetatiles_2F_2, 0); break; } diff --git a/src/scrcmd.c b/src/scrcmd.c index d37e1180d..015fae69f 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1909,7 +1909,7 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) if (!v8) MapGridSetMetatileIdAt(x, y, metatileId); else - MapGridSetMetatileIdAt(x, y, metatileId | 0xC00); + MapGridSetMetatileIdAt(x, y, metatileId | METATILE_COLLISION_MASK); return FALSE; } diff --git a/src/tv.c b/src/tv.c index fa5b0f4d4..5b9867acb 100644 --- a/src/tv.c +++ b/src/tv.c @@ -42,6 +42,7 @@ #include "ewram.h" #include "constants/moves.h" #include "constants/region_map_sections.h" +#include "constants/metatile_labels.h" struct UnkTvStruct { @@ -536,7 +537,7 @@ void UpdateTVScreensOnMap(int width, int height) switch (CheckForBigMovieOrEmergencyNewsOnTV()) { case 1: - SetTVMetatilesOnMap(width, height, 0x3); + SetTVMetatilesOnMap(width, height, METATILE_ID(Building, TV_On)); break; case 2: break; @@ -544,12 +545,12 @@ void UpdateTVScreensOnMap(int width, int height) 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); + SetTVMetatilesOnMap(width, height, METATILE_ID(Building, TV_On)); } else if (FlagGet(FLAG_SYS_TV_START) && (sub_80BD8B8() != 0xff || FindAnyTVNewsOnTheAir() != 0xff || IsTVShowInSearchOfTrainersAiring())) { FlagClear(FLAG_SYS_TV_WATCH); - SetTVMetatilesOnMap(width, height, 0x3); + SetTVMetatilesOnMap(width, height, METATILE_ID(Building, TV_On)); } break; } @@ -565,14 +566,14 @@ void SetTVMetatilesOnMap(int width, int height, u16 tileId) for (x=0; x Date: Thu, 18 Jul 2019 20:15:12 -0400 Subject: start decompiling pokenav data --- data/pokenav.s | 105 --------------------------------------------------- src/pokenav_before.c | 74 ++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 105 deletions(-) diff --git a/data/pokenav.s b/data/pokenav.s index 15c5ee534..6a9416c71 100644 --- a/data/pokenav.s +++ b/data/pokenav.s @@ -3,113 +3,8 @@ .section .rodata - .align 2 -gUnknown_083DFEC8:: @ 83DFEC8 - .4byte gTileBuffer - - .align 1 -gUnknown_083DFECC:: @ 83DFECC - .incbin "graphics/pokenav/83DFECC.gbapal" - - .align 1 -gUnknown_083DFEEC:: @ 83DFEEC - .incbin "graphics/pokenav/83DFEEC.4bpp" - - .align 2 -gUnknown_083DFF8C:: @ 83DFF8C - .incbin "graphics/pokenav/83DFF8C.bin.lz" - - .align 1 -gUnknown_083E003C:: @ 83E003C - .incbin "graphics/pokenav/83E003C.gbapal" - - .align 1 -gUnknown_083E005C:: @ 83E005C - .incbin "graphics/pokenav/83E005C.4bpp" - - .align 2 -gUnknown_083E007C:: @ 83E007C - .incbin "graphics/pokenav/83E007C.bin.lz" - - .align 1 -gUnknown_083E0124:: @ 83E0124 - .incbin "graphics/pokenav/83E0124_pal.bin" - - .align 1 -gUnknown_083E0144:: @ 83E0144 - .incbin "graphics/pokenav/83E0144_pal.bin" - - .align 1 - .incbin "graphics/pokenav/83E0164.bin" - - .align 1 -gUnknown_083E01AC:: @ 83E01AC - .incbin "graphics/pokenav/83E01AC.bin" - - .align 1 -gUnknown_083E01F4:: @ 83E01F4 - .incbin "graphics/pokenav/83E01F4.bin" - - .align 1 -gUnknown_083E0254:: @ 83E0254 - .incbin "graphics/pokenav/83E0254.gbapal" - - .align 1 -gUnknown_083E0274:: @ 83E0274 - .incbin "graphics/pokenav/83E0274.gbapal" - - .align 2 -gPokenavConditionSearch2_Pal:: @ 83E0294 - .incbin "graphics/pokenav/condition_search2.gbapal" - - .align 1 -gUnknown_083E02B4:: @ 83E02B4 - .incbin "graphics/pokenav/83E02B4.gbapal" - - .align 1 - .incbin "graphics/pokenav/83E02D4.bin" - - .align 1 -gUnknown_083E0314:: @ 83E0314 - .incbin "graphics/pokenav/83E0314.gbapal" - - .align 1 -gUnknown_083E0334:: @ 83E0334 - .incbin "graphics/pokenav/trainereyes_misc_pal.bin" @ the original bytes have an "FF FF" instance which is incompatible with gbagfx to produce the bytes needed to match the original ROM, so I am forced to include it as a .bin until the lowest bit is properly handled or a better workaround is produced - - .align 2 -gUnknown_083E0354:: @ 83E0354 - .incbin "graphics/pokenav/trainereyes_misc.4bpp.lz" - .align 1 -gUnknown_083E039C:: @ 83E039C - .2byte 0x4280, 0x4282 - - .align 1 -gUnknown_083E03A0:: @ 83E03A0 - .2byte 0x4000, 0x4000, 0x4281, 0x4283 - - .align 1 -gUnknown_083E03A8:: @ 83E03A8 - .incbin "graphics/pokenav/83E03A8.gbapal" - - .align 1 - .incbin "graphics/pokenav/83E03C8.bin" -gUnknown_083E040C:: @ 83E040C - .incbin "graphics/misc/ribbons_half.4bpp.lz" - - .align 2 -gPokenavOutlinePalette:: @ 83E05D4 - .incbin "graphics/pokenav/outline.gbapal" - - .align 2 -gPokenavOutlineTiles:: @ 83E05F4 - .incbin "graphics/pokenav/outline.4bpp.lz" - - .align 2 -gPokenavOutlineTilemap:: @ 83E0804 - .incbin "graphics/pokenav/outline_map.bin.lz" .align 2 gPokenavCityMap_Lavaridge_0:: @ 83E096C diff --git a/src/pokenav_before.c b/src/pokenav_before.c index 3150629b7..d2d88a1e1 100644 --- a/src/pokenav_before.c +++ b/src/pokenav_before.c @@ -103,6 +103,80 @@ IWRAM_DATA void (*gUnknown_03000744)(void); struct UnkPokenavStruct *const gPokenavStructPtr = (struct UnkPokenavStruct *)gSharedMem; extern u16 gKeyRepeatStartDelay; + +// rodata? +const u8 *const gUnknown_083DFEC8 = gTileBuffer; + +const u8 gUnknown_083DFECC[] = INCBIN_U8("graphics/pokenav/83DFECC.gbapal"); + +const u8 gUnknown_083DFEEC[] = INCBIN_U8("graphics/pokenav/83DFEEC.4bpp"); +const u8 gUnknown_083DFF8C[] = INCBIN_U8("graphics/pokenav/83DFF8C.bin.lz"); +const u16 gUnknown_083E003C[] = INCBIN_U16("graphics/pokenav/83E003C.gbapal"); + +const u8 gUnknown_083E005C[] = INCBIN_U8("graphics/pokenav/83E005C.4bpp"); +const u8 gUnknown_083E007C[] = INCBIN_U8("graphics/pokenav/83E007C.bin.lz"); +const u16 gUnknown_083E0124[] = INCBIN_U16("graphics/pokenav/83E0124_pal.bin"); + +const u16 gUnknown_083E0144[] = INCBIN_U16("graphics/pokenav/83E0144_pal.bin"); + +const u16 gUnknown_083E0164[] = INCBIN_U16("graphics/pokenav/83E0164.bin");//? + +const u8 gUnknown_083E01AC[] = INCBIN_U8("graphics/pokenav/83E01AC.bin"); +const u8 gUnknown_083E01F4[] = INCBIN_U8("graphics/pokenav/83E01F4.bin"); +const u8 gUnknown_083E0254[] = INCBIN_U8("graphics/pokenav/83E0254.gbapal"); +const u16 gUnknown_083E0274[] = INCBIN_U16("graphics/pokenav/83E0274.gbapal"); + +const u16 gPokenavConditionSearch2_Pal[] = INCBIN_U16("graphics/pokenav/condition_search2.gbapal"); + +const u16 gUnknown_083E02B4[] = INCBIN_U16("graphics/pokenav/83E02B4.gbapal"); + +const u16 gUnknown_083E02D4[] = INCBIN_U16("graphics/pokenav/83E02D4.bin");//? + +const u8 gUnknown_083E0314[] = INCBIN_U8("graphics/pokenav/83E0314.gbapal"); +const u8 gUnknown_083E0334[] = INCBIN_U8("graphics/pokenav/trainereyes_misc_pal.bin"); + +const u8 gUnknown_083E0354[] = INCBIN_U8("graphics/pokenav/trainereyes_misc.4bpp.lz"); + +const u8 gUnknown_083E039C[][4] = +{ + {0x80, 0x42, 0x82, 0x42}, +}; + +const u8 gUnknown_083E03A0[][8] = +{ + {0x00, 0x40, 0x00, 0x40, 0x81, 0x42, 0x83, 0x42}, +}; + +const u16 gUnknown_083E03A8[] = INCBIN_U16("graphics/pokenav/83E03A8.gbapal"); +const u16 gUnknown_083E03C8[] = INCBIN_U16("graphics/pokenav/83E03C8.bin"); +const u8 gUnknown_083E040C[] = INCBIN_U8("graphics/misc/ribbons_half.4bpp.lz"); +const u8 gPokenavOutlinePalette[] = INCBIN_U8("graphics/pokenav/outline.gbapal"); +const u8 gPokenavOutlineTiles[] = INCBIN_U8("graphics/pokenav/outline.4bpp.lz"); +const u8 gPokenavOutlineTilemap[] = INCBIN_U8("graphics/pokenav/outline_map.bin.lz"); + + + + + + + + + + + + + + + + + + + + + + + + void sub_80EBA5C() { -- cgit v1.2.3 From a27c727e8bc00f449ab216486c6b9dd606963974 Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 18 Jul 2019 20:32:43 -0400 Subject: continue pokenav data decompile --- data/pokenav.s | 94 ------ src/data/region_map/city_map_tilemaps.h | 22 ++ src/data/text/gift_ribbon_descriptions_de.h | 208 ++++++++++++ src/data/text/gift_ribbon_descriptions_en.h | 208 ++++++++++++ src/data/text/ribbon_descriptions_de.h | 67 ++++ src/data/text/ribbon_descriptions_en.h | 85 +++++ src/data/text/trainer_eye_descriptions_de.h | 486 ++++++++++++++++++++++++++++ src/data/text/trainer_eye_descriptions_en.h | 486 ++++++++++++++++++++++++++++ src/pokenav_before.c | 14 +- 9 files changed, 1573 insertions(+), 97 deletions(-) create mode 100644 src/data/region_map/city_map_tilemaps.h create mode 100644 src/data/text/gift_ribbon_descriptions_de.h create mode 100644 src/data/text/gift_ribbon_descriptions_en.h create mode 100644 src/data/text/ribbon_descriptions_de.h create mode 100644 src/data/text/ribbon_descriptions_en.h create mode 100644 src/data/text/trainer_eye_descriptions_de.h create mode 100644 src/data/text/trainer_eye_descriptions_en.h diff --git a/data/pokenav.s b/data/pokenav.s index 6a9416c71..006d49eaf 100644 --- a/data/pokenav.s +++ b/data/pokenav.s @@ -6,102 +6,8 @@ - .align 2 -gPokenavCityMap_Lavaridge_0:: @ 83E096C - .incbin "graphics/pokenav/city_maps/lavaridge_0.bin.lz" - - .align 2 -gPokenavCityMap_Fallarbor_0:: @ 83E09B0 - .incbin "graphics/pokenav/city_maps/fallarbor_0.bin.lz" - - .align 2 -gPokenavCityMap_Fortree_0:: @ 83E09F8 - .incbin "graphics/pokenav/city_maps/fortree_0.bin.lz" - - .align 2 -gPokenavCityMap_Slateport_0:: @ 83E0A48 - .incbin "graphics/pokenav/city_maps/slateport_0.bin.lz" - - .align 2 -gPokenavCityMap_Slateport_1:: @ 83E0AA8 - .incbin "graphics/pokenav/city_maps/slateport_1.bin.lz" - - .align 2 -gPokenavCityMap_Rustboro_0:: @ 83E0AF4 - .incbin "graphics/pokenav/city_maps/rustboro_0.bin.lz" - - .align 2 -gPokenavCityMap_Rustboro_1:: @ 83E0B48 - .incbin "graphics/pokenav/city_maps/rustboro_1.bin.lz" - - .align 2 -gPokenavCityMap_Pacifidlog_0:: @ 83E0B9C - .incbin "graphics/pokenav/city_maps/pacifidlog_0.bin.lz" - - .align 2 -gPokenavCityMap_Mauville_1:: @ 83E0BDC - .incbin "graphics/pokenav/city_maps/mauville_1.bin.lz" - - .align 2 -gPokenavCityMap_Mauville_0:: @ 83E0C34 - .incbin "graphics/pokenav/city_maps/mauville_0.bin.lz" - - .align 2 -gPokenavCityMap_Oldale_0:: @ 83E0C88 - .incbin "graphics/pokenav/city_maps/oldale_0.bin.lz" - - .align 2 -gPokenavCityMap_Lilycove_1:: @ 83E0CB8 - .incbin "graphics/pokenav/city_maps/lilycove_1.bin.lz" - - .align 2 -gPokenavCityMap_Lilycove_0:: @ 83E0D04 - .incbin "graphics/pokenav/city_maps/lilycove_0.bin.lz" - - .align 2 -gPokenavCityMap_Littleroot_0:: @ 83E0D5C - .incbin "graphics/pokenav/city_maps/littleroot_0.bin.lz" - - .align 2 -gPokenavCityMap_Dewford_0:: @ 83E0D8C - .incbin "graphics/pokenav/city_maps/dewford_0.bin.lz" - - .align 2 -gPokenavCityMap_Sootopolis_0:: @ 83E0DC4 - .incbin "graphics/pokenav/city_maps/sootopolis_0.bin.lz" - - .align 2 -gPokenavCityMap_EverGrande_0:: @ 83E0E04 - .incbin "graphics/pokenav/city_maps/ever_grande_0.bin.lz" - - .align 2 -gPokenavCityMap_EverGrande_1:: @ 83E0E4C - .incbin "graphics/pokenav/city_maps/ever_grande_1.bin.lz" - - .align 2 -gPokenavCityMap_Verdanturf_0:: @ 83E0E90 - .incbin "graphics/pokenav/city_maps/verdanturf_0.bin.lz" - - .align 2 -gPokenavCityMap_Mossdeep_1:: @ 83E0EC8 - .incbin "graphics/pokenav/city_maps/mossdeep_1.bin.lz" - - .align 2 -gPokenavCityMap_Mossdeep_0:: @ 83E0F10 - .incbin "graphics/pokenav/city_maps/mossdeep_0.bin.lz" - - .align 2 -gPokenavCityMap_Petalburg_0:: @ 83E0F6C - .incbin "graphics/pokenav/city_maps/petalburg_0.bin.lz" - -@ 83E0FC8 - .include "data/text/ribbon_descriptions.inc" -@ 83E1204 - .include "data/text/gift_ribbon_descriptions.inc" -@ 83E178C - .include "data/text/trainer_eye_descriptions.inc" .align 2 gUnknown_083E31B0:: @ 83E31B0 diff --git a/src/data/region_map/city_map_tilemaps.h b/src/data/region_map/city_map_tilemaps.h new file mode 100644 index 000000000..8c1ab0056 --- /dev/null +++ b/src/data/region_map/city_map_tilemaps.h @@ -0,0 +1,22 @@ +const u8 gPokenavCityMap_Lavaridge_0[] = INCBIN_U8("graphics/pokenav/city_maps/lavaridge_0.bin.lz"); +const u8 gPokenavCityMap_Fallarbor_0[] = INCBIN_U8("graphics/pokenav/city_maps/fallarbor_0.bin.lz"); +const u8 gPokenavCityMap_Fortree_0[] = INCBIN_U8("graphics/pokenav/city_maps/fortree_0.bin.lz"); +const u8 gPokenavCityMap_Slateport_0[] = INCBIN_U8("graphics/pokenav/city_maps/slateport_0.bin.lz"); +const u8 gPokenavCityMap_Slateport_1[] = INCBIN_U8("graphics/pokenav/city_maps/slateport_1.bin.lz"); +const u8 gPokenavCityMap_Rustboro_0[] = INCBIN_U8("graphics/pokenav/city_maps/rustboro_0.bin.lz"); +const u8 gPokenavCityMap_Rustboro_1[] = INCBIN_U8("graphics/pokenav/city_maps/rustboro_1.bin.lz"); +const u8 gPokenavCityMap_Pacifidlog_0[] = INCBIN_U8("graphics/pokenav/city_maps/pacifidlog_0.bin.lz"); +const u8 gPokenavCityMap_Mauville_1[] = INCBIN_U8("graphics/pokenav/city_maps/mauville_1.bin.lz"); +const u8 gPokenavCityMap_Mauville_0[] = INCBIN_U8("graphics/pokenav/city_maps/mauville_0.bin.lz"); +const u8 gPokenavCityMap_Oldale_0[] = INCBIN_U8("graphics/pokenav/city_maps/oldale_0.bin.lz"); +const u8 gPokenavCityMap_Lilycove_1[] = INCBIN_U8("graphics/pokenav/city_maps/lilycove_1.bin.lz"); +const u8 gPokenavCityMap_Lilycove_0[] = INCBIN_U8("graphics/pokenav/city_maps/lilycove_0.bin.lz"); +const u8 gPokenavCityMap_Littleroot_0[] = INCBIN_U8("graphics/pokenav/city_maps/littleroot_0.bin.lz"); +const u8 gPokenavCityMap_Dewford_0[] = INCBIN_U8("graphics/pokenav/city_maps/dewford_0.bin.lz"); +const u8 gPokenavCityMap_Sootopolis_0[] = INCBIN_U8("graphics/pokenav/city_maps/sootopolis_0.bin.lz"); +const u8 gPokenavCityMap_EverGrande_0[] = INCBIN_U8("graphics/pokenav/city_maps/ever_grande_0.bin.lz"); +const u8 gPokenavCityMap_EverGrande_1[] = INCBIN_U8("graphics/pokenav/city_maps/ever_grande_1.bin.lz"); +const u8 gPokenavCityMap_Verdanturf_0[] = INCBIN_U8("graphics/pokenav/city_maps/verdanturf_0.bin.lz"); +const u8 gPokenavCityMap_Mossdeep_1[] = INCBIN_U8("graphics/pokenav/city_maps/mossdeep_1.bin.lz"); +const u8 gPokenavCityMap_Mossdeep_0[] = INCBIN_U8("graphics/pokenav/city_maps/mossdeep_0.bin.lz"); +const u8 gPokenavCityMap_Petalburg_0[] = INCBIN_U8("graphics/pokenav/city_maps/petalburg_0.bin.lz"); diff --git a/src/data/text/gift_ribbon_descriptions_de.h b/src/data/text/gift_ribbon_descriptions_de.h new file mode 100644 index 000000000..6bc57fb2e --- /dev/null +++ b/src/data/text/gift_ribbon_descriptions_de.h @@ -0,0 +1,208 @@ +const u8 gGiftRibbonDescriptionPart1_2003RegionalTourney[] = _( + "REGIONALTURNIER 2003"); + +const u8 gGiftRibbonDescriptionPart2_Champion[] = _( + "BAND des CHAMPS"); + +const u8 gGiftRibbonDescriptionPart1_2003NationalTourney[] = _( + "NATIONALTURNIER 2003"); + +const u8 gGiftRibbonDescriptionPart1_2003GlobalCup[] = _( + "WELTPOKAL 2003"); + +const u8 gGiftRibbonDescriptionPart2_RunnerUp[] = _( + "BAND für Platzierungen"); + +const u8 gGiftRibbonDescriptionPart2_Semifinalist[] = _( + "BAND für Halbfinalisten"); + +const u8 gGiftRibbonDescriptionPart1_2004RegionalTourney[] = _( + "REGIONALTURNIER 2004"); + +const u8 gGiftRibbonDescriptionPart1_2004NationalTourney[] = _( + "NATIONALTURNIER 2004"); + +const u8 gGiftRibbonDescriptionPart1_2004GlobalCup[] = _( + "WELTPOKAL 2004"); + +const u8 gGiftRibbonDescriptionPart1_2005RegionalTourney[] = _( + "REGIONALTURNIER 2005"); + +const u8 gGiftRibbonDescriptionPart1_2005NationalTourney[] = _( + "NATIONALTURNIER 2005"); + +const u8 gGiftRibbonDescriptionPart1_2005GlobalCup[] = _( + "WELTPOKAL 2005"); + +const u8 gGiftRibbonDescriptionPart1_PokemonBattleCup[] = _( + "POKéMON-KAMPF-POKAL"); + +const u8 gGiftRibbonDescriptionPart2_Participation[] = _( + "Teilnehmer-BAND"); + +const u8 gGiftRibbonDescriptionPart1_PokemonLeague[] = _( + "POKéMON LIGA"); + +const u8 gGiftRibbonDescriptionPart1_AdvanceCup[] = _( + "TALENTPOKAL"); + +const u8 gGiftRibbonDescriptionPart1_PokemonTournament[] = _( + "POKéMON-Turnier"); + +const u8 gGiftRibbonDescriptionPart2_Participation2[] = _( + "Teilnehmer-BAND"); + +const u8 gGiftRibbonDescriptionPart1_PokemonEvent[] = _( + "POKéMON-Wettkampf"); + +const u8 gGiftRibbonDescriptionPart1_PokemonFestival[] = _( + "POKéMON-Festival"); + +const u8 gGiftRibbonDescriptionPart1_DifficultyClearing[] = _( + "Schw.-Grad-Abschl."); + +const u8 gGiftRibbonDescriptionPart2_Commemorative[] = _( + "Gedenk-BAND"); + +const u8 gGiftRibbonDescriptionPart1_ClearingAllDifficulties[] = _( + "BAND für erf. Abschluss"); + +const u8 gGiftRibbonDescriptionPart2_ClearingAllDifficulties[] = _( + "aller Schwierigk.-Grade."); + +const u8 gGiftRibbonDescriptionPart1_100StraightWin[] = _( + "100. Sieg in Folge"); + +const u8 gGiftRibbonDescriptionPart1_DarknessTower[] = _( + "APOKELIPSE-TURM fertig"); + +const u8 gGiftRibbonDescriptionPart1_RedTower[] = _( + "ROTER TURM fertig"); + +const u8 gGiftRibbonDescriptionPart1_BlackironTower[] = _( + "EISERNER TURM fertig"); + +const u8 gGiftRibbonDescriptionPart1_FinalTower[] = _( + "FINAL-TURM-Abschluss"); + +const u8 gGiftRibbonDescriptionPart1_LegendMaking[] = _( + "Legendäres"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterTokyo[] = _( + "POKéMON-CENTER TOKIO"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterOsaka[] = _( + "POKéMON-CENTER OSAKA"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterNagoya[] = _( + "POKéMON-CENTER NAGOYA"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterNY[] = _( + "POKéMON-CENTER N. Y."); + +const u8 gGiftRibbonDescriptionPart1_SummerHolidays[] = _( + "Sommerferien-BAND"); + +const u8 gGiftRibbonDescriptionPart2_EmptyString[] = _( + ""); + +const u8 gGiftRibbonDescriptionPart1_WinterHolidays[] = _( + "Weihnachtsferien-BAND"); + +const u8 gGiftRibbonDescriptionPart1_SpringHolidays[] = _( + "Osterferien-BAND"); + +const u8 gGiftRibbonDescriptionPart1_Evergreen[] = _( + "Evergreen-BAND"); + +const u8 gGiftRibbonDescriptionPart1_SpecialHoliday[] = _( + "Sonderurlaubs-BAND"); + +const u8 gGiftRibbonDescriptionPart1_HardWorker[] = _( + "Fleiß-BAND"); + +const u8 gGiftRibbonDescriptionPart1_LotsOfFriends[] = _( + "Beliebtheits-BAND"); + +const u8 gGiftRibbonDescriptionPart1_FullOfEnergy[] = _( + "Energie-BAND"); + +const u8 gGiftRibbonDescriptionPart1_LovedPokemon[] = _( + "Ein Gedenk-BAND für ein"); + +const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _( + "beliebtes POKéMON."); + +const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _( + "Ein BAND für POKéMON-"); + +const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _( + "Freunde."); + +const u8 *const gGiftRibbonDescriptions[][2] = +{ + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_ClearingAllDifficulties, gGiftRibbonDescriptionPart2_ClearingAllDifficulties}, + {gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon}, + {gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon}, +}; diff --git a/src/data/text/gift_ribbon_descriptions_en.h b/src/data/text/gift_ribbon_descriptions_en.h new file mode 100644 index 000000000..14229a22a --- /dev/null +++ b/src/data/text/gift_ribbon_descriptions_en.h @@ -0,0 +1,208 @@ +const u8 gGiftRibbonDescriptionPart1_2003RegionalTourney[] = _( + "2003 REGIONAL TOURNEY"); + +const u8 gGiftRibbonDescriptionPart2_Champion[] = _( + "CHAMPION RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_2003NationalTourney[] = _( + "2003 NATIONAL TOURNEY"); + +const u8 gGiftRibbonDescriptionPart1_2003GlobalCup[] = _( + "2003 GLOBAL CUP"); + +const u8 gGiftRibbonDescriptionPart2_RunnerUp[] = _( + "Runner-up RIBBON"); + +const u8 gGiftRibbonDescriptionPart2_Semifinalist[] = _( + "Semifinalist RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_2004RegionalTourney[] = _( + "2004 REGIONAL TOURNEY"); + +const u8 gGiftRibbonDescriptionPart1_2004NationalTourney[] = _( + "2004 NATIONAL TOURNEY"); + +const u8 gGiftRibbonDescriptionPart1_2004GlobalCup[] = _( + "2004 GLOBAL CUP"); + +const u8 gGiftRibbonDescriptionPart1_2005RegionalTourney[] = _( + "2005 REGIONAL TOURNEY"); + +const u8 gGiftRibbonDescriptionPart1_2005NationalTourney[] = _( + "2005 NATIONAL TOURNEY"); + +const u8 gGiftRibbonDescriptionPart1_2005GlobalCup[] = _( + "2005 GLOBAL CUP"); + +const u8 gGiftRibbonDescriptionPart1_PokemonBattleCup[] = _( + "POKéMON BATTLE CUP"); + +const u8 gGiftRibbonDescriptionPart2_Participation[] = _( + "Participation RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_PokemonLeague[] = _( + "POKéMON LEAGUE"); + +const u8 gGiftRibbonDescriptionPart1_AdvanceCup[] = _( + "ADVANCE CUP"); + +const u8 gGiftRibbonDescriptionPart1_PokemonTournament[] = _( + "POKéMON Tournament"); + +const u8 gGiftRibbonDescriptionPart2_Participation2[] = _( + "Participation RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_PokemonEvent[] = _( + "POKéMON Event"); + +const u8 gGiftRibbonDescriptionPart1_PokemonFestival[] = _( + "POKéMON Festival"); + +const u8 gGiftRibbonDescriptionPart1_DifficultyClearing[] = _( + "Difficulty-clearing"); + +const u8 gGiftRibbonDescriptionPart2_Commemorative[] = _( + "Commemorative RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_ClearingAllDifficulties[] = _( + "RIBBON awarded for"); + +const u8 gGiftRibbonDescriptionPart2_ClearingAllDifficulties[] = _( + "clearing all difficulties."); + +const u8 gGiftRibbonDescriptionPart1_100StraightWin[] = _( + "100-straight Win"); + +const u8 gGiftRibbonDescriptionPart1_DarknessTower[] = _( + "DARKNESS TOWER Clear"); + +const u8 gGiftRibbonDescriptionPart1_RedTower[] = _( + "RED TOWER Clear"); + +const u8 gGiftRibbonDescriptionPart1_BlackironTower[] = _( + "BLACKIRON TOWER Clear"); + +const u8 gGiftRibbonDescriptionPart1_FinalTower[] = _( + "FINAL TOWER Clear"); + +const u8 gGiftRibbonDescriptionPart1_LegendMaking[] = _( + "Legend-making"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterTokyo[] = _( + "POKéMON CENTER TOKYO"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterOsaka[] = _( + "POKéMON CENTER OSAKA"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterNagoya[] = _( + "POKéMON CENTER NAGOYA"); + +const u8 gGiftRibbonDescriptionPart1_PokemonCenterNY[] = _( + "POKéMON CENTER NY"); + +const u8 gGiftRibbonDescriptionPart1_SummerHolidays[] = _( + "Summer Holidays RIBBON"); + +const u8 gGiftRibbonDescriptionPart2_EmptyString[] = _( + ""); + +const u8 gGiftRibbonDescriptionPart1_WinterHolidays[] = _( + "Winter Holidays RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_SpringHolidays[] = _( + "Spring Holidays RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_Evergreen[] = _( + "Evergreen RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_SpecialHoliday[] = _( + "Special Holiday RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_HardWorker[] = _( + "Hard Worker RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_LotsOfFriends[] = _( + "Lots of Friends RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_FullOfEnergy[] = _( + "Full of Energy RIBBON"); + +const u8 gGiftRibbonDescriptionPart1_LovedPokemon[] = _( + "A commemorative RIBBON"); + +const u8 gGiftRibbonDescriptionPart2_LovedPokemon[] = _( + "for a loved POKéMON."); + +const u8 gGiftRibbonDescriptionPart1_LoveForPokemon[] = _( + "RIBBON that shows"); + +const u8 gGiftRibbonDescriptionPart2_LoveForPokemon[] = _( + "love for POKéMON."); + +const u8 *const gGiftRibbonDescriptions[][2] = +{ + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist}, + {gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation}, + {gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2}, + {gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_ClearingAllDifficulties, gGiftRibbonDescriptionPart2_ClearingAllDifficulties}, + {gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative}, + {gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString}, + {gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon}, + {gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon}, +}; diff --git a/src/data/text/ribbon_descriptions_de.h b/src/data/text/ribbon_descriptions_de.h new file mode 100644 index 000000000..2fef7fb7b --- /dev/null +++ b/src/data/text/ribbon_descriptions_de.h @@ -0,0 +1,67 @@ +const u8 gRibbonDescriptionPart1_Champion[] = _( + "BAND für unschlagbare"); +const u8 gRibbonDescriptionPart2_Champion[] = _( + "RUHMESHALLE-Mitglieder"); +const u8 gRibbonDescriptionPart1_CoolContest[] = _( + "COOLNESS-WETTBEWERB"); +const u8 gRibbonDescriptionPart1_BeautyContest[] = _( + "SCHÖNHEITSWETTBEWERB"); +const u8 gRibbonDescriptionPart1_CuteContest[] = _( + "ANMUT-WETTBEWERB"); +const u8 gRibbonDescriptionPart1_SmartContest[] = _( + "KLUGHEITSWETTBEWERB"); +const u8 gRibbonDescriptionPart1_ToughContest[] = _( + "STÄRKE-WETTBEWERB"); +const u8 gRibbonDescriptionPart2_NormalRank[] = _( + "Sieger in Normal-Klasse!"); +const u8 gRibbonDescriptionPart2_SuperRank[] = _( + "Sieger in Super-Klasse!"); +const u8 gRibbonDescriptionPart2_HyperRank[] = _( + "Sieger in Hyper-Klasse!"); +const u8 gRibbonDescriptionPart2_MasterRank[] = _( + "Sieger in Master-Klasse!"); +const u8 gRibbonDescriptionPart1_Winning[] = _( + "BAND für Lv. 50-Erfolg"); +const u8 gRibbonDescriptionPart2_Winning[] = _( + "im DUELLTURM."); +const u8 gRibbonDescriptionPart1_Victory[] = _( + "Für Erfolg in Lv. 100"); +const u8 gRibbonDescriptionPart2_Victory[] = _( + "im DUELLTURM."); +const u8 gRibbonDescriptionPart1_Artist[] = _( + "Band für auserwählte"); +const u8 gRibbonDescriptionPart2_Artist[] = _( + "Porträt-Modelle."); +const u8 gRibbonDescriptionPart1_Effort[] = _( + "BAND für"); +const u8 gRibbonDescriptionPart2_Effort[] = _( + "fleißige Arbeiter."); + +const u8 *const gRibbonDescriptions[][2] = +{ + {gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning}, + {gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory}, + {gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist}, + {gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort}, +}; diff --git a/src/data/text/ribbon_descriptions_en.h b/src/data/text/ribbon_descriptions_en.h new file mode 100644 index 000000000..5a314d2a6 --- /dev/null +++ b/src/data/text/ribbon_descriptions_en.h @@ -0,0 +1,85 @@ +const u8 gRibbonDescriptionPart1_Champion[] = _( + "CHAMPION-beating, HALL"); + +const u8 gRibbonDescriptionPart2_Champion[] = _( + "OF FAME Member RIBBON"); + +const u8 gRibbonDescriptionPart1_CoolContest[] = _( + "COOL CONTEST"); + +const u8 gRibbonDescriptionPart1_BeautyContest[] = _( + "BEAUTY CONTEST"); + +const u8 gRibbonDescriptionPart1_CuteContest[] = _( + "CUTE CONTEST"); + +const u8 gRibbonDescriptionPart1_SmartContest[] = _( + "SMART CONTEST"); + +const u8 gRibbonDescriptionPart1_ToughContest[] = _( + "TOUGH CONTEST"); + +const u8 gRibbonDescriptionPart2_NormalRank[] = _( + "Normal Rank winner!"); + +const u8 gRibbonDescriptionPart2_SuperRank[] = _( + "Super Rank winner!"); + +const u8 gRibbonDescriptionPart2_HyperRank[] = _( + "Hyper Rank winner!"); + +const u8 gRibbonDescriptionPart2_MasterRank[] = _( + "Master Rank winner!"); + +const u8 gRibbonDescriptionPart1_Winning[] = _( + "RIBBON for clearing LV50"); + +const u8 gRibbonDescriptionPart2_Winning[] = _( + "at the BATTLE TOWER."); + +const u8 gRibbonDescriptionPart1_Victory[] = _( + "Won for clearing LV100"); + +const u8 gRibbonDescriptionPart2_Victory[] = _( + "at the BATTLE TOWER."); + +const u8 gRibbonDescriptionPart1_Artist[] = _( + "RIBBON for being chosen"); + +const u8 gRibbonDescriptionPart2_Artist[] = _( + "as a super sketch model."); + +const u8 gRibbonDescriptionPart1_Effort[] = _( + "RIBBON awarded for"); + +const u8 gRibbonDescriptionPart2_Effort[] = _( + "being a hard worker."); + +const u8 *const gRibbonDescriptions[][2] = +{ + {gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank}, + {gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank}, + {gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning}, + {gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory}, + {gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist}, + {gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort}, +}; diff --git a/src/data/text/trainer_eye_descriptions_de.h b/src/data/text/trainer_eye_descriptions_de.h new file mode 100644 index 000000000..338cdd629 --- /dev/null +++ b/src/data/text/trainer_eye_descriptions_de.h @@ -0,0 +1,486 @@ +static const u8 TrainerEyeDescription_0[] = _( + "Emotionen beruhigen.$" + "Duftende PFLANZEN-PKMN.$" + "Beruhigende Aromen reini-$" + "gen Körper und Geist."); + +static const u8 TrainerEyeDescription_1[] = _( + "Durch Stärke überzeugen!$" + "Felsige GESTEINS-PKMN.$" + "Während des Studiums der$" + "Antike sehe ich die Welt."); + +static const u8 TrainerEyeDescription_2[] = _( + "Ich strenge mich stets an!$" + "PKMN, die gut schwimmen.$" + "Ich würde gerne ohne den$" + "Reifen schwimmen können."); + +static const u8 TrainerEyeDescription_3[] = _( + "Ich versuche einfach alles.$" + "WASSER-PKMN sind Kumpel.$" + "Ich kann schwimmen! Ich$" + "mag halt den Schwimmreifen!"); + +static const u8 TrainerEyeDescription_4[] = _( + "Wir teilen die Arbeit auf.$" + "Wir lieben freundliche PKMN.$" + "Wir teilen die Liebe zu den$" + "PKMN. Wir sind Geschwister!"); + +static const u8 TrainerEyeDescription_5[] = _( + "Schwächen erkennen.$" + "Gleichgewicht ist wichtig.$" + "Mein Ziel ist es, der$" + "PKMN-CHAMP zu werden."); + +static const u8 TrainerEyeDescription_6[] = _( + "Den Gegner umwerfen.$" + "Der PKMN-Typ ist unwichtig.$" + "Ich bin der beste Schüler$" + "der PKMN TRAINERSCHULE."); + +static const u8 TrainerEyeDescription_7[] = _( + "Langsames Niederringen.$" + "Nachts Furcht einflößend.$" + "Ich sehe Dinge, die den$" + "anderen verborgen sind..."); + +static const u8 TrainerEyeDescription_8[] = _( + "Alles, was zum Sieg führt.$" + "Hinreißende Wesen!$" + "Ich habe zu Hause einen$" + "Pool für meine PKMN."); + +static const u8 TrainerEyeDescription_9[] = _( + "Ich bringe dich vom Weg ab.$" + "Niedlich, natürlich!$" + "Ich liebe die SAFARI-ZONE,$" + "dort werde ich bleiben."); + +static const u8 TrainerEyeDescription_10[] = _( + "Wer braucht Strategie?!?$" + "Alle, die gut und teuer sind.$" + "Ich bin reich. Und daher$" + "besitze ich ein PKMN-Bett."); + +static const u8 TrainerEyeDescription_11[] = _( + "Durch Stärke gewinnen!$" + "Habe sie nachts gefangen...$" + "Große, kräftige und zähe$" + "POKéMON sind die besten..."); + +static const u8 TrainerEyeDescription_12[] = _( + "Volle Pulle zuschlagen!$" + "Funky WASSER-PKMN!$" + "Wenn ich nicht schwimme,$" + "stemme ich Gewichte!"); + +static const u8 TrainerEyeDescription_13[] = _( + "Immer gewinnen!$" + "KAMPF-PKMN!$" + "Ohne zu prahlen: Ich kann$" + "10 Ziegel zerschmettern!"); + +static const u8 TrainerEyeDescription_14[] = _( + "Ich elektrisiere dich!$" + "Es sind ELEKTRO-PKMN.$" + "Ich bringe die Menschen mit$" + "meinen Liedern zum Weinen."); + +static const u8 TrainerEyeDescription_15[] = _( + "Alles niederbrennen!$" + "Feuergefährliche POKéMON!$" + "Neben einem Lagerfeuer$" + "sollte stets Wasser stehen!"); + +static const u8 TrainerEyeDescription_16[] = _( + "Man muss hartnäckig sein.$" + "Jede Art von POKéMON.$" + "PKMN, die in der Wildnis auf-$" + "wachsen, werden stark!"); + +static const u8 TrainerEyeDescription_17[] = _( + "Unsere Liebe schlägt alles.$" + "Wir haben sie seit Jahren.$" + "In 50 Jahren Ehe waren$" + "wir den PKMN immer treu."); + +static const u8 TrainerEyeDescription_18[] = _( + "Wellenförmiger Angriff!$" + "KÄFER-PKMN sind cool!$" + "Ich gehe jeden Tag in den$" + "Wald, KÄFER-PKMN fangen."); + +static const u8 TrainerEyeDescription_19[] = _( + "Schwächen und verwirren!$" + "Solche mit irren Kräften.$" + "Ich kann deine Gedanken$" + "klar und deutlich lesen."); + +static const u8 TrainerEyeDescription_20[] = _( + "Mit vollem Einsatz kämpfen.$" + "Geheimnisvolle POKéMON.$" + "Wenn ich spreche,$" + "setze ich Telepathie ein."); + +static const u8 TrainerEyeDescription_21[] = _( + "Ruhig, gesammelt vorgehen.$" + "Ganz verschiedene PKMN.$" + "Wir genießen die tägliche$" + "Tasse Tee."); + +static const u8 TrainerEyeDescription_22[] = _( + "Ich kämpfe mit Köpfchen.$" + "Ich liebe jedes PKMN.$" + "Schreibe ich gute Noten,$" + "gibt Papi mir Geld."); + +static const u8 TrainerEyeDescription_23[] = _( + "Mein Wissen ist Macht!$" + "Jedes clevere PKMN.$" + "Ich will später ein großer$" + "PKMN-Forscher werden."); + +static const u8 TrainerEyeDescription_24[] = _( + "Wir sprechen uns ab.$" + "PKMN, die wir beide mögen.$" + "Wir sind Senior und Junior$" + "im Studium der PKMN."); + +static const u8 TrainerEyeDescription_25[] = _( + "Los geht's, meine Lieben!$" + "Ich mag sie alle!$" + "Auch beim Einkaufen lasse$" + "ich keinen Kampf aus!"); + +static const u8 TrainerEyeDescription_26[] = _( + "Ich kämpfe mit dem Herzen.$" + "PKMN, die Liebe erfahren!$" + "PKMN und Menschen müssen$" + "Vertrauen aufbauen!"); + +static const u8 TrainerEyeDescription_27[] = _( + "Ich durchschaue Gegner!$" + "Die Basis des Kampfes.$" + "Ich bin noch nicht bereit,$" + "Jüngeren Platz zu machen."); + +static const u8 TrainerEyeDescription_28[] = _( + "Angriff als Verteidigung!$" + "KAMPF-PKMN!$" + "Ich bin alt und habe daher$" + "meinen eigenen Stil."); + +static const u8 TrainerEyeDescription_29[] = _( + "Ich tue, was ich kann.$" + "Verschiedene Arten.$" + "Ich will irgendwann einen$" + "ARENALEITER besiegen!"); + +static const u8 TrainerEyeDescription_30[] = _( + "Geduld und Spucke.$" + "WASSER-PKMN!$" + "Niemand vor mir hat je$" + "etwas Größeres gefangen!"); + +static const u8 TrainerEyeDescription_31[] = _( + "Verteidigung ist die Basis.$" + "Kraftvolle PKMN!$" + "Dies war als Diät gedacht,$" + "jetzt ist es mein Hobby."); + +static const u8 TrainerEyeDescription_32[] = _( + "Weiter, immer weiter!$" + "Die Stärke von STAHL...$" + "Wenn du schwitzt, musst du$" + "regelmäßig etwas trinken!"); + +static const u8 TrainerEyeDescription_33[] = _( + "Die Umgebung erforschen.$" + "WASSER-PKMN!$" + "Ich lasse mich nicht von$" + "Strandhäschen besiegen."); + +static const u8 TrainerEyeDescription_34[] = _( + "Stets Offensive zeigen!$" + "Nur WASSER-PKMN...$" + "Ich muss jeden Tag$" + "10 Kilometer schwimmen."); + +static const u8 TrainerEyeDescription_35[] = _( + "Geschwindigkeit ist alles!$" + "Ich liebe schnelle PKMN.$" + "Beim Marathon forderst du$" + "dich selbst heraus."); + +static const u8 TrainerEyeDescription_36[] = _( + "Schneller als andere sein.$" + "Ein rasend schnelles PKMN!$" + "Rennt man rasend schnell,$" + "wird man eins mit dem Wind."); + +static const u8 TrainerEyeDescription_37[] = _( + "Die Stärke der PKMN nutzen.$" + "Sieh die Macht der DRACHEN!$" + "Eines Tages werde ich zur$" + "Legende!!!"); + +static const u8 TrainerEyeDescription_38[] = _( + "Ich zeige dir die Technik!$" + "Elegant kreisende VÖGEL.$" + "Meine VOGEL-PKMN bringen$" + "dem Mädchen meine Liebe!"); + +static const u8 TrainerEyeDescription_39[] = _( + "Du wirst Gift schmecken!$" + "Giftige PKMN.$" + "Ich trainiere hart, um ein$" + "Ninja zu werden."); + +static const u8 TrainerEyeDescription_40[] = _( + "Der Erstschlag siegt!$" + "Schnelle KAMPF-PKMN.$" + "Wenn mein PKMN verliert,$" + "kämpfe ich doch weiter."); + +static const u8 TrainerEyeDescription_41[] = _( + "Los, los, meine PKMN!$" + "Ich mag alle PKMN.$" + "UV-Strahlen sind die Feinde$" + "der Haut. Creme dich ein!"); + +static const u8 TrainerEyeDescription_42[] = _( + "Keine Gnade!$" + "Niedliche WASSER-PKMN.$" + "Ich habe zu viele Fans, ich$" + "war nämlich im Fernsehen."); + +static const u8 TrainerEyeDescription_43[] = _( + "Ich probiere dies und das.$" + "Ich liebe alle PKMN.$" + "Was liegt hinter diesem$" + "hohen Berg dort?"); + +static const u8 TrainerEyeDescription_44[] = _( + "Wir kämpfen zusammen!$" + "Wir trainieren zusammen!$" + "Wir lieben die gleichen PKMN$" + "und verschiedene Desserts."); + +static const u8 TrainerEyeDescription_45[] = _( + "Ich setze Stärke ein.$" + "WASSER- und KAMPF-PKMN.$" + "Matrosen sind raue Typen!$" + "Irgendwelche Einwände?"); + +static const u8 TrainerEyeDescription_46[] = _( + "PKMN vor Schaden bewahren.$" + "Ich liebe seltene PKMN.$" + "Ich möchte seltene PKMN$" + "aus aller Welt sammeln."); + +static const u8 TrainerEyeDescription_47[] = _( + "Meine Stärke...$" + "PKMN sind meine Kinder.$" + "Man benötigt Wissen und$" + "Liebe im Umgang mit PKMN."); + +static const u8 TrainerEyeDescription_48[] = _( + "Angriff aus vollen Rohren!$" + "Jedes PKMN kommt in Frage.$" + "Ich gebe ihnen {POKEBLOCK}, um$" + "in WETTBEWERBEN zu siegen."); + +static const u8 TrainerEyeDescription_49[] = _( + "Ich glaube an meine PKMN.$" + "Ich liebe starke PKMN.$" + "Ich bilde meine PKMN zu$" + "einem Rettungsteam aus."); + +static const u8 TrainerEyeDescription_50[] = _( + "Ich greife in Etappen an.$" + "Verschiedene Arten.$" + "Umweltverschmutzern darf$" + "man niemals vergeben!"); + +static const u8 TrainerEyeDescription_51[] = _( + "Ich zeige meinen Mut.$" + "Ich liebe niedliche PKMN!$" + "Nach einem Kampf gehe ich$" + "mit meinen PKMN schwimmen."); + +static const u8 TrainerEyeDescription_52[] = _( + "Blitzschnelle Attacken.$" + "KÄFER-PKMN sind das Beste!$" + "Um KÄFER-PKMN zu fangen,$" + "musst du früh aufstehen."); + +static const u8 TrainerEyeDescription_53[] = _( + "Ich kämpfe mit Stärke.$" + "PKMN mit hartem Körper.$" + "Ich habe diese Wanderung$" + "einen Monat vorbereitet."); + +static const u8 TrainerEyeDescription_54[] = _( + "Liebevolle Strategie!$" + "Liebevolle PKMN!$" + "Wir sind liebevoll!$" + "Immer liebevoll!"); + +static const u8 TrainerEyeDescription_55[] = _( + "Wir lassen alles raus.$" + "Das 1. PKMN, das ich fing.$" + "Die PKMN und ich sind$" + "zusammen gewachsen."); + +static const u8 TrainerEyeDescription_56[] = _( + "Steinharte Attacken.$" + "Steinharte PKMN...$" + "Ich möchte durch Kämpfe$" + "alles über PKMN lernen."); + +static const u8 TrainerEyeDescription_57[] = _( + "Direkte physische Attacke.$" + "Ich baue auf KAMPF-PKMN.$" + "Die Welt erwartet mich, als$" + "neuen, starken Kämpfer."); + +static const u8 TrainerEyeDescription_58[] = _( + "Elektrisieren... Britzel...$" + "Elektrizität bestimmt alles.$" + "Hahahahaha! Lachen hält$" + "gesund und jung!"); + +static const u8 TrainerEyeDescription_59[] = _( + "Aggressiv kämpfen.$" + "Brennen vor Leidenschaft!$" + "Spül die tägliche Müdigkeit$" + "in den Heißen Quellen ab."); + +static const u8 TrainerEyeDescription_60[] = _( + "Mein Stil ist flexibel.$" + "Gleichmäßig gewachsen.$" + "PKMN sind mein Leben. Mein$" + "Weg des Lebens ist steinig."); + +static const u8 TrainerEyeDescription_61[] = _( + "Ich nutze die Initiative.$" + "Anmutige Himmelstänzer.$" + "Ich sehe das Auf und Ab$" + "der Winde."); + +static const u8 TrainerEyeDescription_62[] = _( + "Wir kämpfen zusammen.$" + "Immer freundliche PKMN.$" + "Wir verstehen uns.$" + "Und wir verstehen andere."); + +static const u8 TrainerEyeDescription_63[] = _( + "Würde und Respekt.$" + "Ich liebe anmutige PKMN.$" + "Wasserillusionen unter-$" + "streichen meinen Stil."); + +static const u8 TrainerEyeDescription_64[] = _( + "Offensive vor Defensive.$" + "Das Schöne des UNLICHTS.$" + "Du kannst sagen, was du$" + "willst, Macht ist alles!"); + +static const u8 TrainerEyeDescription_65[] = _( + "Verwirrend verwirren.$" + "Keine besondere Vorliebe.$" + "Wie es wohl meiner Oma am$" + "PYROBERG geht?"); + +static const u8 TrainerEyeDescription_66[] = _( + "Ich setze Items ein.$" + "Flammendes Inferno in Eis.$" + "Der EIS-Typ entwickelt$" + "sich gut an warmen Orten."); + +static const u8 TrainerEyeDescription_67[] = _( + "Starke Fähigkeiten nutzen.$" + "Die rohe Kraft der DRACHEN.$" + "Beim täglichen Kampf lerne$" + "ich alles über PKMN."); + +static const u8 TrainerEyeDescription_68[] = _( + "Die gegn. Schwäche nutzen.$" + "Das ultimative STAHL-PKMN.$" + "Wenn es drauf ankommt,$" + "bin ich am stärksten!"); + +const u8 *const gTrainerEyeDescriptions[] = +{ + TrainerEyeDescription_0, + TrainerEyeDescription_1, + TrainerEyeDescription_2, + TrainerEyeDescription_3, + TrainerEyeDescription_4, + TrainerEyeDescription_5, + TrainerEyeDescription_6, + TrainerEyeDescription_7, + TrainerEyeDescription_8, + TrainerEyeDescription_9, + TrainerEyeDescription_10, + TrainerEyeDescription_11, + TrainerEyeDescription_12, + TrainerEyeDescription_13, + TrainerEyeDescription_14, + TrainerEyeDescription_15, + TrainerEyeDescription_16, + TrainerEyeDescription_17, + TrainerEyeDescription_18, + TrainerEyeDescription_19, + TrainerEyeDescription_20, + TrainerEyeDescription_21, + TrainerEyeDescription_22, + TrainerEyeDescription_23, + TrainerEyeDescription_24, + TrainerEyeDescription_25, + TrainerEyeDescription_26, + TrainerEyeDescription_27, + TrainerEyeDescription_28, + TrainerEyeDescription_29, + TrainerEyeDescription_30, + TrainerEyeDescription_31, + TrainerEyeDescription_32, + TrainerEyeDescription_33, + TrainerEyeDescription_34, + TrainerEyeDescription_35, + TrainerEyeDescription_36, + TrainerEyeDescription_37, + TrainerEyeDescription_38, + TrainerEyeDescription_39, + TrainerEyeDescription_40, + TrainerEyeDescription_41, + TrainerEyeDescription_42, + TrainerEyeDescription_43, + TrainerEyeDescription_44, + TrainerEyeDescription_45, + TrainerEyeDescription_46, + TrainerEyeDescription_47, + TrainerEyeDescription_48, + TrainerEyeDescription_49, + TrainerEyeDescription_50, + TrainerEyeDescription_51, + TrainerEyeDescription_52, + TrainerEyeDescription_53, + TrainerEyeDescription_54, + TrainerEyeDescription_55, + TrainerEyeDescription_56, + TrainerEyeDescription_57, + TrainerEyeDescription_58, + TrainerEyeDescription_59, + TrainerEyeDescription_60, + TrainerEyeDescription_61, + TrainerEyeDescription_62, + TrainerEyeDescription_63, + TrainerEyeDescription_64, + TrainerEyeDescription_65, + TrainerEyeDescription_66, + TrainerEyeDescription_67, + TrainerEyeDescription_68 +}; diff --git a/src/data/text/trainer_eye_descriptions_en.h b/src/data/text/trainer_eye_descriptions_en.h new file mode 100644 index 000000000..02fc2efdd --- /dev/null +++ b/src/data/text/trainer_eye_descriptions_en.h @@ -0,0 +1,486 @@ +static const u8 TrainerEyeDescription_0[] = _( + "Becalm fighting emotions.$" + "Fragrant GRASS POKéMON$" + "Soothing aromas make the$" + "body and mind healthy."); + +static const u8 TrainerEyeDescription_1[] = _( + "Overwhelm with power!$" + "Craggy ROCK POKéMON$" + "In search of ancient lore,$" + "I travel the world."); + +static const u8 TrainerEyeDescription_2[] = _( + "I'm going to try hard!$" + "Good swimmer POKéMON$" + "I wish I could swim without$" + "using an inner tube."); + +static const u8 TrainerEyeDescription_3[] = _( + "I don't know. I'll try hard.$" + "WATER POKéMON are buddies.$" + "It's not like I can't swim.$" + "I just like my inner tube."); + +static const u8 TrainerEyeDescription_4[] = _( + "We split our duties.$" + "We like friendly POKéMON.$" + "We enjoy POKéMON together$" + "as sister and brother."); + +static const u8 TrainerEyeDescription_5[] = _( + "Exploit the foe's weakness.$" + "Balance is crucial.$" + "My goal is to become the$" + "POKéMON CHAMPION."); + +static const u8 TrainerEyeDescription_6[] = _( + "Upset the opponent.$" + "Type doesn't matter.$" + "I'm a top student at the$" + "TRAINER'S SCHOOL."); + +static const u8 TrainerEyeDescription_7[] = _( + "Slow, steady suffering$" + "Scary to meet at night.$" + "I see things that others$" + "can't see..."); + +static const u8 TrainerEyeDescription_8[] = _( + "Anything to win.$" + "Gorgeous type!$" + "I have a pool specially for$" + "my POKéMON at home."); + +static const u8 TrainerEyeDescription_9[] = _( + "I'll lead you astray.$" + "Cute, of course.$" + "I love the SAFARI ZONE.$" + "I seem to end up there."); + +static const u8 TrainerEyeDescription_10[] = _( + "Strategy? Who needs it?$" + "I spent big money on it!$" + "I, being rich, sleep in a$" + "custom POKéMON bed."); + +static const u8 TrainerEyeDescription_11[] = _( + "Wrestle down with power.$" + "Took all night to catch...$" + "Big, burly, and buff$" + "POKéMON are the best..."); + +static const u8 TrainerEyeDescription_12[] = _( + "Ram at full speed!$" + "Funky WATER type!$" + "If I can't be out swimming,$" + "I'll be pumping weights."); + +static const u8 TrainerEyeDescription_13[] = _( + "Grand slam pummeling!$" + "FIGHTING type$" + "Not to brag, but I can bust$" + "ten roof tiles!"); + +static const u8 TrainerEyeDescription_14[] = _( + "I'll electrify you!$" + "They're ELECTRIC!$" + "I want to make people cry$" + "with songs from my heart."); + +static const u8 TrainerEyeDescription_15[] = _( + "Burn it all down!$" + "Burn-inducing POKéMON$" + "When you light a campfire,$" + "be sure there's some water."); + +static const u8 TrainerEyeDescription_16[] = _( + "Hang in and be tenacious!$" + "I'll raise any POKéMON.$" + "POKéMON raised in the wild$" + "grow strong!"); + +static const u8 TrainerEyeDescription_17[] = _( + "Our love lets us prevail.$" + "We've had them for years.$" + "Married 50 years, we've$" + "devotedly raised POKéMON."); + +static const u8 TrainerEyeDescription_18[] = _( + "Attack in waves!$" + "BUG POKéMON are cool.$" + "I go into the forest every$" + "day to catch BUG POKéMON."); + +static const u8 TrainerEyeDescription_19[] = _( + "Daze and confuse!$" + "Ones with weird powers.$" + "I can see through exactly$" + "what you're thinking!"); + +static const u8 TrainerEyeDescription_20[] = _( + "Battle at full power.$" + "POKéMON of many mysteries$" + "When we spoke, I was really$" + "using telepathy."); + +static const u8 TrainerEyeDescription_21[] = _( + "Calm and collected.$" + "POKéMON of distinction$" + "We enjoy a spot of tea$" + "every day. It's imported."); + +static const u8 TrainerEyeDescription_22[] = _( + "I use my head to battle.$" + "I love any kind of POKéMON!$" + "My daddy gives me spending$" + "money if I ace a test."); + +static const u8 TrainerEyeDescription_23[] = _( + "My knowledge rules!$" + "Any smart POKéMON!$" + "I want to be a POKéMON$" + "researcher in the future."); + +static const u8 TrainerEyeDescription_24[] = _( + "We talk it over first.$" + "POKéMON that we both like.$" + "We're senior and junior$" + "students into POKéMON!"); + +static const u8 TrainerEyeDescription_25[] = _( + "Go for it, my dears!$" + "I have no likes or dislikes.$" + "While out shopping for$" + "supper, I battle too."); + +static const u8 TrainerEyeDescription_26[] = _( + "I battle with love!$" + "A POKéMON raised with love!$" + "It's important to build$" + "trust with your POKéMON."); + +static const u8 TrainerEyeDescription_27[] = _( + "I see through your moves!$" + "The essence of FIGHTING.$" + "I'm not ready to give way$" + "to the young yet!"); + +static const u8 TrainerEyeDescription_28[] = _( + "Attack while defending$" + "The FIGHTING type$" + "Being old, I have my own$" + "style of battling."); + +static const u8 TrainerEyeDescription_29[] = _( + "I do what I can.$" + "I use different types.$" + "I'm going to keep working$" + "until I beat a GYM LEADER."); + +static const u8 TrainerEyeDescription_30[] = _( + "I battle patiently.$" + "WATER POKéMON to battle!$" + "I'm the world's only guy to$" + "catch a huge POKéMON!"); + +static const u8 TrainerEyeDescription_31[] = _( + "Defense is crucial.$" + "My POKéMON is solid.$" + "I started this for dieting,$" + "but I got right into it."); + +static const u8 TrainerEyeDescription_32[] = _( + "Push and push again!$" + "The strength of STEEL$" + "If you're sweating, get$" + "fluids into you regularly."); + +static const u8 TrainerEyeDescription_33[] = _( + "Exploit the environment!$" + "All hail the WATER type!$" + "I won't be beaten by some$" + "beach bum SWIMMER!"); + +static const u8 TrainerEyeDescription_34[] = _( + "All-out offensive!$" + "WATER POKéMON rule!$" + "I must swim over 6 miles$" + "every day."); + +static const u8 TrainerEyeDescription_35[] = _( + "Speed above all!$" + "I use a speedy POKéMON.$" + "A marathon is a challenge$" + "against your own self."); + +static const u8 TrainerEyeDescription_36[] = _( + "Strike before stricken!$" + "A fast-running POKéMON!$" + "If you ran and ran, you'd$" + "become one with the wind."); + +static const u8 TrainerEyeDescription_37[] = _( + "It's about POKéMON power!$" + "See the power of DRAGONS!$" + "I'll become legendary as the$" + "strongest one day!"); + +static const u8 TrainerEyeDescription_38[] = _( + "I'll show you my technique!$" + "Elegantly wheeling BIRDS$" + "My BIRD POKéMON, deliver my$" + "love to that girl!"); + +static const u8 TrainerEyeDescription_39[] = _( + "You'll suffer from poison!$" + "Poisonous POKéMON$" + "I undertake training so$" + "that I may become a ninja."); + +static const u8 TrainerEyeDescription_40[] = _( + "The first strike wins!$" + "Speedy FIGHTING type$" + "If my POKéMON lose,$" + "I'll carry on the fight!"); + +static const u8 TrainerEyeDescription_41[] = _( + "Go, go, my POKéMON!$" + "I'll raise anything.$" + "UV rays are your skin's$" + "enemy. Get protected."); + +static const u8 TrainerEyeDescription_42[] = _( + "No mercy!$" + "Cute WATER POKéMON$" + "I have too many fans.$" + "I was interviewed on TV."); + +static const u8 TrainerEyeDescription_43[] = _( + "I think about this & that.$" + "I like all POKéMON.$" + "What lies beyond that$" + "yonder hill?"); + +static const u8 TrainerEyeDescription_44[] = _( + "We battle together!$" + "We train together!$" + "We like the same POKéMON,$" + "but different desserts."); + +static const u8 TrainerEyeDescription_45[] = _( + "I force things with power!$" + "WATER and FIGHTING types$" + "Seamen are rough spirits!$" + "Any complaints?"); + +static const u8 TrainerEyeDescription_46[] = _( + "Protect POKéMON from harm.$" + "I love rare POKéMON.$" + "I want to collect all the$" + "world's rare POKéMON."); + +static const u8 TrainerEyeDescription_47[] = _( + "I count on power.$" + "POKéMON are my children.$" + "It takes knowledge and$" + "love to raise POKéMON."); + +static const u8 TrainerEyeDescription_48[] = _( + "Full-on attack!$" + "Anything. I'll raise it.$" + "I give them {POKEBLOCK}S for$" + "going after CONTEST titles."); + +static const u8 TrainerEyeDescription_49[] = _( + "I believe in my POKéMON.$" + "I like strong POKéMON.$" + "I'm training for rescue$" + "work with my POKéMON."); + +static const u8 TrainerEyeDescription_50[] = _( + "I attack in waves.$" + "Different types$" + "Those who destroy nature$" + "must never be forgiven!"); + +static const u8 TrainerEyeDescription_51[] = _( + "I'll show you some guts!$" + "Cute POKéMON are my faves!$" + "After a battle, I always$" + "bathe with my POKéMON."); + +static const u8 TrainerEyeDescription_52[] = _( + "Lightning-fast attack!$" + "BUG POKéMON are number 1!$" + "If you want to catch BUG$" + "POKéMON, wake up early."); + +static const u8 TrainerEyeDescription_53[] = _( + "I battle with power.$" + "Hard-bodied POKéMON$" + "I've been planning a month$" + "for today's hike."); + +static const u8 TrainerEyeDescription_54[] = _( + "Lovey-dovey strategy!$" + "Lovey-dovey POKéMON!$" + "We're lovey-dovey!$" + "Forever lovey-dovey!"); + +static const u8 TrainerEyeDescription_55[] = _( + "We let it all hang out.$" + "The 1st POKéMON I caught.$" + "POKéMON and I have grown$" + "stronger together."); + +static const u8 TrainerEyeDescription_56[] = _( + "ROCK-type power attack$" + "Rock-solid types are good.$" + "Through battling, I want to$" + "learn all about POKéMON."); + +static const u8 TrainerEyeDescription_57[] = _( + "Direct physical action!$" + "FIGHTING POKéMON rule!$" + "The world awaits me as the$" + "next big wave!"); + +static const u8 TrainerEyeDescription_58[] = _( + "I choose to electrify.$" + "Get shocked by electricity!$" + "Wahahahaha! The secret to$" + "health is laughter!"); + +static const u8 TrainerEyeDescription_59[] = _( + "Battle aggressively.$" + "Burn with passion!$" + "Wash away daily fatigue in$" + "hot springs completely!"); + +static const u8 TrainerEyeDescription_60[] = _( + "I flexibly adapt my style.$" + "Grown in a balanced manner.$" + "POKéMON are my life.$" + "My chosen path is harsh..."); + +static const u8 TrainerEyeDescription_61[] = _( + "I take advantage of speed.$" + "Graceful sky dancers$" + "I can see the ebb and flow$" + "of the winds."); + +static const u8 TrainerEyeDescription_62[] = _( + "We battle in cooperation.$" + "Always friendly POKéMON.$" + "We understand each other,$" + "and we understand others."); + +static const u8 TrainerEyeDescription_63[] = _( + "Dignity and respect$" + "I prefer POKéMON of grace.$" + "Aquatic illusions best suit$" + "my distinctive elegance."); + +static const u8 TrainerEyeDescription_64[] = _( + "Offense over defense$" + "The DARK side's beauties$" + "You can talk all you want -$" + "might is right!"); + +static const u8 TrainerEyeDescription_65[] = _( + "Confuse and confound$" + "There's nothing definite.$" + "I wonder how my grandma at$" + "MT. PYRE is doing?"); + +static const u8 TrainerEyeDescription_66[] = _( + "I use items for help.$" + "Flaming passion in icy cold!$" + "The ICE type can be better$" + "trained in this hot land."); + +static const u8 TrainerEyeDescription_67[] = _( + "Harness strong abilities.$" + "The raw power of DRAGONS!$" + "I live to battle every day$" + "to learn about POKéMON."); + +static const u8 TrainerEyeDescription_68[] = _( + "Pick on the foe's weakness.$" + "The ultimate STEEL POKéMON$" + "When it comes down to it,$" + "I'm still the strongest!"); + +const u8 *const gTrainerEyeDescriptions[] = +{ + TrainerEyeDescription_0, + TrainerEyeDescription_1, + TrainerEyeDescription_2, + TrainerEyeDescription_3, + TrainerEyeDescription_4, + TrainerEyeDescription_5, + TrainerEyeDescription_6, + TrainerEyeDescription_7, + TrainerEyeDescription_8, + TrainerEyeDescription_9, + TrainerEyeDescription_10, + TrainerEyeDescription_11, + TrainerEyeDescription_12, + TrainerEyeDescription_13, + TrainerEyeDescription_14, + TrainerEyeDescription_15, + TrainerEyeDescription_16, + TrainerEyeDescription_17, + TrainerEyeDescription_18, + TrainerEyeDescription_19, + TrainerEyeDescription_20, + TrainerEyeDescription_21, + TrainerEyeDescription_22, + TrainerEyeDescription_23, + TrainerEyeDescription_24, + TrainerEyeDescription_25, + TrainerEyeDescription_26, + TrainerEyeDescription_27, + TrainerEyeDescription_28, + TrainerEyeDescription_29, + TrainerEyeDescription_30, + TrainerEyeDescription_31, + TrainerEyeDescription_32, + TrainerEyeDescription_33, + TrainerEyeDescription_34, + TrainerEyeDescription_35, + TrainerEyeDescription_36, + TrainerEyeDescription_37, + TrainerEyeDescription_38, + TrainerEyeDescription_39, + TrainerEyeDescription_40, + TrainerEyeDescription_41, + TrainerEyeDescription_42, + TrainerEyeDescription_43, + TrainerEyeDescription_44, + TrainerEyeDescription_45, + TrainerEyeDescription_46, + TrainerEyeDescription_47, + TrainerEyeDescription_48, + TrainerEyeDescription_49, + TrainerEyeDescription_50, + TrainerEyeDescription_51, + TrainerEyeDescription_52, + TrainerEyeDescription_53, + TrainerEyeDescription_54, + TrainerEyeDescription_55, + TrainerEyeDescription_56, + TrainerEyeDescription_57, + TrainerEyeDescription_58, + TrainerEyeDescription_59, + TrainerEyeDescription_60, + TrainerEyeDescription_61, + TrainerEyeDescription_62, + TrainerEyeDescription_63, + TrainerEyeDescription_64, + TrainerEyeDescription_65, + TrainerEyeDescription_66, + TrainerEyeDescription_67, + TrainerEyeDescription_68, +}; diff --git a/src/pokenav_before.c b/src/pokenav_before.c index d2d88a1e1..3a1fddca2 100644 --- a/src/pokenav_before.c +++ b/src/pokenav_before.c @@ -154,9 +154,17 @@ const u8 gPokenavOutlinePalette[] = INCBIN_U8("graphics/pokenav/outline.gbapal") const u8 gPokenavOutlineTiles[] = INCBIN_U8("graphics/pokenav/outline.4bpp.lz"); const u8 gPokenavOutlineTilemap[] = INCBIN_U8("graphics/pokenav/outline_map.bin.lz"); - - - +#include "data/region_map/city_map_tilemaps.h" + +#ifdef ENGLISH +#include "data/text/ribbon_descriptions_en.h" +#include "data/text/gift_ribbon_descriptions_en.h" +#include "data/text/trainer_eye_descriptions_en.h" +#elif GERMAN +#include "data/text/ribbon_descriptions_de.h" +#include "data/text/gift_ribbon_descriptions_de.h" +#include "data/text/trainer_eye_descriptions_de.h" +#endif -- cgit v1.2.3 From dcac22cef97ff6b78e83f427d559d923e37c8029 Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 18 Jul 2019 21:57:19 -0400 Subject: finish pokenav data decomp --- data-de/text/gift_ribbon_descriptions.inc | 207 ------- data-de/text/ribbon_descriptions.inc | 84 --- data-de/text/trainer_eye_descriptions.inc | 417 ------------- data/pokenav.s | 947 ------------------------------ data/text/gift_ribbon_descriptions.inc | 207 ------- data/text/ribbon_descriptions.inc | 84 --- data/text/trainer_eye_descriptions.inc | 417 ------------- src/data/region_map/city_map_entries.h | 19 + src/pokenav_before.c | 928 +++++++++++++++++++++++++++++ 9 files changed, 947 insertions(+), 2363 deletions(-) delete mode 100644 data-de/text/gift_ribbon_descriptions.inc delete mode 100644 data-de/text/ribbon_descriptions.inc delete mode 100644 data-de/text/trainer_eye_descriptions.inc delete mode 100644 data/pokenav.s delete mode 100644 data/text/gift_ribbon_descriptions.inc delete mode 100644 data/text/ribbon_descriptions.inc delete mode 100644 data/text/trainer_eye_descriptions.inc create mode 100644 src/data/region_map/city_map_entries.h diff --git a/data-de/text/gift_ribbon_descriptions.inc b/data-de/text/gift_ribbon_descriptions.inc deleted file mode 100644 index 8cd5416e8..000000000 --- a/data-de/text/gift_ribbon_descriptions.inc +++ /dev/null @@ -1,207 +0,0 @@ -gGiftRibbonDescriptionPart1_2003RegionalTourney: - .string "REGIONALTURNIER 2003$" - -gGiftRibbonDescriptionPart2_Champion: - .string "BAND des CHAMPS$" - -gGiftRibbonDescriptionPart1_2003NationalTourney: - .string "NATIONALTURNIER 2003$" - -gGiftRibbonDescriptionPart1_2003GlobalCup: - .string "WELTPOKAL 2003$" - -gGiftRibbonDescriptionPart2_RunnerUp: - .string "BAND für Platzierungen$" - -gGiftRibbonDescriptionPart2_Semifinalist: - .string "BAND für Halbfinalisten$" - -gGiftRibbonDescriptionPart1_2004RegionalTourney: - .string "REGIONALTURNIER 2004$" - -gGiftRibbonDescriptionPart1_2004NationalTourney: - .string "NATIONALTURNIER 2004$" - -gGiftRibbonDescriptionPart1_2004GlobalCup: - .string "WELTPOKAL 2004$" - -gGiftRibbonDescriptionPart1_2005RegionalTourney: - .string "REGIONALTURNIER 2005$" - -gGiftRibbonDescriptionPart1_2005NationalTourney: - .string "NATIONALTURNIER 2005$" - -gGiftRibbonDescriptionPart1_2005GlobalCup: - .string "WELTPOKAL 2005$" - -gGiftRibbonDescriptionPart1_PokemonBattleCup: - .string "POKéMON-KAMPF-POKAL$" - -gGiftRibbonDescriptionPart2_Participation: - .string "Teilnehmer-BAND$" - -gGiftRibbonDescriptionPart1_PokemonLeague: - .string "POKéMON LIGA$" - -gGiftRibbonDescriptionPart1_AdvanceCup: - .string "TALENTPOKAL$" - -gGiftRibbonDescriptionPart1_PokemonTournament: - .string "POKéMON-Turnier$" - -gGiftRibbonDescriptionPart2_Participation2: - .string "Teilnehmer-BAND$" - -gGiftRibbonDescriptionPart1_PokemonEvent: - .string "POKéMON-Wettkampf$" - -gGiftRibbonDescriptionPart1_PokemonFestival: - .string "POKéMON-Festival$" - -gGiftRibbonDescriptionPart1_DifficultyClearing: - .string "Schw.-Grad-Abschl.$" - -gGiftRibbonDescriptionPart2_Commemorative: - .string "Gedenk-BAND$" - -gGiftRibbonDescriptionPart1_ClearingAllDifficulties: - .string "BAND für erf. Abschluss$" - -gGiftRibbonDescriptionPart2_ClearingAllDifficulties: - .string "aller Schwierigk.-Grade.$" - -gGiftRibbonDescriptionPart1_100StraightWin: - .string "100. Sieg in Folge$" - -gGiftRibbonDescriptionPart1_DarknessTower: - .string "APOKELIPSE-TURM fertig$" - -gGiftRibbonDescriptionPart1_RedTower: - .string "ROTER TURM fertig$" - -gGiftRibbonDescriptionPart1_BlackironTower: - .string "EISERNER TURM fertig$" - -gGiftRibbonDescriptionPart1_FinalTower: - .string "FINAL-TURM-Abschluss$" - -gGiftRibbonDescriptionPart1_LegendMaking: - .string "Legendäres$" - -gGiftRibbonDescriptionPart1_PokemonCenterTokyo: - .string "POKéMON-CENTER TOKIO$" - -gGiftRibbonDescriptionPart1_PokemonCenterOsaka: - .string "POKéMON-CENTER OSAKA$" - -gGiftRibbonDescriptionPart1_PokemonCenterNagoya: - .string "POKéMON-CENTER NAGOYA$" - -gGiftRibbonDescriptionPart1_PokemonCenterNY: - .string "POKéMON-CENTER N. Y.$" - -gGiftRibbonDescriptionPart1_SummerHolidays: - .string "Sommerferien-BAND$" - -gGiftRibbonDescriptionPart2_EmptyString: - .string "$" - -gGiftRibbonDescriptionPart1_WinterHolidays: - .string "Weihnachtsferien-BAND$" - -gGiftRibbonDescriptionPart1_SpringHolidays: - .string "Osterferien-BAND$" - -gGiftRibbonDescriptionPart1_Evergreen: - .string "Evergreen-BAND$" - -gGiftRibbonDescriptionPart1_SpecialHoliday: - .string "Sonderurlaubs-BAND$" - -gGiftRibbonDescriptionPart1_HardWorker: - .string "Fleiß-BAND$" - -gGiftRibbonDescriptionPart1_LotsOfFriends: - .string "Beliebtheits-BAND$" - -gGiftRibbonDescriptionPart1_FullOfEnergy: - .string "Energie-BAND$" - -gGiftRibbonDescriptionPart1_LovedPokemon: - .string "Ein Gedenk-BAND für ein$" - -gGiftRibbonDescriptionPart2_LovedPokemon: - .string "beliebtes POKéMON.$" - -gGiftRibbonDescriptionPart1_LoveForPokemon: - .string "Ein BAND für POKéMON-$" - -gGiftRibbonDescriptionPart2_LoveForPokemon: - .string "Freunde.$" - - .align 2 -gGiftRibbonDescriptions:: @ 83E158C - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_ClearingAllDifficulties, gGiftRibbonDescriptionPart2_ClearingAllDifficulties - .4byte gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon - .4byte gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon diff --git a/data-de/text/ribbon_descriptions.inc b/data-de/text/ribbon_descriptions.inc deleted file mode 100644 index 0450d8db5..000000000 --- a/data-de/text/ribbon_descriptions.inc +++ /dev/null @@ -1,84 +0,0 @@ -gRibbonDescriptionPart1_Champion: - .string "BAND für unschlagbare$" - -gRibbonDescriptionPart2_Champion: - .string "RUHMESHALLE-Mitglieder$" - -gRibbonDescriptionPart1_CoolContest: - .string "COOLNESS-WETTBEWERB$" - -gRibbonDescriptionPart1_BeautyContest: - .string "SCHÖNHEITSWETTBEWERB$" - -gRibbonDescriptionPart1_CuteContest: - .string "ANMUT-WETTBEWERB$" - -gRibbonDescriptionPart1_SmartContest: - .string "KLUGHEITSWETTBEWERB$" - -gRibbonDescriptionPart1_ToughContest: - .string "STÄRKE-WETTBEWERB$" - -gRibbonDescriptionPart2_NormalRank: - .string "Sieger in Normal-Klasse!$" - -gRibbonDescriptionPart2_SuperRank: - .string "Sieger in Super-Klasse!$" - -gRibbonDescriptionPart2_HyperRank: - .string "Sieger in Hyper-Klasse!$" - -gRibbonDescriptionPart2_MasterRank: - .string "Sieger in Master-Klasse!$" - -gRibbonDescriptionPart1_Winning: - .string "BAND für Lv. 50-Erfolg$" - -gRibbonDescriptionPart2_Winning: - .string "im DUELLTURM.$" - -gRibbonDescriptionPart1_Victory: - .string "Für Erfolg in Lv. 100$" - -gRibbonDescriptionPart2_Victory: - .string "im DUELLTURM.$" - -gRibbonDescriptionPart1_Artist: - .string "Band für auserwählte$" - -gRibbonDescriptionPart2_Artist: - .string "Porträt-Modelle.$" - -gRibbonDescriptionPart1_Effort: - .string "BAND für$" - -gRibbonDescriptionPart2_Effort: - .string "fleißige Arbeiter.$" - - .align 2 -gRibbonDescriptions:: @ 83E113C - .4byte gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning - .4byte gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory - .4byte gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist - .4byte gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort diff --git a/data-de/text/trainer_eye_descriptions.inc b/data-de/text/trainer_eye_descriptions.inc deleted file mode 100644 index 96d81f62d..000000000 --- a/data-de/text/trainer_eye_descriptions.inc +++ /dev/null @@ -1,417 +0,0 @@ -TrainerEyeDescription_0: - .string "Emotionen beruhigen.$" - .string "Duftende PFLANZEN-PKMN.$" - .string "Beruhigende Aromen reini-$" - .string "gen Körper und Geist.$" -TrainerEyeDescription_1: - .string "Durch Stärke überzeugen!$" - .string "Felsige GESTEINS-PKMN.$" - .string "Während des Studiums der$" - .string "Antike sehe ich die Welt.$" -TrainerEyeDescription_2: - .string "Ich strenge mich stets an!$" - .string "PKMN, die gut schwimmen.$" - .string "Ich würde gerne ohne den$" - .string "Reifen schwimmen können.$" -TrainerEyeDescription_3: - .string "Ich versuche einfach alles.$" - .string "WASSER-PKMN sind Kumpel.$" - .string "Ich kann schwimmen! Ich$" - .string "mag halt den Schwimmreifen!$" -TrainerEyeDescription_4: - .string "Wir teilen die Arbeit auf.$" - .string "Wir lieben freundliche PKMN.$" - .string "Wir teilen die Liebe zu den$" - .string "PKMN. Wir sind Geschwister!$" -TrainerEyeDescription_5: - .string "Schwächen erkennen.$" - .string "Gleichgewicht ist wichtig.$" - .string "Mein Ziel ist es, der$" - .string "PKMN-CHAMP zu werden.$" -TrainerEyeDescription_6: - .string "Den Gegner umwerfen.$" - .string "Der PKMN-Typ ist unwichtig.$" - .string "Ich bin der beste Schüler$" - .string "der PKMN TRAINERSCHULE.$" -TrainerEyeDescription_7: - .string "Langsames Niederringen.$" - .string "Nachts Furcht einflößend.$" - .string "Ich sehe Dinge, die den$" - .string "anderen verborgen sind...$" -TrainerEyeDescription_8: - .string "Alles, was zum Sieg führt.$" - .string "Hinreißende Wesen!$" - .string "Ich habe zu Hause einen$" - .string "Pool für meine PKMN.$" -TrainerEyeDescription_9: - .string "Ich bringe dich vom Weg ab.$" - .string "Niedlich, natürlich!$" - .string "Ich liebe die SAFARI-ZONE,$" - .string "dort werde ich bleiben.$" -TrainerEyeDescription_10: - .string "Wer braucht Strategie?!?$" - .string "Alle, die gut und teuer sind.$" - .string "Ich bin reich. Und daher$" - .string "besitze ich ein PKMN-Bett.$" -TrainerEyeDescription_11: - .string "Durch Stärke gewinnen!$" - .string "Habe sie nachts gefangen...$" - .string "Große, kräftige und zähe$" - .string "POKéMON sind die besten...$" -TrainerEyeDescription_12: - .string "Volle Pulle zuschlagen!$" - .string "Funky WASSER-PKMN!$" - .string "Wenn ich nicht schwimme,$" - .string "stemme ich Gewichte!$" -TrainerEyeDescription_13: - .string "Immer gewinnen!$" - .string "KAMPF-PKMN!$" - .string "Ohne zu prahlen: Ich kann$" - .string "10 Ziegel zerschmettern!$" -TrainerEyeDescription_14: - .string "Ich elektrisiere dich!$" - .string "Es sind ELEKTRO-PKMN.$" - .string "Ich bringe die Menschen mit$" - .string "meinen Liedern zum Weinen.$" -TrainerEyeDescription_15: - .string "Alles niederbrennen!$" - .string "Feuergefährliche POKéMON!$" - .string "Neben einem Lagerfeuer$" - .string "sollte stets Wasser stehen!$" -TrainerEyeDescription_16: - .string "Man muss hartnäckig sein.$" - .string "Jede Art von POKéMON.$" - .string "PKMN, die in der Wildnis auf-$" - .string "wachsen, werden stark!$" -TrainerEyeDescription_17: - .string "Unsere Liebe schlägt alles.$" - .string "Wir haben sie seit Jahren.$" - .string "In 50 Jahren Ehe waren$" - .string "wir den PKMN immer treu.$" -TrainerEyeDescription_18: - .string "Wellenförmiger Angriff!$" - .string "KÄFER-PKMN sind cool!$" - .string "Ich gehe jeden Tag in den$" - .string "Wald, KÄFER-PKMN fangen.$" -TrainerEyeDescription_19: - .string "Schwächen und verwirren!$" - .string "Solche mit irren Kräften.$" - .string "Ich kann deine Gedanken$" - .string "klar und deutlich lesen.$" -TrainerEyeDescription_20: - .string "Mit vollem Einsatz kämpfen.$" - .string "Geheimnisvolle POKéMON.$" - .string "Wenn ich spreche,$" - .string "setze ich Telepathie ein.$" -TrainerEyeDescription_21: - .string "Ruhig, gesammelt vorgehen.$" - .string "Ganz verschiedene PKMN.$" - .string "Wir genießen die tägliche$" - .string "Tasse Tee.$" -TrainerEyeDescription_22: - .string "Ich kämpfe mit Köpfchen.$" - .string "Ich liebe jedes PKMN.$" - .string "Schreibe ich gute Noten,$" - .string "gibt Papi mir Geld.$" -TrainerEyeDescription_23: - .string "Mein Wissen ist Macht!$" - .string "Jedes clevere PKMN.$" - .string "Ich will später ein großer$" - .string "PKMN-Forscher werden.$" -TrainerEyeDescription_24: - .string "Wir sprechen uns ab.$" - .string "PKMN, die wir beide mögen.$" - .string "Wir sind Senior und Junior$" - .string "im Studium der PKMN.$" -TrainerEyeDescription_25: - .string "Los geht's, meine Lieben!$" - .string "Ich mag sie alle!$" - .string "Auch beim Einkaufen lasse$" - .string "ich keinen Kampf aus!$" -TrainerEyeDescription_26: - .string "Ich kämpfe mit dem Herzen.$" - .string "PKMN, die Liebe erfahren!$" - .string "PKMN und Menschen müssen$" - .string "Vertrauen aufbauen!$" -TrainerEyeDescription_27: - .string "Ich durchschaue Gegner!$" - .string "Die Basis des Kampfes.$" - .string "Ich bin noch nicht bereit,$" - .string "Jüngeren Platz zu machen.$" -TrainerEyeDescription_28: - .string "Angriff als Verteidigung!$" - .string "KAMPF-PKMN!$" - .string "Ich bin alt und habe daher$" - .string "meinen eigenen Stil.$" -TrainerEyeDescription_29: - .string "Ich tue, was ich kann.$" - .string "Verschiedene Arten.$" - .string "Ich will irgendwann einen$" - .string "ARENALEITER besiegen!$" -TrainerEyeDescription_30: - .string "Geduld und Spucke.$" - .string "WASSER-PKMN!$" - .string "Niemand vor mir hat je$" - .string "etwas Größeres gefangen!$" -TrainerEyeDescription_31: - .string "Verteidigung ist die Basis.$" - .string "Kraftvolle PKMN!$" - .string "Dies war als Diät gedacht,$" - .string "jetzt ist es mein Hobby.$" -TrainerEyeDescription_32: - .string "Weiter, immer weiter!$" - .string "Die Stärke von STAHL...$" - .string "Wenn du schwitzt, musst du$" - .string "regelmäßig etwas trinken!$" -TrainerEyeDescription_33: - .string "Die Umgebung erforschen.$" - .string "WASSER-PKMN!$" - .string "Ich lasse mich nicht von$" - .string "Strandhäschen besiegen.$" -TrainerEyeDescription_34: - .string "Stets Offensive zeigen!$" - .string "Nur WASSER-PKMN...$" - .string "Ich muss jeden Tag$" - .string "10 Kilometer schwimmen.$" -TrainerEyeDescription_35: - .string "Geschwindigkeit ist alles!$" - .string "Ich liebe schnelle PKMN.$" - .string "Beim Marathon forderst du$" - .string "dich selbst heraus.$" -TrainerEyeDescription_36: - .string "Schneller als andere sein.$" - .string "Ein rasend schnelles PKMN!$" - .string "Rennt man rasend schnell,$" - .string "wird man eins mit dem Wind.$" -TrainerEyeDescription_37: - .string "Die Stärke der PKMN nutzen.$" - .string "Sieh die Macht der DRACHEN!$" - .string "Eines Tages werde ich zur$" - .string "Legende!!!$" -TrainerEyeDescription_38: - .string "Ich zeige dir die Technik!$" - .string "Elegant kreisende VÖGEL.$" - .string "Meine VOGEL-PKMN bringen$" - .string "dem Mädchen meine Liebe!$" -TrainerEyeDescription_39: - .string "Du wirst Gift schmecken!$" - .string "Giftige PKMN.$" - .string "Ich trainiere hart, um ein$" - .string "Ninja zu werden.$" -TrainerEyeDescription_40: - .string "Der Erstschlag siegt!$" - .string "Schnelle KAMPF-PKMN.$" - .string "Wenn mein PKMN verliert,$" - .string "kämpfe ich doch weiter.$" -TrainerEyeDescription_41: - .string "Los, los, meine PKMN!$" - .string "Ich mag alle PKMN.$" - .string "UV-Strahlen sind die Feinde$" - .string "der Haut. Creme dich ein!$" -TrainerEyeDescription_42: - .string "Keine Gnade!$" - .string "Niedliche WASSER-PKMN.$" - .string "Ich habe zu viele Fans, ich$" - .string "war nämlich im Fernsehen.$" -TrainerEyeDescription_43: - .string "Ich probiere dies und das.$" - .string "Ich liebe alle PKMN.$" - .string "Was liegt hinter diesem$" - .string "hohen Berg dort?$" -TrainerEyeDescription_44: - .string "Wir kämpfen zusammen!$" - .string "Wir trainieren zusammen!$" - .string "Wir lieben die gleichen PKMN$" - .string "und verschiedene Desserts.$" -TrainerEyeDescription_45: - .string "Ich setze Stärke ein.$" - .string "WASSER- und KAMPF-PKMN.$" - .string "Matrosen sind raue Typen!$" - .string "Irgendwelche Einwände?$" -TrainerEyeDescription_46: - .string "PKMN vor Schaden bewahren.$" - .string "Ich liebe seltene PKMN.$" - .string "Ich möchte seltene PKMN$" - .string "aus aller Welt sammeln.$" -TrainerEyeDescription_47: - .string "Meine Stärke...$" - .string "PKMN sind meine Kinder.$" - .string "Man benötigt Wissen und$" - .string "Liebe im Umgang mit PKMN.$" -TrainerEyeDescription_48: - .string "Angriff aus vollen Rohren!$" - .string "Jedes PKMN kommt in Frage.$" - .string "Ich gebe ihnen {POKEBLOCK}, um$" - .string "in WETTBEWERBEN zu siegen.$" -TrainerEyeDescription_49: - .string "Ich glaube an meine PKMN.$" - .string "Ich liebe starke PKMN.$" - .string "Ich bilde meine PKMN zu$" - .string "einem Rettungsteam aus.$" -TrainerEyeDescription_50: - .string "Ich greife in Etappen an.$" - .string "Verschiedene Arten.$" - .string "Umweltverschmutzern darf$" - .string "man niemals vergeben!$" -TrainerEyeDescription_51: - .string "Ich zeige meinen Mut.$" - .string "Ich liebe niedliche PKMN!$" - .string "Nach einem Kampf gehe ich$" - .string "mit meinen PKMN schwimmen.$" -TrainerEyeDescription_52: - .string "Blitzschnelle Attacken.$" - .string "KÄFER-PKMN sind das Beste!$" - .string "Um KÄFER-PKMN zu fangen,$" - .string "musst du früh aufstehen.$" -TrainerEyeDescription_53: - .string "Ich kämpfe mit Stärke.$" - .string "PKMN mit hartem Körper.$" - .string "Ich habe diese Wanderung$" - .string "einen Monat vorbereitet.$" -TrainerEyeDescription_54: - .string "Liebevolle Strategie!$" - .string "Liebevolle PKMN!$" - .string "Wir sind liebevoll!$" - .string "Immer liebevoll!$" -TrainerEyeDescription_55: - .string "Wir lassen alles raus.$" - .string "Das 1. PKMN, das ich fing.$" - .string "Die PKMN und ich sind$" - .string "zusammen gewachsen.$" -TrainerEyeDescription_56: - .string "Steinharte Attacken.$" - .string "Steinharte PKMN...$" - .string "Ich möchte durch Kämpfe$" - .string "alles über PKMN lernen.$" -TrainerEyeDescription_57: - .string "Direkte physische Attacke.$" - .string "Ich baue auf KAMPF-PKMN.$" - .string "Die Welt erwartet mich, als$" - .string "neuen, starken Kämpfer.$" -TrainerEyeDescription_58: - .string "Elektrisieren... Britzel...$" - .string "Elektrizität bestimmt alles.$" - .string "Hahahahaha! Lachen hält$" - .string "gesund und jung!$" -TrainerEyeDescription_59: - .string "Aggressiv kämpfen.$" - .string "Brennen vor Leidenschaft!$" - .string "Spül die tägliche Müdigkeit$" - .string "in den Heißen Quellen ab.$" -TrainerEyeDescription_60: - .string "Mein Stil ist flexibel.$" - .string "Gleichmäßig gewachsen.$" - .string "PKMN sind mein Leben. Mein$" - .string "Weg des Lebens ist steinig.$" -TrainerEyeDescription_61: - .string "Ich nutze die Initiative.$" - .string "Anmutige Himmelstänzer.$" - .string "Ich sehe das Auf und Ab$" - .string "der Winde.$" -TrainerEyeDescription_62: - .string "Wir kämpfen zusammen.$" - .string "Immer freundliche PKMN.$" - .string "Wir verstehen uns.$" - .string "Und wir verstehen andere.$" -TrainerEyeDescription_63: - .string "Würde und Respekt.$" - .string "Ich liebe anmutige PKMN.$" - .string "Wasserillusionen unter-$" - .string "streichen meinen Stil.$" -TrainerEyeDescription_64: - .string "Offensive vor Defensive.$" - .string "Das Schöne des UNLICHTS.$" - .string "Du kannst sagen, was du$" - .string "willst, Macht ist alles!$" -TrainerEyeDescription_65: - .string "Verwirrend verwirren.$" - .string "Keine besondere Vorliebe.$" - .string "Wie es wohl meiner Oma am$" - .string "PYROBERG geht?$" -TrainerEyeDescription_66: - .string "Ich setze Items ein.$" - .string "Flammendes Inferno in Eis.$" - .string "Der EIS-Typ entwickelt$" - .string "sich gut an warmen Orten.$" -TrainerEyeDescription_67: - .string "Starke Fähigkeiten nutzen.$" - .string "Die rohe Kraft der DRACHEN.$" - .string "Beim täglichen Kampf lerne$" - .string "ich alles über PKMN.$" -TrainerEyeDescription_68: - .string "Die gegn. Schwäche nutzen.$" - .string "Das ultimative STAHL-PKMN.$" - .string "Wenn es drauf ankommt,$" - .string "bin ich am stärksten!$" - - .align 2 -gTrainerEyeDescriptions:: @ 83E309C - .4byte TrainerEyeDescription_0 - .4byte TrainerEyeDescription_1 - .4byte TrainerEyeDescription_2 - .4byte TrainerEyeDescription_3 - .4byte TrainerEyeDescription_4 - .4byte TrainerEyeDescription_5 - .4byte TrainerEyeDescription_6 - .4byte TrainerEyeDescription_7 - .4byte TrainerEyeDescription_8 - .4byte TrainerEyeDescription_9 - .4byte TrainerEyeDescription_10 - .4byte TrainerEyeDescription_11 - .4byte TrainerEyeDescription_12 - .4byte TrainerEyeDescription_13 - .4byte TrainerEyeDescription_14 - .4byte TrainerEyeDescription_15 - .4byte TrainerEyeDescription_16 - .4byte TrainerEyeDescription_17 - .4byte TrainerEyeDescription_18 - .4byte TrainerEyeDescription_19 - .4byte TrainerEyeDescription_20 - .4byte TrainerEyeDescription_21 - .4byte TrainerEyeDescription_22 - .4byte TrainerEyeDescription_23 - .4byte TrainerEyeDescription_24 - .4byte TrainerEyeDescription_25 - .4byte TrainerEyeDescription_26 - .4byte TrainerEyeDescription_27 - .4byte TrainerEyeDescription_28 - .4byte TrainerEyeDescription_29 - .4byte TrainerEyeDescription_30 - .4byte TrainerEyeDescription_31 - .4byte TrainerEyeDescription_32 - .4byte TrainerEyeDescription_33 - .4byte TrainerEyeDescription_34 - .4byte TrainerEyeDescription_35 - .4byte TrainerEyeDescription_36 - .4byte TrainerEyeDescription_37 - .4byte TrainerEyeDescription_38 - .4byte TrainerEyeDescription_39 - .4byte TrainerEyeDescription_40 - .4byte TrainerEyeDescription_41 - .4byte TrainerEyeDescription_42 - .4byte TrainerEyeDescription_43 - .4byte TrainerEyeDescription_44 - .4byte TrainerEyeDescription_45 - .4byte TrainerEyeDescription_46 - .4byte TrainerEyeDescription_47 - .4byte TrainerEyeDescription_48 - .4byte TrainerEyeDescription_49 - .4byte TrainerEyeDescription_50 - .4byte TrainerEyeDescription_51 - .4byte TrainerEyeDescription_52 - .4byte TrainerEyeDescription_53 - .4byte TrainerEyeDescription_54 - .4byte TrainerEyeDescription_55 - .4byte TrainerEyeDescription_56 - .4byte TrainerEyeDescription_57 - .4byte TrainerEyeDescription_58 - .4byte TrainerEyeDescription_59 - .4byte TrainerEyeDescription_60 - .4byte TrainerEyeDescription_61 - .4byte TrainerEyeDescription_62 - .4byte TrainerEyeDescription_63 - .4byte TrainerEyeDescription_64 - .4byte TrainerEyeDescription_65 - .4byte TrainerEyeDescription_66 - .4byte TrainerEyeDescription_67 - .4byte TrainerEyeDescription_68 diff --git a/data/pokenav.s b/data/pokenav.s deleted file mode 100644 index 006d49eaf..000000000 --- a/data/pokenav.s +++ /dev/null @@ -1,947 +0,0 @@ - .include "include/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - - - - - - - .align 2 -gUnknown_083E31B0:: @ 83E31B0 - .4byte PCText_CheckMap - .4byte PCText_CheckPoke - .4byte PCText_CheckTrainer - .4byte PCText_CheckRibbons - .4byte PCText_PutAwayNav - .4byte PCText_NoRibbonWin - .4byte PCText_NoTrainers - - .align 2 -gUnknown_083E31CC:: @ 83E31CC - .4byte PCText_CheckParty - .4byte PCText_CheckPokeAll - .4byte PCText_ReturnToNav - - .align 2 -gUnknown_083E31D8:: @ 83E31D8 - .4byte PCText_FindCool - .4byte PCText_FindBeauty - .4byte PCText_FindCute - .4byte PCText_FindSmart - .4byte PCText_FindTough - .4byte PCText_ReturnToCondition - - .align 2 -gPokenavCityMaps:: @ 83E31F0 - .4byte gPokenavCityMap_Littleroot_0, NULL - .4byte gPokenavCityMap_Oldale_0, NULL - .4byte gPokenavCityMap_Dewford_0, NULL - .4byte gPokenavCityMap_Lavaridge_0, NULL - .4byte gPokenavCityMap_Fallarbor_0, NULL - .4byte gPokenavCityMap_Verdanturf_0, NULL - .4byte gPokenavCityMap_Pacifidlog_0, NULL - .4byte gPokenavCityMap_Petalburg_0, NULL - .4byte gPokenavCityMap_Slateport_0, gPokenavCityMap_Slateport_1 - .4byte gPokenavCityMap_Mauville_0, gPokenavCityMap_Mauville_1 - .4byte gPokenavCityMap_Rustboro_0, gPokenavCityMap_Rustboro_1 - .4byte gPokenavCityMap_Fortree_0, NULL - .4byte gPokenavCityMap_Lilycove_0, gPokenavCityMap_Lilycove_1 - .4byte gPokenavCityMap_Mossdeep_0, gPokenavCityMap_Mossdeep_1 - .4byte gPokenavCityMap_Sootopolis_0, NULL - .4byte gPokenavCityMap_EverGrande_0, gPokenavCityMap_EverGrande_1 - - .align 2 -gUnknown_083E3270:: @ 83E3270 - .4byte sub_80F0A24 - .4byte sub_80F0A24 - .4byte sub_80F0A74 - - .align 2 -gPokenavIconPalette:: - .incbin "graphics/pokenav/icon.gbapal" - - .align 2 -gUnknown_083E329C:: @ 83E329C - .incbin "graphics/pokenav/icon.4bpp.lz" - - .align 2 -gPokenavPokeballTiles:: - .incbin "graphics/pokenav/pokeball.4bpp" - - .align 2 -gUnknown_083E3780: @ 83E3780 - .incbin "graphics/pokenav/83E3780.4bpp" - - .align 2 -gPokenavSparkle_Pal:: - .incbin "graphics/pokenav/sparkle.gbapal" - - .align 2 -gPokenavSparkle_Gfx:: - .incbin "graphics/pokenav/sparkle.4bpp" - - .align 2 -gPokenavUpDownArrows_Gfx:: - .incbin "graphics/pokenav/arrows.4bpp" - - .align 2 -gUnknown_083E3BC0:: @ 83E3BC0 - .incbin "graphics/pokenav/83E3BC0.bin" - - .align 2 -gTiles_083E3BE0:: - .incbin "graphics/unknown/unknown_3E3BE0.4bpp" - - .align 2 -gUnknown_083E3C60:: @ 83E3C60 - .incbin "graphics/misc/ribbons_cool.gbapal" - .incbin "graphics/misc/ribbons_beauty.gbapal" - .incbin "graphics/misc/ribbons_cute.gbapal" - .incbin "graphics/misc/ribbons_smart.gbapal" - .incbin "graphics/misc/ribbons_tough.gbapal" - - .align 2 -gUnknown_083E3D00:: @ 83E3D00 - .incbin "graphics/misc/ribbons_full.4bpp.lz" - - .align 2 -PokenavBlueLightPalette: - .incbin "graphics/pokenav/blue_light.gbapal" - - .align 2 -PokenavBlueLightTiles: - .incbin "graphics/pokenav/blue_light.4bpp" - - .align 2 -Palette_3E42D8: @ 83E42D8 - .incbin "graphics/pokenav/83E42D8.gbapal" - - .align 1 -gUnknown_083E42F8:: @ 83E42F8 - .2byte 0x408 - .2byte 0x408 - .2byte 0x507 - .2byte 0x507 - .2byte 0x606 - .2byte 0x606 - .2byte 0x805 - .2byte 0x805 - .2byte 0xA04 - .2byte 0xA04 - .2byte 0xC03 - .2byte 0xC03 - .2byte 0xE02 - .2byte 0xE02 - .2byte 0x1000 - .2byte 0x1000 - - .align 2 -gOamData_83E4318:: @ 83E4318 - .2byte 0x4000 - .2byte 0x8000 - .2byte 0x0400 - - .align 2 -gSpriteAnim_83E4320:: @ 83E4320 - obj_image_anim_frame 0, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4328:: @ 83E4328 - obj_image_anim_frame 8, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4330:: @ 83E4330 - obj_image_anim_frame 16, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4338:: @ 83E4338 - obj_image_anim_frame 24, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4340:: @ 83E4340 - obj_image_anim_frame 32, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4348:: @ 83E4348 - obj_image_anim_frame 40, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4350:: @ 83E4350 - obj_image_anim_frame 48, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4358:: @ 83E4358 - obj_image_anim_frame 56, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4360:: @ 83E4360 - obj_image_anim_frame 64, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4368:: @ 83E4368 - obj_image_anim_frame 72, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4370:: @ 83E4370 - obj_image_anim_frame 80, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4378:: @ 83E4378 - obj_image_anim_frame 88, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4380:: @ 83E4380 - obj_image_anim_frame 96, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4388:: @ 83E4388 - obj_image_anim_frame 104, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4390:: @ 83E4390 - obj_image_anim_frame 112, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4398:: @ 83E4398 - obj_image_anim_frame 120, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43A0:: @ 83E43A0 - obj_image_anim_frame 128, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43A8:: @ 83E43A8 - obj_image_anim_frame 136, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43B0:: @ 83E43B0 - obj_image_anim_frame 144, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43B8:: @ 83E43B8 - obj_image_anim_frame 152, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43C0:: @ 83E43C0 - obj_image_anim_frame 160, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43C8:: @ 83E43C8 - obj_image_anim_frame 168, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43D0:: @ 83E43D0 - obj_image_anim_frame 176, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E43D8:: @ 83E43D8 - obj_image_anim_frame 184, 5 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_83E43E0:: @ 83E43E0 - .4byte gSpriteAnim_83E4320 - .4byte gSpriteAnim_83E4328 - .4byte gSpriteAnim_83E4330 - .4byte gSpriteAnim_83E4338 - .4byte gSpriteAnim_83E4340 - .4byte gSpriteAnim_83E4348 - .4byte gSpriteAnim_83E4350 - .4byte gSpriteAnim_83E4358 - .4byte gSpriteAnim_83E4360 - .4byte gSpriteAnim_83E4368 - .4byte gSpriteAnim_83E4370 - .4byte gSpriteAnim_83E4378 - .4byte gSpriteAnim_83E4380 - .4byte gSpriteAnim_83E4388 - .4byte gSpriteAnim_83E4390 - .4byte gSpriteAnim_83E4398 - .4byte gSpriteAnim_83E43A0 - .4byte gSpriteAnim_83E43A8 - .4byte gSpriteAnim_83E43B0 - .4byte gSpriteAnim_83E43B8 - .4byte gSpriteAnim_83E43C0 - .4byte gSpriteAnim_83E43C8 - .4byte gSpriteAnim_83E43D0 - .4byte gSpriteAnim_83E43D8 - - .align 2 -gSpriteAffineAnim_83E4440:: @ 83E4440 - obj_rot_scal_anim_frame 0x10, 0x10, 0, 16 - obj_rot_scal_anim_end - - .align 2 -gSpriteAffineAnimTable_83E4450:: @ 83E4450 - .4byte gSpriteAffineAnim_83E4440 - - .align 2 -gSpriteTemplate_83E4454:: @ 83E4454 - spr_template 0, 0, gOamData_83E4318, gSpriteAnimTable_83E43E0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - - .align 2 -gSpriteSheet_PokenavBlueLight:: @ 83E446C - obj_tiles PokenavBlueLightTiles, 0x100, 25 - - .align 2 -gSpritePalette_PokenavBlueLight:: @ 83E4474 - obj_pal PokenavBlueLightPalette, 17 - - .align 2 -gOamData_83E447C:: @ 83E447C - .2byte 0x4000 - .2byte 0x8000 - .2byte 0x0400 - - .align 2 -gSpriteTemplate_83E4484:: @ 83E4484 - spr_template 25, 17, gOamData_83E447C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80F2654 - -gUnknown_083E449C:: @ 83E449C - obj_pal gPokenavMenuOptions3_Pal, 2 - obj_pal gPokenavCondition5_Pal, 3 - obj_pal 0x0, 0 - - .align 2 -gOamData_83E44B4:: @ 83E44B4 - .2byte 0x4000 - .2byte 0xC000 - .2byte 0x0400 - - .align 2 -gSpriteAnim_83E44BC:: @ 83E44BC - obj_image_anim_frame 0, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E44C4:: @ 83E44C4 - obj_image_anim_frame 32, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E44CC:: @ 83E44CC - obj_image_anim_frame 64, 5 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_83E44D4:: @ 83E44D4 - .4byte gSpriteAnim_83E44BC - .4byte gSpriteAnim_83E44C4 - .4byte gSpriteAnim_83E44CC - - .align 2 -gSpriteTemplate_83E44E0:: @ 83E44E0 - spr_template 1, 2, gOamData_83E44B4, gSpriteAnimTable_83E44D4, NULL, gDummySpriteAffineAnimTable, sub_80F2BBC - - .align 2 -gSpriteTemplate_83E44F8:: @ 83E44F8 - spr_template 1, 3, gOamData_83E44B4, gSpriteAnimTable_83E44D4, NULL, gDummySpriteAffineAnimTable, sub_80F2BBC - - .align 2 -gOamData_83E4510:: @ 83E4510 - .2byte 0x4000 - .2byte 0x8000 - .2byte 0x0400 - - .align 2 -gSpriteAnim_83E4518:: @ 83E4518 - obj_image_anim_frame 0, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4520:: @ 83E4520 - obj_image_anim_frame 8, 5 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_83E4528:: @ 83E4528 - .4byte gSpriteAnim_83E4518 - .4byte gSpriteAnim_83E4520 - - .align 2 -gSpriteTemplate_83E4530:: @ 83E4530 - spr_template 2, 2, gOamData_83E4510, gSpriteAnimTable_83E4528, NULL, gDummySpriteAffineAnimTable, sub_80F2BBC - - .align 2 -gSpriteTemplate_83E4548:: @ 83E4548 - spr_template 2, 3, gOamData_83E4510, gSpriteAnimTable_83E4528, NULL, gDummySpriteAffineAnimTable, sub_80F2BBC - - .align 2 -gOamData_83E4560:: @ 83E4560 - .2byte 0x0000 - .2byte 0xC000 - .2byte 0x0400 - - .align 2 -gUnknown_083E4568:: @ 83E4568 - obj_tiles NULL, 0x800, 6 - - .align 2 -gSpriteTemplate_83E4570:: @ 83E4570 - spr_template 6, 6, gOamData_83E4560, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80F2E00 - - .align 2 -gUnknown_083E4588:: @ 83E4588 - obj_pal NULL, 6 - - .align 2 -gUnknown_083E4590:: @ 83E4590 - obj_tiles gPokenavArrow_Gfx, 0x40, 9 - obj_tiles gPokenavUpDownArrows_Gfx, 0x80, 10 - null_obj_tiles - - .align 2 -gUnknown_083E45A8:: @ 83E45A8 - obj_pal gPokenavArrowsPalette, 9 - - .align 2 -gOamData_83E45B0:: @ 83E45B0 - .2byte 0x8000 - .2byte 0x0000 - .2byte 0x0800 - - .align 2 -gSpriteTemplate_83E45B8:: @ 83E45B8 - spr_template 9, 9, gOamData_83E45B0, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80F3190 - - .align 2 -gSpriteAnim_83E45D0:: @ 83E45D0 - obj_image_anim_frame 0, 3 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E45D8:: @ 83E45D8 - obj_image_anim_frame 2, 3 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_83E45E0:: @ 83E45E0 - .4byte gSpriteAnim_83E45D0 - .4byte gSpriteAnim_83E45D8 - - .align 2 -gOamData_83E45E8:: @ 83E45E8 - .2byte 0x4000 - .2byte 0x0000 - .2byte 0x0800 - - .align 2 -gSpriteTemplate_83E45F0:: @ 83E45F0 - spr_template 10, 9, gOamData_83E45E8, gSpriteAnimTable_83E45E0, NULL, gDummySpriteAffineAnimTable, sub_80F31AC - - .align 2 -gOamData_83E4608:: @ 83E4608 - .2byte 0x0000 - .2byte 0x4000 - .2byte 0x0800 - - .align 2 -gSpriteAnim_83E4610:: @ 83E4610 - obj_image_anim_frame 0, 5 - obj_image_anim_end - - .align 2 -gSpriteAnim_83E4618:: @ 83E4618 - obj_image_anim_frame 4, 5 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_83E4620:: @ 83E4620 - .4byte gSpriteAnim_83E4610 - .4byte gSpriteAnim_83E4618 - - .align 2 -gUnknown_083E4628:: @ 83E4628 - obj_tiles gPokenavPokeballTiles, 0x100, 3 - obj_tiles gUnknown_083E3780, 0x20, 4 - obj_tiles gPokenavConditionMenuCancel_Gfx, 0x100, 5 - null_obj_tiles - - .align 2 -gUnknown_083E4648:: @ 83E4648 - obj_pal gPokenavConditionPokeball_Pal, 4 - obj_pal gPokenavCondition4_Pal, 5 - .space 8 - - .align 2 -gSpriteTemplate_83E4660:: @ 83E4660 - spr_template 3, 4, gOamData_83E4608, gSpriteAnimTable_83E4620, NULL, gDummySpriteAffineAnimTable, sub_80F3328 - - .align 1 -gUnknown_083E4678:: @ 83E4678 - .incbin "graphics/pokenav/83E4678.gbapal" - - .align 2 -gPokenavRibbonsIconGfx:: @ 83E4698 - .2byte 0, 0 - .2byte 1, 0 - .2byte 2, 0 - .2byte 3, 0 - .2byte 4, 0 - .2byte 1, 1 - .2byte 2, 1 - .2byte 3, 1 - .2byte 4, 1 - .2byte 1, 2 - .2byte 2, 2 - .2byte 3, 2 - .2byte 4, 2 - .2byte 1, 3 - .2byte 2, 3 - .2byte 3, 3 - .2byte 4, 3 - .2byte 1, 4 - .2byte 2, 4 - .2byte 3, 4 - .2byte 4, 4 - .2byte 5, 0 - .2byte 6, 0 - .2byte 7, 1 - .2byte 8, 2 - .2byte 9, 1 - .2byte 9, 3 - .2byte 9, 4 - .2byte 10, 3 - .2byte 10, 4 - .2byte 11, 0 - .2byte 11, 1 - - .align 2 -gOamData_83E4718:: @ 83E4718 - .2byte 0x0100 - .2byte 0x8000 - .2byte 0x0000 - - .align 2 -gSpriteAffineAnim_83E4720:: @ 83E4720 - obj_rot_scal_anim_frame 0x80, 0x80, 0, 0 - obj_rot_scal_anim_end - - .align 2 -gSpriteAffineAnim_83E4730:: @ 83E4730 - obj_rot_scal_anim_frame 0x80, 0x80, 0, 0 - obj_rot_scal_anim_frame 0x20, 0x20, 0, 4 - obj_rot_scal_anim_end - - .align 2 -gSpriteAffineAnim_83E4748:: @ 83E4748 - obj_rot_scal_anim_frame 0x100, 0x100, 0, 0 - obj_rot_scal_anim_frame 0xFFE0, 0xFFE0, 0, 4 - obj_rot_scal_anim_end - - .align 2 -gSpriteAffineAnimTable_83E4760:: @ 83E4760 - .4byte gSpriteAffineAnim_83E4720 - .4byte gSpriteAffineAnim_83E4730 - .4byte gSpriteAffineAnim_83E4748 - - .align 2 -gSpriteTemplate_83E476C:: @ 83E476C - spr_template 11, 10, gOamData_83E4718, gDummySpriteAnimTable, NULL, gSpriteAffineAnimTable_83E4760, SpriteCallbackDummy - - .align 2 -gUnknown_083E4784:: @ 83E4784 - obj_tiles gPokenavSparkle_Gfx, 896, 0x0017 - - .align 2 -gUnknown_083E478C:: @ 83E478C - obj_pal gPokenavSparkle_Pal, 0x000f - - .align 2 -gUnknown_083E4794:: @ 83E4794 - .2byte 0, -35 - .2byte 20, -28 - .2byte 33, -10 - .2byte 33, 10 - .2byte 20, 28 - .2byte 0, 35 - .2byte -20, 28 - .2byte -33, 10 - .2byte -33, -10 - .2byte -20, -28 - - .align 2 -gOamData_83E47BC:: @ 83E47BC - .2byte 0x0000 - .2byte 0x4000 - .2byte 0x0000 - - .align 2 -gSpriteAnim_83E47C4:: @ 83E47C4 - obj_image_anim_frame 0, 5 - obj_image_anim_frame 4, 5 - obj_image_anim_frame 8, 5 - obj_image_anim_frame 12, 5 - obj_image_anim_frame 16, 5 - obj_image_anim_frame 20, 5 - obj_image_anim_frame 24, 5 - obj_image_anim_end - - .align 2 -gSpriteAnimTable_83E47E4:: @ 83E47E4 - .4byte gSpriteAnim_83E47C4 - .4byte gSpriteAnim_83E47C4 + 0x8 - .4byte gSpriteAnim_83E47C4 + 0x10 - .4byte gSpriteAnim_83E47C4 + 0x18 - - @ unused? - .4byte gSpriteAnim_83E47C4 + 0x20 - .4byte gSpriteAnim_83E47C4 + 0x28 - .4byte gSpriteAnim_83E47C4 + 0x30 - - .align 2 -gSpriteTemplate_83E4800:: @ 83E4800 - spr_template 23, 15, gOamData_83E47BC, gSpriteAnimTable_83E47E4, NULL, gDummySpriteAffineAnimTable, sub_80F3E9C - - .align 2 -gUnknown_083E4818:: @ 83E4818 - obj_pal gPokenavIconPalette, 16 - - .align 2 -gSpriteAnim_83E4820:: @ 83E4820 - obj_image_anim_frame 0, 12 - obj_image_anim_frame 16, 12 - obj_image_anim_frame 32, 12 - obj_image_anim_frame 48, 12 - obj_image_anim_frame 64, 12 - obj_image_anim_frame 80, 12 - obj_image_anim_frame 96, 12 - obj_image_anim_frame 112, 12 - obj_image_anim_jump 0 - - .align 2 -gSpriteAnimTable_83E4844:: @ 83E4844 - .4byte gSpriteAnim_83E4820 - - .align 2 -gOamData_83E4848:: @ 83E4848 - .2byte 0x0000 - .2byte 0x8000 - .2byte 0x0000 - - .align 2 -gSpriteTemplate_83E4850:: @ 83E4850 - spr_template 24, 16, gOamData_83E4848, gSpriteAnimTable_83E4844, NULL, gDummySpriteAffineAnimTable, sub_80F4138 - - .align 2 -gUnknown_083E4868:: @ 83E4868 - obj_pal Palette_3E42D8, 18 - - .align 2 -gOamData_83E4870:: @ 83E4870 - .2byte 0x4000 - .2byte 0x8000 - .2byte 0x0C00 - - .align 2 -gSpriteTemplate_83E4878:: @ 83E4878 - spr_template 26, 18, gOamData_83E4870, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy - -gUnknown_083E4890:: @ 83E4890 - .byte 4 - .byte 5 - .byte 6 - .byte 7 - .byte 8 - .byte 9 - .byte 9 - .byte 10 - .byte 10 - .byte 11 - .byte 11 - .byte 12 - .byte 12 - .byte 13 - .byte 13 - .byte 13 - .byte 13 - .byte 14 - .byte 14 - .byte 14 - .byte 14 - .byte 15 - .byte 15 - .byte 15 - .byte 15 - .byte 16 - .byte 16 - .byte 16 - .byte 16 - .byte 16 - .byte 16 - .byte 17 - .byte 17 - .byte 17 - .byte 17 - .byte 17 - .byte 17 - .byte 18 - .byte 18 - .byte 18 - .byte 18 - .byte 18 - .byte 18 - .byte 19 - .byte 19 - .byte 19 - .byte 19 - .byte 19 - .byte 19 - .byte 19 - .byte 19 - .byte 20 - .byte 20 - .byte 20 - .byte 20 - .byte 20 - .byte 20 - .byte 20 - .byte 20 - .byte 21 - .byte 21 - .byte 21 - .byte 21 - .byte 21 - .byte 21 - .byte 21 - .byte 21 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 22 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 23 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 24 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 25 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 26 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 27 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 28 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 29 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 30 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 31 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 32 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 33 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 34 - .byte 35 - - .align 2 -gUnknown_083E4990:: @ 83E4990 - .4byte REG_WIN0H - .4byte ((DMA_ENABLE | DMA_START_HBLANK | DMA_32BIT | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1 - .4byte 1 - - .align 1 -gUnknown_083E499C:: @ 83E499C - .2byte 0x43 - .2byte 0x32 - .2byte 0x33 - .2byte 0x34 - .2byte 0x35 - .2byte 0x36 - .2byte 0x44 - .2byte 0x45 - .2byte 0x46 - .2byte 0x47 - .2byte 0x48 - .2byte 0x49 - .2byte 0x4A - .2byte 0x4B - .2byte 0x4C - .2byte 0x4D - .2byte 0x4E diff --git a/data/text/gift_ribbon_descriptions.inc b/data/text/gift_ribbon_descriptions.inc deleted file mode 100644 index 798d291b9..000000000 --- a/data/text/gift_ribbon_descriptions.inc +++ /dev/null @@ -1,207 +0,0 @@ -gGiftRibbonDescriptionPart1_2003RegionalTourney: - .string "2003 REGIONAL TOURNEY$" - -gGiftRibbonDescriptionPart2_Champion: - .string "CHAMPION RIBBON$" - -gGiftRibbonDescriptionPart1_2003NationalTourney: - .string "2003 NATIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2003GlobalCup: - .string "2003 GLOBAL CUP$" - -gGiftRibbonDescriptionPart2_RunnerUp: - .string "Runner-up RIBBON$" - -gGiftRibbonDescriptionPart2_Semifinalist: - .string "Semifinalist RIBBON$" - -gGiftRibbonDescriptionPart1_2004RegionalTourney: - .string "2004 REGIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2004NationalTourney: - .string "2004 NATIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2004GlobalCup: - .string "2004 GLOBAL CUP$" - -gGiftRibbonDescriptionPart1_2005RegionalTourney: - .string "2005 REGIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2005NationalTourney: - .string "2005 NATIONAL TOURNEY$" - -gGiftRibbonDescriptionPart1_2005GlobalCup: - .string "2005 GLOBAL CUP$" - -gGiftRibbonDescriptionPart1_PokemonBattleCup: - .string "POKéMON BATTLE CUP$" - -gGiftRibbonDescriptionPart2_Participation: - .string "Participation RIBBON$" - -gGiftRibbonDescriptionPart1_PokemonLeague: - .string "POKéMON LEAGUE$" - -gGiftRibbonDescriptionPart1_AdvanceCup: - .string "ADVANCE CUP$" - -gGiftRibbonDescriptionPart1_PokemonTournament: - .string "POKéMON Tournament$" - -gGiftRibbonDescriptionPart2_Participation2: - .string "Participation RIBBON$" - -gGiftRibbonDescriptionPart1_PokemonEvent: - .string "POKéMON Event$" - -gGiftRibbonDescriptionPart1_PokemonFestival: - .string "POKéMON Festival$" - -gGiftRibbonDescriptionPart1_DifficultyClearing: - .string "Difficulty-clearing$" - -gGiftRibbonDescriptionPart2_Commemorative: - .string "Commemorative RIBBON$" - -gGiftRibbonDescriptionPart1_ClearingAllDifficulties: - .string "RIBBON awarded for$" - -gGiftRibbonDescriptionPart2_ClearingAllDifficulties: - .string "clearing all difficulties.$" - -gGiftRibbonDescriptionPart1_100StraightWin: - .string "100-straight Win$" - -gGiftRibbonDescriptionPart1_DarknessTower: - .string "DARKNESS TOWER Clear$" - -gGiftRibbonDescriptionPart1_RedTower: - .string "RED TOWER Clear$" - -gGiftRibbonDescriptionPart1_BlackironTower: - .string "BLACKIRON TOWER Clear$" - -gGiftRibbonDescriptionPart1_FinalTower: - .string "FINAL TOWER Clear$" - -gGiftRibbonDescriptionPart1_LegendMaking: - .string "Legend-making$" - -gGiftRibbonDescriptionPart1_PokemonCenterTokyo: - .string "POKéMON CENTER TOKYO$" - -gGiftRibbonDescriptionPart1_PokemonCenterOsaka: - .string "POKéMON CENTER OSAKA$" - -gGiftRibbonDescriptionPart1_PokemonCenterNagoya: - .string "POKéMON CENTER NAGOYA$" - -gGiftRibbonDescriptionPart1_PokemonCenterNY: - .string "POKéMON CENTER NY$" - -gGiftRibbonDescriptionPart1_SummerHolidays: - .string "Summer Holidays RIBBON$" - -gGiftRibbonDescriptionPart2_EmptyString: - .string "$" - -gGiftRibbonDescriptionPart1_WinterHolidays: - .string "Winter Holidays RIBBON$" - -gGiftRibbonDescriptionPart1_SpringHolidays: - .string "Spring Holidays RIBBON$" - -gGiftRibbonDescriptionPart1_Evergreen: - .string "Evergreen RIBBON$" - -gGiftRibbonDescriptionPart1_SpecialHoliday: - .string "Special Holiday RIBBON$" - -gGiftRibbonDescriptionPart1_HardWorker: - .string "Hard Worker RIBBON$" - -gGiftRibbonDescriptionPart1_LotsOfFriends: - .string "Lots of Friends RIBBON$" - -gGiftRibbonDescriptionPart1_FullOfEnergy: - .string "Full of Energy RIBBON$" - -gGiftRibbonDescriptionPart1_LovedPokemon: - .string "A commemorative RIBBON$" - -gGiftRibbonDescriptionPart2_LovedPokemon: - .string "for a loved POKéMON.$" - -gGiftRibbonDescriptionPart1_LoveForPokemon: - .string "RIBBON that shows$" - -gGiftRibbonDescriptionPart2_LoveForPokemon: - .string "love for POKéMON.$" - - .align 2 -gGiftRibbonDescriptions:: @ 83E158C - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2003RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2003NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2003GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2004RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2004GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_2005RegionalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005NationalTourney, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_2005GlobalCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonBattleCup, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_PokemonLeague, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Champion - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_RunnerUp - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Semifinalist - .4byte gGiftRibbonDescriptionPart1_AdvanceCup, gGiftRibbonDescriptionPart2_Participation - .4byte gGiftRibbonDescriptionPart1_PokemonTournament, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_PokemonEvent, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_PokemonFestival, gGiftRibbonDescriptionPart2_Participation2 - .4byte gGiftRibbonDescriptionPart1_DifficultyClearing, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_ClearingAllDifficulties, gGiftRibbonDescriptionPart2_ClearingAllDifficulties - .4byte gGiftRibbonDescriptionPart1_100StraightWin, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_DarknessTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_RedTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_BlackironTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_FinalTower, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_LegendMaking, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterTokyo, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterOsaka, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterNagoya, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_PokemonCenterNY, gGiftRibbonDescriptionPart2_Commemorative - .4byte gGiftRibbonDescriptionPart1_SummerHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_WinterHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_SpringHolidays, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_Evergreen, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_SpecialHoliday, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_HardWorker, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_LotsOfFriends, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_FullOfEnergy, gGiftRibbonDescriptionPart2_EmptyString - .4byte gGiftRibbonDescriptionPart1_LovedPokemon, gGiftRibbonDescriptionPart2_LovedPokemon - .4byte gGiftRibbonDescriptionPart1_LoveForPokemon, gGiftRibbonDescriptionPart2_LoveForPokemon diff --git a/data/text/ribbon_descriptions.inc b/data/text/ribbon_descriptions.inc deleted file mode 100644 index ebbfc34ff..000000000 --- a/data/text/ribbon_descriptions.inc +++ /dev/null @@ -1,84 +0,0 @@ -gRibbonDescriptionPart1_Champion: - .string "CHAMPION-beating, HALL$" - -gRibbonDescriptionPart2_Champion: - .string "OF FAME Member RIBBON$" - -gRibbonDescriptionPart1_CoolContest: - .string "COOL CONTEST$" - -gRibbonDescriptionPart1_BeautyContest: - .string "BEAUTY CONTEST$" - -gRibbonDescriptionPart1_CuteContest: - .string "CUTE CONTEST$" - -gRibbonDescriptionPart1_SmartContest: - .string "SMART CONTEST$" - -gRibbonDescriptionPart1_ToughContest: - .string "TOUGH CONTEST$" - -gRibbonDescriptionPart2_NormalRank: - .string "Normal Rank winner!$" - -gRibbonDescriptionPart2_SuperRank: - .string "Super Rank winner!$" - -gRibbonDescriptionPart2_HyperRank: - .string "Hyper Rank winner!$" - -gRibbonDescriptionPart2_MasterRank: - .string "Master Rank winner!$" - -gRibbonDescriptionPart1_Winning: - .string "RIBBON for clearing LV50$" - -gRibbonDescriptionPart2_Winning: - .string "at the BATTLE TOWER.$" - -gRibbonDescriptionPart1_Victory: - .string "Won for clearing LV100$" - -gRibbonDescriptionPart2_Victory: - .string "at the BATTLE TOWER.$" - -gRibbonDescriptionPart1_Artist: - .string "RIBBON for being chosen$" - -gRibbonDescriptionPart2_Artist: - .string "as a super sketch model.$" - -gRibbonDescriptionPart1_Effort: - .string "RIBBON awarded for$" - -gRibbonDescriptionPart2_Effort: - .string "being a hard worker.$" - - .align 2 -gRibbonDescriptions:: @ 83E113C - .4byte gRibbonDescriptionPart1_Champion, gRibbonDescriptionPart2_Champion - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_CoolContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_BeautyContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_CuteContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_SmartContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_NormalRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_SuperRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_HyperRank - .4byte gRibbonDescriptionPart1_ToughContest, gRibbonDescriptionPart2_MasterRank - .4byte gRibbonDescriptionPart1_Winning, gRibbonDescriptionPart2_Winning - .4byte gRibbonDescriptionPart1_Victory, gRibbonDescriptionPart2_Victory - .4byte gRibbonDescriptionPart1_Artist, gRibbonDescriptionPart2_Artist - .4byte gRibbonDescriptionPart1_Effort, gRibbonDescriptionPart2_Effort diff --git a/data/text/trainer_eye_descriptions.inc b/data/text/trainer_eye_descriptions.inc deleted file mode 100644 index 9e20ea8cc..000000000 --- a/data/text/trainer_eye_descriptions.inc +++ /dev/null @@ -1,417 +0,0 @@ -TrainerEyeDescription_0: - .string "Becalm fighting emotions.$" - .string "Fragrant GRASS POKéMON$" - .string "Soothing aromas make the$" - .string "body and mind healthy.$" -TrainerEyeDescription_1: - .string "Overwhelm with power!$" - .string "Craggy ROCK POKéMON$" - .string "In search of ancient lore,$" - .string "I travel the world.$" -TrainerEyeDescription_2: - .string "I'm going to try hard!$" - .string "Good swimmer POKéMON$" - .string "I wish I could swim without$" - .string "using an inner tube.$" -TrainerEyeDescription_3: - .string "I don't know. I'll try hard.$" - .string "WATER POKéMON are buddies.$" - .string "It's not like I can't swim.$" - .string "I just like my inner tube.$" -TrainerEyeDescription_4: - .string "We split our duties.$" - .string "We like friendly POKéMON.$" - .string "We enjoy POKéMON together$" - .string "as sister and brother.$" -TrainerEyeDescription_5: - .string "Exploit the foe's weakness.$" - .string "Balance is crucial.$" - .string "My goal is to become the$" - .string "POKéMON CHAMPION.$" -TrainerEyeDescription_6: - .string "Upset the opponent.$" - .string "Type doesn't matter.$" - .string "I'm a top student at the$" - .string "TRAINER'S SCHOOL.$" -TrainerEyeDescription_7: - .string "Slow, steady suffering$" - .string "Scary to meet at night.$" - .string "I see things that others$" - .string "can't see...$" -TrainerEyeDescription_8: - .string "Anything to win.$" - .string "Gorgeous type!$" - .string "I have a pool specially for$" - .string "my POKéMON at home.$" -TrainerEyeDescription_9: - .string "I'll lead you astray.$" - .string "Cute, of course.$" - .string "I love the SAFARI ZONE.$" - .string "I seem to end up there.$" -TrainerEyeDescription_10: - .string "Strategy? Who needs it?$" - .string "I spent big money on it!$" - .string "I, being rich, sleep in a$" - .string "custom POKéMON bed.$" -TrainerEyeDescription_11: - .string "Wrestle down with power.$" - .string "Took all night to catch...$" - .string "Big, burly, and buff$" - .string "POKéMON are the best...$" -TrainerEyeDescription_12: - .string "Ram at full speed!$" - .string "Funky WATER type!$" - .string "If I can't be out swimming,$" - .string "I'll be pumping weights.$" -TrainerEyeDescription_13: - .string "Grand slam pummeling!$" - .string "FIGHTING type$" - .string "Not to brag, but I can bust$" - .string "ten roof tiles!$" -TrainerEyeDescription_14: - .string "I'll electrify you!$" - .string "They're ELECTRIC!$" - .string "I want to make people cry$" - .string "with songs from my heart.$" -TrainerEyeDescription_15: - .string "Burn it all down!$" - .string "Burn-inducing POKéMON$" - .string "When you light a campfire,$" - .string "be sure there's some water.$" -TrainerEyeDescription_16: - .string "Hang in and be tenacious!$" - .string "I'll raise any POKéMON.$" - .string "POKéMON raised in the wild$" - .string "grow strong!$" -TrainerEyeDescription_17: - .string "Our love lets us prevail.$" - .string "We've had them for years.$" - .string "Married 50 years, we've$" - .string "devotedly raised POKéMON.$" -TrainerEyeDescription_18: - .string "Attack in waves!$" - .string "BUG POKéMON are cool.$" - .string "I go into the forest every$" - .string "day to catch BUG POKéMON.$" -TrainerEyeDescription_19: - .string "Daze and confuse!$" - .string "Ones with weird powers.$" - .string "I can see through exactly$" - .string "what you're thinking!$" -TrainerEyeDescription_20: - .string "Battle at full power.$" - .string "POKéMON of many mysteries$" - .string "When we spoke, I was really$" - .string "using telepathy.$" -TrainerEyeDescription_21: - .string "Calm and collected.$" - .string "POKéMON of distinction$" - .string "We enjoy a spot of tea$" - .string "every day. It's imported.$" -TrainerEyeDescription_22: - .string "I use my head to battle.$" - .string "I love any kind of POKéMON!$" - .string "My daddy gives me spending$" - .string "money if I ace a test.$" -TrainerEyeDescription_23: - .string "My knowledge rules!$" - .string "Any smart POKéMON!$" - .string "I want to be a POKéMON$" - .string "researcher in the future.$" -TrainerEyeDescription_24: - .string "We talk it over first.$" - .string "POKéMON that we both like.$" - .string "We're senior and junior$" - .string "students into POKéMON!$" -TrainerEyeDescription_25: - .string "Go for it, my dears!$" - .string "I have no likes or dislikes.$" - .string "While out shopping for$" - .string "supper, I battle too.$" -TrainerEyeDescription_26: - .string "I battle with love!$" - .string "A POKéMON raised with love!$" - .string "It's important to build$" - .string "trust with your POKéMON.$" -TrainerEyeDescription_27: - .string "I see through your moves!$" - .string "The essence of FIGHTING.$" - .string "I'm not ready to give way$" - .string "to the young yet!$" -TrainerEyeDescription_28: - .string "Attack while defending$" - .string "The FIGHTING type$" - .string "Being old, I have my own$" - .string "style of battling.$" -TrainerEyeDescription_29: - .string "I do what I can.$" - .string "I use different types.$" - .string "I'm going to keep working$" - .string "until I beat a GYM LEADER.$" -TrainerEyeDescription_30: - .string "I battle patiently.$" - .string "WATER POKéMON to battle!$" - .string "I'm the world's only guy to$" - .string "catch a huge POKéMON!$" -TrainerEyeDescription_31: - .string "Defense is crucial.$" - .string "My POKéMON is solid.$" - .string "I started this for dieting,$" - .string "but I got right into it.$" -TrainerEyeDescription_32: - .string "Push and push again!$" - .string "The strength of STEEL$" - .string "If you're sweating, get$" - .string "fluids into you regularly.$" -TrainerEyeDescription_33: - .string "Exploit the environment!$" - .string "All hail the WATER type!$" - .string "I won't be beaten by some$" - .string "beach bum SWIMMER!$" -TrainerEyeDescription_34: - .string "All-out offensive!$" - .string "WATER POKéMON rule!$" - .string "I must swim over 6 miles$" - .string "every day.$" -TrainerEyeDescription_35: - .string "Speed above all!$" - .string "I use a speedy POKéMON.$" - .string "A marathon is a challenge$" - .string "against your own self.$" -TrainerEyeDescription_36: - .string "Strike before stricken!$" - .string "A fast-running POKéMON!$" - .string "If you ran and ran, you'd$" - .string "become one with the wind.$" -TrainerEyeDescription_37: - .string "It's about POKéMON power!$" - .string "See the power of DRAGONS!$" - .string "I'll become legendary as the$" - .string "strongest one day!$" -TrainerEyeDescription_38: - .string "I'll show you my technique!$" - .string "Elegantly wheeling BIRDS$" - .string "My BIRD POKéMON, deliver my$" - .string "love to that girl!$" -TrainerEyeDescription_39: - .string "You'll suffer from poison!$" - .string "Poisonous POKéMON$" - .string "I undertake training so$" - .string "that I may become a ninja.$" -TrainerEyeDescription_40: - .string "The first strike wins!$" - .string "Speedy FIGHTING type$" - .string "If my POKéMON lose,$" - .string "I'll carry on the fight!$" -TrainerEyeDescription_41: - .string "Go, go, my POKéMON!$" - .string "I'll raise anything.$" - .string "UV rays are your skin's$" - .string "enemy. Get protected.$" -TrainerEyeDescription_42: - .string "No mercy!$" - .string "Cute WATER POKéMON$" - .string "I have too many fans.$" - .string "I was interviewed on TV.$" -TrainerEyeDescription_43: - .string "I think about this & that.$" - .string "I like all POKéMON.$" - .string "What lies beyond that$" - .string "yonder hill?$" -TrainerEyeDescription_44: - .string "We battle together!$" - .string "We train together!$" - .string "We like the same POKéMON,$" - .string "but different desserts.$" -TrainerEyeDescription_45: - .string "I force things with power!$" - .string "WATER and FIGHTING types$" - .string "Seamen are rough spirits!$" - .string "Any complaints?$" -TrainerEyeDescription_46: - .string "Protect POKéMON from harm.$" - .string "I love rare POKéMON.$" - .string "I want to collect all the$" - .string "world's rare POKéMON.$" -TrainerEyeDescription_47: - .string "I count on power.$" - .string "POKéMON are my children.$" - .string "It takes knowledge and$" - .string "love to raise POKéMON.$" -TrainerEyeDescription_48: - .string "Full-on attack!$" - .string "Anything. I'll raise it.$" - .string "I give them {POKEBLOCK}S for$" - .string "going after CONTEST titles.$" -TrainerEyeDescription_49: - .string "I believe in my POKéMON.$" - .string "I like strong POKéMON.$" - .string "I'm training for rescue$" - .string "work with my POKéMON.$" -TrainerEyeDescription_50: - .string "I attack in waves.$" - .string "Different types$" - .string "Those who destroy nature$" - .string "must never be forgiven!$" -TrainerEyeDescription_51: - .string "I'll show you some guts!$" - .string "Cute POKéMON are my faves!$" - .string "After a battle, I always$" - .string "bathe with my POKéMON.$" -TrainerEyeDescription_52: - .string "Lightning-fast attack!$" - .string "BUG POKéMON are number 1!$" - .string "If you want to catch BUG$" - .string "POKéMON, wake up early.$" -TrainerEyeDescription_53: - .string "I battle with power.$" - .string "Hard-bodied POKéMON$" - .string "I've been planning a month$" - .string "for today's hike.$" -TrainerEyeDescription_54: - .string "Lovey-dovey strategy!$" - .string "Lovey-dovey POKéMON!$" - .string "We're lovey-dovey!$" - .string "Forever lovey-dovey!$" -TrainerEyeDescription_55: - .string "We let it all hang out.$" - .string "The 1st POKéMON I caught.$" - .string "POKéMON and I have grown$" - .string "stronger together.$" -TrainerEyeDescription_56: - .string "ROCK-type power attack$" - .string "Rock-solid types are good.$" - .string "Through battling, I want to$" - .string "learn all about POKéMON.$" -TrainerEyeDescription_57: - .string "Direct physical action!$" - .string "FIGHTING POKéMON rule!$" - .string "The world awaits me as the$" - .string "next big wave!$" -TrainerEyeDescription_58: - .string "I choose to electrify.$" - .string "Get shocked by electricity!$" - .string "Wahahahaha! The secret to$" - .string "health is laughter!$" -TrainerEyeDescription_59: - .string "Battle aggressively.$" - .string "Burn with passion!$" - .string "Wash away daily fatigue in$" - .string "hot springs completely!$" -TrainerEyeDescription_60: - .string "I flexibly adapt my style.$" - .string "Grown in a balanced manner.$" - .string "POKéMON are my life.$" - .string "My chosen path is harsh...$" -TrainerEyeDescription_61: - .string "I take advantage of speed.$" - .string "Graceful sky dancers$" - .string "I can see the ebb and flow$" - .string "of the winds.$" -TrainerEyeDescription_62: - .string "We battle in cooperation.$" - .string "Always friendly POKéMON.$" - .string "We understand each other,$" - .string "and we understand others.$" -TrainerEyeDescription_63: - .string "Dignity and respect$" - .string "I prefer POKéMON of grace.$" - .string "Aquatic illusions best suit$" - .string "my distinctive elegance.$" -TrainerEyeDescription_64: - .string "Offense over defense$" - .string "The DARK side's beauties$" - .string "You can talk all you want -$" - .string "might is right!$" -TrainerEyeDescription_65: - .string "Confuse and confound$" - .string "There's nothing definite.$" - .string "I wonder how my grandma at$" - .string "MT. PYRE is doing?$" -TrainerEyeDescription_66: - .string "I use items for help.$" - .string "Flaming passion in icy cold!$" - .string "The ICE type can be better$" - .string "trained in this hot land.$" -TrainerEyeDescription_67: - .string "Harness strong abilities.$" - .string "The raw power of DRAGONS!$" - .string "I live to battle every day$" - .string "to learn about POKéMON.$" -TrainerEyeDescription_68: - .string "Pick on the foe's weakness.$" - .string "The ultimate STEEL POKéMON$" - .string "When it comes down to it,$" - .string "I'm still the strongest!$" - - .align 2 -gTrainerEyeDescriptions:: @ 83E309C - .4byte TrainerEyeDescription_0 - .4byte TrainerEyeDescription_1 - .4byte TrainerEyeDescription_2 - .4byte TrainerEyeDescription_3 - .4byte TrainerEyeDescription_4 - .4byte TrainerEyeDescription_5 - .4byte TrainerEyeDescription_6 - .4byte TrainerEyeDescription_7 - .4byte TrainerEyeDescription_8 - .4byte TrainerEyeDescription_9 - .4byte TrainerEyeDescription_10 - .4byte TrainerEyeDescription_11 - .4byte TrainerEyeDescription_12 - .4byte TrainerEyeDescription_13 - .4byte TrainerEyeDescription_14 - .4byte TrainerEyeDescription_15 - .4byte TrainerEyeDescription_16 - .4byte TrainerEyeDescription_17 - .4byte TrainerEyeDescription_18 - .4byte TrainerEyeDescription_19 - .4byte TrainerEyeDescription_20 - .4byte TrainerEyeDescription_21 - .4byte TrainerEyeDescription_22 - .4byte TrainerEyeDescription_23 - .4byte TrainerEyeDescription_24 - .4byte TrainerEyeDescription_25 - .4byte TrainerEyeDescription_26 - .4byte TrainerEyeDescription_27 - .4byte TrainerEyeDescription_28 - .4byte TrainerEyeDescription_29 - .4byte TrainerEyeDescription_30 - .4byte TrainerEyeDescription_31 - .4byte TrainerEyeDescription_32 - .4byte TrainerEyeDescription_33 - .4byte TrainerEyeDescription_34 - .4byte TrainerEyeDescription_35 - .4byte TrainerEyeDescription_36 - .4byte TrainerEyeDescription_37 - .4byte TrainerEyeDescription_38 - .4byte TrainerEyeDescription_39 - .4byte TrainerEyeDescription_40 - .4byte TrainerEyeDescription_41 - .4byte TrainerEyeDescription_42 - .4byte TrainerEyeDescription_43 - .4byte TrainerEyeDescription_44 - .4byte TrainerEyeDescription_45 - .4byte TrainerEyeDescription_46 - .4byte TrainerEyeDescription_47 - .4byte TrainerEyeDescription_48 - .4byte TrainerEyeDescription_49 - .4byte TrainerEyeDescription_50 - .4byte TrainerEyeDescription_51 - .4byte TrainerEyeDescription_52 - .4byte TrainerEyeDescription_53 - .4byte TrainerEyeDescription_54 - .4byte TrainerEyeDescription_55 - .4byte TrainerEyeDescription_56 - .4byte TrainerEyeDescription_57 - .4byte TrainerEyeDescription_58 - .4byte TrainerEyeDescription_59 - .4byte TrainerEyeDescription_60 - .4byte TrainerEyeDescription_61 - .4byte TrainerEyeDescription_62 - .4byte TrainerEyeDescription_63 - .4byte TrainerEyeDescription_64 - .4byte TrainerEyeDescription_65 - .4byte TrainerEyeDescription_66 - .4byte TrainerEyeDescription_67 - .4byte TrainerEyeDescription_68 diff --git a/src/data/region_map/city_map_entries.h b/src/data/region_map/city_map_entries.h new file mode 100644 index 000000000..949fc2b8d --- /dev/null +++ b/src/data/region_map/city_map_entries.h @@ -0,0 +1,19 @@ +const u8 *const gPokenavCityMaps[][2] = +{ + {gPokenavCityMap_Littleroot_0, NULL}, + {gPokenavCityMap_Oldale_0, NULL}, + {gPokenavCityMap_Dewford_0, NULL}, + {gPokenavCityMap_Lavaridge_0, NULL}, + {gPokenavCityMap_Fallarbor_0, NULL}, + {gPokenavCityMap_Verdanturf_0, NULL}, + {gPokenavCityMap_Pacifidlog_0, NULL}, + {gPokenavCityMap_Petalburg_0, NULL}, + {gPokenavCityMap_Slateport_0, gPokenavCityMap_Slateport_1}, + {gPokenavCityMap_Mauville_0, gPokenavCityMap_Mauville_1}, + {gPokenavCityMap_Rustboro_0, gPokenavCityMap_Rustboro_1}, + {gPokenavCityMap_Fortree_0, NULL}, + {gPokenavCityMap_Lilycove_0, gPokenavCityMap_Lilycove_1}, + {gPokenavCityMap_Mossdeep_0, gPokenavCityMap_Mossdeep_1}, + {gPokenavCityMap_Sootopolis_0, NULL}, + {gPokenavCityMap_EverGrande_0, gPokenavCityMap_EverGrande_1}, +}; diff --git a/src/pokenav_before.c b/src/pokenav_before.c index 3a1fddca2..d339fbffc 100644 --- a/src/pokenav_before.c +++ b/src/pokenav_before.c @@ -166,25 +166,953 @@ const u8 gPokenavOutlineTilemap[] = INCBIN_U8("graphics/pokenav/outline_map.bin. #include "data/text/trainer_eye_descriptions_de.h" #endif +const u8 *const gUnknown_083E31B0[] = +{ + PCText_CheckMap, + PCText_CheckPoke, + PCText_CheckTrainer, + PCText_CheckRibbons, + PCText_PutAwayNav, + PCText_NoRibbonWin, + PCText_NoTrainers, +}; + +const u8 *const gUnknown_083E31CC[] = +{ + PCText_CheckParty, + PCText_CheckPokeAll, + PCText_ReturnToNav, +}; + +const u8 *const gUnknown_083E31D8[] = +{ + PCText_FindCool, + PCText_FindBeauty, + PCText_FindCute, + PCText_FindSmart, + PCText_FindTough, + PCText_ReturnToCondition, +}; + +#include "data/region_map/city_map_entries.h" + +void sub_80F0A24(u16, u16); +void sub_80F0A74(u16, u16); + +void (*const gUnknown_083E3270[])(u16, u16) = +{ + sub_80F0A24, + sub_80F0A24, + sub_80F0A74, +}; + +const u16 gPokenavIconPalette[] = INCBIN_U16("graphics/pokenav/icon.gbapal"); +const u8 gUnknown_083E329C[] = INCBIN_U8("graphics/pokenav/icon.4bpp.lz"); +const u8 gPokenavPokeballTiles[] = INCBIN_U8("graphics/pokenav/pokeball.4bpp"); +const u8 gUnknown_083E3780[] = INCBIN_U8("graphics/pokenav/83E3780.4bpp"); +const u16 gPokenavSparkle_Pal[] = INCBIN_U16("graphics/pokenav/sparkle.gbapal"); +const u8 gPokenavSparkle_Gfx[] = INCBIN_U8("graphics/pokenav/sparkle.4bpp"); +const u8 gPokenavUpDownArrows_Gfx[] = INCBIN_U8("graphics/pokenav/arrows.4bpp"); +const u8 gUnknown_083E3BC0[] = INCBIN_U8("graphics/pokenav/83E3BC0.bin"); +const u8 gTiles_083E3BE0[] = INCBIN_U8("graphics/unknown/unknown_3E3BE0.4bpp"); + +const u16 gUnknown_083E3C60[][16] = +{ + INCBIN_U16("graphics/misc/ribbons_cool.gbapal"), + INCBIN_U16("graphics/misc/ribbons_beauty.gbapal"), + INCBIN_U16("graphics/misc/ribbons_cute.gbapal"), + INCBIN_U16("graphics/misc/ribbons_smart.gbapal"), + INCBIN_U16("graphics/misc/ribbons_tough.gbapal"), +}; + +const u8 gUnknown_083E3D00[] = INCBIN_U8("graphics/misc/ribbons_full.4bpp.lz"); +const u16 PokenavBlueLightPalette[] = INCBIN_U16("graphics/pokenav/blue_light.gbapal"); +const u8 PokenavBlueLightTiles[] = INCBIN_U8("graphics/pokenav/blue_light.4bpp"); +const u16 Palette_3E42D8[] = INCBIN_U16("graphics/pokenav/83E42D8.gbapal"); + +const u16 gUnknown_083E42F8[] = +{ + 0x408, + 0x408, + 0x507, + 0x507, + 0x606, + 0x606, + 0x805, + 0x805, + 0xA04, + 0xA04, + 0xC03, + 0xC03, + 0xE02, + 0xE02, + 0x1000, + 0x1000, +}; + +const struct OamData gOamData_83E4318 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_83E4320[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4328[] = +{ + ANIMCMD_FRAME(8, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4330[] = +{ + ANIMCMD_FRAME(16, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4338[] = +{ + ANIMCMD_FRAME(24, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4340[] = +{ + ANIMCMD_FRAME(32, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4348[] = +{ + ANIMCMD_FRAME(40, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4350[] = +{ + ANIMCMD_FRAME(48, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4358[] = +{ + ANIMCMD_FRAME(56, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4360[] = +{ + ANIMCMD_FRAME(64, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4368[] = +{ + ANIMCMD_FRAME(72, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4370[] = +{ + ANIMCMD_FRAME(80, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4378[] = +{ + ANIMCMD_FRAME(88, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4380[] = +{ + ANIMCMD_FRAME(96, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4388[] = +{ + ANIMCMD_FRAME(104, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4390[] = +{ + ANIMCMD_FRAME(112, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E4398[] = +{ + ANIMCMD_FRAME(120, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43A0[] = +{ + ANIMCMD_FRAME(128, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43A8[] = +{ + ANIMCMD_FRAME(136, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43B0[] = +{ + ANIMCMD_FRAME(144, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43B8[] = +{ + ANIMCMD_FRAME(152, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43C0[] = +{ + ANIMCMD_FRAME(160, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43C8[] = +{ + ANIMCMD_FRAME(168, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43D0[] = +{ + ANIMCMD_FRAME(176, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sSpriteAnim_83E43D8[] = +{ + ANIMCMD_FRAME(184, 5), + ANIMCMD_END, +}; + +const union AnimCmd *const gSpriteAnimTable_83E43E0[] = +{ + sSpriteAnim_83E4320, + sSpriteAnim_83E4328, + sSpriteAnim_83E4330, + sSpriteAnim_83E4338, + sSpriteAnim_83E4340, + sSpriteAnim_83E4348, + sSpriteAnim_83E4350, + sSpriteAnim_83E4358, + sSpriteAnim_83E4360, + sSpriteAnim_83E4368, + sSpriteAnim_83E4370, + sSpriteAnim_83E4378, + sSpriteAnim_83E4380, + sSpriteAnim_83E4388, + sSpriteAnim_83E4390, + sSpriteAnim_83E4398, + sSpriteAnim_83E43A0, + sSpriteAnim_83E43A8, + sSpriteAnim_83E43B0, + sSpriteAnim_83E43B8, + sSpriteAnim_83E43C0, + sSpriteAnim_83E43C8, + sSpriteAnim_83E43D0, + sSpriteAnim_83E43D8, +}; + +const union AffineAnimCmd gSpriteAffineAnim_83E4440[] = +{ + AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 16), + AFFINEANIMCMD_END, +}; +const union AffineAnimCmd *const gSpriteAffineAnimTable_83E4450[] = +{ + gSpriteAffineAnim_83E4440, +}; +const struct SpriteTemplate gSpriteTemplate_83E4454 = +{ + .tileTag = 0, + .paletteTag = 0, + .oam = &gOamData_83E4318, + .anims = gSpriteAnimTable_83E43E0, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; +// sizeof(PokenavBlueLightTiles) ? +const struct SpriteSheet gSpriteSheet_PokenavBlueLight = {PokenavBlueLightTiles, 0x100, 25}; +const struct SpritePalette gSpritePalette_PokenavBlueLight = {PokenavBlueLightPalette, 17}; +const struct OamData gOamData_83E447C = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; +void sub_80F2654(struct Sprite *); +const struct SpriteTemplate gSpriteTemplate_83E4484 = +{ + .tileTag = 25, + .paletteTag = 17, + .oam = &gOamData_83E447C, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F2654, +}; +extern const u16 gPokenavMenuOptions3_Pal[]; +extern const u16 gPokenavCondition5_Pal[]; +const struct SpritePalette gUnknown_083E449C[] = +{ + {gPokenavMenuOptions3_Pal, 2}, + {gPokenavCondition5_Pal, 3}, + {0x0, 0}, +}; + +const struct OamData gOamData_83E44B4 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_H_RECTANGLE, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; +const union AnimCmd gSpriteAnim_83E44BC[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; + +const union AnimCmd gSpriteAnim_83E44C4[] = +{ + ANIMCMD_FRAME(32, 5), + ANIMCMD_END, +}; +const union AnimCmd gSpriteAnim_83E44CC[] = +{ + ANIMCMD_FRAME(64, 5), + ANIMCMD_END, +}; +const union AnimCmd *const gSpriteAnimTable_83E44D4[] = +{ + gSpriteAnim_83E44BC, + gSpriteAnim_83E44C4, + gSpriteAnim_83E44CC, +}; +void sub_80F2BBC(struct Sprite *); +const struct SpriteTemplate gSpriteTemplate_83E44E0 = +{ + .tileTag = 1, + .paletteTag = 2, + .oam = &gOamData_83E44B4, + .anims = gSpriteAnimTable_83E44D4, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F2BBC, +}; +const struct SpriteTemplate gSpriteTemplate_83E44F8 = +{ + .tileTag = 1, + .paletteTag = 3, + .oam = &gOamData_83E44B4, + .anims = gSpriteAnimTable_83E44D4, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F2BBC, +}; +const struct OamData gOamData_83E4510 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_H_RECTANGLE, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; +const union AnimCmd gSpriteAnim_83E4518[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; +const union AnimCmd gSpriteAnim_83E4520[] = +{ + ANIMCMD_FRAME(8, 5), + ANIMCMD_END, +}; +const union AnimCmd *const gSpriteAnimTable_83E4528[] = +{ + gSpriteAnim_83E4518, + gSpriteAnim_83E4520, +}; + +const struct SpriteTemplate gSpriteTemplate_83E4530 = +{ + .tileTag = 2, + .paletteTag = 2, + .oam = &gOamData_83E4510, + .anims = gSpriteAnimTable_83E4528, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F2BBC, +}; + +const struct SpriteTemplate gSpriteTemplate_83E4548 = +{ + .tileTag = 2, + .paletteTag = 3, + .oam = &gOamData_83E4510, + .anims = gSpriteAnimTable_83E4528, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F2BBC, +}; + +const struct OamData gOamData_83E4560 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +const struct SpriteSheet gUnknown_083E4568 = {NULL, 0x800, 6}; + +void sub_80F2E00(struct Sprite *); + +const struct SpriteTemplate gSpriteTemplate_83E4570 = +{ + .tileTag = 6, + .paletteTag = 6, + .oam = &gOamData_83E4560, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F2E00, +}; + +const struct SpritePalette gUnknown_083E4588 = {NULL, 6}; +extern const u8 gPokenavArrow_Gfx[]; + +const struct SpriteSheet gUnknown_083E4590[] = +{ + {gPokenavArrow_Gfx, 0x40, 9}, + {gPokenavUpDownArrows_Gfx, 0x80, 10}, + {}, +}; + +extern const u16 gPokenavArrowsPalette[]; + +const struct SpritePalette gUnknown_083E45A8 = {gPokenavArrowsPalette, 9}; + +const struct OamData gOamData_83E45B0 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_V_RECTANGLE, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0, +}; + +void sub_80F3190(struct Sprite *); + +const struct SpriteTemplate gSpriteTemplate_83E45B8 = +{ + .tileTag = 9, + .paletteTag = 9, + .oam = &gOamData_83E45B0, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F3190, +}; + +const union AnimCmd gSpriteAnim_83E45D0[] = +{ + ANIMCMD_FRAME(0, 3), + ANIMCMD_END, +}; + +const union AnimCmd gSpriteAnim_83E45D8[] = +{ + ANIMCMD_FRAME(2, 3), + ANIMCMD_END, +}; + +const union AnimCmd *const gSpriteAnimTable_83E45E0[] = +{ + gSpriteAnim_83E45D0, + gSpriteAnim_83E45D8, +}; + +const struct OamData gOamData_83E45E8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_H_RECTANGLE, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0, +}; + +void sub_80F31AC(struct Sprite *); + +const struct SpriteTemplate gSpriteTemplate_83E45F0 = +{ + .tileTag = 10, + .paletteTag = 9, + .oam = &gOamData_83E45E8, + .anims = gSpriteAnimTable_83E45E0, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F31AC, +}; + +const struct OamData gOamData_83E4608 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0, +}; + +const union AnimCmd gSpriteAnim_83E4610[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; + +const union AnimCmd gSpriteAnim_83E4618[] = +{ + ANIMCMD_FRAME(4, 5), + ANIMCMD_END, +}; + +const union AnimCmd *const gSpriteAnimTable_83E4620[] = +{ + gSpriteAnim_83E4610, + gSpriteAnim_83E4618, +}; + +extern const u8 gPokenavConditionMenuCancel_Gfx[]; + +const struct SpriteSheet gUnknown_083E4628[] = +{ + {gPokenavPokeballTiles, 0x100, 3}, + {gUnknown_083E3780, 0x20, 4}, + {gPokenavConditionMenuCancel_Gfx, 0x100, 5}, + {}, +}; + +extern const u16 gPokenavConditionPokeball_Pal[]; +extern const u16 gPokenavCondition4_Pal[]; + +const struct SpritePalette gUnknown_083E4648[] = +{ + {gPokenavConditionPokeball_Pal, 4}, + {gPokenavCondition4_Pal, 5}, + {NULL, 0}, +}; + +void sub_80F3328(struct Sprite *); + +const struct SpriteTemplate gSpriteTemplate_83E4660 = +{ + .tileTag = 3, + .paletteTag = 4, + .oam = &gOamData_83E4608, + .anims = gSpriteAnimTable_83E4620, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F3328, +}; + +const u16 gUnknown_083E4678[] = INCBIN_U16("graphics/pokenav/83E4678.gbapal"); + +const u16 gPokenavRibbonsIconGfx[][2] = +{ + {0, 0}, + {1, 0}, + {2, 0}, + {3, 0}, + {4, 0}, + {1, 1}, + {2, 1}, + {3, 1}, + {4, 1}, + {1, 2}, + {2, 2}, + {3, 2}, + {4, 2}, + {1, 3}, + {2, 3}, + {3, 3}, + {4, 3}, + {1, 4}, + {2, 4}, + {3, 4}, + {4, 4}, + {5, 0}, + {6, 0}, + {7, 1}, + {8, 2}, + {9, 1}, + {9, 3}, + {9, 4}, + {10, 3}, + {10, 4}, + {11, 0}, + {11, 1}, +}; + +const struct OamData gOamData_83E4718 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_NORMAL, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +const union AffineAnimCmd gSpriteAffineAnim_83E4720[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gSpriteAffineAnim_83E4730[] = +{ + AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0), + AFFINEANIMCMD_FRAME(0x20, 0x20, 0, 4), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd gSpriteAffineAnim_83E4748[] = +{ + AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0), + AFFINEANIMCMD_FRAME(0xFFE0, 0xFFE0, 0, 4), + AFFINEANIMCMD_END, +}; + +const union AffineAnimCmd *const gSpriteAffineAnimTable_83E4760[] = +{ + gSpriteAffineAnim_83E4720, + gSpriteAffineAnim_83E4730, + gSpriteAffineAnim_83E4748, +}; + +const struct SpriteTemplate gSpriteTemplate_83E476C = +{ + .tileTag = 11, + .paletteTag = 10, + .oam = &gOamData_83E4718, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gSpriteAffineAnimTable_83E4760, + .callback = SpriteCallbackDummy, +}; + +const struct SpriteSheet gUnknown_083E4784 = {gPokenavSparkle_Gfx, sizeof(gPokenavSparkle_Gfx), 0x0017}; +const struct SpritePalette gUnknown_083E478C = {gPokenavSparkle_Pal, 0x000f}; + +const s16 gUnknown_083E4794[][2] = +{ + { 0 , -35}, + { 20, -28}, + { 33, -10}, + { 33, 10}, + { 20, 28}, + { 0 , 35}, + {-20, 28}, + {-33, 10}, + {-33, -10}, + {-20, -28}, +}; + +const struct OamData gOamData_83E47BC = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 1, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +const union AnimCmd gSpriteAnim_83E47C4[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_FRAME(4, 5), + ANIMCMD_FRAME(8, 5), + ANIMCMD_FRAME(12, 5), + ANIMCMD_FRAME(16, 5), + ANIMCMD_FRAME(20, 5), + ANIMCMD_FRAME(24, 5), + ANIMCMD_END, +}; + +// sparkles around pokemon on condition page of pokenav +const union AnimCmd *const gSpriteAnimTable_83E47E4[] = +{ + &gSpriteAnim_83E47C4[0], + &gSpriteAnim_83E47C4[2], + &gSpriteAnim_83E47C4[4], + &gSpriteAnim_83E47C4[6], + &gSpriteAnim_83E47C4[8], + &gSpriteAnim_83E47C4[10], + &gSpriteAnim_83E47C4[12], +}; + +void sub_80F3E9C(struct Sprite *sprite); + +const struct SpriteTemplate gSpriteTemplate_83E4800 = +{ + .tileTag = 23, + .paletteTag = 15, + .oam = &gOamData_83E47BC, + .anims = gSpriteAnimTable_83E47E4, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F3E9C, +}; + +const struct SpritePalette gUnknown_083E4818 = {gPokenavIconPalette, 16}; + +const union AnimCmd gSpriteAnim_83E4820[] = +{ + ANIMCMD_FRAME(0, 12), + ANIMCMD_FRAME(16, 12), + ANIMCMD_FRAME(32, 12), + ANIMCMD_FRAME(48, 12), + ANIMCMD_FRAME(64, 12), + ANIMCMD_FRAME(80, 12), + ANIMCMD_FRAME(96, 12), + ANIMCMD_FRAME(112, 12), + ANIMCMD_JUMP(0), +}; + +const union AnimCmd *const gSpriteAnimTable_83E4844[] = +{ + gSpriteAnim_83E4820, +}; + +const struct OamData gOamData_83E4848 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_SQUARE, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +void sub_80F4138(struct Sprite *); + +const struct SpriteTemplate gSpriteTemplate_83E4850 = +{ + .tileTag = 24, + .paletteTag = 16, + .oam = &gOamData_83E4848, + .anims = gSpriteAnimTable_83E4844, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = sub_80F4138, +}; + +const struct SpritePalette gUnknown_083E4868 = {Palette_3E42D8, 18}; + +const struct OamData gOamData_83E4870 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = ST_OAM_H_RECTANGLE, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 3, + .paletteNum = 0, + .affineParam = 0, +}; + +const struct SpriteTemplate gSpriteTemplate_83E4878 = +{ + .tileTag = 26, + .paletteTag = 18, + .oam = &gOamData_83E4870, + .anims = gDummySpriteAnimTable, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy, +}; + +const u8 gUnknown_083E4890[] = +{ + 4, 5, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, + 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, + 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, + 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, +}; + +const struct ScanlineEffectParams gUnknown_083E4990 = +{ + (void *)REG_ADDR_WIN0H, + ((DMA_ENABLE | DMA_START_HBLANK | DMA_32BIT | DMA_REPEAT | DMA_DEST_RELOAD) << 16) | 1, + 1, + 0, +}; + +const u16 gUnknown_083E499C[] = +{ + 0x43, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, +}; void sub_80EBA5C() { -- cgit v1.2.3 From 6c27c89086fee532f5629610f13f0f52e45bb8e9 Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 18 Jul 2019 22:16:54 -0400 Subject: fix build --- ld_script.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/ld_script.txt b/ld_script.txt index 5a70154c0..489148b74 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -694,7 +694,6 @@ SECTIONS { src/easy_chat_2.o(.data); src/pokenav_before.o(.rodata); src/pokenav.o(.rodata); - data/pokenav.o(.rodata); src/trainers_eye.o(.rodata); src/mon_markings.o(.rodata); src/mauville_man.o(.rodata); -- cgit v1.2.3 From e74b92a581e8293ca56e5a2809be51810fc74492 Mon Sep 17 00:00:00 2001 From: garak Date: Fri, 19 Jul 2019 23:01:57 -0400 Subject: change tilemaps to u32 --- src/data/region_map/city_map_entries.h | 2 +- src/data/region_map/city_map_tilemaps.h | 44 ++++++++++++++++----------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/data/region_map/city_map_entries.h b/src/data/region_map/city_map_entries.h index 949fc2b8d..b49ffe4ea 100644 --- a/src/data/region_map/city_map_entries.h +++ b/src/data/region_map/city_map_entries.h @@ -1,4 +1,4 @@ -const u8 *const gPokenavCityMaps[][2] = +const u32 *const gPokenavCityMaps[][2] = { {gPokenavCityMap_Littleroot_0, NULL}, {gPokenavCityMap_Oldale_0, NULL}, diff --git a/src/data/region_map/city_map_tilemaps.h b/src/data/region_map/city_map_tilemaps.h index 8c1ab0056..fed158935 100644 --- a/src/data/region_map/city_map_tilemaps.h +++ b/src/data/region_map/city_map_tilemaps.h @@ -1,22 +1,22 @@ -const u8 gPokenavCityMap_Lavaridge_0[] = INCBIN_U8("graphics/pokenav/city_maps/lavaridge_0.bin.lz"); -const u8 gPokenavCityMap_Fallarbor_0[] = INCBIN_U8("graphics/pokenav/city_maps/fallarbor_0.bin.lz"); -const u8 gPokenavCityMap_Fortree_0[] = INCBIN_U8("graphics/pokenav/city_maps/fortree_0.bin.lz"); -const u8 gPokenavCityMap_Slateport_0[] = INCBIN_U8("graphics/pokenav/city_maps/slateport_0.bin.lz"); -const u8 gPokenavCityMap_Slateport_1[] = INCBIN_U8("graphics/pokenav/city_maps/slateport_1.bin.lz"); -const u8 gPokenavCityMap_Rustboro_0[] = INCBIN_U8("graphics/pokenav/city_maps/rustboro_0.bin.lz"); -const u8 gPokenavCityMap_Rustboro_1[] = INCBIN_U8("graphics/pokenav/city_maps/rustboro_1.bin.lz"); -const u8 gPokenavCityMap_Pacifidlog_0[] = INCBIN_U8("graphics/pokenav/city_maps/pacifidlog_0.bin.lz"); -const u8 gPokenavCityMap_Mauville_1[] = INCBIN_U8("graphics/pokenav/city_maps/mauville_1.bin.lz"); -const u8 gPokenavCityMap_Mauville_0[] = INCBIN_U8("graphics/pokenav/city_maps/mauville_0.bin.lz"); -const u8 gPokenavCityMap_Oldale_0[] = INCBIN_U8("graphics/pokenav/city_maps/oldale_0.bin.lz"); -const u8 gPokenavCityMap_Lilycove_1[] = INCBIN_U8("graphics/pokenav/city_maps/lilycove_1.bin.lz"); -const u8 gPokenavCityMap_Lilycove_0[] = INCBIN_U8("graphics/pokenav/city_maps/lilycove_0.bin.lz"); -const u8 gPokenavCityMap_Littleroot_0[] = INCBIN_U8("graphics/pokenav/city_maps/littleroot_0.bin.lz"); -const u8 gPokenavCityMap_Dewford_0[] = INCBIN_U8("graphics/pokenav/city_maps/dewford_0.bin.lz"); -const u8 gPokenavCityMap_Sootopolis_0[] = INCBIN_U8("graphics/pokenav/city_maps/sootopolis_0.bin.lz"); -const u8 gPokenavCityMap_EverGrande_0[] = INCBIN_U8("graphics/pokenav/city_maps/ever_grande_0.bin.lz"); -const u8 gPokenavCityMap_EverGrande_1[] = INCBIN_U8("graphics/pokenav/city_maps/ever_grande_1.bin.lz"); -const u8 gPokenavCityMap_Verdanturf_0[] = INCBIN_U8("graphics/pokenav/city_maps/verdanturf_0.bin.lz"); -const u8 gPokenavCityMap_Mossdeep_1[] = INCBIN_U8("graphics/pokenav/city_maps/mossdeep_1.bin.lz"); -const u8 gPokenavCityMap_Mossdeep_0[] = INCBIN_U8("graphics/pokenav/city_maps/mossdeep_0.bin.lz"); -const u8 gPokenavCityMap_Petalburg_0[] = INCBIN_U8("graphics/pokenav/city_maps/petalburg_0.bin.lz"); +const u32 gPokenavCityMap_Lavaridge_0[] = INCBIN_U32("graphics/pokenav/city_maps/lavaridge_0.bin.lz"); +const u32 gPokenavCityMap_Fallarbor_0[] = INCBIN_U32("graphics/pokenav/city_maps/fallarbor_0.bin.lz"); +const u32 gPokenavCityMap_Fortree_0[] = INCBIN_U32("graphics/pokenav/city_maps/fortree_0.bin.lz"); +const u32 gPokenavCityMap_Slateport_0[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_0.bin.lz"); +const u32 gPokenavCityMap_Slateport_1[] = INCBIN_U32("graphics/pokenav/city_maps/slateport_1.bin.lz"); +const u32 gPokenavCityMap_Rustboro_0[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_0.bin.lz"); +const u32 gPokenavCityMap_Rustboro_1[] = INCBIN_U32("graphics/pokenav/city_maps/rustboro_1.bin.lz"); +const u32 gPokenavCityMap_Pacifidlog_0[] = INCBIN_U32("graphics/pokenav/city_maps/pacifidlog_0.bin.lz"); +const u32 gPokenavCityMap_Mauville_1[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_1.bin.lz"); +const u32 gPokenavCityMap_Mauville_0[] = INCBIN_U32("graphics/pokenav/city_maps/mauville_0.bin.lz"); +const u32 gPokenavCityMap_Oldale_0[] = INCBIN_U32("graphics/pokenav/city_maps/oldale_0.bin.lz"); +const u32 gPokenavCityMap_Lilycove_1[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_1.bin.lz"); +const u32 gPokenavCityMap_Lilycove_0[] = INCBIN_U32("graphics/pokenav/city_maps/lilycove_0.bin.lz"); +const u32 gPokenavCityMap_Littleroot_0[] = INCBIN_U32("graphics/pokenav/city_maps/littleroot_0.bin.lz"); +const u32 gPokenavCityMap_Dewford_0[] = INCBIN_U32("graphics/pokenav/city_maps/dewford_0.bin.lz"); +const u32 gPokenavCityMap_Sootopolis_0[] = INCBIN_U32("graphics/pokenav/city_maps/sootopolis_0.bin.lz"); +const u32 gPokenavCityMap_EverGrande_0[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_0.bin.lz"); +const u32 gPokenavCityMap_EverGrande_1[] = INCBIN_U32("graphics/pokenav/city_maps/ever_grande_1.bin.lz"); +const u32 gPokenavCityMap_Verdanturf_0[] = INCBIN_U32("graphics/pokenav/city_maps/verdanturf_0.bin.lz"); +const u32 gPokenavCityMap_Mossdeep_1[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_1.bin.lz"); +const u32 gPokenavCityMap_Mossdeep_0[] = INCBIN_U32("graphics/pokenav/city_maps/mossdeep_0.bin.lz"); +const u32 gPokenavCityMap_Petalburg_0[] = INCBIN_U32("graphics/pokenav/city_maps/petalburg_0.bin.lz"); -- cgit v1.2.3 From e1854c665dab1234ef272fedc1b61a926f7bcdc0 Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 29 Jul 2019 12:07:18 -0400 Subject: name trainers eye messages, use constants in some pokenav rodata --- src/data/text/trainer_eye_descriptions_de.h | 276 ++++++++++++++-------------- src/data/text/trainer_eye_descriptions_en.h | 276 ++++++++++++++-------------- src/pokenav_before.c | 67 +++---- 3 files changed, 310 insertions(+), 309 deletions(-) diff --git a/src/data/text/trainer_eye_descriptions_de.h b/src/data/text/trainer_eye_descriptions_de.h index 338cdd629..4f3be5fe4 100644 --- a/src/data/text/trainer_eye_descriptions_de.h +++ b/src/data/text/trainer_eye_descriptions_de.h @@ -1,412 +1,412 @@ -static const u8 TrainerEyeDescription_0[] = _( +static const u8 TrainerEyeDescription_AromaLady_Rose[] = _( "Emotionen beruhigen.$" "Duftende PFLANZEN-PKMN.$" "Beruhigende Aromen reini-$" "gen Körper und Geist."); -static const u8 TrainerEyeDescription_1[] = _( +static const u8 TrainerEyeDescription_RuinManiac_Dusty[] = _( "Durch Stärke überzeugen!$" "Felsige GESTEINS-PKMN.$" "Während des Studiums der$" "Antike sehe ich die Welt."); -static const u8 TrainerEyeDescription_2[] = _( +static const u8 TrainerEyeDescription_Tuber_Lola[] = _( "Ich strenge mich stets an!$" "PKMN, die gut schwimmen.$" "Ich würde gerne ohne den$" "Reifen schwimmen können."); -static const u8 TrainerEyeDescription_3[] = _( +static const u8 TrainerEyeDescription_Tuber_Ricky[] = _( "Ich versuche einfach alles.$" "WASSER-PKMN sind Kumpel.$" "Ich kann schwimmen! Ich$" "mag halt den Schwimmreifen!"); -static const u8 TrainerEyeDescription_4[] = _( +static const u8 TrainerEyeDescription_SisAndBro_RitaAndSam[] = _( "Wir teilen die Arbeit auf.$" "Wir lieben freundliche PKMN.$" "Wir teilen die Liebe zu den$" "PKMN. Wir sind Geschwister!"); -static const u8 TrainerEyeDescription_5[] = _( +static const u8 TrainerEyeDescription_Cooltrainer_Brooke[] = _( "Schwächen erkennen.$" "Gleichgewicht ist wichtig.$" "Mein Ziel ist es, der$" "PKMN-CHAMP zu werden."); -static const u8 TrainerEyeDescription_6[] = _( +static const u8 TrainerEyeDescription_Cooltrainer_Wilton[] = _( "Den Gegner umwerfen.$" "Der PKMN-Typ ist unwichtig.$" "Ich bin der beste Schüler$" "der PKMN TRAINERSCHULE."); -static const u8 TrainerEyeDescription_7[] = _( +static const u8 TrainerEyeDescription_HexManiac_Valerie[] = _( "Langsames Niederringen.$" "Nachts Furcht einflößend.$" "Ich sehe Dinge, die den$" "anderen verborgen sind..."); -static const u8 TrainerEyeDescription_8[] = _( +static const u8 TrainerEyeDescription_Lady_Cindy[] = _( "Alles, was zum Sieg führt.$" "Hinreißende Wesen!$" "Ich habe zu Hause einen$" "Pool für meine PKMN."); -static const u8 TrainerEyeDescription_9[] = _( +static const u8 TrainerEyeDescription_Beauty_Jessica[] = _( "Ich bringe dich vom Weg ab.$" "Niedlich, natürlich!$" "Ich liebe die SAFARI-ZONE,$" "dort werde ich bleiben."); -static const u8 TrainerEyeDescription_10[] = _( +static const u8 TrainerEyeDescription_RichBoy_Winston[] = _( "Wer braucht Strategie?!?$" "Alle, die gut und teuer sind.$" "Ich bin reich. Und daher$" "besitze ich ein PKMN-Bett."); -static const u8 TrainerEyeDescription_11[] = _( +static const u8 TrainerEyeDescription_PokeManiac_Steve[] = _( "Durch Stärke gewinnen!$" "Habe sie nachts gefangen...$" "Große, kräftige und zähe$" "POKéMON sind die besten..."); -static const u8 TrainerEyeDescription_12[] = _( +static const u8 TrainerEyeDescription_Swimmer_Tony[] = _( "Volle Pulle zuschlagen!$" "Funky WASSER-PKMN!$" "Wenn ich nicht schwimme,$" "stemme ich Gewichte!"); -static const u8 TrainerEyeDescription_13[] = _( +static const u8 TrainerEyeDescription_BlackBelt_Nob[] = _( "Immer gewinnen!$" "KAMPF-PKMN!$" "Ohne zu prahlen: Ich kann$" "10 Ziegel zerschmettern!"); -static const u8 TrainerEyeDescription_14[] = _( +static const u8 TrainerEyeDescription_Guitarist_Dalton[] = _( "Ich elektrisiere dich!$" "Es sind ELEKTRO-PKMN.$" "Ich bringe die Menschen mit$" "meinen Liedern zum Weinen."); -static const u8 TrainerEyeDescription_15[] = _( +static const u8 TrainerEyeDescription_Kindler_Bernie[] = _( "Alles niederbrennen!$" "Feuergefährliche POKéMON!$" "Neben einem Lagerfeuer$" "sollte stets Wasser stehen!"); -static const u8 TrainerEyeDescription_16[] = _( +static const u8 TrainerEyeDescription_Camper_Ethan[] = _( "Man muss hartnäckig sein.$" "Jede Art von POKéMON.$" "PKMN, die in der Wildnis auf-$" "wachsen, werden stark!"); -static const u8 TrainerEyeDescription_17[] = _( +static const u8 TrainerEyeDescription_OldCouple_JohnAndJay[] = _( "Unsere Liebe schlägt alles.$" "Wir haben sie seit Jahren.$" "In 50 Jahren Ehe waren$" "wir den PKMN immer treu."); -static const u8 TrainerEyeDescription_18[] = _( +static const u8 TrainerEyeDescription_BugManiac_Brandon[] = _( "Wellenförmiger Angriff!$" "KÄFER-PKMN sind cool!$" "Ich gehe jeden Tag in den$" "Wald, KÄFER-PKMN fangen."); -static const u8 TrainerEyeDescription_19[] = _( +static const u8 TrainerEyeDescription_Psychic_Cameron[] = _( "Schwächen und verwirren!$" "Solche mit irren Kräften.$" "Ich kann deine Gedanken$" "klar und deutlich lesen."); -static const u8 TrainerEyeDescription_20[] = _( +static const u8 TrainerEyeDescription_Psychic_Jacki[] = _( "Mit vollem Einsatz kämpfen.$" "Geheimnisvolle POKéMON.$" "Wenn ich spreche,$" "setze ich Telepathie ein."); -static const u8 TrainerEyeDescription_21[] = _( +static const u8 TrainerEyeDescription_Gentleman_Walter[] = _( "Ruhig, gesammelt vorgehen.$" "Ganz verschiedene PKMN.$" "Wir genießen die tägliche$" "Tasse Tee."); -static const u8 TrainerEyeDescription_22[] = _( +static const u8 TrainerEyeDescription_SchoolKid_Karen[] = _( "Ich kämpfe mit Köpfchen.$" "Ich liebe jedes PKMN.$" "Schreibe ich gute Noten,$" "gibt Papi mir Geld."); -static const u8 TrainerEyeDescription_23[] = _( +static const u8 TrainerEyeDescription_SchoolKid_Jerry[] = _( "Mein Wissen ist Macht!$" "Jedes clevere PKMN.$" "Ich will später ein großer$" "PKMN-Forscher werden."); -static const u8 TrainerEyeDescription_24[] = _( +static const u8 TrainerEyeDescription_SrAndJr_AnnaAndMeg[] = _( "Wir sprechen uns ab.$" "PKMN, die wir beide mögen.$" "Wir sind Senior und Junior$" "im Studium der PKMN."); -static const u8 TrainerEyeDescription_25[] = _( +static const u8 TrainerEyeDescription_Pokefan_Isabel[] = _( "Los geht's, meine Lieben!$" "Ich mag sie alle!$" "Auch beim Einkaufen lasse$" "ich keinen Kampf aus!"); -static const u8 TrainerEyeDescription_26[] = _( +static const u8 TrainerEyeDescription_Pokefan_Miguel[] = _( "Ich kämpfe mit dem Herzen.$" "PKMN, die Liebe erfahren!$" "PKMN und Menschen müssen$" "Vertrauen aufbauen!"); -static const u8 TrainerEyeDescription_27[] = _( +static const u8 TrainerEyeDescription_Expert_Timothy[] = _( "Ich durchschaue Gegner!$" "Die Basis des Kampfes.$" "Ich bin noch nicht bereit,$" "Jüngeren Platz zu machen."); -static const u8 TrainerEyeDescription_28[] = _( +static const u8 TrainerEyeDescription_Expert_Shelby[] = _( "Angriff als Verteidigung!$" "KAMPF-PKMN!$" "Ich bin alt und habe daher$" "meinen eigenen Stil."); -static const u8 TrainerEyeDescription_29[] = _( +static const u8 TrainerEyeDescription_Youngster_Calvin[] = _( "Ich tue, was ich kann.$" "Verschiedene Arten.$" "Ich will irgendwann einen$" "ARENALEITER besiegen!"); -static const u8 TrainerEyeDescription_30[] = _( +static const u8 TrainerEyeDescription_Fisherman_Elliot[] = _( "Geduld und Spucke.$" "WASSER-PKMN!$" "Niemand vor mir hat je$" "etwas Größeres gefangen!"); -static const u8 TrainerEyeDescription_31[] = _( +static const u8 TrainerEyeDescription_Triathlete_Abigail[] = _( "Verteidigung ist die Basis.$" "Kraftvolle PKMN!$" "Dies war als Diät gedacht,$" "jetzt ist es mein Hobby."); -static const u8 TrainerEyeDescription_32[] = _( +static const u8 TrainerEyeDescription_Triathlete_Benjamin[] = _( "Weiter, immer weiter!$" "Die Stärke von STAHL...$" "Wenn du schwitzt, musst du$" "regelmäßig etwas trinken!"); -static const u8 TrainerEyeDescription_33[] = _( +static const u8 TrainerEyeDescription_Triathlete_Isaiah[] = _( "Die Umgebung erforschen.$" "WASSER-PKMN!$" "Ich lasse mich nicht von$" "Strandhäschen besiegen."); -static const u8 TrainerEyeDescription_34[] = _( +static const u8 TrainerEyeDescription_Triathlete_Katelyn[] = _( "Stets Offensive zeigen!$" "Nur WASSER-PKMN...$" "Ich muss jeden Tag$" "10 Kilometer schwimmen."); -static const u8 TrainerEyeDescription_35[] = _( +static const u8 TrainerEyeDescription_Triathlete_Maria[] = _( "Geschwindigkeit ist alles!$" "Ich liebe schnelle PKMN.$" "Beim Marathon forderst du$" "dich selbst heraus."); -static const u8 TrainerEyeDescription_36[] = _( +static const u8 TrainerEyeDescription_Triathlete_Dylan[] = _( "Schneller als andere sein.$" "Ein rasend schnelles PKMN!$" "Rennt man rasend schnell,$" "wird man eins mit dem Wind."); -static const u8 TrainerEyeDescription_37[] = _( +static const u8 TrainerEyeDescription_DragonTamer_Nicolas[] = _( "Die Stärke der PKMN nutzen.$" "Sieh die Macht der DRACHEN!$" "Eines Tages werde ich zur$" "Legende!!!"); -static const u8 TrainerEyeDescription_38[] = _( +static const u8 TrainerEyeDescription_BirdKeeper_Robert[] = _( "Ich zeige dir die Technik!$" "Elegant kreisende VÖGEL.$" "Meine VOGEL-PKMN bringen$" "dem Mädchen meine Liebe!"); -static const u8 TrainerEyeDescription_39[] = _( +static const u8 TrainerEyeDescription_NinjaBoy_Lao[] = _( "Du wirst Gift schmecken!$" "Giftige PKMN.$" "Ich trainiere hart, um ein$" "Ninja zu werden."); -static const u8 TrainerEyeDescription_40[] = _( +static const u8 TrainerEyeDescription_BattleGirl_Cyndy[] = _( "Der Erstschlag siegt!$" "Schnelle KAMPF-PKMN.$" "Wenn mein PKMN verliert,$" "kämpfe ich doch weiter."); -static const u8 TrainerEyeDescription_41[] = _( +static const u8 TrainerEyeDescription_ParasolLady_Madeline[] = _( "Los, los, meine PKMN!$" "Ich mag alle PKMN.$" "UV-Strahlen sind die Feinde$" "der Haut. Creme dich ein!"); -static const u8 TrainerEyeDescription_42[] = _( +static const u8 TrainerEyeDescription_Swimmer_Jenny[] = _( "Keine Gnade!$" "Niedliche WASSER-PKMN.$" "Ich habe zu viele Fans, ich$" "war nämlich im Fernsehen."); -static const u8 TrainerEyeDescription_43[] = _( +static const u8 TrainerEyeDescription_Picnicker_Diana[] = _( "Ich probiere dies und das.$" "Ich liebe alle PKMN.$" "Was liegt hinter diesem$" "hohen Berg dort?"); -static const u8 TrainerEyeDescription_44[] = _( +static const u8 TrainerEyeDescription_Twins_AmyAndLiv[] = _( "Wir kämpfen zusammen!$" "Wir trainieren zusammen!$" "Wir lieben die gleichen PKMN$" "und verschiedene Desserts."); -static const u8 TrainerEyeDescription_45[] = _( +static const u8 TrainerEyeDescription_Sailor_Ernest[] = _( "Ich setze Stärke ein.$" "WASSER- und KAMPF-PKMN.$" "Matrosen sind raue Typen!$" "Irgendwelche Einwände?"); -static const u8 TrainerEyeDescription_46[] = _( +static const u8 TrainerEyeDescription_Collector_Edwin[] = _( "PKMN vor Schaden bewahren.$" "Ich liebe seltene PKMN.$" "Ich möchte seltene PKMN$" "aus aller Welt sammeln."); -static const u8 TrainerEyeDescription_47[] = _( +static const u8 TrainerEyeDescription_PkmnBreeder_Lydia[] = _( "Meine Stärke...$" "PKMN sind meine Kinder.$" "Man benötigt Wissen und$" "Liebe im Umgang mit PKMN."); -static const u8 TrainerEyeDescription_48[] = _( +static const u8 TrainerEyeDescription_PkmnBreeder_Isaac[] = _( "Angriff aus vollen Rohren!$" "Jedes PKMN kommt in Frage.$" "Ich gebe ihnen {POKEBLOCK}, um$" "in WETTBEWERBEN zu siegen."); -static const u8 TrainerEyeDescription_49[] = _( +static const u8 TrainerEyeDescription_PkmnRanger_Catherine[] = _( "Ich glaube an meine PKMN.$" "Ich liebe starke PKMN.$" "Ich bilde meine PKMN zu$" "einem Rettungsteam aus."); -static const u8 TrainerEyeDescription_50[] = _( +static const u8 TrainerEyeDescription_PkmnRanger_Jackson[] = _( "Ich greife in Etappen an.$" "Verschiedene Arten.$" "Umweltverschmutzern darf$" "man niemals vergeben!"); -static const u8 TrainerEyeDescription_51[] = _( +static const u8 TrainerEyeDescription_Lass_Haley[] = _( "Ich zeige meinen Mut.$" "Ich liebe niedliche PKMN!$" "Nach einem Kampf gehe ich$" "mit meinen PKMN schwimmen."); -static const u8 TrainerEyeDescription_52[] = _( +static const u8 TrainerEyeDescription_BugCatcher_James[] = _( "Blitzschnelle Attacken.$" "KÄFER-PKMN sind das Beste!$" "Um KÄFER-PKMN zu fangen,$" "musst du früh aufstehen."); -static const u8 TrainerEyeDescription_53[] = _( +static const u8 TrainerEyeDescription_Hiker_Trent[] = _( "Ich kämpfe mit Stärke.$" "PKMN mit hartem Körper.$" "Ich habe diese Wanderung$" "einen Monat vorbereitet."); -static const u8 TrainerEyeDescription_54[] = _( +static const u8 TrainerEyeDescription_YoungCouple_LoisAndHal[] = _( "Liebevolle Strategie!$" "Liebevolle PKMN!$" "Wir sind liebevoll!$" "Immer liebevoll!"); -static const u8 TrainerEyeDescription_55[] = _( +static const u8 TrainerEyeDescription_PkmnTrainer_Wally[] = _( "Wir lassen alles raus.$" "Das 1. PKMN, das ich fing.$" "Die PKMN und ich sind$" "zusammen gewachsen."); -static const u8 TrainerEyeDescription_56[] = _( +static const u8 TrainerEyeDescription_Leader_Roxanne[] = _( "Steinharte Attacken.$" "Steinharte PKMN...$" "Ich möchte durch Kämpfe$" "alles über PKMN lernen."); -static const u8 TrainerEyeDescription_57[] = _( +static const u8 TrainerEyeDescription_Leader_Brawly[] = _( "Direkte physische Attacke.$" "Ich baue auf KAMPF-PKMN.$" "Die Welt erwartet mich, als$" "neuen, starken Kämpfer."); -static const u8 TrainerEyeDescription_58[] = _( +static const u8 TrainerEyeDescription_Leader_Wattson[] = _( "Elektrisieren... Britzel...$" "Elektrizität bestimmt alles.$" "Hahahahaha! Lachen hält$" "gesund und jung!"); -static const u8 TrainerEyeDescription_59[] = _( +static const u8 TrainerEyeDescription_Leader_Flannery[] = _( "Aggressiv kämpfen.$" "Brennen vor Leidenschaft!$" "Spül die tägliche Müdigkeit$" "in den Heißen Quellen ab."); -static const u8 TrainerEyeDescription_60[] = _( +static const u8 TrainerEyeDescription_Leader_Norman[] = _( "Mein Stil ist flexibel.$" "Gleichmäßig gewachsen.$" "PKMN sind mein Leben. Mein$" "Weg des Lebens ist steinig."); -static const u8 TrainerEyeDescription_61[] = _( +static const u8 TrainerEyeDescription_Leader_Winona[] = _( "Ich nutze die Initiative.$" "Anmutige Himmelstänzer.$" "Ich sehe das Auf und Ab$" "der Winde."); -static const u8 TrainerEyeDescription_62[] = _( +static const u8 TrainerEyeDescription_Leader_TateAndLiza[] = _( "Wir kämpfen zusammen.$" "Immer freundliche PKMN.$" "Wir verstehen uns.$" "Und wir verstehen andere."); -static const u8 TrainerEyeDescription_63[] = _( +static const u8 TrainerEyeDescription_Leader_Wallace[] = _( "Würde und Respekt.$" "Ich liebe anmutige PKMN.$" "Wasserillusionen unter-$" "streichen meinen Stil."); -static const u8 TrainerEyeDescription_64[] = _( +static const u8 TrainerEyeDescription_EliteFour_Sidney[] = _( "Offensive vor Defensive.$" "Das Schöne des UNLICHTS.$" "Du kannst sagen, was du$" "willst, Macht ist alles!"); -static const u8 TrainerEyeDescription_65[] = _( +static const u8 TrainerEyeDescription_EliteFour_Phoebe[] = _( "Verwirrend verwirren.$" "Keine besondere Vorliebe.$" "Wie es wohl meiner Oma am$" "PYROBERG geht?"); -static const u8 TrainerEyeDescription_66[] = _( +static const u8 TrainerEyeDescription_EliteFour_Glacia[] = _( "Ich setze Items ein.$" "Flammendes Inferno in Eis.$" "Der EIS-Typ entwickelt$" "sich gut an warmen Orten."); -static const u8 TrainerEyeDescription_67[] = _( +static const u8 TrainerEyeDescription_EliteFour_Drake[] = _( "Starke Fähigkeiten nutzen.$" "Die rohe Kraft der DRACHEN.$" "Beim täglichen Kampf lerne$" "ich alles über PKMN."); -static const u8 TrainerEyeDescription_68[] = _( +static const u8 TrainerEyeDescription_Champion_Steven[] = _( "Die gegn. Schwäche nutzen.$" "Das ultimative STAHL-PKMN.$" "Wenn es drauf ankommt,$" @@ -414,73 +414,73 @@ static const u8 TrainerEyeDescription_68[] = _( const u8 *const gTrainerEyeDescriptions[] = { - TrainerEyeDescription_0, - TrainerEyeDescription_1, - TrainerEyeDescription_2, - TrainerEyeDescription_3, - TrainerEyeDescription_4, - TrainerEyeDescription_5, - TrainerEyeDescription_6, - TrainerEyeDescription_7, - TrainerEyeDescription_8, - TrainerEyeDescription_9, - TrainerEyeDescription_10, - TrainerEyeDescription_11, - TrainerEyeDescription_12, - TrainerEyeDescription_13, - TrainerEyeDescription_14, - TrainerEyeDescription_15, - TrainerEyeDescription_16, - TrainerEyeDescription_17, - TrainerEyeDescription_18, - TrainerEyeDescription_19, - TrainerEyeDescription_20, - TrainerEyeDescription_21, - TrainerEyeDescription_22, - TrainerEyeDescription_23, - TrainerEyeDescription_24, - TrainerEyeDescription_25, - TrainerEyeDescription_26, - TrainerEyeDescription_27, - TrainerEyeDescription_28, - TrainerEyeDescription_29, - TrainerEyeDescription_30, - TrainerEyeDescription_31, - TrainerEyeDescription_32, - TrainerEyeDescription_33, - TrainerEyeDescription_34, - TrainerEyeDescription_35, - TrainerEyeDescription_36, - TrainerEyeDescription_37, - TrainerEyeDescription_38, - TrainerEyeDescription_39, - TrainerEyeDescription_40, - TrainerEyeDescription_41, - TrainerEyeDescription_42, - TrainerEyeDescription_43, - TrainerEyeDescription_44, - TrainerEyeDescription_45, - TrainerEyeDescription_46, - TrainerEyeDescription_47, - TrainerEyeDescription_48, - TrainerEyeDescription_49, - TrainerEyeDescription_50, - TrainerEyeDescription_51, - TrainerEyeDescription_52, - TrainerEyeDescription_53, - TrainerEyeDescription_54, - TrainerEyeDescription_55, - TrainerEyeDescription_56, - TrainerEyeDescription_57, - TrainerEyeDescription_58, - TrainerEyeDescription_59, - TrainerEyeDescription_60, - TrainerEyeDescription_61, - TrainerEyeDescription_62, - TrainerEyeDescription_63, - TrainerEyeDescription_64, - TrainerEyeDescription_65, - TrainerEyeDescription_66, - TrainerEyeDescription_67, - TrainerEyeDescription_68 + TrainerEyeDescription_AromaLady_Rose, + TrainerEyeDescription_RuinManiac_Dusty, + TrainerEyeDescription_Tuber_Lola, + TrainerEyeDescription_Tuber_Ricky, + TrainerEyeDescription_SisAndBro_RitaAndSam, + TrainerEyeDescription_Cooltrainer_Brooke, + TrainerEyeDescription_Cooltrainer_Wilton, + TrainerEyeDescription_HexManiac_Valerie, + TrainerEyeDescription_Lady_Cindy, + TrainerEyeDescription_Beauty_Jessica, + TrainerEyeDescription_RichBoy_Winston, + TrainerEyeDescription_PokeManiac_Steve, + TrainerEyeDescription_Swimmer_Tony, + TrainerEyeDescription_BlackBelt_Nob, + TrainerEyeDescription_Guitarist_Dalton, + TrainerEyeDescription_Kindler_Bernie, + TrainerEyeDescription_Camper_Ethan, + TrainerEyeDescription_OldCouple_JohnAndJay, + TrainerEyeDescription_BugManiac_Brandon, + TrainerEyeDescription_Psychic_Cameron, + TrainerEyeDescription_Psychic_Jacki, + TrainerEyeDescription_Gentleman_Walter, + TrainerEyeDescription_SchoolKid_Karen, + TrainerEyeDescription_SchoolKid_Jerry, + TrainerEyeDescription_SrAndJr_AnnaAndMeg, + TrainerEyeDescription_Pokefan_Isabel, + TrainerEyeDescription_Pokefan_Miguel, + TrainerEyeDescription_Expert_Timothy, + TrainerEyeDescription_Expert_Shelby, + TrainerEyeDescription_Youngster_Calvin, + TrainerEyeDescription_Fisherman_Elliot, + TrainerEyeDescription_Triathlete_Abigail, + TrainerEyeDescription_Triathlete_Benjamin, + TrainerEyeDescription_Triathlete_Isaiah, + TrainerEyeDescription_Triathlete_Katelyn, + TrainerEyeDescription_Triathlete_Maria, + TrainerEyeDescription_Triathlete_Dylan, + TrainerEyeDescription_DragonTamer_Nicolas, + TrainerEyeDescription_BirdKeeper_Robert, + TrainerEyeDescription_NinjaBoy_Lao, + TrainerEyeDescription_BattleGirl_Cyndy, + TrainerEyeDescription_ParasolLady_Madeline, + TrainerEyeDescription_Swimmer_Jenny, + TrainerEyeDescription_Picnicker_Diana, + TrainerEyeDescription_Twins_AmyAndLiv, + TrainerEyeDescription_Sailor_Ernest, + TrainerEyeDescription_Collector_Edwin, + TrainerEyeDescription_PkmnBreeder_Lydia, + TrainerEyeDescription_PkmnBreeder_Isaac, + TrainerEyeDescription_PkmnRanger_Catherine, + TrainerEyeDescription_PkmnRanger_Jackson, + TrainerEyeDescription_Lass_Haley, + TrainerEyeDescription_BugCatcher_James, + TrainerEyeDescription_Hiker_Trent, + TrainerEyeDescription_YoungCouple_LoisAndHal, + TrainerEyeDescription_PkmnTrainer_Wally, + TrainerEyeDescription_Leader_Roxanne, + TrainerEyeDescription_Leader_Brawly, + TrainerEyeDescription_Leader_Wattson, + TrainerEyeDescription_Leader_Flannery, + TrainerEyeDescription_Leader_Norman, + TrainerEyeDescription_Leader_Winona, + TrainerEyeDescription_Leader_TateAndLiza, + TrainerEyeDescription_Leader_Wallace, + TrainerEyeDescription_EliteFour_Sidney, + TrainerEyeDescription_EliteFour_Phoebe, + TrainerEyeDescription_EliteFour_Glacia, + TrainerEyeDescription_EliteFour_Drake, + TrainerEyeDescription_Champion_Steven }; diff --git a/src/data/text/trainer_eye_descriptions_en.h b/src/data/text/trainer_eye_descriptions_en.h index 02fc2efdd..bc07c3f5b 100644 --- a/src/data/text/trainer_eye_descriptions_en.h +++ b/src/data/text/trainer_eye_descriptions_en.h @@ -1,412 +1,412 @@ -static const u8 TrainerEyeDescription_0[] = _( +static const u8 TrainerEyeDescription_AromaLady_Rose[] = _( "Becalm fighting emotions.$" "Fragrant GRASS POKéMON$" "Soothing aromas make the$" "body and mind healthy."); -static const u8 TrainerEyeDescription_1[] = _( +static const u8 TrainerEyeDescription_RuinManiac_Dusty[] = _( "Overwhelm with power!$" "Craggy ROCK POKéMON$" "In search of ancient lore,$" "I travel the world."); -static const u8 TrainerEyeDescription_2[] = _( +static const u8 TrainerEyeDescription_Tuber_Lola[] = _( "I'm going to try hard!$" "Good swimmer POKéMON$" "I wish I could swim without$" "using an inner tube."); -static const u8 TrainerEyeDescription_3[] = _( +static const u8 TrainerEyeDescription_Tuber_Ricky[] = _( "I don't know. I'll try hard.$" "WATER POKéMON are buddies.$" "It's not like I can't swim.$" "I just like my inner tube."); -static const u8 TrainerEyeDescription_4[] = _( +static const u8 TrainerEyeDescription_SisAndBro_RitaAndSam[] = _( "We split our duties.$" "We like friendly POKéMON.$" "We enjoy POKéMON together$" "as sister and brother."); -static const u8 TrainerEyeDescription_5[] = _( +static const u8 TrainerEyeDescription_Cooltrainer_Brooke[] = _( "Exploit the foe's weakness.$" "Balance is crucial.$" "My goal is to become the$" "POKéMON CHAMPION."); -static const u8 TrainerEyeDescription_6[] = _( +static const u8 TrainerEyeDescription_Cooltrainer_Wilton[] = _( "Upset the opponent.$" "Type doesn't matter.$" "I'm a top student at the$" "TRAINER'S SCHOOL."); -static const u8 TrainerEyeDescription_7[] = _( +static const u8 TrainerEyeDescription_HexManiac_Valerie[] = _( "Slow, steady suffering$" "Scary to meet at night.$" "I see things that others$" "can't see..."); -static const u8 TrainerEyeDescription_8[] = _( +static const u8 TrainerEyeDescription_Lady_Cindy[] = _( "Anything to win.$" "Gorgeous type!$" "I have a pool specially for$" "my POKéMON at home."); -static const u8 TrainerEyeDescription_9[] = _( +static const u8 TrainerEyeDescription_Beauty_Jessica[] = _( "I'll lead you astray.$" "Cute, of course.$" "I love the SAFARI ZONE.$" "I seem to end up there."); -static const u8 TrainerEyeDescription_10[] = _( +static const u8 TrainerEyeDescription_RichBoy_Winston[] = _( "Strategy? Who needs it?$" "I spent big money on it!$" "I, being rich, sleep in a$" "custom POKéMON bed."); -static const u8 TrainerEyeDescription_11[] = _( +static const u8 TrainerEyeDescription_PokeManiac_Steve[] = _( "Wrestle down with power.$" "Took all night to catch...$" "Big, burly, and buff$" "POKéMON are the best..."); -static const u8 TrainerEyeDescription_12[] = _( +static const u8 TrainerEyeDescription_Swimmer_Tony[] = _( "Ram at full speed!$" "Funky WATER type!$" "If I can't be out swimming,$" "I'll be pumping weights."); -static const u8 TrainerEyeDescription_13[] = _( +static const u8 TrainerEyeDescription_BlackBelt_Nob[] = _( "Grand slam pummeling!$" "FIGHTING type$" "Not to brag, but I can bust$" "ten roof tiles!"); -static const u8 TrainerEyeDescription_14[] = _( +static const u8 TrainerEyeDescription_Guitarist_Dalton[] = _( "I'll electrify you!$" "They're ELECTRIC!$" "I want to make people cry$" "with songs from my heart."); -static const u8 TrainerEyeDescription_15[] = _( +static const u8 TrainerEyeDescription_Kindler_Bernie[] = _( "Burn it all down!$" "Burn-inducing POKéMON$" "When you light a campfire,$" "be sure there's some water."); -static const u8 TrainerEyeDescription_16[] = _( +static const u8 TrainerEyeDescription_Camper_Ethan[] = _( "Hang in and be tenacious!$" "I'll raise any POKéMON.$" "POKéMON raised in the wild$" "grow strong!"); -static const u8 TrainerEyeDescription_17[] = _( +static const u8 TrainerEyeDescription_OldCouple_JohnAndJay[] = _( "Our love lets us prevail.$" "We've had them for years.$" "Married 50 years, we've$" "devotedly raised POKéMON."); -static const u8 TrainerEyeDescription_18[] = _( +static const u8 TrainerEyeDescription_BugManiac_Brandon[] = _( "Attack in waves!$" "BUG POKéMON are cool.$" "I go into the forest every$" "day to catch BUG POKéMON."); -static const u8 TrainerEyeDescription_19[] = _( +static const u8 TrainerEyeDescription_Psychic_Cameron[] = _( "Daze and confuse!$" "Ones with weird powers.$" "I can see through exactly$" "what you're thinking!"); -static const u8 TrainerEyeDescription_20[] = _( +static const u8 TrainerEyeDescription_Psychic_Jacki[] = _( "Battle at full power.$" "POKéMON of many mysteries$" "When we spoke, I was really$" "using telepathy."); -static const u8 TrainerEyeDescription_21[] = _( +static const u8 TrainerEyeDescription_Gentleman_Walter[] = _( "Calm and collected.$" "POKéMON of distinction$" "We enjoy a spot of tea$" "every day. It's imported."); -static const u8 TrainerEyeDescription_22[] = _( +static const u8 TrainerEyeDescription_SchoolKid_Karen[] = _( "I use my head to battle.$" "I love any kind of POKéMON!$" "My daddy gives me spending$" "money if I ace a test."); -static const u8 TrainerEyeDescription_23[] = _( +static const u8 TrainerEyeDescription_SchoolKid_Jerry[] = _( "My knowledge rules!$" "Any smart POKéMON!$" "I want to be a POKéMON$" "researcher in the future."); -static const u8 TrainerEyeDescription_24[] = _( +static const u8 TrainerEyeDescription_SrAndJr_AnnaAndMeg[] = _( "We talk it over first.$" "POKéMON that we both like.$" "We're senior and junior$" "students into POKéMON!"); -static const u8 TrainerEyeDescription_25[] = _( +static const u8 TrainerEyeDescription_Pokefan_Isabel[] = _( "Go for it, my dears!$" "I have no likes or dislikes.$" "While out shopping for$" "supper, I battle too."); -static const u8 TrainerEyeDescription_26[] = _( +static const u8 TrainerEyeDescription_Pokefan_Miguel[] = _( "I battle with love!$" "A POKéMON raised with love!$" "It's important to build$" "trust with your POKéMON."); -static const u8 TrainerEyeDescription_27[] = _( +static const u8 TrainerEyeDescription_Expert_Timothy[] = _( "I see through your moves!$" "The essence of FIGHTING.$" "I'm not ready to give way$" "to the young yet!"); -static const u8 TrainerEyeDescription_28[] = _( +static const u8 TrainerEyeDescription_Expert_Shelby[] = _( "Attack while defending$" "The FIGHTING type$" "Being old, I have my own$" "style of battling."); -static const u8 TrainerEyeDescription_29[] = _( +static const u8 TrainerEyeDescription_Youngster_Calvin[] = _( "I do what I can.$" "I use different types.$" "I'm going to keep working$" "until I beat a GYM LEADER."); -static const u8 TrainerEyeDescription_30[] = _( +static const u8 TrainerEyeDescription_Fisherman_Elliot[] = _( "I battle patiently.$" "WATER POKéMON to battle!$" "I'm the world's only guy to$" "catch a huge POKéMON!"); -static const u8 TrainerEyeDescription_31[] = _( +static const u8 TrainerEyeDescription_Triathlete_Abigail[] = _( "Defense is crucial.$" "My POKéMON is solid.$" "I started this for dieting,$" "but I got right into it."); -static const u8 TrainerEyeDescription_32[] = _( +static const u8 TrainerEyeDescription_Triathlete_Benjamin[] = _( "Push and push again!$" "The strength of STEEL$" "If you're sweating, get$" "fluids into you regularly."); -static const u8 TrainerEyeDescription_33[] = _( +static const u8 TrainerEyeDescription_Triathlete_Isaiah[] = _( "Exploit the environment!$" "All hail the WATER type!$" "I won't be beaten by some$" "beach bum SWIMMER!"); -static const u8 TrainerEyeDescription_34[] = _( +static const u8 TrainerEyeDescription_Triathlete_Katelyn[] = _( "All-out offensive!$" "WATER POKéMON rule!$" "I must swim over 6 miles$" "every day."); -static const u8 TrainerEyeDescription_35[] = _( +static const u8 TrainerEyeDescription_Triathlete_Maria[] = _( "Speed above all!$" "I use a speedy POKéMON.$" "A marathon is a challenge$" "against your own self."); -static const u8 TrainerEyeDescription_36[] = _( +static const u8 TrainerEyeDescription_Triathlete_Dylan[] = _( "Strike before stricken!$" "A fast-running POKéMON!$" "If you ran and ran, you'd$" "become one with the wind."); -static const u8 TrainerEyeDescription_37[] = _( +static const u8 TrainerEyeDescription_DragonTamer_Nicolas[] = _( "It's about POKéMON power!$" "See the power of DRAGONS!$" "I'll become legendary as the$" "strongest one day!"); -static const u8 TrainerEyeDescription_38[] = _( +static const u8 TrainerEyeDescription_BirdKeeper_Robert[] = _( "I'll show you my technique!$" "Elegantly wheeling BIRDS$" "My BIRD POKéMON, deliver my$" "love to that girl!"); -static const u8 TrainerEyeDescription_39[] = _( +static const u8 TrainerEyeDescription_NinjaBoy_Lao[] = _( "You'll suffer from poison!$" "Poisonous POKéMON$" "I undertake training so$" "that I may become a ninja."); -static const u8 TrainerEyeDescription_40[] = _( +static const u8 TrainerEyeDescription_BattleGirl_Cyndy[] = _( "The first strike wins!$" "Speedy FIGHTING type$" "If my POKéMON lose,$" "I'll carry on the fight!"); -static const u8 TrainerEyeDescription_41[] = _( +static const u8 TrainerEyeDescription_ParasolLady_Madeline[] = _( "Go, go, my POKéMON!$" "I'll raise anything.$" "UV rays are your skin's$" "enemy. Get protected."); -static const u8 TrainerEyeDescription_42[] = _( +static const u8 TrainerEyeDescription_Swimmer_Jenny[] = _( "No mercy!$" "Cute WATER POKéMON$" "I have too many fans.$" "I was interviewed on TV."); -static const u8 TrainerEyeDescription_43[] = _( +static const u8 TrainerEyeDescription_Picnicker_Diana[] = _( "I think about this & that.$" "I like all POKéMON.$" "What lies beyond that$" "yonder hill?"); -static const u8 TrainerEyeDescription_44[] = _( +static const u8 TrainerEyeDescription_Twins_AmyAndLiv[] = _( "We battle together!$" "We train together!$" "We like the same POKéMON,$" "but different desserts."); -static const u8 TrainerEyeDescription_45[] = _( +static const u8 TrainerEyeDescription_Sailor_Ernest[] = _( "I force things with power!$" "WATER and FIGHTING types$" "Seamen are rough spirits!$" "Any complaints?"); -static const u8 TrainerEyeDescription_46[] = _( +static const u8 TrainerEyeDescription_Collector_Edwin[] = _( "Protect POKéMON from harm.$" "I love rare POKéMON.$" "I want to collect all the$" "world's rare POKéMON."); -static const u8 TrainerEyeDescription_47[] = _( +static const u8 TrainerEyeDescription_PkmnBreeder_Lydia[] = _( "I count on power.$" "POKéMON are my children.$" "It takes knowledge and$" "love to raise POKéMON."); -static const u8 TrainerEyeDescription_48[] = _( +static const u8 TrainerEyeDescription_PkmnBreeder_Isaac[] = _( "Full-on attack!$" "Anything. I'll raise it.$" "I give them {POKEBLOCK}S for$" "going after CONTEST titles."); -static const u8 TrainerEyeDescription_49[] = _( +static const u8 TrainerEyeDescription_PkmnRanger_Catherine[] = _( "I believe in my POKéMON.$" "I like strong POKéMON.$" "I'm training for rescue$" "work with my POKéMON."); -static const u8 TrainerEyeDescription_50[] = _( +static const u8 TrainerEyeDescription_PkmnRanger_Jackson[] = _( "I attack in waves.$" "Different types$" "Those who destroy nature$" "must never be forgiven!"); -static const u8 TrainerEyeDescription_51[] = _( +static const u8 TrainerEyeDescription_Lass_Haley[] = _( "I'll show you some guts!$" "Cute POKéMON are my faves!$" "After a battle, I always$" "bathe with my POKéMON."); -static const u8 TrainerEyeDescription_52[] = _( +static const u8 TrainerEyeDescription_BugCatcher_James[] = _( "Lightning-fast attack!$" "BUG POKéMON are number 1!$" "If you want to catch BUG$" "POKéMON, wake up early."); -static const u8 TrainerEyeDescription_53[] = _( +static const u8 TrainerEyeDescription_Hiker_Trent[] = _( "I battle with power.$" "Hard-bodied POKéMON$" "I've been planning a month$" "for today's hike."); -static const u8 TrainerEyeDescription_54[] = _( +static const u8 TrainerEyeDescription_YoungCouple_LoisAndHal[] = _( "Lovey-dovey strategy!$" "Lovey-dovey POKéMON!$" "We're lovey-dovey!$" "Forever lovey-dovey!"); -static const u8 TrainerEyeDescription_55[] = _( +static const u8 TrainerEyeDescription_PkmnTrainer_Wally[] = _( "We let it all hang out.$" "The 1st POKéMON I caught.$" "POKéMON and I have grown$" "stronger together."); -static const u8 TrainerEyeDescription_56[] = _( +static const u8 TrainerEyeDescription_Leader_Roxanne[] = _( "ROCK-type power attack$" "Rock-solid types are good.$" "Through battling, I want to$" "learn all about POKéMON."); -static const u8 TrainerEyeDescription_57[] = _( +static const u8 TrainerEyeDescription_Leader_Brawly[] = _( "Direct physical action!$" "FIGHTING POKéMON rule!$" "The world awaits me as the$" "next big wave!"); -static const u8 TrainerEyeDescription_58[] = _( +static const u8 TrainerEyeDescription_Leader_Wattson[] = _( "I choose to electrify.$" "Get shocked by electricity!$" "Wahahahaha! The secret to$" "health is laughter!"); -static const u8 TrainerEyeDescription_59[] = _( +static const u8 TrainerEyeDescription_Leader_Flannery[] = _( "Battle aggressively.$" "Burn with passion!$" "Wash away daily fatigue in$" "hot springs completely!"); -static const u8 TrainerEyeDescription_60[] = _( +static const u8 TrainerEyeDescription_Leader_Norman[] = _( "I flexibly adapt my style.$" "Grown in a balanced manner.$" "POKéMON are my life.$" "My chosen path is harsh..."); -static const u8 TrainerEyeDescription_61[] = _( +static const u8 TrainerEyeDescription_Leader_Winona[] = _( "I take advantage of speed.$" "Graceful sky dancers$" "I can see the ebb and flow$" "of the winds."); -static const u8 TrainerEyeDescription_62[] = _( +static const u8 TrainerEyeDescription_Leader_TateAndLiza[] = _( "We battle in cooperation.$" "Always friendly POKéMON.$" "We understand each other,$" "and we understand others."); -static const u8 TrainerEyeDescription_63[] = _( +static const u8 TrainerEyeDescription_Leader_Wallace[] = _( "Dignity and respect$" "I prefer POKéMON of grace.$" "Aquatic illusions best suit$" "my distinctive elegance."); -static const u8 TrainerEyeDescription_64[] = _( +static const u8 TrainerEyeDescription_EliteFour_Sidney[] = _( "Offense over defense$" "The DARK side's beauties$" "You can talk all you want -$" "might is right!"); -static const u8 TrainerEyeDescription_65[] = _( +static const u8 TrainerEyeDescription_EliteFour_Phoebe[] = _( "Confuse and confound$" "There's nothing definite.$" "I wonder how my grandma at$" "MT. PYRE is doing?"); -static const u8 TrainerEyeDescription_66[] = _( +static const u8 TrainerEyeDescription_EliteFour_Glacia[] = _( "I use items for help.$" "Flaming passion in icy cold!$" "The ICE type can be better$" "trained in this hot land."); -static const u8 TrainerEyeDescription_67[] = _( +static const u8 TrainerEyeDescription_EliteFour_Drake[] = _( "Harness strong abilities.$" "The raw power of DRAGONS!$" "I live to battle every day$" "to learn about POKéMON."); -static const u8 TrainerEyeDescription_68[] = _( +static const u8 TrainerEyeDescription_Champion_Steven[] = _( "Pick on the foe's weakness.$" "The ultimate STEEL POKéMON$" "When it comes down to it,$" @@ -414,73 +414,73 @@ static const u8 TrainerEyeDescription_68[] = _( const u8 *const gTrainerEyeDescriptions[] = { - TrainerEyeDescription_0, - TrainerEyeDescription_1, - TrainerEyeDescription_2, - TrainerEyeDescription_3, - TrainerEyeDescription_4, - TrainerEyeDescription_5, - TrainerEyeDescription_6, - TrainerEyeDescription_7, - TrainerEyeDescription_8, - TrainerEyeDescription_9, - TrainerEyeDescription_10, - TrainerEyeDescription_11, - TrainerEyeDescription_12, - TrainerEyeDescription_13, - TrainerEyeDescription_14, - TrainerEyeDescription_15, - TrainerEyeDescription_16, - TrainerEyeDescription_17, - TrainerEyeDescription_18, - TrainerEyeDescription_19, - TrainerEyeDescription_20, - TrainerEyeDescription_21, - TrainerEyeDescription_22, - TrainerEyeDescription_23, - TrainerEyeDescription_24, - TrainerEyeDescription_25, - TrainerEyeDescription_26, - TrainerEyeDescription_27, - TrainerEyeDescription_28, - TrainerEyeDescription_29, - TrainerEyeDescription_30, - TrainerEyeDescription_31, - TrainerEyeDescription_32, - TrainerEyeDescription_33, - TrainerEyeDescription_34, - TrainerEyeDescription_35, - TrainerEyeDescription_36, - TrainerEyeDescription_37, - TrainerEyeDescription_38, - TrainerEyeDescription_39, - TrainerEyeDescription_40, - TrainerEyeDescription_41, - TrainerEyeDescription_42, - TrainerEyeDescription_43, - TrainerEyeDescription_44, - TrainerEyeDescription_45, - TrainerEyeDescription_46, - TrainerEyeDescription_47, - TrainerEyeDescription_48, - TrainerEyeDescription_49, - TrainerEyeDescription_50, - TrainerEyeDescription_51, - TrainerEyeDescription_52, - TrainerEyeDescription_53, - TrainerEyeDescription_54, - TrainerEyeDescription_55, - TrainerEyeDescription_56, - TrainerEyeDescription_57, - TrainerEyeDescription_58, - TrainerEyeDescription_59, - TrainerEyeDescription_60, - TrainerEyeDescription_61, - TrainerEyeDescription_62, - TrainerEyeDescription_63, - TrainerEyeDescription_64, - TrainerEyeDescription_65, - TrainerEyeDescription_66, - TrainerEyeDescription_67, - TrainerEyeDescription_68, + TrainerEyeDescription_AromaLady_Rose, + TrainerEyeDescription_RuinManiac_Dusty, + TrainerEyeDescription_Tuber_Lola, + TrainerEyeDescription_Tuber_Ricky, + TrainerEyeDescription_SisAndBro_RitaAndSam, + TrainerEyeDescription_Cooltrainer_Brooke, + TrainerEyeDescription_Cooltrainer_Wilton, + TrainerEyeDescription_HexManiac_Valerie, + TrainerEyeDescription_Lady_Cindy, + TrainerEyeDescription_Beauty_Jessica, + TrainerEyeDescription_RichBoy_Winston, + TrainerEyeDescription_PokeManiac_Steve, + TrainerEyeDescription_Swimmer_Tony, + TrainerEyeDescription_BlackBelt_Nob, + TrainerEyeDescription_Guitarist_Dalton, + TrainerEyeDescription_Kindler_Bernie, + TrainerEyeDescription_Camper_Ethan, + TrainerEyeDescription_OldCouple_JohnAndJay, + TrainerEyeDescription_BugManiac_Brandon, + TrainerEyeDescription_Psychic_Cameron, + TrainerEyeDescription_Psychic_Jacki, + TrainerEyeDescription_Gentleman_Walter, + TrainerEyeDescription_SchoolKid_Karen, + TrainerEyeDescription_SchoolKid_Jerry, + TrainerEyeDescription_SrAndJr_AnnaAndMeg, + TrainerEyeDescription_Pokefan_Isabel, + TrainerEyeDescription_Pokefan_Miguel, + TrainerEyeDescription_Expert_Timothy, + TrainerEyeDescription_Expert_Shelby, + TrainerEyeDescription_Youngster_Calvin, + TrainerEyeDescription_Fisherman_Elliot, + TrainerEyeDescription_Triathlete_Abigail, + TrainerEyeDescription_Triathlete_Benjamin, + TrainerEyeDescription_Triathlete_Isaiah, + TrainerEyeDescription_Triathlete_Katelyn, + TrainerEyeDescription_Triathlete_Maria, + TrainerEyeDescription_Triathlete_Dylan, + TrainerEyeDescription_DragonTamer_Nicolas, + TrainerEyeDescription_BirdKeeper_Robert, + TrainerEyeDescription_NinjaBoy_Lao, + TrainerEyeDescription_BattleGirl_Cyndy, + TrainerEyeDescription_ParasolLady_Madeline, + TrainerEyeDescription_Swimmer_Jenny, + TrainerEyeDescription_Picnicker_Diana, + TrainerEyeDescription_Twins_AmyAndLiv, + TrainerEyeDescription_Sailor_Ernest, + TrainerEyeDescription_Collector_Edwin, + TrainerEyeDescription_PkmnBreeder_Lydia, + TrainerEyeDescription_PkmnBreeder_Isaac, + TrainerEyeDescription_PkmnRanger_Catherine, + TrainerEyeDescription_PkmnRanger_Jackson, + TrainerEyeDescription_Lass_Haley, + TrainerEyeDescription_BugCatcher_James, + TrainerEyeDescription_Hiker_Trent, + TrainerEyeDescription_YoungCouple_LoisAndHal, + TrainerEyeDescription_PkmnTrainer_Wally, + TrainerEyeDescription_Leader_Roxanne, + TrainerEyeDescription_Leader_Brawly, + TrainerEyeDescription_Leader_Wattson, + TrainerEyeDescription_Leader_Flannery, + TrainerEyeDescription_Leader_Norman, + TrainerEyeDescription_Leader_Winona, + TrainerEyeDescription_Leader_TateAndLiza, + TrainerEyeDescription_Leader_Wallace, + TrainerEyeDescription_EliteFour_Sidney, + TrainerEyeDescription_EliteFour_Phoebe, + TrainerEyeDescription_EliteFour_Glacia, + TrainerEyeDescription_EliteFour_Drake, + TrainerEyeDescription_Champion_Steven, }; diff --git a/src/pokenav_before.c b/src/pokenav_before.c index d339fbffc..c9390a070 100644 --- a/src/pokenav_before.c +++ b/src/pokenav_before.c @@ -26,6 +26,7 @@ #include "pokemon_summary_screen.h" #include "use_pokeblock.h" #include "constants/game_stat.h" +#include "pokemon.h" struct UnknownPokenav0 { @@ -232,22 +233,22 @@ const u16 Palette_3E42D8[] = INCBIN_U16("graphics/pokenav/83E42D8.gbapal"); const u16 gUnknown_083E42F8[] = { - 0x408, - 0x408, - 0x507, - 0x507, - 0x606, - 0x606, - 0x805, - 0x805, - 0xA04, - 0xA04, - 0xC03, - 0xC03, - 0xE02, - 0xE02, - 0x1000, - 0x1000, + BLDALPHA_BLEND(8, 4), + BLDALPHA_BLEND(8, 4), + BLDALPHA_BLEND(7, 5), + BLDALPHA_BLEND(7, 5), + BLDALPHA_BLEND(6, 6), + BLDALPHA_BLEND(6, 6), + BLDALPHA_BLEND(5, 8), + BLDALPHA_BLEND(5, 8), + BLDALPHA_BLEND(4, 10), + BLDALPHA_BLEND(4, 10), + BLDALPHA_BLEND(3, 12), + BLDALPHA_BLEND(3, 12), + BLDALPHA_BLEND(2, 14), + BLDALPHA_BLEND(2, 14), + BLDALPHA_BLEND(0, 16), + BLDALPHA_BLEND(0, 16), }; const struct OamData gOamData_83E4318 = @@ -1095,23 +1096,23 @@ const struct ScanlineEffectParams gUnknown_083E4990 = const u16 gUnknown_083E499C[] = { - 0x43, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, + MON_DATA_CHAMPION_RIBBON, + MON_DATA_COOL_RIBBON, + MON_DATA_BEAUTY_RIBBON, + MON_DATA_CUTE_RIBBON, + MON_DATA_SMART_RIBBON, + MON_DATA_TOUGH_RIBBON, + MON_DATA_WINNING_RIBBON, + MON_DATA_VICTORY_RIBBON, + MON_DATA_ARTIST_RIBBON, + MON_DATA_EFFORT_RIBBON, + MON_DATA_GIFT_RIBBON_1, + MON_DATA_GIFT_RIBBON_2, + MON_DATA_GIFT_RIBBON_3, + MON_DATA_GIFT_RIBBON_4, + MON_DATA_GIFT_RIBBON_5, + MON_DATA_GIFT_RIBBON_6, + MON_DATA_GIFT_RIBBON_7, }; void sub_80EBA5C() -- cgit v1.2.3 From 39683e0362a63ecbffc289b1e45d3e10106fbc58 Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 29 Jul 2019 14:42:28 -0400 Subject: use more accurate metatile collision expression --- include/global.fieldmap.h | 6 ++++ src/braille_puzzles.c | 12 +++---- src/field_specials.c | 88 +++++++++++++++++++++++------------------------ src/fieldmap.c | 6 ++-- src/fldeff_escalator.c | 4 +-- src/scrcmd.c | 6 ++-- src/tv.c | 2 +- 7 files changed, 65 insertions(+), 59 deletions(-) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 6a583d6e4..27b2b5593 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -1,6 +1,12 @@ #ifndef GUARD_GLOBAL_FIELDMAP_H #define GUARD_GLOBAL_FIELDMAP_H +#define COLLISION_DIR_SOUTH 0 +#define COLLISION_DIR_NORTH 1 +#define COLLISION_DIR_WEST 2 +#define COLLISION_DIR_EAST 3 +#define COLLISION_DIR_ALL (COLLISION_DIR_NORTH | COLLISION_DIR_SOUTH | COLLISION_DIR_EAST | COLLISION_DIR_WEST) + #define METATILE_COLLISION_MASK 0x0C00 #define METATILE_ID_MASK 0x03FF #define METATILE_ID_UNDEFINED 0x03FF diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index b413d7d1b..e217de503 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -46,9 +46,9 @@ void DoBrailleDigEffect(void) MapGridSetMetatileIdAt(16, 8, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); MapGridSetMetatileIdAt(17, 8, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); MapGridSetMetatileIdAt(18, 8, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); - MapGridSetMetatileIdAt(16, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(16, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); MapGridSetMetatileIdAt(17, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); - MapGridSetMetatileIdAt(18, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_DIG); @@ -89,9 +89,9 @@ void DoBrailleStrengthEffect(void) MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); - MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); - MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_STRENGTH); @@ -135,9 +135,9 @@ void UseFlyAncientTomb_Finish(void) MapGridSetMetatileIdAt(14, 26, METATILE_ID(Cave, SealedChamberEntrance_TopLeft)); MapGridSetMetatileIdAt(15, 26, METATILE_ID(Cave, SealedChamberEntrance_TopMid)); MapGridSetMetatileIdAt(16, 26, METATILE_ID(Cave, SealedChamberEntrance_TopRight)); - MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(14, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomLeft) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); MapGridSetMetatileIdAt(15, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomMid)); - MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(16, 27, METATILE_ID(Cave, SealedChamberEntrance_BottomRight) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); DrawWholeMapView(); PlaySE(SE_BAN); FlagSet(FLAG_SYS_BRAILLE_FLY); diff --git a/src/field_specials.c b/src/field_specials.c index c24df157a..c23a8c44c 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -430,10 +430,10 @@ void MauvilleGymSpecial2(void) MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH2_On)); break; case METATILE_ID(MauvilleGym, GreenBeamH3_Off): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH3_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, GreenBeamH4_Off): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamH4_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, RedBeamH1_On): MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH1_Off)); @@ -454,41 +454,41 @@ void MauvilleGymSpecial2(void) MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH2_On)); break; case METATILE_ID(MauvilleGym, RedBeamH3_Off): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH3_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, RedBeamH4_Off): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, GreenBeamV1_On): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, GreenBeamV2_On): MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; case METATILE_ID(MauvilleGym, RedBeamV1_On): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, RedBeamV2_On): MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, FloorTile)); break; case METATILE_ID(MauvilleGym, PoleBottom_On): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV1_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV1_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, FloorTile): if (MapGridGetMetatileIdAt(x, y - 1) == METATILE_ID(MauvilleGym, GreenBeamV1_On)) { - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV2_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, GreenBeamV2_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); } else { - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV2_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV2_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); } break; case METATILE_ID(MauvilleGym, PoleBottom_Off): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV1_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamV1_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, PoleTop_Off): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, PoleTop_On): MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleTop_Off)); @@ -538,10 +538,10 @@ void MauvilleGymSpecial3(void) MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, RedBeamH4_Off)); break; case METATILE_ID(MauvilleGym, GreenBeamV1_On): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_On) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, RedBeamV1_On): - MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, METATILE_ID(MauvilleGym, PoleBottom_Off) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case METATILE_ID(MauvilleGym, GreenBeamV2_On): case METATILE_ID(MauvilleGym, RedBeamV2_On): @@ -913,7 +913,7 @@ static void PCTurnOffEffect(void) { tileId = METATILE_ID(BrendansMaysHouse, MayPC_Off); } - MapGridSetMetatileIdAt(gSaveBlock1.pos.x + dx + 7, gSaveBlock1.pos.y + dy + 7, tileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(gSaveBlock1.pos.x + dx + 7, gSaveBlock1.pos.y + dy + 7, tileId | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); DrawWholeMapView(); } @@ -949,13 +949,13 @@ static void LotteryCornerComputerEffect(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); } else { - MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Flash) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Flash) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Flash) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Flash) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); } DrawWholeMapView(); task->data[4] ^= 1; @@ -969,8 +969,8 @@ static void LotteryCornerComputerEffect(struct Task *task) void EndLotteryCornerComputerEffect(void) { - MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(18, 8, METATILE_ID(Shop, Laptop1_Normal) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(18, 9, METATILE_ID(Shop, Laptop2_Normal) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); DrawWholeMapView(); } @@ -1302,33 +1302,33 @@ void sub_810ED60(struct Task *task) task->data[3] = 0; if (task->data[4] != 0) { - MapGridSetMetatileIdAt( 7, 7, METATILE_BattleTower_Elevator_Top0 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 8, 7, METATILE_BattleTower_Elevator_Top1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 9, 7, METATILE_BattleTower_Elevator_Top1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(10, 7, METATILE_BattleTower_Elevator_Top2 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 7, 8, METATILE_BattleTower_Elevator_Mid0 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 8, 8, METATILE_BattleTower_Elevator_Mid1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 9, 8, METATILE_BattleTower_Elevator_Mid1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(10, 8, METATILE_BattleTower_Elevator_Mid2 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 7, 9, METATILE_BattleTower_Elevator_Bottom0 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 8, 9, METATILE_BattleTower_Elevator_Bottom1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 9, 9, METATILE_BattleTower_Elevator_Bottom1 | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(10, 9, METATILE_BattleTower_Elevator_Bottom2 | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 7, 7, METATILE_BattleTower_Elevator_Top0 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 8, 7, METATILE_BattleTower_Elevator_Top1 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 9, 7, METATILE_BattleTower_Elevator_Top1 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(10, 7, METATILE_BattleTower_Elevator_Top2 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 7, 8, METATILE_BattleTower_Elevator_Mid0 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 8, 8, METATILE_BattleTower_Elevator_Mid1 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 9, 8, METATILE_BattleTower_Elevator_Mid1 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(10, 8, METATILE_BattleTower_Elevator_Mid2 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 7, 9, METATILE_BattleTower_Elevator_Bottom0 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 8, 9, METATILE_BattleTower_Elevator_Bottom1 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 9, 9, METATILE_BattleTower_Elevator_Bottom1 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(10, 9, METATILE_BattleTower_Elevator_Bottom2 | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); } else { - MapGridSetMetatileIdAt( 7, 7, (METATILE_BattleTower_Elevator_Top0 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 8, 7, (METATILE_BattleTower_Elevator_Top1 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 9, 7, (METATILE_BattleTower_Elevator_Top1 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(10, 7, (METATILE_BattleTower_Elevator_Top2 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 7, 8, (METATILE_BattleTower_Elevator_Mid0 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 8, 8, (METATILE_BattleTower_Elevator_Mid1 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 9, 8, (METATILE_BattleTower_Elevator_Mid1 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(10, 8, (METATILE_BattleTower_Elevator_Mid2 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 7, 9, (METATILE_BattleTower_Elevator_Bottom0 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 8, 9, (METATILE_BattleTower_Elevator_Bottom1 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt( 9, 9, (METATILE_BattleTower_Elevator_Bottom1 + 3) | METATILE_COLLISION_MASK); - MapGridSetMetatileIdAt(10, 9, (METATILE_BattleTower_Elevator_Bottom2 + 3) | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt( 7, 7, (METATILE_BattleTower_Elevator_Top0 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 8, 7, (METATILE_BattleTower_Elevator_Top1 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 9, 7, (METATILE_BattleTower_Elevator_Top1 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(10, 7, (METATILE_BattleTower_Elevator_Top2 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 7, 8, (METATILE_BattleTower_Elevator_Mid0 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 8, 8, (METATILE_BattleTower_Elevator_Mid1 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 9, 8, (METATILE_BattleTower_Elevator_Mid1 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(10, 8, (METATILE_BattleTower_Elevator_Mid2 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 7, 9, (METATILE_BattleTower_Elevator_Bottom0 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 8, 9, (METATILE_BattleTower_Elevator_Bottom1 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt( 9, 9, (METATILE_BattleTower_Elevator_Bottom1 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); + MapGridSetMetatileIdAt(10, 9, (METATILE_BattleTower_Elevator_Bottom2 + 3) | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); } DrawWholeMapView(); task->data[4] ^= 1; diff --git a/src/fieldmap.c b/src/fieldmap.c index 4b5149878..8e24e3b9e 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -382,13 +382,13 @@ u8 MapGridIsImpassableAt(int x, int y) i = (x + 1) & 1; i += ((y + 1) & 1) * 2; block = gMapHeader.mapLayout->border[i]; - block |= 0xc00; + block |= METATILE_COLLISION_MASK; } - if (block == 0x3ff) + if (block == METATILE_ID_UNDEFINED) { return 1; } - return (block & 0xc00) >> 10; + return (block & METATILE_COLLISION_MASK) >> 10; } u32 MapGridGetMetatileIdAt(int x, int y) diff --git a/src/fldeff_escalator.c b/src/fldeff_escalator.c index 34a11b7c6..d2c9fe3c7 100644 --- a/src/fldeff_escalator.c +++ b/src/fldeff_escalator.c @@ -110,13 +110,13 @@ void sub_80B4710(u8 taskId) sub_80B45B4(taskId, sEscalatorMetatiles_1F_1, 0); break; case 2: - sub_80B45B4(taskId, sEscalatorMetatiles_1F_2, METATILE_COLLISION_MASK); + sub_80B45B4(taskId, sEscalatorMetatiles_1F_2, (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case 3: sub_80B45B4(taskId, sEscalatorMetatiles_1F_3, 0); break; case 4: - sub_80B45B4(taskId, sEscalatorMetatiles_2F_0, METATILE_COLLISION_MASK); + sub_80B45B4(taskId, sEscalatorMetatiles_2F_0, (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); break; case 5: sub_80B45B4(taskId, sEscalatorMetatiles_2F_1, 0); diff --git a/src/scrcmd.c b/src/scrcmd.c index 015fae69f..6084cfc5d 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1902,14 +1902,14 @@ bool8 ScrCmd_setmetatile(struct ScriptContext *ctx) u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); u16 metatileId = VarGet(ScriptReadHalfword(ctx)); - u16 v8 = VarGet(ScriptReadHalfword(ctx)); + u16 impassable = VarGet(ScriptReadHalfword(ctx)); x += 7; y += 7; - if (!v8) + if (!impassable) MapGridSetMetatileIdAt(x, y, metatileId); else - MapGridSetMetatileIdAt(x, y, metatileId | METATILE_COLLISION_MASK); + MapGridSetMetatileIdAt(x, y, metatileId | (COLLISION_DIR_ALL << METATILE_COLLISION_SHIFT)); return FALSE; } diff --git a/src/tv.c b/src/tv.c index 5b9867acb..9cd8d7eea 100644 --- a/src/tv.c +++ b/src/tv.c @@ -566,7 +566,7 @@ void SetTVMetatilesOnMap(int width, int height, u16 tileId) for (x=0; x Date: Tue, 30 Jul 2019 16:20:20 -0400 Subject: add jsonproc tool --- Makefile | 23 +- build_tools.sh | 1 + build_tools_mac.sh | 1 + tools/jsonproc/.gitignore | 1 + tools/jsonproc/Makefile | 17 + tools/jsonproc/inja.hpp | 3396 ++++++ tools/jsonproc/jsonproc.cpp | 119 + tools/jsonproc/jsonproc.h | 32 + tools/jsonproc/nlohmann/json.hpp | 20842 +++++++++++++++++++++++++++++++++++++ 9 files changed, 24422 insertions(+), 10 deletions(-) create mode 100755 tools/jsonproc/.gitignore create mode 100755 tools/jsonproc/Makefile create mode 100755 tools/jsonproc/inja.hpp create mode 100755 tools/jsonproc/jsonproc.cpp create mode 100755 tools/jsonproc/jsonproc.h create mode 100755 tools/jsonproc/nlohmann/json.hpp diff --git a/Makefile b/Makefile index 02f00c22e..ccde4e709 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ CC1 := tools/agbcc/bin/agbcc$(EXE) CPP := $(PREFIX)cpp LD := $(PREFIX)ld OBJCOPY := $(PREFIX)objcopy -SHA1SUM := sha1sum -c +SHA1SUM := shasum -c # change back to sha1sum GBAGFX := tools/gbagfx/gbagfx$(EXE) RSFONT := tools/rsfont/rsfont$(EXE) AIF2PCM := tools/aif2pcm/aif2pcm$(EXE) @@ -26,6 +26,7 @@ SCANINC := tools/scaninc/scaninc$(EXE) RAMSCRGEN := tools/ramscrgen/ramscrgen$(EXE) GBAFIX := tools/gbafix/gbafix$(EXE) MAPJSON := tools/mapjson/mapjson$(EXE) +JSONPROC := tools/jsonproc/jsonproc$(EXE) ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym $(GAME_LANGUAGE)=1 --defsym DEBUG=$(DEBUG) CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm @@ -114,15 +115,16 @@ clean: tidy rm -f data/layouts/layouts.inc data/layouts/layouts_table.inc rm -f data/maps/connections.inc data/maps/events.inc data/maps/groups.inc data/maps/headers.inc find data/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} + - $(MAKE) clean -C tools/gbagfx - $(MAKE) clean -C tools/scaninc - $(MAKE) clean -C tools/preproc - $(MAKE) clean -C tools/bin2c - $(MAKE) clean -C tools/rsfont - $(MAKE) clean -C tools/aif2pcm - $(MAKE) clean -C tools/ramscrgen - $(MAKE) clean -C tools/gbafix - $(MAKE) clean -C tools/mapjson +# $(MAKE) clean -C tools/gbagfx +# $(MAKE) clean -C tools/scaninc +# $(MAKE) clean -C tools/preproc +# $(MAKE) clean -C tools/bin2c +# $(MAKE) clean -C tools/rsfont +# $(MAKE) clean -C tools/aif2pcm +# $(MAKE) clean -C tools/ramscrgen +# $(MAKE) clean -C tools/gbafix +# $(MAKE) clean -C tools/mapjson +# $(MAKE) clean -C tools/jsonproc tools: @$(MAKE) -C tools/gbagfx @@ -135,6 +137,7 @@ tools: @$(MAKE) -C tools/mid2agb @$(MAKE) -C tools/gbafix @$(MAKE) -C tools/mapjson + @$(MAKE) -C tools/jsonproc tidy: $(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map}) diff --git a/build_tools.sh b/build_tools.sh index 7236072d4..5bf7404bd 100755 --- a/build_tools.sh +++ b/build_tools.sh @@ -7,3 +7,4 @@ make -C tools/rsfont make -C tools/aif2pcm make -C tools/ramscrgen make -C tools/gbafix +make -C tools/jsonproc diff --git a/build_tools_mac.sh b/build_tools_mac.sh index f9b758850..4ea70952e 100755 --- a/build_tools_mac.sh +++ b/build_tools_mac.sh @@ -7,3 +7,4 @@ make -C tools/rsfont CXX=clang++ make -C tools/aif2pcm CXX=clang++ make -C tools/ramscrgen CXX=clang++ make -C tools/gbafix CXX=clang++ +make -C tools/jsonproc CXX=clang++ diff --git a/tools/jsonproc/.gitignore b/tools/jsonproc/.gitignore new file mode 100755 index 000000000..a613cf2d7 --- /dev/null +++ b/tools/jsonproc/.gitignore @@ -0,0 +1 @@ +jsonproc diff --git a/tools/jsonproc/Makefile b/tools/jsonproc/Makefile new file mode 100755 index 000000000..69093a216 --- /dev/null +++ b/tools/jsonproc/Makefile @@ -0,0 +1,17 @@ +CXX := g++ + +CXXFLAGS := -Wall -std=c++11 -O2 + +INCLUDES := -I . + +SRCS := jsonproc.cpp + +HEADERS := jsonproc.h inja.hpp nlohmann/json.hpp + +.PHONY: clean + +jsonproc: $(SRCS) $(HEADERS) + $(CXX) $(CXXFLAGS) $(INCLUDES) $(SRCS) -o $@ $(LDFLAGS) + +clean: + $(RM) jsonproc jsonproc.exe diff --git a/tools/jsonproc/inja.hpp b/tools/jsonproc/inja.hpp new file mode 100755 index 000000000..3b7263546 --- /dev/null +++ b/tools/jsonproc/inja.hpp @@ -0,0 +1,3396 @@ +// MIT License + +// Copyright (c) 2018 lbersch + +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + + +// --- + + +// Copyright (c) 2009-2018 FIRST +// All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of the FIRST nor the +// names of its contributors may be used to endorse or promote products +// derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef PANTOR_INJA_HPP +#define PANTOR_INJA_HPP + +#include +#include +#include +#include +#include +#include +#include + +#include + +// #include "environment.hpp" +#ifndef PANTOR_INJA_ENVIRONMENT_HPP +#define PANTOR_INJA_ENVIRONMENT_HPP + +#include +#include +#include +#include + +#include + +// #include "config.hpp" +#ifndef PANTOR_INJA_CONFIG_HPP +#define PANTOR_INJA_CONFIG_HPP + +#include +#include + +// #include "string_view.hpp" +// Copyright 2017-2019 by Martin Moene +// +// string-view lite, a C++17-like string_view for C++98 and later. +// For more information see https://github.com/martinmoene/string-view-lite +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + + + +#ifndef NONSTD_SV_LITE_H_INCLUDED +#define NONSTD_SV_LITE_H_INCLUDED + +#define string_view_lite_MAJOR 1 +#define string_view_lite_MINOR 1 +#define string_view_lite_PATCH 0 + +#define string_view_lite_VERSION nssv_STRINGIFY(string_view_lite_MAJOR) "." nssv_STRINGIFY(string_view_lite_MINOR) "." nssv_STRINGIFY(string_view_lite_PATCH) + +#define nssv_STRINGIFY( x ) nssv_STRINGIFY_( x ) +#define nssv_STRINGIFY_( x ) #x + +// string-view lite configuration: + +#define nssv_STRING_VIEW_DEFAULT 0 +#define nssv_STRING_VIEW_NONSTD 1 +#define nssv_STRING_VIEW_STD 2 + +#if !defined( nssv_CONFIG_SELECT_STRING_VIEW ) +# define nssv_CONFIG_SELECT_STRING_VIEW ( nssv_HAVE_STD_STRING_VIEW ? nssv_STRING_VIEW_STD : nssv_STRING_VIEW_NONSTD ) +#endif + +#if defined( nssv_CONFIG_SELECT_STD_STRING_VIEW ) || defined( nssv_CONFIG_SELECT_NONSTD_STRING_VIEW ) +# error nssv_CONFIG_SELECT_STD_STRING_VIEW and nssv_CONFIG_SELECT_NONSTD_STRING_VIEW are deprecated and removed, please use nssv_CONFIG_SELECT_STRING_VIEW=nssv_STRING_VIEW_... +#endif + +#ifndef nssv_CONFIG_STD_SV_OPERATOR +# define nssv_CONFIG_STD_SV_OPERATOR 0 +#endif + +#ifndef nssv_CONFIG_USR_SV_OPERATOR +# define nssv_CONFIG_USR_SV_OPERATOR 1 +#endif + +#ifdef nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS nssv_CONFIG_CONVERSION_STD_STRING +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS 1 +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS 1 +#endif + +// Control presence of exception handling (try and auto discover): + +#ifndef nssv_CONFIG_NO_EXCEPTIONS +# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND) +# define nssv_CONFIG_NO_EXCEPTIONS 0 +# else +# define nssv_CONFIG_NO_EXCEPTIONS 1 +# endif +#endif + +// C++ language version detection (C++20 is speculative): +// Note: VC14.0/1900 (VS2015) lacks too much from C++14. + +#ifndef nssv_CPLUSPLUS +# if defined(_MSVC_LANG ) && !defined(__clang__) +# define nssv_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) +# else +# define nssv_CPLUSPLUS __cplusplus +# endif +#endif + +#define nssv_CPP98_OR_GREATER ( nssv_CPLUSPLUS >= 199711L ) +#define nssv_CPP11_OR_GREATER ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP11_OR_GREATER_ ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP14_OR_GREATER ( nssv_CPLUSPLUS >= 201402L ) +#define nssv_CPP17_OR_GREATER ( nssv_CPLUSPLUS >= 201703L ) +#define nssv_CPP20_OR_GREATER ( nssv_CPLUSPLUS >= 202000L ) + +// use C++17 std::string_view if available and requested: + +#if nssv_CPP17_OR_GREATER && defined(__has_include ) +# if __has_include( ) +# define nssv_HAVE_STD_STRING_VIEW 1 +# else +# define nssv_HAVE_STD_STRING_VIEW 0 +# endif +#else +# define nssv_HAVE_STD_STRING_VIEW 0 +#endif + +#define nssv_USES_STD_STRING_VIEW ( (nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_STD) || ((nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_DEFAULT) && nssv_HAVE_STD_STRING_VIEW) ) + +#define nssv_HAVE_STARTS_WITH ( nssv_CPP20_OR_GREATER || !nssv_USES_STD_STRING_VIEW ) +#define nssv_HAVE_ENDS_WITH nssv_HAVE_STARTS_WITH + +// +// Use C++17 std::string_view: +// + +#if nssv_USES_STD_STRING_VIEW + +#include + +// Extensions for std::string: + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +template< class CharT, class Traits, class Allocator = std::allocator > +std::basic_string +to_string( std::basic_string_view v, Allocator const & a = Allocator() ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string_view +to_string_view( std::basic_string const & s ) +{ + return std::basic_string_view( s.data(), s.size() ); +} + +// Literal operators sv and _sv: + +#if nssv_CONFIG_STD_SV_OPERATOR + +using namespace std::literals::string_view_literals; + +#endif + +#if nssv_CONFIG_USR_SV_OPERATOR + +inline namespace literals { +inline namespace string_view_literals { + + +constexpr std::string_view operator "" _sv( const char* str, size_t len ) noexcept // (1) +{ + return std::string_view{ str, len }; +} + +constexpr std::u16string_view operator "" _sv( const char16_t* str, size_t len ) noexcept // (2) +{ + return std::u16string_view{ str, len }; +} + +constexpr std::u32string_view operator "" _sv( const char32_t* str, size_t len ) noexcept // (3) +{ + return std::u32string_view{ str, len }; +} + +constexpr std::wstring_view operator "" _sv( const wchar_t* str, size_t len ) noexcept // (4) +{ + return std::wstring_view{ str, len }; +} + +}} // namespace literals::string_view_literals + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +} // namespace nonstd + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +using std::string_view; +using std::wstring_view; +using std::u16string_view; +using std::u32string_view; +using std::basic_string_view; + +// literal "sv" and "_sv", see above + +using std::operator==; +using std::operator!=; +using std::operator<; +using std::operator<=; +using std::operator>; +using std::operator>=; + +using std::operator<<; + +} // namespace nonstd + +#else // nssv_HAVE_STD_STRING_VIEW + +// +// Before C++17: use string_view lite: +// + +// Compiler versions: +// +// MSVC++ 6.0 _MSC_VER == 1200 (Visual Studio 6.0) +// MSVC++ 7.0 _MSC_VER == 1300 (Visual Studio .NET 2002) +// MSVC++ 7.1 _MSC_VER == 1310 (Visual Studio .NET 2003) +// MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005) +// MSVC++ 9.0 _MSC_VER == 1500 (Visual Studio 2008) +// MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010) +// MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012) +// MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) +// MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) +// MSVC++ 14.1 _MSC_VER >= 1910 (Visual Studio 2017) + +#if defined(_MSC_VER ) && !defined(__clang__) +# define nssv_COMPILER_MSVC_VER (_MSC_VER ) +# define nssv_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) +#else +# define nssv_COMPILER_MSVC_VER 0 +# define nssv_COMPILER_MSVC_VERSION 0 +#endif + +#define nssv_COMPILER_VERSION( major, minor, patch ) (10 * ( 10 * major + minor) + patch) + +#if defined(__clang__) +# define nssv_COMPILER_CLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +#else +# define nssv_COMPILER_CLANG_VERSION 0 +#endif + +#if defined(__GNUC__) && !defined(__clang__) +# define nssv_COMPILER_GNUC_VERSION nssv_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#else +# define nssv_COMPILER_GNUC_VERSION 0 +#endif + +// half-open range [lo..hi): +#define nssv_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) + +// Presence of language and library features: + +#ifdef _HAS_CPP0X +# define nssv_HAS_CPP0X _HAS_CPP0X +#else +# define nssv_HAS_CPP0X 0 +#endif + +// Unless defined otherwise below, consider VC14 as C++11 for variant-lite: + +#if nssv_COMPILER_MSVC_VER >= 1900 +# undef nssv_CPP11_OR_GREATER +# define nssv_CPP11_OR_GREATER 1 +#endif + +#define nssv_CPP11_90 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1500) +#define nssv_CPP11_100 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1600) +#define nssv_CPP11_110 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1700) +#define nssv_CPP11_120 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1800) +#define nssv_CPP11_140 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1900) +#define nssv_CPP11_141 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1910) + +#define nssv_CPP14_000 (nssv_CPP14_OR_GREATER) +#define nssv_CPP17_000 (nssv_CPP17_OR_GREATER) + +// Presence of C++11 language features: + +#define nssv_HAVE_CONSTEXPR_11 nssv_CPP11_140 +#define nssv_HAVE_EXPLICIT_CONVERSION nssv_CPP11_140 +#define nssv_HAVE_INLINE_NAMESPACE nssv_CPP11_140 +#define nssv_HAVE_NOEXCEPT nssv_CPP11_140 +#define nssv_HAVE_NULLPTR nssv_CPP11_100 +#define nssv_HAVE_REF_QUALIFIER nssv_CPP11_140 +#define nssv_HAVE_UNICODE_LITERALS nssv_CPP11_140 +#define nssv_HAVE_USER_DEFINED_LITERALS nssv_CPP11_140 +#define nssv_HAVE_WCHAR16_T nssv_CPP11_100 +#define nssv_HAVE_WCHAR32_T nssv_CPP11_100 + +#if ! ( ( nssv_CPP11 && nssv_COMPILER_CLANG_VERSION ) || nssv_BETWEEN( nssv_COMPILER_CLANG_VERSION, 300, 400 ) ) +# define nssv_HAVE_STD_DEFINED_LITERALS nssv_CPP11_140 +#endif + +// Presence of C++14 language features: + +#define nssv_HAVE_CONSTEXPR_14 nssv_CPP14_000 + +// Presence of C++17 language features: + +#define nssv_HAVE_NODISCARD nssv_CPP17_000 + +// Presence of C++ library features: + +#define nssv_HAVE_STD_HASH nssv_CPP11_120 + +// C++ feature usage: + +#if nssv_HAVE_CONSTEXPR_11 +# define nssv_constexpr constexpr +#else +# define nssv_constexpr /*constexpr*/ +#endif + +#if nssv_HAVE_CONSTEXPR_14 +# define nssv_constexpr14 constexpr +#else +# define nssv_constexpr14 /*constexpr*/ +#endif + +#if nssv_HAVE_EXPLICIT_CONVERSION +# define nssv_explicit explicit +#else +# define nssv_explicit /*explicit*/ +#endif + +#if nssv_HAVE_INLINE_NAMESPACE +# define nssv_inline_ns inline +#else +# define nssv_inline_ns /*inline*/ +#endif + +#if nssv_HAVE_NOEXCEPT +# define nssv_noexcept noexcept +#else +# define nssv_noexcept /*noexcept*/ +#endif + +//#if nssv_HAVE_REF_QUALIFIER +//# define nssv_ref_qual & +//# define nssv_refref_qual && +//#else +//# define nssv_ref_qual /*&*/ +//# define nssv_refref_qual /*&&*/ +//#endif + +#if nssv_HAVE_NULLPTR +# define nssv_nullptr nullptr +#else +# define nssv_nullptr NULL +#endif + +#if nssv_HAVE_NODISCARD +# define nssv_nodiscard [[nodiscard]] +#else +# define nssv_nodiscard /*[[nodiscard]]*/ +#endif + +// Additional includes: + +#include +#include +#include +#include +#include +#include // std::char_traits<> + +#if ! nssv_CONFIG_NO_EXCEPTIONS +# include +#endif + +#if nssv_CPP11_OR_GREATER +# include +#endif + +// Clang, GNUC, MSVC warning suppression macros: + +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wreserved-user-defined-literal" +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wuser-defined-literals" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-suffix" +#endif // __clang__ + +#if nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_SUPPRESS_MSGSL_WARNING(expr) [[gsl::suppress(expr)]] +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) __pragma(warning(suppress: code) ) +# define nssv_DISABLE_MSVC_WARNINGS(codes) __pragma(warning(push)) __pragma(warning(disable: codes)) +#else +# define nssv_SUPPRESS_MSGSL_WARNING(expr) +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) +# define nssv_DISABLE_MSVC_WARNINGS(codes) +#endif + +#if defined(__clang__) +# define nssv_RESTORE_WARNINGS() _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define nssv_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop") +#elif nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_RESTORE_WARNINGS() __pragma(warning(pop )) +#else +# define nssv_RESTORE_WARNINGS() +#endif + +// Suppress the following MSVC (GSL) warnings: +// - C4455, non-gsl : 'operator ""sv': literal suffix identifiers that do not +// start with an underscore are reserved +// - C26472, gsl::t.1 : don't use a static_cast for arithmetic conversions; +// use brace initialization, gsl::narrow_cast or gsl::narow +// - C26481: gsl::b.1 : don't use pointer arithmetic. Use span instead + +nssv_DISABLE_MSVC_WARNINGS( 4455 26481 26472 ) +//nssv_DISABLE_CLANG_WARNINGS( "-Wuser-defined-literals" ) +//nssv_DISABLE_GNUC_WARNINGS( -Wliteral-suffix ) + +namespace nonstd { namespace sv_lite { + +template +< + class CharT, + class Traits = std::char_traits +> +class basic_string_view; + +// +// basic_string_view: +// + +template +< + class CharT, + class Traits /* = std::char_traits */ +> +class basic_string_view +{ +public: + // Member types: + + typedef Traits traits_type; + typedef CharT value_type; + + typedef CharT * pointer; + typedef CharT const * const_pointer; + typedef CharT & reference; + typedef CharT const & const_reference; + + typedef const_pointer iterator; + typedef const_pointer const_iterator; + typedef std::reverse_iterator< const_iterator > reverse_iterator; + typedef std::reverse_iterator< const_iterator > const_reverse_iterator; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // 24.4.2.1 Construction and assignment: + + nssv_constexpr basic_string_view() nssv_noexcept + : data_( nssv_nullptr ) + , size_( 0 ) + {} + +#if nssv_CPP11_OR_GREATER + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept + : data_( other.data_) + , size_( other.size_) + {} +#endif + + nssv_constexpr basic_string_view( CharT const * s, size_type count ) + : data_( s ) + , size_( count ) + {} + + nssv_constexpr basic_string_view( CharT const * s) + : data_( s ) + , size_( Traits::length(s) ) + {} + + // Assignment: + +#if nssv_CPP11_OR_GREATER + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept + { + data_ = other.data_; + size_ = other.size_; + return *this; + } +#endif + + // 24.4.2.2 Iterator support: + + nssv_constexpr const_iterator begin() const nssv_noexcept { return data_; } + nssv_constexpr const_iterator end() const nssv_noexcept { return data_ + size_; } + + nssv_constexpr const_iterator cbegin() const nssv_noexcept { return begin(); } + nssv_constexpr const_iterator cend() const nssv_noexcept { return end(); } + + nssv_constexpr const_reverse_iterator rbegin() const nssv_noexcept { return const_reverse_iterator( end() ); } + nssv_constexpr const_reverse_iterator rend() const nssv_noexcept { return const_reverse_iterator( begin() ); } + + nssv_constexpr const_reverse_iterator crbegin() const nssv_noexcept { return rbegin(); } + nssv_constexpr const_reverse_iterator crend() const nssv_noexcept { return rend(); } + + // 24.4.2.3 Capacity: + + nssv_constexpr size_type size() const nssv_noexcept { return size_; } + nssv_constexpr size_type length() const nssv_noexcept { return size_; } + nssv_constexpr size_type max_size() const nssv_noexcept { return (std::numeric_limits< size_type >::max)(); } + + // since C++20 + nssv_nodiscard nssv_constexpr bool empty() const nssv_noexcept + { + return 0 == size_; + } + + // 24.4.2.4 Element access: + + nssv_constexpr const_reference operator[]( size_type pos ) const + { + return data_at( pos ); + } + + nssv_constexpr14 const_reference at( size_type pos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos < size() ); +#else + if ( pos >= size() ) + { + throw std::out_of_range("nonst::string_view::at()"); + } +#endif + return data_at( pos ); + } + + nssv_constexpr const_reference front() const { return data_at( 0 ); } + nssv_constexpr const_reference back() const { return data_at( size() - 1 ); } + + nssv_constexpr const_pointer data() const nssv_noexcept { return data_; } + + // 24.4.2.5 Modifiers: + + nssv_constexpr14 void remove_prefix( size_type n ) + { + assert( n <= size() ); + data_ += n; + size_ -= n; + } + + nssv_constexpr14 void remove_suffix( size_type n ) + { + assert( n <= size() ); + size_ -= n; + } + + nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept + { + using std::swap; + swap( data_, other.data_ ); + swap( size_, other.size_ ); + } + + // 24.4.2.6 String operations: + + size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonst::string_view::copy()"); + } +#endif + const size_type rlen = (std::min)( n, size() - pos ); + + (void) Traits::copy( dest, data() + pos, rlen ); + + return rlen; + } + + nssv_constexpr14 basic_string_view substr( size_type pos = 0, size_type n = npos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonst::string_view::substr()"); + } +#endif + return basic_string_view( data() + pos, (std::min)( n, size() - pos ) ); + } + + // compare(), 6x: + + nssv_constexpr14 int compare( basic_string_view other ) const nssv_noexcept // (1) + { + if ( const int result = Traits::compare( data(), other.data(), (std::min)( size(), other.size() ) ) ) + return result; + + return size() == other.size() ? 0 : size() < other.size() ? -1 : 1; + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other ) const // (2) + { + return substr( pos1, n1 ).compare( other ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other, size_type pos2, size_type n2 ) const // (3) + { + return substr( pos1, n1 ).compare( other.substr( pos2, n2 ) ); + } + + nssv_constexpr int compare( CharT const * s ) const // (4) + { + return compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s ) const // (5) + { + return substr( pos1, n1 ).compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s, size_type n2 ) const // (6) + { + return substr( pos1, n1 ).compare( basic_string_view( s, n2 ) ); + } + + // 24.4.2.7 Searching: + + // starts_with(), 3x, since C++20: + + nssv_constexpr bool starts_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( 0, v.size(), v ) == 0; + } + + nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept // (2) + { + return starts_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool starts_with( CharT const * s ) const // (3) + { + return starts_with( basic_string_view( s ) ); + } + + // ends_with(), 3x, since C++20: + + nssv_constexpr bool ends_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( size() - v.size(), npos, v ) == 0; + } + + nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2) + { + return ends_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool ends_with( CharT const * s ) const // (3) + { + return ends_with( basic_string_view( s ) ); + } + + // find(), 4x: + + nssv_constexpr14 size_type find( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return assert( v.size() == 0 || v.data() != nssv_nullptr ) + , pos >= size() + ? npos + : to_pos( std::search( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr14 size_type find( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr14 size_type find( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find( basic_string_view( s, n ), pos ); + } + + nssv_constexpr14 size_type find( CharT const * s, size_type pos = 0 ) const // (4) + { + return find( basic_string_view( s ), pos ); + } + + // rfind(), 4x: + + nssv_constexpr14 size_type rfind( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + if ( size() < v.size() ) + return npos; + + if ( v.empty() ) + return (std::min)( size(), pos ); + + const_iterator last = cbegin() + (std::min)( size() - v.size(), pos ) + v.size(); + const_iterator result = std::find_end( cbegin(), last, v.cbegin(), v.cend(), Traits::eq ); + + return result != last ? size_type( result - cbegin() ) : npos; + } + + nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return rfind( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, size_type n ) const // (3) + { + return rfind( basic_string_view( s, n ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos = npos ) const // (4) + { + return rfind( basic_string_view( s ), pos ); + } + + // find_first_of(), 4x: + + nssv_constexpr size_type find_first_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_first_of( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find_first_of( basic_string_view( s, n ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_of( basic_string_view( s ), pos ); + } + + // find_last_of(), 4x: + + nssv_constexpr size_type find_last_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_of( v, size() - 1 ) + : to_pos( std::find_first_of( const_reverse_iterator( cbegin() + pos + 1 ), crend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_last_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_of( basic_string_view( s ), pos ); + } + + // find_first_not_of(), 4x: + + nssv_constexpr size_type find_first_not_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_if( cbegin() + pos, cend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_first_not_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_first_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_not_of( basic_string_view( s ), pos ); + } + + // find_last_not_of(), 4x: + + nssv_constexpr size_type find_last_not_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_not_of( v, size() - 1 ) + : to_pos( std::find_if( const_reverse_iterator( cbegin() + pos + 1 ), crend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_last_not_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_not_of( basic_string_view( s ), pos ); + } + + // Constants: + +#if nssv_CPP17_OR_GREATER + static nssv_constexpr size_type npos = size_type(-1); +#elif nssv_CPP11_OR_GREATER + enum : size_type { npos = size_type(-1) }; +#else + enum { npos = size_type(-1) }; +#endif + +private: + struct not_in_view + { + const basic_string_view v; + + nssv_constexpr not_in_view( basic_string_view v ) : v( v ) {} + + nssv_constexpr bool operator()( CharT c ) const + { + return npos == v.find_first_of( c ); + } + }; + + nssv_constexpr size_type to_pos( const_iterator it ) const + { + return it == cend() ? npos : size_type( it - cbegin() ); + } + + nssv_constexpr size_type to_pos( const_reverse_iterator it ) const + { + return it == crend() ? npos : size_type( crend() - it - 1 ); + } + + nssv_constexpr const_reference data_at( size_type pos ) const + { +#if nssv_BETWEEN( nssv_COMPILER_GNUC_VERSION, 1, 500 ) + return data_[pos]; +#else + return assert( pos < size() ), data_[pos]; +#endif + } + +private: + const_pointer data_; + size_type size_; + +public: +#if nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS + + template< class Allocator > + basic_string_view( std::basic_string const & s ) nssv_noexcept + : data_( s.data() ) + , size_( s.size() ) + {} + +#if nssv_HAVE_EXPLICIT_CONVERSION + + template< class Allocator > + explicit operator std::basic_string() const + { + return to_string( Allocator() ); + } + +#endif // nssv_HAVE_EXPLICIT_CONVERSION + +#if nssv_CPP11_OR_GREATER + + template< class Allocator = std::allocator > + std::basic_string + to_string( Allocator const & a = Allocator() ) const + { + return std::basic_string( begin(), end(), a ); + } + +#else + + std::basic_string + to_string() const + { + return std::basic_string( begin(), end() ); + } + + template< class Allocator > + std::basic_string + to_string( Allocator const & a ) const + { + return std::basic_string( begin(), end(), a ); + } + +#endif // nssv_CPP11_OR_GREATER + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +}; + +// +// Non-member functions: +// + +// 24.4.3 Non-member comparison functions: +// lexicographically compare two string views (function template): + +template< class CharT, class Traits > +nssv_constexpr bool operator== ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) == 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator!= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) != 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator< ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator<= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator> ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0 ; } + +template< class CharT, class Traits > +nssv_constexpr bool operator>= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0 ; } + +// Let S be basic_string_view, and sv be an instance of S. +// Implementations shall provide sufficient additional overloads marked +// constexpr and noexcept so that an object t with an implicit conversion +// to S can be compared according to Table 67. + +#if nssv_CPP11_OR_GREATER && ! nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 100, 141 ) + +#define nssv_BASIC_STRING_VIEW_I(T,U) typename std::decay< basic_string_view >::type + +#if nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 140, 150 ) +# define nssv_MSVC_ORDER(x) , int=x +#else +# define nssv_MSVC_ORDER(x) /*, int=x*/ +#endif + +// == + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator==( + basic_string_view lhs, + nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator==( + nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +// != + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator!= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.size() != rhs.size() || lhs.compare( rhs ) != 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator!= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) != 0 ; } + +// < + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator< ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator< ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0 ; } + +// <= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator<= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator<= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0 ; } + +// > + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator> ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator> ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0 ; } + +// >= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator>= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0 ; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator>= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0 ; } + +#undef nssv_MSVC_ORDER +#undef nssv_BASIC_STRING_VIEW_I + +#endif // nssv_CPP11_OR_GREATER + +// 24.4.4 Inserters and extractors: + +namespace detail { + +template< class Stream > +void write_padding( Stream & os, std::streamsize n ) +{ + for ( std::streamsize i = 0; i < n; ++i ) + os.rdbuf()->sputc( os.fill() ); +} + +template< class Stream, class View > +Stream & write_to_stream( Stream & os, View const & sv ) +{ + typename Stream::sentry sentry( os ); + + if ( !os ) + return os; + + const std::streamsize length = static_cast( sv.length() ); + + // Whether, and how, to pad: + const bool pad = ( length < os.width() ); + const bool left_pad = pad && ( os.flags() & std::ios_base::adjustfield ) == std::ios_base::right; + + if ( left_pad ) + write_padding( os, os.width() - length ); + + // Write span characters: + os.rdbuf()->sputn( sv.begin(), length ); + + if ( pad && !left_pad ) + write_padding( os, os.width() - length ); + + // Reset output stream width: + os.width( 0 ); + + return os; +} + +} // namespace detail + +template< class CharT, class Traits > +std::basic_ostream & +operator<<( + std::basic_ostream& os, + basic_string_view sv ) +{ + return detail::write_to_stream( os, sv ); +} + +// Several typedefs for common character types are provided: + +typedef basic_string_view string_view; +typedef basic_string_view wstring_view; +#if nssv_HAVE_WCHAR16_T +typedef basic_string_view u16string_view; +typedef basic_string_view u32string_view; +#endif + +}} // namespace nonstd::sv_lite + +// +// 24.4.6 Suffix for basic_string_view literals: +// + +#if nssv_HAVE_USER_DEFINED_LITERALS + +namespace nonstd { +nssv_inline_ns namespace literals { +nssv_inline_ns namespace string_view_literals { + +#if nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +nssv_constexpr nonstd::sv_lite::string_view operator "" sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +#if nssv_CONFIG_USR_SV_OPERATOR + +nssv_constexpr nonstd::sv_lite::string_view operator "" _sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" _sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" _sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" _sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +}}} // namespace nonstd::literals::string_view_literals + +#endif + +// +// Extensions for std::string: +// + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { +namespace sv_lite { + +// Exclude MSVC 14 (19.00): it yields ambiguous to_string(): + +#if nssv_CPP11_OR_GREATER && nssv_COMPILER_MSVC_VERSION != 140 + +template< class CharT, class Traits, class Allocator = std::allocator > +std::basic_string +to_string( basic_string_view v, Allocator const & a = Allocator() ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +#else + +template< class CharT, class Traits > +std::basic_string +to_string( basic_string_view v ) +{ + return std::basic_string( v.begin(), v.end() ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string +to_string( basic_string_view v, Allocator const & a ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +#endif // nssv_CPP11_OR_GREATER + +template< class CharT, class Traits, class Allocator > +basic_string_view +to_string_view( std::basic_string const & s ) +{ + return basic_string_view( s.data(), s.size() ); +} + +}} // namespace nonstd::sv_lite + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +// +// make types and algorithms available in namespace nonstd: +// + +namespace nonstd { + +using sv_lite::basic_string_view; +using sv_lite::string_view; +using sv_lite::wstring_view; + +#if nssv_HAVE_WCHAR16_T +using sv_lite::u16string_view; +#endif +#if nssv_HAVE_WCHAR32_T +using sv_lite::u32string_view; +#endif + +// literal "sv" + +using sv_lite::operator==; +using sv_lite::operator!=; +using sv_lite::operator<; +using sv_lite::operator<=; +using sv_lite::operator>; +using sv_lite::operator>=; + +using sv_lite::operator<<; + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +using sv_lite::to_string; +using sv_lite::to_string_view; +#endif + +} // namespace nonstd + +// 24.4.5 Hash support (C++11): + +// Note: The hash value of a string view object is equal to the hash value of +// the corresponding string object. + +#if nssv_HAVE_STD_HASH + +#include + +namespace std { + +template<> +struct hash< nonstd::string_view > +{ +public: + std::size_t operator()( nonstd::string_view v ) const nssv_noexcept + { + return std::hash()( std::string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::wstring_view > +{ +public: + std::size_t operator()( nonstd::wstring_view v ) const nssv_noexcept + { + return std::hash()( std::wstring( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u16string_view > +{ +public: + std::size_t operator()( nonstd::u16string_view v ) const nssv_noexcept + { + return std::hash()( std::u16string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u32string_view > +{ +public: + std::size_t operator()( nonstd::u32string_view v ) const nssv_noexcept + { + return std::hash()( std::u32string( v.data(), v.size() ) ); + } +}; + +} // namespace std + +#endif // nssv_HAVE_STD_HASH + +nssv_RESTORE_WARNINGS() + +#endif // nssv_HAVE_STD_STRING_VIEW +#endif // NONSTD_SV_LITE_H_INCLUDED + + + +namespace inja { + +enum class ElementNotation { + Dot, + Pointer +}; + +struct LexerConfig { + std::string statement_open {"{%"}; + std::string statement_close {"%}"}; + std::string line_statement {"##"}; + std::string expression_open {"{{"}; + std::string expression_close {"}}"}; + std::string comment_open {"{#"}; + std::string comment_close {"#}"}; + std::string open_chars {"#{"}; + + void update_open_chars() { + open_chars = ""; + if (open_chars.find(line_statement[0]) == std::string::npos) { + open_chars += line_statement[0]; + } + if (open_chars.find(statement_open[0]) == std::string::npos) { + open_chars += statement_open[0]; + } + if (open_chars.find(expression_open[0]) == std::string::npos) { + open_chars += expression_open[0]; + } + if (open_chars.find(comment_open[0]) == std::string::npos) { + open_chars += comment_open[0]; + } + } +}; + +struct ParserConfig { + ElementNotation notation {ElementNotation::Dot}; +}; + +} + +#endif // PANTOR_INJA_CONFIG_HPP + +// #include "function_storage.hpp" +#ifndef PANTOR_INJA_FUNCTION_STORAGE_HPP +#define PANTOR_INJA_FUNCTION_STORAGE_HPP + +// #include "bytecode.hpp" +#ifndef PANTOR_INJA_BYTECODE_HPP +#define PANTOR_INJA_BYTECODE_HPP + +#include + +#include + +// #include "string_view.hpp" + + + +namespace inja { + +using namespace nlohmann; + + +struct Bytecode { + enum class Op : uint8_t { + Nop, + // print StringRef (always immediate) + PrintText, + // print value + PrintValue, + // push value onto stack (always immediate) + Push, + + // builtin functions + // result is pushed to stack + // args specify number of arguments + // all functions can take their "last" argument either immediate + // or popped off stack (e.g. if immediate, it's like the immediate was + // just pushed to the stack) + Not, + And, + Or, + In, + Equal, + Greater, + GreaterEqual, + Less, + LessEqual, + Different, + DivisibleBy, + Even, + First, + Float, + Int, + Last, + Length, + Lower, + Max, + Min, + Odd, + Range, + Result, + Round, + Sort, + Upper, + Exists, + ExistsInObject, + IsBoolean, + IsNumber, + IsInteger, + IsFloat, + IsObject, + IsArray, + IsString, + Default, + + // include another template + // value is the template name + Include, + + // callback function + // str is the function name (this means it cannot be a lookup) + // args specify number of arguments + // as with builtin functions, "last" argument can be immediate + Callback, + + // unconditional jump + // args is the index of the bytecode to jump to. + Jump, + + // conditional jump + // value popped off stack is checked for truthyness + // if false, args is the index of the bytecode to jump to. + // if true, no action is taken (falls through) + ConditionalJump, + + // start loop + // value popped off stack is what is iterated over + // args is index of bytecode after end loop (jumped to if iterable is + // empty) + // immediate value is key name (for maps) + // str is value name + StartLoop, + + // end a loop + // args is index of the first bytecode in the loop body + EndLoop, + }; + + enum Flag { + // location of value for value-taking ops (mask) + ValueMask = 0x03, + // pop value off stack + ValuePop = 0x00, + // value is immediate rather than on stack + ValueImmediate = 0x01, + // lookup immediate str (dot notation) + ValueLookupDot = 0x02, + // lookup immediate str (json pointer notation) + ValueLookupPointer = 0x03, + }; + + Op op {Op::Nop}; + uint32_t args: 30; + uint32_t flags: 2; + + json value; + std::string str; + + Bytecode(): args(0), flags(0) {} + explicit Bytecode(Op op, unsigned int args = 0): op(op), args(args), flags(0) {} + explicit Bytecode(Op op, nonstd::string_view str, unsigned int flags): op(op), args(0), flags(flags), str(str) {} + explicit Bytecode(Op op, json&& value, unsigned int flags): op(op), args(0), flags(flags), value(std::move(value)) {} +}; + +} // namespace inja + +#endif // PANTOR_INJA_BYTECODE_HPP + +// #include "string_view.hpp" + + + +namespace inja { + +using namespace nlohmann; + +using Arguments = std::vector; +using CallbackFunction = std::function; + +class FunctionStorage { + public: + void add_builtin(nonstd::string_view name, unsigned int num_args, Bytecode::Op op) { + auto& data = get_or_new(name, num_args); + data.op = op; + } + + void add_callback(nonstd::string_view name, unsigned int num_args, const CallbackFunction& function) { + auto& data = get_or_new(name, num_args); + data.function = function; + } + + Bytecode::Op find_builtin(nonstd::string_view name, unsigned int num_args) const { + if (auto ptr = get(name, num_args)) { + return ptr->op; + } + return Bytecode::Op::Nop; + } + + CallbackFunction find_callback(nonstd::string_view name, unsigned int num_args) const { + if (auto ptr = get(name, num_args)) { + return ptr->function; + } + return nullptr; + } + + private: + struct FunctionData { + unsigned int num_args {0}; + Bytecode::Op op {Bytecode::Op::Nop}; // for builtins + CallbackFunction function; // for callbacks + }; + + FunctionData& get_or_new(nonstd::string_view name, unsigned int num_args) { + auto &vec = m_map[static_cast(name)]; + for (auto &i: vec) { + if (i.num_args == num_args) return i; + } + vec.emplace_back(); + vec.back().num_args = num_args; + return vec.back(); + } + + const FunctionData* get(nonstd::string_view name, unsigned int num_args) const { + auto it = m_map.find(static_cast(name)); + if (it == m_map.end()) return nullptr; + for (auto &&i: it->second) { + if (i.num_args == num_args) return &i; + } + return nullptr; + } + + std::map> m_map; +}; + +} + +#endif // PANTOR_INJA_FUNCTION_STORAGE_HPP + +// #include "parser.hpp" +#ifndef PANTOR_INJA_PARSER_HPP +#define PANTOR_INJA_PARSER_HPP + +#include + +// #include "bytecode.hpp" + +// #include "config.hpp" + +// #include "function_storage.hpp" + +// #include "lexer.hpp" +#ifndef PANTOR_INJA_LEXER_HPP +#define PANTOR_INJA_LEXER_HPP + +#include +#include + +// #include "config.hpp" + +// #include "token.hpp" +#ifndef PANTOR_INJA_TOKEN_HPP +#define PANTOR_INJA_TOKEN_HPP + +// #include "string_view.hpp" + + + +namespace inja { + +struct Token { + enum class Kind { + Text, + ExpressionOpen, // {{ + ExpressionClose, // }} + LineStatementOpen, // ## + LineStatementClose, // \n + StatementOpen, // {% + StatementClose, // %} + CommentOpen, // {# + CommentClose, // #} + Id, // this, this.foo + Number, // 1, 2, -1, 5.2, -5.3 + String, // "this" + Comma, // , + Colon, // : + LeftParen, // ( + RightParen, // ) + LeftBracket, // [ + RightBracket, // ] + LeftBrace, // { + RightBrace, // } + Equal, // == + GreaterThan, // > + GreaterEqual, // >= + LessThan, // < + LessEqual, // <= + NotEqual, // != + Unknown, + Eof + } kind {Kind::Unknown}; + + nonstd::string_view text; + + constexpr Token() = default; + constexpr Token(Kind kind, nonstd::string_view text): kind(kind), text(text) {} + + std::string describe() const { + switch (kind) { + case Kind::Text: + return ""; + case Kind::LineStatementClose: + return ""; + case Kind::Eof: + return ""; + default: + return static_cast(text); + } + } +}; + +} + +#endif // PANTOR_INJA_TOKEN_HPP + +// #include "utils.hpp" +#ifndef PANTOR_INJA_UTILS_HPP +#define PANTOR_INJA_UTILS_HPP + +#include + +// #include "string_view.hpp" + + + +namespace inja { + +inline void inja_throw(const std::string& type, const std::string& message) { + throw std::runtime_error("[inja.exception." + type + "] " + message); +} + +namespace string_view { + inline nonstd::string_view slice(nonstd::string_view view, size_t start, size_t end) { + start = std::min(start, view.size()); + end = std::min(std::max(start, end), view.size()); + return view.substr(start, end - start); // StringRef(Data + Start, End - Start); + } + + inline std::pair split(nonstd::string_view view, char Separator) { + size_t idx = view.find(Separator); + if (idx == nonstd::string_view::npos) { + return std::make_pair(view, nonstd::string_view()); + } + return std::make_pair(slice(view, 0, idx), slice(view, idx + 1, nonstd::string_view::npos)); + } + + inline bool starts_with(nonstd::string_view view, nonstd::string_view prefix) { + return (view.size() >= prefix.size() && view.compare(0, prefix.size(), prefix) == 0); + } +} // namespace string + +} // namespace inja + +#endif // PANTOR_INJA_UTILS_HPP + + + +namespace inja { + +class Lexer { + enum class State { + Text, + ExpressionStart, + ExpressionBody, + LineStart, + LineBody, + StatementStart, + StatementBody, + CommentStart, + CommentBody + } m_state; + + const LexerConfig& m_config; + nonstd::string_view m_in; + size_t m_tok_start; + size_t m_pos; + + public: + explicit Lexer(const LexerConfig& config) : m_config(config) {} + + void start(nonstd::string_view in) { + m_in = in; + m_tok_start = 0; + m_pos = 0; + m_state = State::Text; + } + + Token scan() { + m_tok_start = m_pos; + + again: + if (m_tok_start >= m_in.size()) return make_token(Token::Kind::Eof); + + switch (m_state) { + default: + case State::Text: { + // fast-scan to first open character + size_t open_start = m_in.substr(m_pos).find_first_of(m_config.open_chars); + if (open_start == nonstd::string_view::npos) { + // didn't find open, return remaining text as text token + m_pos = m_in.size(); + return make_token(Token::Kind::Text); + } + m_pos += open_start; + + // try to match one of the opening sequences, and get the close + nonstd::string_view open_str = m_in.substr(m_pos); + if (inja::string_view::starts_with(open_str, m_config.expression_open)) { + m_state = State::ExpressionStart; + } else if (inja::string_view::starts_with(open_str, m_config.statement_open)) { + m_state = State::StatementStart; + } else if (inja::string_view::starts_with(open_str, m_config.comment_open)) { + m_state = State::CommentStart; + } else if ((m_pos == 0 || m_in[m_pos - 1] == '\n') && + inja::string_view::starts_with(open_str, m_config.line_statement)) { + m_state = State::LineStart; + } else { + m_pos += 1; // wasn't actually an opening sequence + goto again; + } + if (m_pos == m_tok_start) goto again; // don't generate empty token + return make_token(Token::Kind::Text); + } + case State::ExpressionStart: { + m_state = State::ExpressionBody; + m_pos += m_config.expression_open.size(); + return make_token(Token::Kind::ExpressionOpen); + } + case State::LineStart: { + m_state = State::LineBody; + m_pos += m_config.line_statement.size(); + return make_token(Token::Kind::LineStatementOpen); + } + case State::StatementStart: { + m_state = State::StatementBody; + m_pos += m_config.statement_open.size(); + return make_token(Token::Kind::StatementOpen); + } + case State::CommentStart: { + m_state = State::CommentBody; + m_pos += m_config.comment_open.size(); + return make_token(Token::Kind::CommentOpen); + } + case State::ExpressionBody: + return scan_body(m_config.expression_close, Token::Kind::ExpressionClose); + case State::LineBody: + return scan_body("\n", Token::Kind::LineStatementClose); + case State::StatementBody: + return scan_body(m_config.statement_close, Token::Kind::StatementClose); + case State::CommentBody: { + // fast-scan to comment close + size_t end = m_in.substr(m_pos).find(m_config.comment_close); + if (end == nonstd::string_view::npos) { + m_pos = m_in.size(); + return make_token(Token::Kind::Eof); + } + // return the entire comment in the close token + m_state = State::Text; + m_pos += end + m_config.comment_close.size(); + return make_token(Token::Kind::CommentClose); + } + } + } + + const LexerConfig& get_config() const { return m_config; } + + private: + Token scan_body(nonstd::string_view close, Token::Kind closeKind) { + again: + // skip whitespace (except for \n as it might be a close) + if (m_tok_start >= m_in.size()) return make_token(Token::Kind::Eof); + char ch = m_in[m_tok_start]; + if (ch == ' ' || ch == '\t' || ch == '\r') { + m_tok_start += 1; + goto again; + } + + // check for close + if (inja::string_view::starts_with(m_in.substr(m_tok_start), close)) { + m_state = State::Text; + m_pos = m_tok_start + close.size(); + return make_token(closeKind); + } + + // skip \n + if (ch == '\n') { + m_tok_start += 1; + goto again; + } + + m_pos = m_tok_start + 1; + if (std::isalpha(ch)) return scan_id(); + switch (ch) { + case ',': + return make_token(Token::Kind::Comma); + case ':': + return make_token(Token::Kind::Colon); + case '(': + return make_token(Token::Kind::LeftParen); + case ')': + return make_token(Token::Kind::RightParen); + case '[': + return make_token(Token::Kind::LeftBracket); + case ']': + return make_token(Token::Kind::RightBracket); + case '{': + return make_token(Token::Kind::LeftBrace); + case '}': + return make_token(Token::Kind::RightBrace); + case '>': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::GreaterEqual); + } + return make_token(Token::Kind::GreaterThan); + case '<': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::LessEqual); + } + return make_token(Token::Kind::LessThan); + case '=': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::Equal); + } + return make_token(Token::Kind::Unknown); + case '!': + if (m_pos < m_in.size() && m_in[m_pos] == '=') { + m_pos += 1; + return make_token(Token::Kind::NotEqual); + } + return make_token(Token::Kind::Unknown); + case '\"': + return scan_string(); + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return scan_number(); + case '_': + return scan_id(); + default: + return make_token(Token::Kind::Unknown); + } + } + + Token scan_id() { + for (;;) { + if (m_pos >= m_in.size()) { + break; + } + char ch = m_in[m_pos]; + if (!std::isalnum(ch) && ch != '.' && ch != '/' && ch != '_' && ch != '-') { + break; + } + m_pos += 1; + } + return make_token(Token::Kind::Id); + } + + Token scan_number() { + for (;;) { + if (m_pos >= m_in.size()) { + break; + } + char ch = m_in[m_pos]; + // be very permissive in lexer (we'll catch errors when conversion happens) + if (!std::isdigit(ch) && ch != '.' && ch != 'e' && ch != 'E' && ch != '+' && ch != '-') { + break; + } + m_pos += 1; + } + return make_token(Token::Kind::Number); + } + + Token scan_string() { + bool escape {false}; + for (;;) { + if (m_pos >= m_in.size()) break; + char ch = m_in[m_pos++]; + if (ch == '\\') { + escape = true; + } else if (!escape && ch == m_in[m_tok_start]) { + break; + } else { + escape = false; + } + } + return make_token(Token::Kind::String); + } + + Token make_token(Token::Kind kind) const { + return Token(kind, string_view::slice(m_in, m_tok_start, m_pos)); + } +}; + +} + +#endif // PANTOR_INJA_LEXER_HPP + +// #include "template.hpp" +#ifndef PANTOR_INJA_TEMPLATE_HPP +#define PANTOR_INJA_TEMPLATE_HPP + +#include +#include + +// #include "bytecode.hpp" + + + +namespace inja { + +struct Template { + std::vector bytecodes; + std::string content; +}; + +using TemplateStorage = std::map; + +} + +#endif // PANTOR_INJA_TEMPLATE_HPP + +// #include "token.hpp" + +// #include "utils.hpp" + + +#include + + +namespace inja { + +class ParserStatic { + ParserStatic() { + functions.add_builtin("default", 2, Bytecode::Op::Default); + functions.add_builtin("divisibleBy", 2, Bytecode::Op::DivisibleBy); + functions.add_builtin("even", 1, Bytecode::Op::Even); + functions.add_builtin("first", 1, Bytecode::Op::First); + functions.add_builtin("float", 1, Bytecode::Op::Float); + functions.add_builtin("int", 1, Bytecode::Op::Int); + functions.add_builtin("last", 1, Bytecode::Op::Last); + functions.add_builtin("length", 1, Bytecode::Op::Length); + functions.add_builtin("lower", 1, Bytecode::Op::Lower); + functions.add_builtin("max", 1, Bytecode::Op::Max); + functions.add_builtin("min", 1, Bytecode::Op::Min); + functions.add_builtin("odd", 1, Bytecode::Op::Odd); + functions.add_builtin("range", 1, Bytecode::Op::Range); + functions.add_builtin("round", 2, Bytecode::Op::Round); + functions.add_builtin("sort", 1, Bytecode::Op::Sort); + functions.add_builtin("upper", 1, Bytecode::Op::Upper); + functions.add_builtin("exists", 1, Bytecode::Op::Exists); + functions.add_builtin("existsIn", 2, Bytecode::Op::ExistsInObject); + functions.add_builtin("isBoolean", 1, Bytecode::Op::IsBoolean); + functions.add_builtin("isNumber", 1, Bytecode::Op::IsNumber); + functions.add_builtin("isInteger", 1, Bytecode::Op::IsInteger); + functions.add_builtin("isFloat", 1, Bytecode::Op::IsFloat); + functions.add_builtin("isObject", 1, Bytecode::Op::IsObject); + functions.add_builtin("isArray", 1, Bytecode::Op::IsArray); + functions.add_builtin("isString", 1, Bytecode::Op::IsString); + } + + public: + ParserStatic(const ParserStatic&) = delete; + ParserStatic& operator=(const ParserStatic&) = delete; + + static const ParserStatic& get_instance() { + static ParserStatic inst; + return inst; + } + + FunctionStorage functions; +}; + +class Parser { + public: + explicit Parser(const ParserConfig& parser_config, const LexerConfig& lexer_config, TemplateStorage& included_templates): m_config(parser_config), m_lexer(lexer_config), m_included_templates(included_templates), m_static(ParserStatic::get_instance()) { } + + bool parse_expression(Template& tmpl) { + if (!parse_expression_and(tmpl)) return false; + if (m_tok.kind != Token::Kind::Id || m_tok.text != "or") return true; + get_next_token(); + if (!parse_expression_and(tmpl)) return false; + append_function(tmpl, Bytecode::Op::Or, 2); + return true; + } + + bool parse_expression_and(Template& tmpl) { + if (!parse_expression_not(tmpl)) return false; + if (m_tok.kind != Token::Kind::Id || m_tok.text != "and") return true; + get_next_token(); + if (!parse_expression_not(tmpl)) return false; + append_function(tmpl, Bytecode::Op::And, 2); + return true; + } + + bool parse_expression_not(Template& tmpl) { + if (m_tok.kind == Token::Kind::Id && m_tok.text == "not") { + get_next_token(); + if (!parse_expression_not(tmpl)) return false; + append_function(tmpl, Bytecode::Op::Not, 1); + return true; + } else { + return parse_expression_comparison(tmpl); + } + } + + bool parse_expression_comparison(Template& tmpl) { + if (!parse_expression_datum(tmpl)) return false; + Bytecode::Op op; + switch (m_tok.kind) { + case Token::Kind::Id: + if (m_tok.text == "in") + op = Bytecode::Op::In; + else + return true; + break; + case Token::Kind::Equal: + op = Bytecode::Op::Equal; + break; + case Token::Kind::GreaterThan: + op = Bytecode::Op::Greater; + break; + case Token::Kind::LessThan: + op = Bytecode::Op::Less; + break; + case Token::Kind::LessEqual: + op = Bytecode::Op::LessEqual; + break; + case Token::Kind::GreaterEqual: + op = Bytecode::Op::GreaterEqual; + break; + case Token::Kind::NotEqual: + op = Bytecode::Op::Different; + break; + default: + return true; + } + get_next_token(); + if (!parse_expression_datum(tmpl)) return false; + append_function(tmpl, op, 2); + return true; + } + + bool parse_expression_datum(Template& tmpl) { + nonstd::string_view json_first; + size_t bracket_level = 0; + size_t brace_level = 0; + + for (;;) { + switch (m_tok.kind) { + case Token::Kind::LeftParen: { + get_next_token(); + if (!parse_expression(tmpl)) return false; + if (m_tok.kind != Token::Kind::RightParen) { + inja_throw("parser_error", "unmatched '('"); + } + get_next_token(); + return true; + } + case Token::Kind::Id: + get_peek_token(); + if (m_peek_tok.kind == Token::Kind::LeftParen) { + // function call, parse arguments + Token func_token = m_tok; + get_next_token(); // id + get_next_token(); // leftParen + unsigned int num_args = 0; + if (m_tok.kind == Token::Kind::RightParen) { + // no args + get_next_token(); + } else { + for (;;) { + if (!parse_expression(tmpl)) { + inja_throw("parser_error", "expected expression, got '" + m_tok.describe() + "'"); + } + num_args += 1; + if (m_tok.kind == Token::Kind::RightParen) { + get_next_token(); + break; + } + if (m_tok.kind != Token::Kind::Comma) { + inja_throw("parser_error", "expected ')' or ',', got '" + m_tok.describe() + "'"); + } + get_next_token(); + } + } + + auto op = m_static.functions.find_builtin(func_token.text, num_args); + + if (op != Bytecode::Op::Nop) { + // swap arguments for default(); see comment in RenderTo() + if (op == Bytecode::Op::Default) + std::swap(tmpl.bytecodes.back(), *(tmpl.bytecodes.rbegin() + 1)); + append_function(tmpl, op, num_args); + return true; + } else { + append_callback(tmpl, func_token.text, num_args); + return true; + } + } else if (m_tok.text == "true" || m_tok.text == "false" || m_tok.text == "null") { + // true, false, null are json literals + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + goto returnJson; + } + break; + } else { + // normal literal (json read) + tmpl.bytecodes.emplace_back( + Bytecode::Op::Push, m_tok.text, + m_config.notation == ElementNotation::Pointer ? Bytecode::Flag::ValueLookupPointer : Bytecode::Flag::ValueLookupDot); + get_next_token(); + return true; + } + // json passthrough + case Token::Kind::Number: + case Token::Kind::String: + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + goto returnJson; + } + break; + case Token::Kind::Comma: + case Token::Kind::Colon: + if (brace_level == 0 && bracket_level == 0) { + inja_throw("parser_error", "unexpected token '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::LeftBracket: + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + } + bracket_level += 1; + break; + case Token::Kind::LeftBrace: + if (brace_level == 0 && bracket_level == 0) { + json_first = m_tok.text; + } + brace_level += 1; + break; + case Token::Kind::RightBracket: + if (bracket_level == 0) { + inja_throw("parser_error", "unexpected ']'"); + } + --bracket_level; + if (brace_level == 0 && bracket_level == 0) goto returnJson; + break; + case Token::Kind::RightBrace: + if (brace_level == 0) { + inja_throw("parser_error", "unexpected '}'"); + } + --brace_level; + if (brace_level == 0 && bracket_level == 0) goto returnJson; + break; + default: + if (brace_level != 0) { + inja_throw("parser_error", "unmatched '{'"); + } + if (bracket_level != 0) { + inja_throw("parser_error", "unmatched '['"); + } + return false; + } + + get_next_token(); + } + + returnJson: + // bridge across all intermediate tokens + nonstd::string_view json_text(json_first.data(), m_tok.text.data() - json_first.data() + m_tok.text.size()); + tmpl.bytecodes.emplace_back(Bytecode::Op::Push, json::parse(json_text), Bytecode::Flag::ValueImmediate); + get_next_token(); + return true; + } + + bool parse_statement(Template& tmpl, nonstd::string_view path) { + if (m_tok.kind != Token::Kind::Id) return false; + + if (m_tok.text == "if") { + get_next_token(); + + // evaluate expression + if (!parse_expression(tmpl)) return false; + + // start a new if block on if stack + m_if_stack.emplace_back(tmpl.bytecodes.size()); + + // conditional jump; destination will be filled in by else or endif + tmpl.bytecodes.emplace_back(Bytecode::Op::ConditionalJump); + } else if (m_tok.text == "endif") { + if (m_if_stack.empty()) { + inja_throw("parser_error", "endif without matching if"); + } + auto& if_data = m_if_stack.back(); + get_next_token(); + + // previous conditional jump jumps here + if (if_data.prev_cond_jump != std::numeric_limits::max()) { + tmpl.bytecodes[if_data.prev_cond_jump].args = tmpl.bytecodes.size(); + } + + // update all previous unconditional jumps to here + for (unsigned int i: if_data.uncond_jumps) { + tmpl.bytecodes[i].args = tmpl.bytecodes.size(); + } + + // pop if stack + m_if_stack.pop_back(); + } else if (m_tok.text == "else") { + if (m_if_stack.empty()) + inja_throw("parser_error", "else without matching if"); + auto& if_data = m_if_stack.back(); + get_next_token(); + + // end previous block with unconditional jump to endif; destination will be + // filled in by endif + if_data.uncond_jumps.push_back(tmpl.bytecodes.size()); + tmpl.bytecodes.emplace_back(Bytecode::Op::Jump); + + // previous conditional jump jumps here + tmpl.bytecodes[if_data.prev_cond_jump].args = tmpl.bytecodes.size(); + if_data.prev_cond_jump = std::numeric_limits::max(); + + // chained else if + if (m_tok.kind == Token::Kind::Id && m_tok.text == "if") { + get_next_token(); + + // evaluate expression + if (!parse_expression(tmpl)) return false; + + // update "previous jump" + if_data.prev_cond_jump = tmpl.bytecodes.size(); + + // conditional jump; destination will be filled in by else or endif + tmpl.bytecodes.emplace_back(Bytecode::Op::ConditionalJump); + } + } else if (m_tok.text == "for") { + get_next_token(); + + // options: for a in arr; for a, b in obj + if (m_tok.kind != Token::Kind::Id) + inja_throw("parser_error", "expected id, got '" + m_tok.describe() + "'"); + Token value_token = m_tok; + get_next_token(); + + Token key_token; + if (m_tok.kind == Token::Kind::Comma) { + get_next_token(); + if (m_tok.kind != Token::Kind::Id) + inja_throw("parser_error", "expected id, got '" + m_tok.describe() + "'"); + key_token = std::move(value_token); + value_token = m_tok; + get_next_token(); + } + + if (m_tok.kind != Token::Kind::Id || m_tok.text != "in") + inja_throw("parser_error", + "expected 'in', got '" + m_tok.describe() + "'"); + get_next_token(); + + if (!parse_expression(tmpl)) return false; + + m_loop_stack.push_back(tmpl.bytecodes.size()); + + tmpl.bytecodes.emplace_back(Bytecode::Op::StartLoop); + if (!key_token.text.empty()) { + tmpl.bytecodes.back().value = key_token.text; + } + tmpl.bytecodes.back().str = static_cast(value_token.text); + } else if (m_tok.text == "endfor") { + get_next_token(); + if (m_loop_stack.empty()) { + inja_throw("parser_error", "endfor without matching for"); + } + + // update loop with EndLoop index (for empty case) + tmpl.bytecodes[m_loop_stack.back()].args = tmpl.bytecodes.size(); + + tmpl.bytecodes.emplace_back(Bytecode::Op::EndLoop); + tmpl.bytecodes.back().args = m_loop_stack.back() + 1; // loop body + m_loop_stack.pop_back(); + } else if (m_tok.text == "include") { + get_next_token(); + + if (m_tok.kind != Token::Kind::String) { + inja_throw("parser_error", "expected string, got '" + m_tok.describe() + "'"); + } + + // build the relative path + json json_name = json::parse(m_tok.text); + std::string pathname = static_cast(path); + pathname += json_name.get_ref(); + if (pathname.compare(0, 2, "./") == 0) { + pathname.erase(0, 2); + } + // sys::path::remove_dots(pathname, true, sys::path::Style::posix); + + Template include_template = parse_template(pathname); + m_included_templates.emplace(pathname, include_template); + + // generate a reference bytecode + tmpl.bytecodes.emplace_back(Bytecode::Op::Include, json(pathname), Bytecode::Flag::ValueImmediate); + + get_next_token(); + } else { + return false; + } + return true; + } + + void append_function(Template& tmpl, Bytecode::Op op, unsigned int num_args) { + // we can merge with back-to-back push + if (!tmpl.bytecodes.empty()) { + Bytecode& last = tmpl.bytecodes.back(); + if (last.op == Bytecode::Op::Push) { + last.op = op; + last.args = num_args; + return; + } + } + + // otherwise just add it to the end + tmpl.bytecodes.emplace_back(op, num_args); + } + + void append_callback(Template& tmpl, nonstd::string_view name, unsigned int num_args) { + // we can merge with back-to-back push value (not lookup) + if (!tmpl.bytecodes.empty()) { + Bytecode& last = tmpl.bytecodes.back(); + if (last.op == Bytecode::Op::Push && + (last.flags & Bytecode::Flag::ValueMask) == Bytecode::Flag::ValueImmediate) { + last.op = Bytecode::Op::Callback; + last.args = num_args; + last.str = static_cast(name); + return; + } + } + + // otherwise just add it to the end + tmpl.bytecodes.emplace_back(Bytecode::Op::Callback, num_args); + tmpl.bytecodes.back().str = static_cast(name); + } + + void parse_into(Template& tmpl, nonstd::string_view path) { + m_lexer.start(tmpl.content); + + for (;;) { + get_next_token(); + switch (m_tok.kind) { + case Token::Kind::Eof: + if (!m_if_stack.empty()) inja_throw("parser_error", "unmatched if"); + if (!m_loop_stack.empty()) inja_throw("parser_error", "unmatched for"); + return; + case Token::Kind::Text: + tmpl.bytecodes.emplace_back(Bytecode::Op::PrintText, m_tok.text, 0u); + break; + case Token::Kind::StatementOpen: + get_next_token(); + if (!parse_statement(tmpl, path)) { + inja_throw("parser_error", "expected statement, got '" + m_tok.describe() + "'"); + } + if (m_tok.kind != Token::Kind::StatementClose) { + inja_throw("parser_error", "expected statement close, got '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::LineStatementOpen: + get_next_token(); + parse_statement(tmpl, path); + if (m_tok.kind != Token::Kind::LineStatementClose && + m_tok.kind != Token::Kind::Eof) { + inja_throw("parser_error", "expected line statement close, got '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::ExpressionOpen: + get_next_token(); + if (!parse_expression(tmpl)) { + inja_throw("parser_error", "expected expression, got '" + m_tok.describe() + "'"); + } + append_function(tmpl, Bytecode::Op::PrintValue, 1); + if (m_tok.kind != Token::Kind::ExpressionClose) { + inja_throw("parser_error", "expected expression close, got '" + m_tok.describe() + "'"); + } + break; + case Token::Kind::CommentOpen: + get_next_token(); + if (m_tok.kind != Token::Kind::CommentClose) { + inja_throw("parser_error", "expected comment close, got '" + m_tok.describe() + "'"); + } + break; + default: + inja_throw("parser_error", "unexpected token '" + m_tok.describe() + "'"); + break; + } + } + } + + Template parse(nonstd::string_view input, nonstd::string_view path) { + Template result; + result.content = static_cast(input); + parse_into(result, path); + return result; + } + + Template parse(nonstd::string_view input) { + return parse(input, "./"); + } + + Template parse_template(nonstd::string_view filename) { + Template result; + result.content = load_file(filename); + + nonstd::string_view path = filename.substr(0, filename.find_last_of("/\\") + 1); + // StringRef path = sys::path::parent_path(filename); + Parser(m_config, m_lexer.get_config(), m_included_templates).parse_into(result, path); + return result; + } + + std::string load_file(nonstd::string_view filename) { + std::ifstream file(static_cast(filename)); + std::string text((std::istreambuf_iterator(file)), std::istreambuf_iterator()); + return text; + } + + private: + const ParserConfig& m_config; + Lexer m_lexer; + Token m_tok; + Token m_peek_tok; + bool m_have_peek_tok {false}; + TemplateStorage& m_included_templates; + const ParserStatic& m_static; + + struct IfData { + unsigned int prev_cond_jump; + std::vector uncond_jumps; + + explicit IfData(unsigned int condJump): prev_cond_jump(condJump) {} + }; + + std::vector m_if_stack; + std::vector m_loop_stack; + + void get_next_token() { + if (m_have_peek_tok) { + m_tok = m_peek_tok; + m_have_peek_tok = false; + } else { + m_tok = m_lexer.scan(); + } + } + + void get_peek_token() { + if (!m_have_peek_tok) { + m_peek_tok = m_lexer.scan(); + m_have_peek_tok = true; + } + } +}; + +} // namespace inja + +#endif // PANTOR_INJA_PARSER_HPP + +// #include "polyfill.hpp" +#ifndef PANTOR_INJA_POLYFILL_HPP +#define PANTOR_INJA_POLYFILL_HPP + + +#if __cplusplus < 201402L + +#include +#include +#include + + +namespace stdinja { + template struct _Unique_if { + typedef std::unique_ptr _Single_object; + }; + + template struct _Unique_if { + typedef std::unique_ptr _Unknown_bound; + }; + + template struct _Unique_if { + typedef void _Known_bound; + }; + + template + typename _Unique_if::_Single_object + make_unique(Args&&... args) { + return std::unique_ptr(new T(std::forward(args)...)); + } + + template + typename _Unique_if::_Unknown_bound + make_unique(size_t n) { + typedef typename std::remove_extent::type U; + return std::unique_ptr(new U[n]()); + } + + template + typename _Unique_if::_Known_bound + make_unique(Args&&...) = delete; +} + +#else + +namespace stdinja = std; + +#endif // memory */ + + +#endif // PANTOR_INJA_POLYFILL_HPP + +// #include "renderer.hpp" +#ifndef PANTOR_INJA_RENDERER_HPP +#define PANTOR_INJA_RENDERER_HPP + +#include +#include + +#include + +// #include "bytecode.hpp" + +// #include "template.hpp" + +// #include "utils.hpp" + + + +namespace inja { + +inline nonstd::string_view convert_dot_to_json_pointer(nonstd::string_view dot, std::string& out) { + out.clear(); + do { + nonstd::string_view part; + std::tie(part, dot) = string_view::split(dot, '.'); + out.push_back('/'); + out.append(part.begin(), part.end()); + } while (!dot.empty()); + return nonstd::string_view(out.data(), out.size()); +} + +class Renderer { + std::vector& get_args(const Bytecode& bc) { + m_tmp_args.clear(); + + bool has_imm = ((bc.flags & Bytecode::Flag::ValueMask) != Bytecode::Flag::ValuePop); + + // get args from stack + unsigned int pop_args = bc.args; + if (has_imm) { + pop_args -= 1; + } + + for (auto i = std::prev(m_stack.end(), pop_args); i != m_stack.end(); i++) { + m_tmp_args.push_back(&(*i)); + } + + // get immediate arg + if (has_imm) { + m_tmp_args.push_back(get_imm(bc)); + } + + return m_tmp_args; + } + + void pop_args(const Bytecode& bc) { + unsigned int popArgs = bc.args; + if ((bc.flags & Bytecode::Flag::ValueMask) != Bytecode::Flag::ValuePop) { + popArgs -= 1; + } + for (unsigned int i = 0; i < popArgs; ++i) { + m_stack.pop_back(); + } + } + + const json* get_imm(const Bytecode& bc) { + std::string ptr_buffer; + nonstd::string_view ptr; + switch (bc.flags & Bytecode::Flag::ValueMask) { + case Bytecode::Flag::ValuePop: + return nullptr; + case Bytecode::Flag::ValueImmediate: + return &bc.value; + case Bytecode::Flag::ValueLookupDot: + ptr = convert_dot_to_json_pointer(bc.str, ptr_buffer); + break; + case Bytecode::Flag::ValueLookupPointer: + ptr_buffer += '/'; + ptr_buffer += bc.str; + ptr = ptr_buffer; + break; + } + try { + return &m_data->at(json::json_pointer(ptr.data())); + } catch (std::exception&) { + // try to evaluate as a no-argument callback + if (auto callback = m_callbacks.find_callback(bc.str, 0)) { + std::vector arguments {}; + m_tmp_val = callback(arguments); + return &m_tmp_val; + } + inja_throw("render_error", "variable '" + static_cast(bc.str) + "' not found"); + return nullptr; + } + } + + bool truthy(const json& var) const { + if (var.empty()) { + return false; + } else if (var.is_number()) { + return (var != 0); + } else if (var.is_string()) { + return !var.empty(); + } + + try { + return var.get(); + } catch (json::type_error& e) { + inja_throw("json_error", e.what()); + throw; + } + } + + void update_loop_data() { + LoopLevel& level = m_loop_stack.back(); + + if (level.loop_type == LoopLevel::Type::Array) { + level.data[static_cast(level.value_name)] = level.values.at(level.index); // *level.it; + auto& loopData = level.data["loop"]; + loopData["index"] = level.index; + loopData["index1"] = level.index + 1; + loopData["is_first"] = (level.index == 0); + loopData["is_last"] = (level.index == level.size - 1); + } else { + level.data[static_cast(level.key_name)] = level.map_it->first; + level.data[static_cast(level.value_name)] = *level.map_it->second; + } + } + + const TemplateStorage& m_included_templates; + const FunctionStorage& m_callbacks; + + std::vector m_stack; + + + struct LoopLevel { + enum class Type { Map, Array }; + + Type loop_type; + nonstd::string_view key_name; // variable name for keys + nonstd::string_view value_name; // variable name for values + json data; // data with loop info added + + json values; // values to iterate over + + // loop over list + size_t index; // current list index + size_t size; // length of list + + // loop over map + using KeyValue = std::pair; + using MapValues = std::vector; + MapValues map_values; // values to iterate over + MapValues::iterator map_it; // iterator over values + + }; + + std::vector m_loop_stack; + const json* m_data; + + std::vector m_tmp_args; + json m_tmp_val; + + + public: + Renderer(const TemplateStorage& included_templates, const FunctionStorage& callbacks): m_included_templates(included_templates), m_callbacks(callbacks) { + m_stack.reserve(16); + m_tmp_args.reserve(4); + m_loop_stack.reserve(16); + } + + void render_to(std::ostream& os, const Template& tmpl, const json& data) { + m_data = &data; + + for (size_t i = 0; i < tmpl.bytecodes.size(); ++i) { + const auto& bc = tmpl.bytecodes[i]; + + switch (bc.op) { + case Bytecode::Op::Nop: { + break; + } + case Bytecode::Op::PrintText: { + os << bc.str; + break; + } + case Bytecode::Op::PrintValue: { + const json& val = *get_args(bc)[0]; + if (val.is_string()) + os << val.get_ref(); + else + os << val.dump(); + // val.dump(os); + pop_args(bc); + break; + } + case Bytecode::Op::Push: { + m_stack.emplace_back(*get_imm(bc)); + break; + } + case Bytecode::Op::Upper: { + auto result = get_args(bc)[0]->get(); + std::transform(result.begin(), result.end(), result.begin(), ::toupper); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Lower: { + auto result = get_args(bc)[0]->get(); + std::transform(result.begin(), result.end(), result.begin(), ::tolower); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Range: { + int number = get_args(bc)[0]->get(); + std::vector result(number); + std::iota(std::begin(result), std::end(result), 0); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Length: { + auto result = get_args(bc)[0]->size(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Sort: { + auto result = get_args(bc)[0]->get>(); + std::sort(result.begin(), result.end()); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::First: { + auto result = get_args(bc)[0]->front(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Last: { + auto result = get_args(bc)[0]->back(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Round: { + auto args = get_args(bc); + double number = args[0]->get(); + int precision = args[1]->get(); + pop_args(bc); + m_stack.emplace_back(std::round(number * std::pow(10.0, precision)) / std::pow(10.0, precision)); + break; + } + case Bytecode::Op::DivisibleBy: { + auto args = get_args(bc); + int number = args[0]->get(); + int divisor = args[1]->get(); + pop_args(bc); + m_stack.emplace_back((divisor != 0) && (number % divisor == 0)); + break; + } + case Bytecode::Op::Odd: { + int number = get_args(bc)[0]->get(); + pop_args(bc); + m_stack.emplace_back(number % 2 != 0); + break; + } + case Bytecode::Op::Even: { + int number = get_args(bc)[0]->get(); + pop_args(bc); + m_stack.emplace_back(number % 2 == 0); + break; + } + case Bytecode::Op::Max: { + auto args = get_args(bc); + auto result = *std::max_element(args[0]->begin(), args[0]->end()); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Min: { + auto args = get_args(bc); + auto result = *std::min_element(args[0]->begin(), args[0]->end()); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Not: { + bool result = !truthy(*get_args(bc)[0]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::And: { + auto args = get_args(bc); + bool result = truthy(*args[0]) && truthy(*args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Or: { + auto args = get_args(bc); + bool result = truthy(*args[0]) || truthy(*args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::In: { + auto args = get_args(bc); + bool result = std::find(args[1]->begin(), args[1]->end(), *args[0]) != + args[1]->end(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Equal: { + auto args = get_args(bc); + bool result = (*args[0] == *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Greater: { + auto args = get_args(bc); + bool result = (*args[0] > *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Less: { + auto args = get_args(bc); + bool result = (*args[0] < *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::GreaterEqual: { + auto args = get_args(bc); + bool result = (*args[0] >= *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::LessEqual: { + auto args = get_args(bc); + bool result = (*args[0] <= *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Different: { + auto args = get_args(bc); + bool result = (*args[0] != *args[1]); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Float: { + double result = + std::stod(get_args(bc)[0]->get_ref()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Int: { + int result = std::stoi(get_args(bc)[0]->get_ref()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Exists: { + auto&& name = get_args(bc)[0]->get_ref(); + bool result = (data.find(name) != data.end()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::ExistsInObject: { + auto args = get_args(bc); + auto&& name = args[1]->get_ref(); + bool result = (args[0]->find(name) != args[0]->end()); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsBoolean: { + bool result = get_args(bc)[0]->is_boolean(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsNumber: { + bool result = get_args(bc)[0]->is_number(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsInteger: { + bool result = get_args(bc)[0]->is_number_integer(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsFloat: { + bool result = get_args(bc)[0]->is_number_float(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsObject: { + bool result = get_args(bc)[0]->is_object(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsArray: { + bool result = get_args(bc)[0]->is_array(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::IsString: { + bool result = get_args(bc)[0]->is_string(); + pop_args(bc); + m_stack.emplace_back(result); + break; + } + case Bytecode::Op::Default: { + // default needs to be a bit "magic"; we can't evaluate the first + // argument during the push operation, so we swap the arguments during + // the parse phase so the second argument is pushed on the stack and + // the first argument is in the immediate + try { + const json* imm = get_imm(bc); + // if no exception was raised, replace the stack value with it + m_stack.back() = *imm; + } catch (std::exception&) { + // couldn't read immediate, just leave the stack as is + } + break; + } + case Bytecode::Op::Include: + Renderer(m_included_templates, m_callbacks).render_to(os, m_included_templates.find(get_imm(bc)->get_ref())->second, data); + break; + case Bytecode::Op::Callback: { + auto callback = m_callbacks.find_callback(bc.str, bc.args); + if (!callback) { + inja_throw("render_error", "function '" + static_cast(bc.str) + "' (" + std::to_string(static_cast(bc.args)) + ") not found"); + } + json result = callback(get_args(bc)); + pop_args(bc); + m_stack.emplace_back(std::move(result)); + break; + } + case Bytecode::Op::Jump: { + i = bc.args - 1; // -1 due to ++i in loop + break; + } + case Bytecode::Op::ConditionalJump: { + if (!truthy(m_stack.back())) { + i = bc.args - 1; // -1 due to ++i in loop + } + m_stack.pop_back(); + break; + } + case Bytecode::Op::StartLoop: { + // jump past loop body if empty + if (m_stack.back().empty()) { + m_stack.pop_back(); + i = bc.args; // ++i in loop will take it past EndLoop + break; + } + + m_loop_stack.emplace_back(); + LoopLevel& level = m_loop_stack.back(); + level.value_name = bc.str; + level.values = std::move(m_stack.back()); + level.data = (*m_data); + m_stack.pop_back(); + + if (bc.value.is_string()) { + // map iterator + if (!level.values.is_object()) { + m_loop_stack.pop_back(); + inja_throw("render_error", "for key, value requires object"); + } + level.loop_type = LoopLevel::Type::Map; + level.key_name = bc.value.get_ref(); + + // sort by key + for (auto it = level.values.begin(), end = level.values.end(); it != end; ++it) { + level.map_values.emplace_back(it.key(), &it.value()); + } + std::sort(level.map_values.begin(), level.map_values.end(), [](const LoopLevel::KeyValue& a, const LoopLevel::KeyValue& b) { return a.first < b.first; }); + level.map_it = level.map_values.begin(); + } else { + if (!level.values.is_array()) { + m_loop_stack.pop_back(); + inja_throw("render_error", "type must be array"); + } + + // list iterator + level.loop_type = LoopLevel::Type::Array; + level.index = 0; + level.size = level.values.size(); + } + + // provide parent access in nested loop + auto parent_loop_it = level.data.find("loop"); + if (parent_loop_it != level.data.end()) { + json loop_copy = *parent_loop_it; + (*parent_loop_it)["parent"] = std::move(loop_copy); + } + + // set "current" data to loop data + m_data = &level.data; + update_loop_data(); + break; + } + case Bytecode::Op::EndLoop: { + if (m_loop_stack.empty()) { + inja_throw("render_error", "unexpected state in renderer"); + } + LoopLevel& level = m_loop_stack.back(); + + bool done; + if (level.loop_type == LoopLevel::Type::Array) { + level.index += 1; + done = (level.index == level.values.size()); + } else { + level.map_it += 1; + done = (level.map_it == level.map_values.end()); + } + + if (done) { + m_loop_stack.pop_back(); + // set "current" data to outer loop data or main data as appropriate + if (!m_loop_stack.empty()) { + m_data = &m_loop_stack.back().data; + } else { + m_data = &data; + } + break; + } + + update_loop_data(); + + // jump back to start of loop + i = bc.args - 1; // -1 due to ++i in loop + break; + } + default: { + inja_throw("render_error", "unknown op in renderer: " + std::to_string(static_cast(bc.op))); + } + } + } + } +}; + +} // namespace inja + +#endif // PANTOR_INJA_RENDERER_HPP + +// #include "string_view.hpp" + +// #include "template.hpp" + + + +namespace inja { + +using namespace nlohmann; + +class Environment { + class Impl { + public: + std::string input_path; + std::string output_path; + + LexerConfig lexer_config; + ParserConfig parser_config; + + FunctionStorage callbacks; + TemplateStorage included_templates; + }; + + std::unique_ptr m_impl; + + public: + Environment(): Environment("./") { } + + explicit Environment(const std::string& global_path): m_impl(stdinja::make_unique()) { + m_impl->input_path = global_path; + m_impl->output_path = global_path; + } + + explicit Environment(const std::string& input_path, const std::string& output_path): m_impl(stdinja::make_unique()) { + m_impl->input_path = input_path; + m_impl->output_path = output_path; + } + + /// Sets the opener and closer for template statements + void set_statement(const std::string& open, const std::string& close) { + m_impl->lexer_config.statement_open = open; + m_impl->lexer_config.statement_close = close; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the opener for template line statements + void set_line_statement(const std::string& open) { + m_impl->lexer_config.line_statement = open; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the opener and closer for template expressions + void set_expression(const std::string& open, const std::string& close) { + m_impl->lexer_config.expression_open = open; + m_impl->lexer_config.expression_close = close; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the opener and closer for template comments + void set_comment(const std::string& open, const std::string& close) { + m_impl->lexer_config.comment_open = open; + m_impl->lexer_config.comment_close = close; + m_impl->lexer_config.update_open_chars(); + } + + /// Sets the element notation syntax + void set_element_notation(ElementNotation notation) { + m_impl->parser_config.notation = notation; + } + + + Template parse(nonstd::string_view input) { + Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates); + return parser.parse(input); + } + + Template parse_template(const std::string& filename) { + Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates); + return parser.parse_template(m_impl->input_path + static_cast(filename)); + } + + std::string render(nonstd::string_view input, const json& data) { + return render(parse(input), data); + } + + std::string render(const Template& tmpl, const json& data) { + std::stringstream os; + render_to(os, tmpl, data); + return os.str(); + } + + std::string render_file(const std::string& filename, const json& data) { + return render(parse_template(filename), data); + } + + std::string render_file_with_json_file(const std::string& filename, const std::string& filename_data) { + const json data = load_json(filename_data); + return render_file(filename, data); + } + + void write(const std::string& filename, const json& data, const std::string& filename_out) { + std::ofstream file(m_impl->output_path + filename_out); + file << render_file(filename, data); + file.close(); + } + + void write(const Template& temp, const json& data, const std::string& filename_out) { + std::ofstream file(m_impl->output_path + filename_out); + file << render(temp, data); + file.close(); + } + + void write_with_json_file(const std::string& filename, const std::string& filename_data, const std::string& filename_out) { + const json data = load_json(filename_data); + write(filename, data, filename_out); + } + + void write_with_json_file(const Template& temp, const std::string& filename_data, const std::string& filename_out) { + const json data = load_json(filename_data); + write(temp, data, filename_out); + } + + std::ostream& render_to(std::ostream& os, const Template& tmpl, const json& data) { + Renderer(m_impl->included_templates, m_impl->callbacks).render_to(os, tmpl, data); + return os; + } + + std::string load_file(const std::string& filename) { + Parser parser(m_impl->parser_config, m_impl->lexer_config, m_impl->included_templates); + return parser.load_file(m_impl->input_path + filename); + } + + json load_json(const std::string& filename) { + std::ifstream file(m_impl->input_path + filename); + json j; + file >> j; + return j; + } + + void add_callback(const std::string& name, unsigned int numArgs, const CallbackFunction& callback) { + m_impl->callbacks.add_callback(name, numArgs, callback); + } + + /** Includes a template with a given name into the environment. + * Then, a template can be rendered in another template using the + * include "" syntax. + */ + void include_template(const std::string& name, const Template& tmpl) { + m_impl->included_templates[name] = tmpl; + } +}; + +/*! +@brief render with default settings to a string +*/ +inline std::string render(nonstd::string_view input, const json& data) { + return Environment().render(input, data); +} + +/*! +@brief render with default settings to the given output stream +*/ +inline void render_to(std::ostream& os, nonstd::string_view input, const json& data) { + Environment env; + env.render_to(os, env.parse(input), data); +} + +} + +#endif // PANTOR_INJA_ENVIRONMENT_HPP + +// #include "string_view.hpp" + +// #include "template.hpp" + +// #include "parser.hpp" + +// #include "renderer.hpp" + + + +#endif // PANTOR_INJA_HPP diff --git a/tools/jsonproc/jsonproc.cpp b/tools/jsonproc/jsonproc.cpp new file mode 100755 index 000000000..15eae9dcb --- /dev/null +++ b/tools/jsonproc/jsonproc.cpp @@ -0,0 +1,119 @@ +// jsonproc.cpp + +#include "jsonproc.h" + +#include + +#include +using std::string; using std::to_string; + +#include +using namespace inja; +using json = nlohmann::json; + +std::map customVars; + +void set_custom_var(string key, string value) +{ + customVars[key] = value; +} + +string get_custom_var(string key) +{ + return customVars[key]; +} + +int main(int argc, char *argv[]) +{ + if (argc != 4) + FATAL_ERROR("USAGE: jsonproc \n"); + + string jsonfilepath = argv[1]; + string templateFilepath = argv[2]; + string outputFilepath = argv[3]; + + Environment env; + + // Add custom command callbacks. + env.add_callback("doNotModifyHeader", 0, [jsonfilepath, templateFilepath](Arguments& args) { + return "//\n// DO NOT MODIFY THIS FILE! It is auto-generated from " + jsonfilepath +" and Inja template " + templateFilepath + "\n//\n"; + }); + + env.add_callback("subtract", 2, [](Arguments& args) { + int minuend = args.at(0)->get(); + int subtrahend = args.at(1)->get(); + + return minuend - subtrahend; + }); + + env.add_callback("setVar", 2, [=](Arguments& args) { + string key = args.at(0)->get(); + string value = args.at(1)->get(); + set_custom_var(key, value); + return ""; + }); + + env.add_callback("setVarInt", 2, [=](Arguments& args) { + string key = args.at(0)->get(); + string value = to_string(args.at(1)->get()); + set_custom_var(key, value); + return ""; + }); + + env.add_callback("getVar", 1, [=](Arguments& args) { + string key = args.at(0)->get(); + return get_custom_var(key); + }); + + env.add_callback("trackVar", 2, [](Arguments& args) { + static int counter = 0; + + int addValue = args.at(0)->get(); + int checkValue = args.at(1)->get(); + + bool over = false; + + counter = (counter + addValue) % (checkValue + 1); + + if (counter <= addValue) over = true; + + return over; + }); + + env.add_callback("concat", 2, [](Arguments& args) { + string first = args.at(0)->get(); + string second = args.at(1)->get(); + return first + second; + }); + + env.add_callback("removePrefix", 2, [](Arguments& args) { + string rawValue = args.at(0)->get(); + string prefix = args.at(1)->get(); + string::size_type i = rawValue.find(prefix); + if (i != 0) + return rawValue; + + return rawValue.erase(0, prefix.length()); + }); + + env.add_callback("removeSuffix", 2, [](Arguments& args) { + string rawValue = args.at(0)->get(); + string suffix = args.at(1)->get(); + string::size_type i = rawValue.rfind(suffix); + if (i == string::npos) + return rawValue; + + return rawValue.substr(0, i); + }); + + try + { + env.write_with_json_file(templateFilepath, jsonfilepath, outputFilepath); + } + catch (const std::exception& e) + { + FATAL_ERROR("JSONPROC_ERROR: %s\n", e.what()); + } + + return 0; +} diff --git a/tools/jsonproc/jsonproc.h b/tools/jsonproc/jsonproc.h new file mode 100755 index 000000000..575fb3756 --- /dev/null +++ b/tools/jsonproc/jsonproc.h @@ -0,0 +1,32 @@ +// jsonproc.h + +#ifndef JSONPROC_H +#define JSONPROC_H + +#include +#include +using std::fprintf; using std::exit; + +#include + +#ifdef _MSC_VER + +#define FATAL_ERROR(format, ...) \ +do \ +{ \ + fprintf(stderr, format, __VA_ARGS__); \ + exit(1); \ +} while (0) + +#else + +#define FATAL_ERROR(format, ...) \ +do \ +{ \ + fprintf(stderr, format, ##__VA_ARGS__); \ + exit(1); \ +} while (0) + +#endif // _MSC_VER + +#endif // JSONPROC_H diff --git a/tools/jsonproc/nlohmann/json.hpp b/tools/jsonproc/nlohmann/json.hpp new file mode 100755 index 000000000..5003a4fa2 --- /dev/null +++ b/tools/jsonproc/nlohmann/json.hpp @@ -0,0 +1,20842 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.6.1 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +SPDX-License-Identifier: MIT +Copyright (c) 2013-2019 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 6 +#define NLOHMANN_JSON_VERSION_PATCH 1 + +#include // all_of, find, for_each +#include // assert +#include // and, not, or +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#include // istream, ostream +#include // random_access_iterator_tag +#include // unique_ptr +#include // accumulate +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include + + +#include + +// #include + + +#include // transform +#include // array +#include // and, not +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include + + +#include // exception +#include // runtime_error +#include // to_string + +// #include + + +#include // size_t + +namespace nlohmann +{ +namespace detail +{ +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. +json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet). + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, const position_t& pos, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + position_string(pos) + ": " + what_arg; + return parse_error(id_, pos.chars_read_total, w.c_str()); + } + + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) + { + return " at line " + std::to_string(pos.lines_read + 1) + + ", column " + std::to_string(pos.chars_read_current_line); + } +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t &. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | +json.exception.type_error.317 | JSON value cannot be serialized to requested format | The dynamic type of the object cannot be represented in the requested serialization format (e.g. a raw `true` or `null` JSON object cannot be serialized to BSON) | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. +json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | +json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | +json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // pair + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow for portable deprecation warnings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define JSON_DEPRECATED __declspec(deprecated) +#else + #define JSON_DEPRECATED +#endif + +// allow for portable nodiscard warnings +#if defined(__has_cpp_attribute) + #if __has_cpp_attribute(nodiscard) + #define JSON_NODISCARD [[nodiscard]] + #elif __has_cpp_attribute(gnu::warn_unused_result) + #define JSON_NODISCARD [[gnu::warn_unused_result]] + #else + #define JSON_NODISCARD + #endif +#else + #define JSON_NODISCARD +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(x, 1) + #define JSON_UNLIKELY(x) __builtin_expect(x, 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// #include + + +#include // not +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type + +namespace nlohmann +{ +namespace detail +{ +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +template +using uncvref_t = typename std::remove_cv::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template +struct merge_and_renumber; + +template +struct merge_and_renumber, index_sequence> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template +using index_sequence_for = make_index_sequence; + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static constexpr T value{}; +}; + +template +constexpr T static_const::value; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // not +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval + +// #include + + +#include // random_access_iterator_tag + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; +} // namespace detail +} // namespace nlohmann + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + + +#include + +// #include + + +// http://en.cppreference.com/w/cpp/experimental/is_detected +namespace nlohmann +{ +namespace detail +{ +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template