summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/macros/battle_ai_script.inc20
-rw-r--r--asm/macros/event.inc775
-rw-r--r--data/event_scripts.s6
-rw-r--r--data/maps/AbandonedShip_CaptainsOffice/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Corridors_B1F/scripts.inc8
-rw-r--r--data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc26
-rw-r--r--data/maps/AbandonedShip_Rooms_B1F/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Underwater1/scripts.inc2
-rw-r--r--data/maps/AbandonedShip_Underwater2/scripts.inc2
-rw-r--r--data/maps/AncientTomb/scripts.inc12
-rw-r--r--data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleArenaLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleDomeLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc58
-rw-r--r--data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattlePyramidTop/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc10
-rw-r--r--data/maps/BattleFrontier_BattleTowerElevator/scripts.inc8
-rw-r--r--data/maps/BattleFrontier_BattleTowerLobby/scripts.inc10
-rw-r--r--data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_Lounge1/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_Lounge2/scripts.inc20
-rw-r--r--data/maps/BattleFrontier_Lounge3/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_Lounge5/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_Lounge6/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_Lounge7/scripts.inc2
-rw-r--r--data/maps/BattleFrontier_OutsideWest/scripts.inc6
-rw-r--r--data/maps/BattleFrontier_ScottsHouse/scripts.inc8
-rw-r--r--data/maps/BirthIsland_Harbor/scripts.inc2
-rw-r--r--data/maps/CaveOfOrigin_Entrance/scripts.inc2
-rw-r--r--data/maps/ContestHall/scripts.inc10
-rw-r--r--data/maps/DesertRuins/scripts.inc12
-rw-r--r--data/maps/DewfordTown/scripts.inc18
-rw-r--r--data/maps/DewfordTown_Gym/scripts.inc64
-rw-r--r--data/maps/EverGrandeCity_ChampionsRoom/scripts.inc6
-rw-r--r--data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc4
-rw-r--r--data/maps/FallarborTown_BattleTentCorridor/scripts.inc2
-rw-r--r--data/maps/FallarborTown_BattleTentLobby/scripts.inc2
-rw-r--r--data/maps/FallarborTown_CozmosHouse/scripts.inc2
-rw-r--r--data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc4
-rw-r--r--data/maps/FarawayIsland_Entrance/scripts.inc2
-rw-r--r--data/maps/FortreeCity/scripts.inc2
-rw-r--r--data/maps/FortreeCity_House1/scripts.inc6
-rw-r--r--data/maps/GraniteCave_B1F/scripts.inc2
-rw-r--r--data/maps/InsideOfTruck/scripts.inc10
-rw-r--r--data/maps/IslandCave/scripts.inc24
-rw-r--r--data/maps/JaggedPass/scripts.inc10
-rw-r--r--data/maps/LilycoveCity/scripts.inc24
-rw-r--r--data/maps/LilycoveCity_ContestLobby/scripts.inc32
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc10
-rw-r--r--data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc40
-rw-r--r--data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc2
-rw-r--r--data/maps/LilycoveCity_Harbor/scripts.inc36
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc6
-rw-r--r--data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc20
-rw-r--r--data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc2
-rw-r--r--data/maps/LittlerootTown/scripts.inc6
-rw-r--r--data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc8
-rw-r--r--data/maps/LittlerootTown_MaysHouse_1F/scripts.inc8
-rw-r--r--data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc8
-rw-r--r--data/maps/MarineCave_Entrance/scripts.inc2
-rw-r--r--data/maps/MauvilleCity_BikeShop/scripts.inc4
-rw-r--r--data/maps/MauvilleCity_GameCorner/scripts.inc84
-rw-r--r--data/maps/MauvilleCity_Gym/scripts.inc52
-rw-r--r--data/maps/MauvilleCity_House2/scripts.inc2
-rw-r--r--data/maps/MeteorFalls_1F_1R/scripts.inc8
-rw-r--r--data/maps/MirageTower_2F/scripts.inc2
-rw-r--r--data/maps/MirageTower_3F/scripts.inc2
-rw-r--r--data/maps/MirageTower_4F/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_Gym/scripts.inc50
-rw-r--r--data/maps/MossdeepCity_House1/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc6
-rw-r--r--data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_StevensHouse/scripts.inc6
-rw-r--r--data/maps/MtChimney/scripts.inc10
-rw-r--r--data/maps/MtPyre_2F/scripts.inc2
-rw-r--r--data/maps/NavelRock_Harbor/scripts.inc2
-rw-r--r--data/maps/NewMauville_Entrance/scripts.inc26
-rw-r--r--data/maps/NewMauville_Inside/scripts.inc166
-rw-r--r--data/maps/PacifidlogTown_House2/scripts.inc2
-rw-r--r--data/maps/PacifidlogTown_House3/scripts.inc6
-rw-r--r--data/maps/PetalburgCity/scripts.inc4
-rw-r--r--data/maps/PetalburgCity_Gym/scripts.inc58
-rw-r--r--data/maps/Route101/scripts.inc2
-rw-r--r--data/maps/Route103/scripts.inc4
-rw-r--r--data/maps/Route104/scripts.inc10
-rw-r--r--data/maps/Route104_MrBrineysHouse/scripts.inc2
-rw-r--r--data/maps/Route105/scripts.inc4
-rw-r--r--data/maps/Route109/scripts.inc10
-rw-r--r--data/maps/Route109_SeashoreHouse/scripts.inc10
-rw-r--r--data/maps/Route110_TrickHouseEnd/scripts.inc2
-rw-r--r--data/maps/Route110_TrickHouseEntrance/scripts.inc36
-rw-r--r--data/maps/Route110_TrickHousePuzzle1/scripts.inc2
-rw-r--r--data/maps/Route110_TrickHousePuzzle2/scripts.inc16
-rw-r--r--data/maps/Route110_TrickHousePuzzle3/scripts.inc312
-rw-r--r--data/maps/Route110_TrickHousePuzzle5/scripts.inc2
-rw-r--r--data/maps/Route110_TrickHousePuzzle7/scripts.inc42
-rw-r--r--data/maps/Route111/scripts.inc42
-rw-r--r--data/maps/Route112_CableCarStation/scripts.inc2
-rw-r--r--data/maps/Route113_GlassWorkshop/scripts.inc34
-rw-r--r--data/maps/Route114_FossilManiacsTunnel/scripts.inc8
-rw-r--r--data/maps/Route116/scripts.inc2
-rw-r--r--data/maps/Route119_WeatherInstitute_2F/scripts.inc2
-rw-r--r--data/maps/Route120/scripts.inc20
-rw-r--r--data/maps/Route121_SafariZoneEntrance/scripts.inc12
-rw-r--r--data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc14
-rw-r--r--data/maps/Route134/scripts.inc2
-rw-r--r--data/maps/RustboroCity/scripts.inc2
-rw-r--r--data/maps/RustboroCity_DevonCorp_2F/scripts.inc24
-rw-r--r--data/maps/RustboroCity_House1/scripts.inc4
-rw-r--r--data/maps/SSTidalCorridor/scripts.inc4
-rw-r--r--data/maps/SafariZone_South/scripts.inc2
-rw-r--r--data/maps/SeafloorCavern_Entrance/scripts.inc4
-rw-r--r--data/maps/SeafloorCavern_Room9/scripts.inc2
-rw-r--r--data/maps/SealedChamber_OuterRoom/scripts.inc16
-rw-r--r--data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc6
-rw-r--r--data/maps/ShoalCave_LowTideInnerRoom/scripts.inc24
-rw-r--r--data/maps/ShoalCave_LowTideLowerRoom/scripts.inc4
-rw-r--r--data/maps/ShoalCave_LowTideStairsRoom/scripts.inc4
-rw-r--r--data/maps/SkyPillar_2F/scripts.inc2
-rw-r--r--data/maps/SkyPillar_4F/scripts.inc2
-rw-r--r--data/maps/SkyPillar_Outside/scripts.inc4
-rw-r--r--data/maps/SkyPillar_Top/scripts.inc2
-rw-r--r--data/maps/SlateportCity/scripts.inc28
-rw-r--r--data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc6
-rw-r--r--data/maps/SlateportCity_BattleTentCorridor/scripts.inc2
-rw-r--r--data/maps/SlateportCity_BattleTentLobby/scripts.inc2
-rw-r--r--data/maps/SlateportCity_Harbor/scripts.inc8
-rw-r--r--data/maps/SlateportCity_NameRatersHouse/scripts.inc4
-rw-r--r--data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc8
-rw-r--r--data/maps/SlateportCity_PokemonFanClub/scripts.inc12
-rw-r--r--data/maps/SootopolisCity/scripts.inc78
-rw-r--r--data/maps/SootopolisCity_Gym_1F/scripts.inc12
-rw-r--r--data/maps/SootopolisCity_House6/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc4
-rw-r--r--data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc2
-rw-r--r--data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc2
-rw-r--r--data/maps/SouthernIsland_Exterior/scripts.inc2
-rw-r--r--data/maps/TrainerHill_Elevator/scripts.inc4
-rw-r--r--data/maps/TrainerHill_Entrance/scripts.inc4
-rw-r--r--data/maps/Underwater_MarineCave/scripts.inc2
-rw-r--r--data/maps/Underwater_Route134/scripts.inc2
-rw-r--r--data/maps/Underwater_SeafloorCavern/scripts.inc26
-rw-r--r--data/maps/Underwater_SealedChamber/scripts.inc4
-rw-r--r--data/maps/Underwater_SootopolisCity/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc4
-rw-r--r--data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc2
-rw-r--r--data/maps/VerdanturfTown_BattleTentLobby/scripts.inc2
-rw-r--r--data/script_cmd_table.inc14
-rw-r--r--data/scripts/abnormal_weather.inc464
-rw-r--r--data/scripts/battle_pike.inc10
-rw-r--r--data/scripts/berry_blender.inc12
-rw-r--r--data/scripts/berry_tree.inc12
-rw-r--r--data/scripts/cable_club.inc52
-rw-r--r--data/scripts/contest_hall.inc10
-rw-r--r--data/scripts/day_care.inc2
-rw-r--r--data/scripts/elite_four.inc84
-rw-r--r--data/scripts/field_move_scripts.inc14
-rw-r--r--data/scripts/flash.inc2
-rw-r--r--data/scripts/gift_aurora_ticket.inc4
-rw-r--r--data/scripts/gift_mystic_ticket.inc4
-rw-r--r--data/scripts/gift_old_sea_map.inc4
-rw-r--r--data/scripts/gift_stamp_card.inc2
-rw-r--r--data/scripts/kecleon.inc4
-rw-r--r--data/scripts/lilycove_lady.inc2
-rw-r--r--data/scripts/obtain_item.inc97
-rw-r--r--data/scripts/pc_transfer.inc10
-rw-r--r--data/scripts/prof_birch.inc8
-rw-r--r--data/scripts/roulette.inc8
-rw-r--r--data/scripts/safari_zone.inc4
-rw-r--r--data/scripts/secret_base.inc12
-rw-r--r--data/scripts/std_msgbox.inc15
-rw-r--r--data/scripts/surf.inc2
-rw-r--r--data/scripts/trainer_battle.inc2
-rw-r--r--data/scripts/trainer_hill.inc4
-rw-r--r--data/scripts/trainer_script.inc6
-rw-r--r--data/scripts/tv.inc4
-rw-r--r--gflib/sprite.h1
-rw-r--r--include/battle_anim.h2
-rw-r--r--include/constants/event_objects.h1
-rw-r--r--include/constants/maps.h12
-rwxr-xr-xinclude/constants/metatile_behaviors.h8
-rw-r--r--include/constants/metatile_labels.h32
-rw-r--r--include/constants/party_menu.h2
-rw-r--r--include/constants/slot_machine.h9
-rw-r--r--include/constants/tv.h8
-rw-r--r--include/event_object_movement.h4
-rw-r--r--include/field_control_avatar.h6
-rw-r--r--include/field_screen_effect.h3
-rw-r--r--include/field_special_scene.h1
-rw-r--r--include/field_weather.h6
-rw-r--r--include/global.h7
-rw-r--r--include/global.tv.h22
-rw-r--r--include/mail.h2
-rw-r--r--include/mauville_old_man.h2
-rw-r--r--include/metatile_behavior.h8
-rw-r--r--include/overworld.h8
-rw-r--r--include/script_menu.h2
-rw-r--r--include/tv.h2
-rw-r--r--src/battle_arena.c2
-rw-r--r--src/battle_dome.c2
-rw-r--r--src/battle_factory.c2
-rw-r--r--src/battle_palace.c2
-rw-r--r--src/battle_pyramid.c1
-rw-r--r--src/battle_setup.c5
-rw-r--r--src/battle_tent.c6
-rw-r--r--src/battle_tower.c2
-rw-r--r--src/braille_puzzles.c1
-rw-r--r--src/cable_club.c2
-rw-r--r--src/contest_util.c2
-rw-r--r--src/data/lilycove_lady.h50
-rw-r--r--src/decoration.c2
-rw-r--r--src/event_object_movement.c7
-rwxr-xr-xsrc/faraway_island.c1
-rw-r--r--src/field_control_avatar.c9
-rw-r--r--src/field_door.c1
-rw-r--r--src/field_player_avatar.c1
-rw-r--r--src/field_screen_effect.c19
-rw-r--r--src/field_special_scene.c2
-rw-r--r--src/field_specials.c76
-rw-r--r--src/field_tasks.c933
-rw-r--r--src/field_weather_effect.c18
-rw-r--r--src/frontier_pass.c1
-rw-r--r--src/heal_location.c1
-rw-r--r--src/link.c5
-rw-r--r--src/mail_data.c3
-rw-r--r--src/match_call.c1
-rw-r--r--src/menu_helpers.c1
-rw-r--r--src/metatile_behavior.c32
-rw-r--r--src/mirage_tower.c1
-rw-r--r--src/new_game.c3
-rw-r--r--src/overworld.c61
-rwxr-xr-xsrc/party_menu.c9
-rw-r--r--src/pokeball.c2
-rwxr-xr-xsrc/pokedex_area_screen.c1
-rw-r--r--src/pokemon_storage_system.c1
-rw-r--r--src/region_map.c103
-rw-r--r--src/roamer.c1
-rw-r--r--src/rotating_gate.c1
-rw-r--r--src/save_location.c1
-rw-r--r--src/scrcmd.c101
-rw-r--r--src/script.c10
-rw-r--r--src/script_menu.c3
-rwxr-xr-xsrc/script_pokemon_util.c5
-rw-r--r--src/secret_base.c188
-rwxr-xr-xsrc/shop.c6
-rw-r--r--src/slot_machine.c124
-rw-r--r--src/trainer_hill.c1
-rw-r--r--src/tv.c343
-rw-r--r--src/union_room.c7
-rw-r--r--src/wild_encounter.c1
270 files changed, 3204 insertions, 2854 deletions
diff --git a/asm/macros/battle_ai_script.inc b/asm/macros/battle_ai_script.inc
index 4c7646d6f..5341e5a43 100644
--- a/asm/macros/battle_ai_script.inc
+++ b/asm/macros/battle_ai_script.inc
@@ -251,11 +251,11 @@
.4byte \param1
.endm
- .macro nullsub_2A
+ .macro nop_2A
.byte 0x2a
.endm
- .macro nullsub_2B
+ .macro nop_2B
.byte 0x2b
.endm
@@ -287,11 +287,11 @@
.4byte \param1
.endm
- .macro nullsub_32
+ .macro nop_32
.byte 0x32
.endm
- .macro nullsub_33
+ .macro nop_33
.byte 0x33
.endm
@@ -467,27 +467,27 @@
.byte \battler
.endm
- .macro nullsub_52
+ .macro nop_52
.byte 0x52
.endm
- .macro nullsub_53
+ .macro nop_53
.byte 0x53
.endm
- .macro nullsub_54
+ .macro nop_54
.byte 0x54
.endm
- .macro nullsub_55
+ .macro nop_55
.byte 0x55
.endm
- .macro nullsub_56
+ .macro nop_56
.byte 0x56
.endm
- .macro nullsub_57
+ .macro nop_57
.byte 0x57
.endm
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 27a439725..38a53f1e2 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -44,7 +44,7 @@
.4byte \destination
.endm
- @ Jumps to the standard function at index function.
+ @ Jumps to the script in gStdScripts at index function.
.macro gotostd function:req
.byte 0x08
.byte \function
@@ -56,20 +56,20 @@
STD_OBTAIN_DECORATION = 7
STD_REGISTER_MATCH_CALL = 8
- @ Calls the standard function at index function.
+ @ Calls the script in gStdScripts at index function.
.macro callstd function:req
.byte 0x09
.byte \function
.endm
- @ If the result of the last comparison matches condition (see Comparison operators), jumps to the standard function at index function.
+ @ If the result of the last comparison matches condition (see Comparison operators), jumps to the script in gStdScripts at index function.
.macro gotostd_if condition:req, function:req
.byte 0x0a
.byte \condition
.byte \function
.endm
- @ If the result of the last comparison matches condition (see Comparison operators), calls the standard function at index function.
+ @ If the result of the last comparison matches condition (see Comparison operators), calls the script in gStdScripts at index function.
.macro callstd_if condition:req, function:req
.byte 0x0b
.byte \condition
@@ -120,6 +120,7 @@
.4byte \source
.endm
+ @ TODO
@ Not sure. Judging from XSE's description I think it takes the least-significant byte in bank source and writes it to destination.
.macro setptrbyte source:req, destination:req
.byte 0x13
@@ -233,7 +234,7 @@
.endm
@ Generic compare macro which attempts to deduce argument types based on their values
- @ Any values between 0x4000 to 0x40FF and 0x8000 to 0x8015 are considered event variable identifiers
+ @ Any values between VARS_START to VARS_END and SPECIAL_VARS_START to SPECIAL_VARS_END are considered event variable identifiers
.macro compare var:req, arg:req
.if ((\arg >= VARS_START && \arg <= VARS_END) || (\arg >= SPECIAL_VARS_START && \arg <= SPECIAL_VARS_END))
compare_var_to_var \var, \arg
@@ -242,39 +243,33 @@
.endif
.endm
- @ Calls the native C function stored at `func`.
+ @ Calls the native C function stored at func.
.macro callnative func:req
.byte 0x23
.4byte \func
.endm
- @ Replaces the script with the function stored at `func`. Execution returns to the bytecode script when func returns TRUE.
+ @ Replaces the script with the function stored at func. Execution returns to the bytecode script when func returns TRUE.
.macro gotonative func:req
.byte 0x24
.4byte \func
.endm
- @ Calls a special function; that is, a function designed for use by scripts and listed in a table of pointers.
+ @ Calls a function listed in the table in data/specials.inc.
.macro special function:req
.byte 0x25
.2byte SPECIAL_\function
.endm
- @ Calls a special function. That function's output (if any) will be written to the variable you specify.
+ @ Calls a function listed in the table in data/specials.inc.
+ @ That function's output (if any) will be written to the variable specified by 'output'.
.macro specialvar output:req, function:req
.byte 0x26
.2byte \output
.2byte SPECIAL_\function
.endm
- @ temporary solution
- .macro specialvar_ output:req, functionId:req
- .byte 0x26
- .2byte \output
- .2byte \functionId
- .endm
-
- @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific
+ @ Blocks script execution until a command or ASM code manually unblocks it. Generally used with specific
@ commands and specials. If this command runs, and a subsequent command or piece of ASM does not unblock
@ state, the script will remain blocked indefinitely (essentially a hang).
.macro waitstate
@@ -287,46 +282,46 @@
.2byte \frames
.endm
- @ Sets a to 1.
- .macro setflag a:req
+ @ Sets flag to TRUE.
+ .macro setflag flag:req
.byte 0x29
- .2byte \a
+ .2byte \flag
.endm
- @ Sets a to 0.
- .macro clearflag a:req
+ @ Sets flag to FALSE.
+ .macro clearflag flag:req
.byte 0x2a
- .2byte \a
+ .2byte \flag
.endm
- @ Compares a to 1.
- .macro checkflag a:req
+ @ Compares flag to TRUE and stores the result in comparisonResult to be used by goto_if, etc
+ @ See additional _if_unset and _if_set macros
+ .macro checkflag flag:req
.byte 0x2b
- .2byte \a
+ .2byte \flag
.endm
- @ Initializes the RTC`s local time offset to the given hour and minute. In FireRed, this command is a nop.
+ @ Initializes the RTC`s local time offset to the given hour and minute.
.macro initclock hour:req, minute:req
.byte 0x2c
.2byte \hour
.2byte \minute
.endm
- @ Runs time based events. In FireRed, this command is a nop.
+ @ Runs time based events.
.macro dotimebasedevents
.byte 0x2d
.endm
- @ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG,
- @ this command sets those variables to zero.
+ @ Sets the values of variables VAR_0x8000, VAR_0x8001, and VAR_0x8002 to the current hour, minute, and second.
.macro gettime
.byte 0x2e
.endm
- @ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones.
- .macro playse sound_number:req
+ @ Plays the specified sound. Only one sound may play at a time, with newer ones interrupting older ones.
+ .macro playse song:req
.byte 0x2f
- .2byte \sound_number
+ .2byte \song
.endm
@ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing.
@@ -335,9 +330,9 @@
.endm
@ Plays the fanfare specified by the song number. If the specified song is not a fanfare it will instead play the first song in sFanfares.
- .macro playfanfare songNumber:req
+ .macro playfanfare song:req
.byte 0x31
- .2byte \songNumber
+ .2byte \song
.endm
@ Blocks script execution until all currently-playing fanfares finish.
@@ -345,18 +340,19 @@
.byte 0x32
.endm
- @ Plays the specified (song_number) song. If save_song is TRUE, the
- @ specified (song_number) will be saved as if savebgm was called with it.
- .macro playbgm song_number:req, save_song:req
+ @ Plays the specified song. If save_song is TRUE, the
+ @ specified song will be saved as if savebgm was called with it.
+ .macro playbgm song:req, save_song:req
.byte 0x33
- .2byte \song_number
+ .2byte \song
.byte \save_song
.endm
- @ Saves the specified (song_number) song to be played later.
- .macro savebgm song_number:req
+ @ Saves the specified song to be played later. Saved music may be played when Overworld_PlaySpecialMapMusic is called. This occurs on
+ @ exiting most warps.
+ .macro savebgm song:req
.byte 0x34
- .2byte \song_number
+ .2byte \song
.endm
@ Crossfades the currently-playing song into the map's default song.
@@ -364,10 +360,10 @@
.byte 0x35
.endm
- @ Crossfades the currently-playng song into the specified (song_number) song.
- .macro fadenewbgm song_number:req
+ @ Crossfades the currently-playing song into the specified song.
+ .macro fadenewbgm song:req
.byte 0x36
- .2byte \song_number
+ .2byte \song
.endm
@ Fades out the currently-playing song.
@@ -382,91 +378,125 @@
.byte \speed
.endm
- @ Sends the player to Warp warp on Map bank.map. If the specified warp is 0xFF,
- @ then the player will instead be sent to (X, Y) on the map.
- .macro warp map:req, warp:req, X:req, Y:req
- .byte 0x39
+ @ Helper macro for warp commands that formats their arguments.
+ @ It allows warp macros to either provide 1. a valid id for which warp location to use,
+ @ or 2. a pair of x/y coordinates to use. Both may be provided but at least one will be
+ @ ignored by SetPlayerCoordsFromWarp. If none are provided it will use dummy arguments,
+ @ and the warp will send the player to the center of the map.
+ @ Examples of valid inputs for a warp command:
+ @ - warp MAP, x, y
+ @ - warp MAP, warpId
+ @ - warp MAP
+ @ - warp MAP, warpId, x, y
+ .macro formatwarp map:req, a, b, c
map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ .ifb \a @ No arguments provided, use dummy warpId and coords.
+ .byte WARP_ID_NONE
+ .2byte -1 @ x
+ .2byte -1 @ y
+ .else
+ .ifb \b @ Only one argument provided, treat it as a warpId and use dummy coords.
+ .byte \a @ warpId
+ .2byte -1 @ x
+ .2byte -1 @ y
+ .else
+ .ifb \c @ Only two arguments provided, treat them as a coord pair and use dummy warpId.
+ .byte WARP_ID_NONE
+ .2byte \a @ x
+ .2byte \b @ y
+ .else @ All three arguments provided. Output them and let the warp sort out which to use.
+ .byte \a @ warpId
+ .2byte \b @ x
+ .2byte \c @ y
+ .endif
+ .endif
+ .endif
.endm
- @ Clone of warp that does not play a sound effect.
- .macro warpsilent map:req, warp:req, X:req, Y:req
+
+ @ Warps the player to the specified map.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warp map:req, a, b, c
+ .byte 0x39
+ formatwarp \map, \a, \b, \c
+ .endm
+
+ @ Warps the player to the specified map without playing a sound effect.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warpsilent map:req, a, b, c
.byte 0x3a
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
- @ Clone of warp that plays a door opening animation before stepping upwards into it.
- .macro warpdoor map:req, warp:req, X:req, Y:req
+ @ Warps the player to the specified map and plays a door opening animation before stepping upwards into it.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warpdoor map:req, a, b, c
.byte 0x3b
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
- @ Warps the player to another map using a hole animation.
+ @ Warps the player to another map using a hole animation. If the specified map is MAP_UNDEFINED it will instead
+ @ use the map set by setholewarp. In either case the target coordinates on the destination map will be the
+ @ player's current position.
.macro warphole map:req
.byte 0x3c
map \map
.endm
- @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E.
- .macro warpteleport map:req, warp:req, X:req, Y:req
+ @ Warps the player to the specified map using a teleport effect. Effect is similar to warpspinenter but
+ @ this warp has a fade out first and doesn't maintain the original facing direction.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warpteleport map:req, a, b, c
.byte 0x3d
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
@ Sets the warp destination to be used later.
- .macro setwarp map:req, warp:req, X:req, Y:req
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro setwarp map:req, a, b, c
.byte 0x3e
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
- @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to.
- @ Useful when a map has warps that need to go to script-controlled locations (i.e. elevators).
- .macro setdynamicwarp map:req, warp:req, X:req, Y:req
+ @ Sets the dynamic warp destination. Warps with a destination map of MAP_NONE will target this destination.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro setdynamicwarp map:req, a, b, c
.byte 0x3f
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
- @ Sets the destination that diving or emerging from a dive will take the player to.
- .macro setdivewarp map:req, warp:req, X:req, Y:req
+ @ Sets the destination that diving or emerging from a dive will take the player to. Note that this only
+ @ applies if the current map does not have a dive/emerge connection. If it does have a corresponding
+ @ map connection then that map and the player's current coordinates will be used as the destination instead.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro setdivewarp map:req, a, b, c
.byte 0x40
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
@ Sets the destination that falling into a hole will take the player to.
- .macro setholewarp map:req, warp:req, X:req, Y:req
+ @ While it does accept and set the x/y coordinates and warpId, they are ultimately ignored.
+ @ This is only used to set the map the player should fall to. The exact location on the
+ @ map to fall to is determined by warphole.
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro setholewarp map:req, a=0, b=0, c
.byte 0x41
- map \map
- .byte \warp
- .2byte \X
- .2byte \Y
+ formatwarp \map, \a, \b, \c
.endm
- @ Retrieves the player's zero-indexed X- and Y-coordinates in the map, and stores them in the specified variables.
- .macro getplayerxy X:req, Y:req
+ @ Retrieves the player's zero-indexed x- and y-coordinates in the map, and stores them in the specified variables.
+ .macro getplayerxy x:req, y:req
.byte 0x42
- .2byte \X
- .2byte \Y
+ .2byte \x
+ .2byte \y
.endm
@ Retrieves the number of Pokemon in the player's party, and stores that number in VAR_RESULT.
@@ -474,176 +504,176 @@
.byte 0x43
.endm
- @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and
- @ VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE.
- .macro additem index:req, quantity=1
+ @ Attempts to add quantity of the specified item to the player's Bag. If the player has enough room, the item will
+ @ be added and VAR_RESULT will be set to TRUE; otherwise, VAR_RESULT is set to FALSE.
+ .macro additem itemId:req, quantity=1
.byte 0x44
- .2byte \index
+ .2byte \itemId
.2byte \quantity
.endm
- @ Removes quantity of item index from the player's Bag.
- .macro removeitem index:req, quantity=1
+ @ Removes quantity of the specified item from the player's Bag. If the player has fewer than 'quantity' in their bag
+ @ then none will be removed and VAR_RESULT will be set to FALSE. Otherwise it will be set to TRUE.
+ .macro removeitem itemId:req, quantity=1
.byte 0x45
- .2byte \index
+ .2byte \itemId
.2byte \quantity
.endm
- @ Checks if the player has enough space in their Bag to hold quantity more of item index. Sets VAR_RESULT to
+ @ Checks if the player has enough space in their Bag to hold quantity more of the specified item. Sets VAR_RESULT to
@ TRUE if there is room, or FALSE is there is no room.
- .macro checkitemspace index:req, quantity:req
+ .macro checkitemspace itemId:req, quantity=1
.byte 0x46
- .2byte \index
+ .2byte \itemId
.2byte \quantity
.endm
- @ Checks if the player has quantity or more of item index in their Bag. Sets VAR_RESULT to TRUE if the player has
+ @ Checks if the player has quantity or more of the specified item in their Bag. Sets VAR_RESULT to TRUE if the player has
@ enough of the item, or FALSE if they have fewer than quantity of the item.
- .macro checkitem index:req, quantity:req
+ .macro checkitem itemId:req, quantity=1
.byte 0x47
- .2byte \index
+ .2byte \itemId
.2byte \quantity
.endm
@ Checks which Bag pocket the specified item belongs in, and writes the pocket value (POCKET_*) to VAR_RESULT.
- @ This script is used to show the name of the proper Bag pocket when the player receives an item via callstd (simplified to giveitem in XSE).
- .macro checkitemtype index:req
+ @ This is used to show the name of the proper Bag pocket when the player receives an item via callstd.
+ .macro checkitemtype itemId:req
.byte 0x48
- .2byte \index
+ .2byte \itemId
.endm
- @ Adds a quantity amount of item index to the player's PC. Both arguments can be variables.
- .macro addpcitem index:req, quantity:req
+ @ Adds quantity of the specified item to the player's PC.
+ .macro addpcitem itemId:req, quantity=1
.byte 0x49
- .2byte \index
+ .2byte \itemId
.2byte \quantity
.endm
- @ Checks for quantity amount of item index in the player's PC. Both arguments can be variables.
- .macro checkpcitem index:req, quantity:req
+ @ Checks for quantity of the specified item in the player's PC.
+ .macro checkpcitem itemId:req, quantity=1
.byte 0x4a
- .2byte \index
+ .2byte \itemId
.2byte \quantity
.endm
- @ Adds decoration to the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
+ @ Adds a decoration to the player's PC.
.macro adddecoration decoration:req
.byte 0x4b
.2byte \decoration
.endm
- @ Removes a decoration from the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
+ @ Removes a decoration from the player's PC.
.macro removedecoration decoration:req
.byte 0x4c
.2byte \decoration
.endm
- @ Checks for decoration in the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
+ @ Checks for decoration in the player's PC.
.macro checkdecor decoration:req
.byte 0x4d
.2byte \decoration
.endm
- @ Checks if the player has enough space in their PC to hold decoration. Sets VAR_RESULT to TRUE if there is room, or
- @ FALSE is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.)
+ @ Checks if the player has enough space in their PC to hold the decoration.
+ @ Sets VAR_RESULT to TRUE if there is room, or FALSE is there is no room.
.macro checkdecorspace decoration:req
.byte 0x4e
.2byte \decoration
.endm
- @ Applies the movement data at movements to the specified (index) Object. Also closes any standard message boxes that are still open.
- @ If no map is specified, then the current map is used.
- .macro applymovement index:req, movements:req, map
+ @ Applies the movement data at movements to the specified (localId) Object. If no map is specified, then the current map is used.
+ .macro applymovement localId:req, movements:req, map
.ifb \map
.byte 0x4f
- .2byte \index
+ .2byte \localId
.4byte \movements
.else
@ Really only useful if the object has followed from one map to another (e.g. Wally during the catching event).
.byte 0x50
- .2byte \index
+ .2byte \localId
.4byte \movements
map \map
.endif
.endm
- @ Blocks script execution until the movements being applied to the specified (index) Object finish.
- @ If the specified Object is 0x0000, then the command will block script execution until all Objects
+ @ Blocks script execution until the movements being applied to the specified (localId) Object finish.
+ @ If the specified Object is 0, then the command will block script execution until all Objects
@ affected by applymovement finish their movements. If the specified Object is not currently being
@ manipulated with applymovement, then this command does nothing.
@ If no map is specified, then the current map is used.
- .macro waitmovement index:req, map
+ .macro waitmovement localId:req, map
.ifb \map
.byte 0x51
- .2byte \index
+ .2byte \localId
.else
.byte 0x52
- .2byte \index
+ .2byte \localId
map \map
.endif
.endm
- @ Attempts to hide the specified (index) Object on the specified (map_group, map_num) map,
- @ by setting its visibility flag if it has a valid one. If the Object does not have a valid
- @ visibility flag, this command does nothing.
+ @ Attempts to despawn the specified (localId) Object on the specified (map_group, map_num) map.
+ @ It also sets the object's visibility flag if it has one.
@ If no map is specified, then the current map is used.
- .macro removeobject index:req, map
+ .macro removeobject localId:req, map
.ifb \map
.byte 0x53
- .2byte \index
+ .2byte \localId
.else
.byte 0x54
- .2byte \index
+ .2byte \localId
map \map
.endif
.endm
- @ Unsets the specified (index) Object's visibility flag on the specified (map_group, map_num) map if it has a valid one.
- @ If the Object does not have a valid visibility flag, this command does nothing.
+ @ Attempts to spawn the specified (localId) Object the specified (map_group, map_num) map.
+ @ Note that unlike removeobject this does not modify the OObject's flag.
@ If no map is specified, then the current map is used.
- .macro addobject index:req, map
+ .macro addobject localId:req, map
.ifb \map
.byte 0x55
- .2byte \index
+ .2byte \localId
.else
.byte 0x56
- .2byte \index
+ .2byte \localId
map \map
.endif
.endm
- @ Sets the specified (index) Object's position on the current map.
- .macro setobjectxy index:req, x:req, y:req
+ @ Sets the specified (localId) Object's position on the current map.
+ .macro setobjectxy localId:req, x:req, y:req
.byte 0x57
- .2byte \index
+ .2byte \localId
.2byte \x
.2byte \y
.endm
- .macro showobjectat index:req, map:req
+ .macro showobjectat localId:req, map:req
.byte 0x58
- .2byte \index
+ .2byte \localId
map \map
.endm
- .macro hideobjectat index:req, map:req
+ .macro hideobjectat localId:req, map:req
.byte 0x59
- .2byte \index
+ .2byte \localId
map \map
.endm
- @ If the script was called by an Object, then that Object will turn to face toward the metatile that the player is standing on.
+ @ Turns the currently selected object (if there is one) to face the player.
.macro faceplayer
.byte 0x5a
.endm
- .macro turnobject index:req, direction:req
+ @ Turns the specified object in the specified direction.
+ .macro turnobject localId:req, direction:req
.byte 0x5b
- .2byte \index
+ .2byte \localId
.byte \direction
.endm
- @ If the Trainer flag for Trainer index is not set, this command does absolutely nothing.
+ @ TODO
.macro trainerbattle type:req, trainer:req, local_id:req, pointer1:req, pointer2, pointer3, pointer4
.byte 0x5c
.byte \type
@@ -700,8 +730,8 @@
NO_MUSIC = FALSE
- @ Starts a single trainer battle, takes a trainer, intro text, loss text, and an optional event script
- @ when used with an event script, you can also pass in an optional flag to disable music
+ @ Starts a single trainer battle. Takes a trainer, intro text, loss text, and an optional event script.
+ @ When used with an event script, you can also pass in an optional flag to disable music
.macro trainerbattle_single trainer:req, intro_text:req, lose_text:req, event_script=FALSE, music=TRUE
.if \event_script == FALSE
trainerbattle TRAINER_BATTLE_SINGLE, \trainer, 0, \intro_text, \lose_text
@@ -712,8 +742,8 @@
.endif
.endm
- @ Starts a double trainer battle, takes a trainer, intro text, loss text, text for when you have too few pokemon
- @ and an optional event script, when used with an event script you can pass in an optional flag to disable music
+ @ Starts a double trainer battle. Takes a trainer, intro text, loss text, text for when you have too few pokemon
+ @ and an optional event script. When used with an event script you can pass in an optional flag to disable music
.macro trainerbattle_double trainer:req, intro_text:req, lose_text:req, not_enough_pkmn_text:req, event_script=FALSE, music=TRUE
.if \event_script == FALSE
trainerbattle TRAINER_BATTLE_DOUBLE, \trainer, 0, \intro_text, \lose_text, \not_enough_pkmn_text
@@ -724,17 +754,17 @@
.endif
.endm
- @ Starts a rematch battle, takes a trainer, intro text and loss text
+ @ Starts a rematch battle. Takes a trainer, intro text and loss text
.macro trainerbattle_rematch trainer:req, intro_text:req, lose_text:req
trainerbattle TRAINER_BATTLE_REMATCH, \trainer, 0, \intro_text, \lose_text
.endm
- @ Starts a rematch double battle, takes a trainer, intro text, loss text, and text for when you have too few pokemon
+ @ Starts a rematch double battle. Takes a trainer, intro text, loss text, and text for when you have too few pokemon
.macro trainerbattle_rematch_double trainer:req, intro_text:req, lose_text:req, not_enough_pkmn_text:req
trainerbattle TRAINER_BATTLE_REMATCH_DOUBLE, \trainer, 0, \intro_text, \lose_text, \not_enough_pkmn_text
.endm
- @ Starts a trainer battle, skipping intro text, takes a trainer and loss text
+ @ Starts a trainer battle, skipping intro text. Takes a trainer and loss text
.macro trainerbattle_no_intro trainer:req, lose_text:req
trainerbattle TRAINER_BATTLE_SINGLE_NO_INTRO_TEXT, \trainer, 0, \lose_text
.endm
@@ -756,38 +786,41 @@
.byte 0x5f
.endm
- @ Compares Flag (trainer + 0x500) to 1. (If the flag is set, then the trainer has been defeated by the player.)
+ @ Checks if the trainer has been defeated by the player (by comparing the flag 'trainer + TRAINER_FLAGS_START' to TRUE).
.macro checktrainerflag trainer:req
.byte 0x60
.2byte \trainer
.endm
- @ Sets Flag (trainer + 0x500).
+ @ Sets the trainer flag (trainer + TRAINER_FLAGS_START) to TRUE (defeated).
.macro settrainerflag trainer:req
.byte 0x61
.2byte \trainer
.endm
- @ Clears Flag (trainer + 0x500).
+ @ Sets the trainer flag (trainer + TRAINER_FLAGS_START) to FALSE (not defeated).
.macro cleartrainerflag trainer:req
.byte 0x62
.2byte \trainer
.endm
- .macro setobjectxyperm index:req, x:req, y:req
+ @ Sets the coordinates of an object's template, so that if the sprite goes off screen
+ @ it'll still be there when it comes back on screen.
+ .macro setobjectxyperm localId:req, x:req, y:req
.byte 0x63
- .2byte \index
+ .2byte \localId
.2byte \x
.2byte \y
.endm
- @ Copies a live object event's xy position to its template, so that if the sprite goes off screen,
+ @ Copies a live object event's xy position to its template, so that if the sprite goes off screen
@ it'll still be there when it comes back on screen.
- .macro copyobjectxytoperm index:req
+ .macro copyobjectxytoperm localId:req
.byte 0x64
- .2byte \index
+ .2byte \localId
.endm
+ @ Sets the movement type (MOVEMENT_TYPE_*) for an object's template.
.macro setobjectmovementtype word:req, byte:req
.byte 0x65
.2byte \word
@@ -801,8 +834,8 @@
.endm
@ Starts displaying a standard message box containing the specified text. If text is a pointer, then the string at
- @ that offset will be loaded and used. If text is script bank 0, then the value of script bank 0 will be treated as
- @ a pointer to the text. (You can use loadpointer to place a string pointer in a script bank.)
+ @ that offset will be loaded and used. If text is NULL, then the value of script data 0 will be treated as
+ @ a pointer to the text. The 'loadword 0' in msgbox sets this value, for instance.
.macro message text:req
.byte 0x67
.4byte \text
@@ -823,17 +856,17 @@
.byte 0x6a
.endm
- @ Resumes normal movement for all Objects on-screen, and closes any standard message boxes that are still open.
+ @ Resumes normal movement for all objects on-screen, and closes any standard message boxes that are still open.
.macro releaseall
.byte 0x6b
.endm
- @ If the script was called by an Object, then that Object's movement will resume. This command also closes any standard message boxes that are still open.
+ @ Resumes normal movement for the selected object (if there is one) and the player. Also closes any standard message boxes that are still open.
.macro release
.byte 0x6c
.endm
- @ Blocks script execution until the player presses any key.
+ @ Blocks script execution until the player presses the A or B button.
.macro waitbuttonpress
.byte 0x6d
.endm
@@ -859,7 +892,7 @@
@ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made.
@ Lists of options are predefined (sMultichoiceLists) and the one to be used is specified with multichoiceId.
- @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00.
+ @ The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0.
@ If ignoreBPress is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button.
.macro multichoicedefault x:req, y:req, multichoiceId:req, default:req, ignoreBPress:req
.byte 0x70
@@ -906,7 +939,7 @@
.byte \ignoreBPress
.endm
- @ Displays a box containing the front sprite for the specified (species) Pokemon species.
+ @ Displays a box containing the front sprite for the specified Pokemon species.
.macro showmonpic species:req, x:req, y:req
.byte 0x75
.2byte \species
@@ -914,7 +947,7 @@
.byte \y
.endm
- @ Hides all boxes displayed with showmonpic.
+ @ Hides the box displayed by showmonpic.
.macro hidemonpic
.byte 0x76
.endm
@@ -925,9 +958,9 @@
.byte \winnerId
.endm
- @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille
- @ characters and needs to provide six extra starting characters that are skipped (in RS, these characters determined the
- @ box's size and position, but in Emerald these are calculated automatically).
+ @ Displays the given string as braille text in a standard message box. The string should use the .braille directive
+ @ to convert text to braille, and be preceded by brailleformat. The brailleformat data is skipped over (in RS, these
+ @ bytes determined the box's size and position, but in Emerald these are calculated automatically).
.macro braillemessage text:req
.byte 0x78
.4byte \text
@@ -944,209 +977,237 @@
.byte \textTop
.endm
- @ Gives the player one of the specified (species) Pokemon at level level holding item. The trailing 0s are unused parameters
+ @ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters.
+ @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
.macro givemon species:req, level:req, item:req
.byte 0x79
.2byte \species
.byte \level
.2byte \item
- .4byte 0x0
- .4byte 0x0
+ .4byte 0
+ .4byte 0
.byte 0
.endm
+ @ Gives the player an Egg of the specified species.
+ @ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
.macro giveegg species:req
.byte 0x7a
.2byte \species
.endm
- .macro setmonmove index:req, slot:req, move:req
+ @ Replaces the move at 'slot' of the Pokémon in the player's party at 'partyIndex' with the specified move.
+ @ If a value greater than PARTY_SIZE is given for partyIndex it will use the last Pokémon in the party instead.
+ @ Note that this means in vanilla a value equal to PARTY_SIZE for partyIndex will go out of bounds.
+ .macro setmonmove partyIndex:req, slot:req, move:req
.byte 0x7b
- .byte \index
+ .byte \partyIndex
.byte \slot
.2byte \move
.endm
- @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, VAR_RESULT is set to the
+ @ Checks if at least one Pokemon in the player's party knows the specified move. If so, VAR_RESULT is set to the
@ (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE.
@ VAR_0x8004 is also set to this Pokemon's species.
- .macro checkpartymove index:req
+ .macro checkpartymove move:req
.byte 0x7c
- .2byte \index
+ .2byte \move
+ .endm
+
+ @ Converts STR_VAR_1, STR_VAR_2, or STR_VAR_3 to its corresponding index into sScriptStringVars (0, 1, or 2).
+ @ If given anything else it will output it directly.
+ @ Note: because the STR_VAR_# arguments given to this macro are not part of a processed string they are not
+ @ replaced with their charmap values, they are just passed as the literal characters "STR_VAR_#".
+ .macro stringvar id:req
+ .if \id == STR_VAR_1
+ .byte 0
+ .elseif \id == STR_VAR_2
+ .byte 1
+ .elseif \id == STR_VAR_3
+ .byte 2
+ .else
+ .byte \id
+ .endif
.endm
- @ Writes the name of the Pokemon at index species to the specified buffer.
- .macro bufferspeciesname out:req, species:req
+ @ Writes the name of the given Pokemon species to the specified buffer.
+ .macro bufferspeciesname stringVarId:req, species:req
.byte 0x7d
- .byte \out
+ stringvar \stringVarId
.2byte \species
.endm
@ Writes the name of the species of the first Pokemon in the player's party to the specified buffer.
- .macro bufferleadmonspeciesname out:req
+ .macro bufferleadmonspeciesname stringVarId:req
.byte 0x7e
- .byte \out
+ stringvar \stringVarId
.endm
- @ Writes the nickname of the Pokemon in slot slot (zero-indexed) of the player's party to the specified buffer.
+ @ Writes the nickname of the Pokemon in 'slot' (zero-indexed) of the player's party to the specified buffer.
@ If an empty or invalid slot is specified, ten spaces ("") are written to the buffer.
- .macro bufferpartymonnick out:req, slot:req
+ .macro bufferpartymonnick stringVarId:req, slot:req
.byte 0x7f
- .byte \out
+ stringvar \stringVarId
.2byte \slot
.endm
- @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than
- @ the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead.
- .macro bufferitemname out:req, item:req
+ @ Writes the name of the specified item to the specified buffer. If itemId is >= ITEMS_COUNT,
+ @ then the name of ITEM_NONE ("????????") is buffered instead.
+ .macro bufferitemname stringVarId:req, item:req
.byte 0x80
- .byte \out
+ stringvar \stringVarId
.2byte \item
.endm
- @ Writes the name of the decoration at index decoration to the specified buffer. In FireRed, this command is a nop.
- .macro bufferdecorationname out:req, decoration:req
+ @ Writes the name of the specified decoration to the specified buffer.
+ .macro bufferdecorationname stringVarId:req, decoration:req
.byte 0x81
- .byte \out
+ stringvar \stringVarId
.2byte \decoration
.endm
- @ Writes the name of the move at index move to the specified buffer.
- .macro buffermovename out:req, move:req
+ @ Writes the name of the specified move to the specified buffer.
+ .macro buffermovename stringVarId:req, move:req
.byte 0x82
- .byte \out
+ stringvar \stringVarId
.2byte \move
.endm
@ Converts the value of input to a decimal string, and writes that string to the specified buffer.
- .macro buffernumberstring out:req, input:req
+ .macro buffernumberstring stringVarId:req, input:req
.byte 0x83
- .byte \out
+ stringvar \stringVarId
.2byte \input
.endm
- @ Writes the standard string identified by index to the specified buffer. This command has no protections in place at all,
- @ so specifying an invalid standard string (e.x. 0x2B) can and usually will cause crashes or garbage characters.
- .macro bufferstdstring out:req, index:req
+ @ Writes the given standard string (STDSTRING_*) to the specified buffer. Invalid std string ids are not handled.
+ .macro bufferstdstring stringVarId:req, index:req
.byte 0x84
- .byte \out
+ stringvar \stringVarId
.2byte \index
.endm
- @ Copies the string at offset to the specified buffer.
- .macro bufferstring out:req, offset:req
+ @ Copies the string at the given pointer to the specified buffer.
+ .macro bufferstring stringVarId:req, text:req
.byte 0x85
- .byte \out
- .4byte \offset
+ stringvar \stringVarId
+ .4byte \text
.endm
@ Opens the Pokemart system, offering the specified products for sale.
+ @ Products should be a list of .2byte item values preceded by an .align 2
.macro pokemart products:req
.byte 0x86
.4byte \products
.endm
@ Opens the Pokemart system and treats the list of items as decorations.
+ @ Products should be a list of .2byte decoration values preceded by an .align 2
.macro pokemartdecoration products:req
.byte 0x87
.4byte \products
.endm
- @ Apparent clone of pokemartdecoration.
+ @ Identical to pokemartdecoration, but with slight changes to the clerk dialogue. See uses of MART_TYPE_DECOR2.
.macro pokemartdecoration2 products:req
.byte 0x88
.4byte \products
.endm
- @ Starts up the slot machine minigame.
- .macro playslotmachine word:req
+ @ Starts up the slot machine minigame. id is a SLOT_MACHINE_* value that influences probabilities of certain reel outcomes.
+ .macro playslotmachine id:req
.byte 0x89
- .2byte \word
+ .2byte \id
.endm
- @ Sets a berry tree's specific berry and growth stage. In FireRed, this command is a nop.
- .macro setberrytree tree_id:req, berry:req, growth_stage:req
+ @ Sets a berry tree's berry and growth stage. treeId is any BERRY_TREE_* constant (an index into berryTrees in SaveBlock1),
+ @ berry is any ITEM_TO_BERRY(ITEM_BERRY_NAME) value, and growthStage is any BERRY_STAGE_* constant.
+ .macro setberrytree treeId:req, berry:req, growthStage:req
.byte 0x8a
- .byte \tree_id
+ .byte \treeId
.byte \berry
- .byte \growth_stage
+ .byte \growthStage
.endm
- @ This allows you to choose a Pokemon to use in a contest. In FireRed, this command sets the byte at 0x03000EA8 to 0x01.
+ @ This allows you to choose a Pokemon to use in a contest
.macro choosecontestmon
.byte 0x8b
.endm
- @ Starts a contest. In FireRed, this command is a nop.
+ @ Starts the appeals round of a contest.
.macro startcontest
.byte 0x8c
.endm
- @ Shows the results of a contest. In FireRed, this command is a nop.
+ @ Shows the results screen of a contest.
.macro showcontestresults
.byte 0x8d
.endm
- @ Starts a contest over a link connection. In FireRed, this command is a nop.
+ @ Starts communication to initialize a link contest.
.macro contestlinktransfer
.byte 0x8e
.endm
- @ Stores a random integer between 0 and limit in VAR_RESULT.
+ @ Stores a random integer between 0 and limit (exclusive of limit) in VAR_RESULT.
.macro random limit:req
.byte 0x8f
.2byte \limit
.endm
- @ If check is 0x00, this command adds value to the player's money.
- .macro addmoney value:req, check:req
+ @ Adds value to the player's money. If adding 'value' money would exceed MAX_MONEY, the player's money is set to MAX_MONEY.
+ @ If 'disable' is set to anything but 0 then this command does nothing.
+ .macro addmoney value:req, disable=0
.byte 0x90
.4byte \value
- .byte \check
+ .byte \disable
.endm
- @ If check is 0x00, this command subtracts value from the player's money.
- .macro removemoney value:req, check:req
+ @ Subtracts value from the player's money. If the player has less than 'value' money, their money is set to 0.
+ @ If 'disable' is set to anything but 0 then this command does nothing.
+ .macro removemoney value:req, disable=0
.byte 0x91
.4byte \value
- .byte \check
+ .byte \disable
.endm
- @ If check is 0x00, this command will check if the player has money >= value; VAR_RESULT is set to TRUE if the player
- @ has enough money, or FALSE if they do not.
- .macro checkmoney value:req, check:req
+ @ Checks if the player has money >= value. VAR_RESULT is set to TRUE if the player has enough money, or FALSE if they do not.
+ @ If 'disable' is set to anything but 0 then this command does nothing.
+ .macro checkmoney value:req, disable=0
.byte 0x92
.4byte \value
- .byte \check
+ .byte \disable
.endm
- @ Spawns a secondary box showing how much money the player has.
- .macro showmoneybox x:req, y:req, check:req
+ @ Creates a window showing how much money the player has.
+ @ If 'disable' is set to anything but 0 then this command does nothing.
+ .macro showmoneybox x:req, y:req, disable=0
.byte 0x93
.byte \x
.byte \y
- .byte \check
+ .byte \disable
.endm
- @ Hides the secondary box spawned by showmoney. Consumption of the x and y arguments was dummied out.
+ @ Destroys the window created by showmoneybox. Consumption of the x and y arguments was dummied out.
.macro hidemoneybox
.byte 0x94
.byte 0 @ \x
.byte 0 @ \y
.endm
- @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments.
- .macro updatemoneybox x:req, y:req
+ @ Updates the window created by showmoneybox. Consumption of the x and y arguments was dummied out.
+ @ If 'disable' is set to anything but 0 then this command does nothing.
+ .macro updatemoneybox disable=0
.byte 0x95
- .byte \x
- .byte \y
- .byte 0 @ 1 = don't perform this command. Always 0 in vanilla. Why this is a thing is beyond me.
+ .byte 0 @ \x
+ .byte 0 @ \y
+ .byte \disable
.endm
- @ Gets the price reduction for the index given. In FireRed, this command is a nop.
- .macro getpricereduction index:req
+ @ Gets whether the effects of the specified PokeNews program are active. newsKind is a POKENEWS_* constant.
+ .macro getpokenewsactive newsKind:req
.byte 0x96
- .2byte \index
+ .2byte \newsKind
.endm
@ Fades the screen to and from black and white. Modes are FADE_(TO/FROM)_(WHITE/BLACK)
@@ -1162,14 +1223,18 @@
.byte \speed
.endm
- .macro setflashradius word:req
+ @ Sets the flash level. A level of 0 is fully bright, a level of 1 is the largest flash radius, a level
+ @ of 7 is the smallest flash radius, a level of 8 is fully black.
+ .macro setflashlevel level:req
.byte 0x99
- .2byte \word
+ .2byte \level
.endm
- .macro animateflash byte:req
+ @ Animates the flash radius from its current size to the size it would be at the specified level.
+ @ Note that this does not actually change the current flash level. It's typically used just before a setflashlevel.
+ .macro animateflash level:req
.byte 0x9a
- .byte \byte
+ .byte \level
.endm
.macro messageautoscroll pointer:req
@@ -1177,20 +1242,20 @@
.4byte \pointer
.endm
- @ Executes the specified field move animation.
+ @ Executes the specified field effect animation (FLDEFF_*).
.macro dofieldeffect animation:req
.byte 0x9c
.2byte \animation
.endm
- @ Sets up the field effect argument argument with the value value.
- .macro setfieldeffectargument argument:req, param:req
+ @ Sets the field effect argument at index 'argNum' to 'value.'
+ .macro setfieldeffectargument argNum:req, value:req
.byte 0x9d
- .byte \argument
- .2byte \param
+ .byte \argNum
+ .2byte \value
.endm
- @ Blocks script execution until all playing field move animations complete.
+ @ Blocks script execution until all playing field effect animations complete.
.macro waitfieldeffect animation:req
.byte 0x9e
.2byte \animation
@@ -1202,25 +1267,26 @@
.2byte \heallocation
.endm
- @ Checks the player's gender. If male, then MALE (0) is stored in VAR_RESULT. If female, then FEMALE (1) is stored in VAR_RESULT.
+ @ Checks the player's gender. Stores the result (MALE (0) or FEMALE (1)) in VAR_RESULT.
.macro checkplayergender
.byte 0xa0
.endm
- @ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes.
+ @ Plays the cry of the given species. Mode is any CRY_MODE_* constant.
+ @ You can use waitmoncry to block script execution until the cry finishes.
.macro playmoncry species:req, mode:req
.byte 0xa1
.2byte \species
.2byte \mode
.endm
- @ Changes the metatile at (x, y) on the current map.
- .macro setmetatile x:req, y:req, metatile_number:req, has_collision:req
+ @ Set the metatile at (x, y) on the current map to the given metatile and impassability.
+ .macro setmetatile x:req, y:req, metatileId:req, impassable:req
.byte 0xa2
.2byte \x
.2byte \y
- .2byte \metatile_number
- .2byte \has_collision
+ .2byte \metatileId
+ .2byte \impassable
.endm
@ Queues a weather change to the default weather for the map.
@@ -1239,27 +1305,32 @@
.byte 0xa5
.endm
- @ This command manages cases in which maps have tiles that change state when stepped on (specifically, cracked/breakable floors).
- .macro setstepcallback subroutine:req
+ @ Enables the overworld task specified by stepCbId (STEP_CB_*). Only 1 can be active at a time. See src/field_tasks.c for more.
+ .macro setstepcallback stepCbId:req
.byte 0xa6
- .byte \subroutine
+ .byte \stepCbId
.endm
+ @ Sets the current map layout to the one specified by index (LAYOUT_*).
+ @ This should be done before the layout is loaded, typically in the ON_TRANSITION map script.
.macro setmaplayoutindex index:req
.byte 0xa7
.2byte \index
.endm
- .macro setobjectpriority index:req, map:req, priority:req
+ @ Sets the specified object's sprite's subpriority, and sets fixedPriority to TRUE.
+ @ Only used to hide the player and Briney behind the boat.
+ .macro setobjectsubpriority localId:req, map:req, subpriority:req
.byte 0xa8
- .2byte \index
+ .2byte \localId
map \map
- .byte \priority
+ .byte \subpriority
.endm
- .macro resetobjectpriority index:req, map:req
+ @ Sets the specified object's fixedPriority to FALSE. Does not change the subpriority field.
+ .macro resetobjectsubpriority localId:req, map:req
.byte 0xa9
- .2byte \index
+ .2byte \localId
map \map
.endm
@@ -1279,14 +1350,14 @@
.byte \direction
.endm
- @ Opens the door metatile at (X, Y) with an animation.
+ @ Opens the door metatile at (x, y) with an animation.
.macro opendoor x:req, y:req
.byte 0xac
.2byte \x
.2byte \y
.endm
- @ Closes the door metatile at (X, Y) with an animation.
+ @ Closes the door metatile at (x, y) with an animation.
.macro closedoor x:req, y:req
.byte 0xad
.2byte \x
@@ -1298,21 +1369,21 @@
.byte 0xae
.endm
- @ Sets the door tile at (x, y) to be open without an animation.
+ @ Sets the door metatile at (x, y) to be open without an animation.
.macro setdooropen x:req, y:req
.byte 0xaf
.2byte \x
.2byte \y
.endm
- @ Sets the door tile at (x, y) to be closed without an animation.
+ @ Sets the door metatile at (x, y) to be closed without an animation.
.macro setdoorclosed x:req, y:req
.byte 0xb0
.2byte \x
.2byte \y
.endm
- @ In Emerald, this command consumes its parameters and does nothing. In FireRed, this command is a nop.
+ @ Consumes its parameters and does nothing. It is implemented but unused in Ruby/Sapphire.
.macro addelevmenuitem a:req, b:req, c:req, d:req
.byte 0xb1
.byte \a
@@ -1321,27 +1392,33 @@
.2byte \d
.endm
- @ In FireRed and Emerald, this command is a nop.
+ @ Does nothing. It is implemented but unused in Ruby/Sapphire.
.macro showelevmenu
.byte 0xb2
.endm
+ @ Gets the number of coins the player has and stores it in the variable 'out'.
.macro checkcoins out:req
.byte 0xb3
.2byte \out
.endm
+ @ Gives 'count' coins to the player, up to a total of MAX_COINS.
+ @ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE.
.macro addcoins count:req
.byte 0xb4
.2byte \count
.endm
+ @ Takes 'count' coins from the player.
+ @ If the player has fewer than 'count' coins then no coins are taken and VAR_RESULT is set to TRUE.
+ @ Otherwise VAR_RESULT is set to FALSE.
.macro removecoins count:req
.byte 0xb5
.2byte \count
.endm
- @ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect
+ @ Prepares to start a wild battle against a 'species' at 'level' holding 'item'. Running this command will not affect
@ normal wild battles. You start the prepared battle with dowildbattle.
.macro setwildbattle species:req, level:req, item:req
.byte 0xb6
@@ -1392,46 +1469,45 @@
.4byte \pointer
.endm
- .macro vbufferstring byte:req, pointer:req
+ .macro vbufferstring stringVarIndex:req, pointer:req
.byte 0xbf
- .byte \byte
+ stringvar \stringVarIndex
.4byte \pointer
.endm
- @ Spawns a secondary box showing how many Coins the player has.
+ @ Create a window showing how many Coins the player has.
.macro showcoinsbox x:req, y:req
.byte 0xc0
.byte \x
.byte \y
.endm
- @ Hides the secondary box spawned by showcoins. It consumes its arguments but doesn't use them.
+ @ Destroys the window created by showcoins. It consumes its arguments but doesn't use them.
.macro hidecoinsbox x:req, y:req
.byte 0xc1
.byte \x
.byte \y
.endm
- @ Updates the secondary box spawned by showcoins. It consumes its arguments but doesn't use them.
+ @ Updates the window created by showcoins. It consumes its arguments but doesn't use them.
.macro updatecoinsbox x:req, y:req
.byte 0xc2
.byte \x
.byte \y
.endm
- @ Increases the value of the specified game stat by 1. The stat's value will not be allowed to exceed 0x00FFFFFF.
+ @ Increases the value of the specified game stat by 1. The maximum value of a stat is 0xFFFFFF. See include/constants/game_stat.h
.macro incrementgamestat stat:req
.byte 0xc3
.byte \stat
.endm
@ Sets the destination that using an Escape Rope or Dig will take the player to.
- .macro setescapewarp map:req, warp:req, x:req, y:req
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro setescapewarp map:req, a, b, c
.byte 0xc4
- map \map
- .byte \warp
- .2byte \x
- .2byte \y
+ formatwarp \map, \a, \b, \c
.endm
@ Blocks script execution until cry finishes.
@@ -1440,48 +1516,39 @@
.endm
@ Writes the name of the specified (box) PC box to the specified buffer.
- .macro bufferboxname out:req, box:req
+ .macro bufferboxname stringVarId:req, box:req
.byte 0xc6
- .byte \out
+ stringvar \stringVarId
.2byte \box
.endm
- @ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text,
- @ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro textcolor color:req
.byte 0xc7
.byte \color
.endm
- @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom
- @ of the screen when the Main Menu is opened.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro loadhelp pointer:req
.byte 0xc8
.4byte \pointer
.endm
- @ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of
- @ the screen when the Main Menu is opened.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro unloadhelp
.byte 0xc9
.endm
- @ After using this command, all standard message boxes will use the signpost frame.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro signmsg
.byte 0xca
.endm
- @ Ends the effects of signmsg, returning message box frames to normal.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro normalmsg
.byte 0xcb
.endm
- @ Compares the value of a hidden variable to a dword.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro comparehiddenvar a:req, value:req
.byte 0xcc
@@ -1489,39 +1556,36 @@
.4byte \value
.endm
- @ Sets the Pokemon in the specified slot of the player party's eventLegal bit.
+ @ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party.
.macro setmoneventlegal slot:req
.byte 0xcd
.2byte \slot
.endm
- @ Checks if the Pokemon in the specified slot of the player's party has its eventLegal bit set. If it isn't set,
+ @ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
@ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE.
.macro checkmoneventlegal slot:req
.byte 0xce
.2byte \slot
.endm
- @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the
- @ offset specified by the pointer at 0x020375C0.
- .macro gotoram
+ @ Jumps to the ram script saved from a Wonder Card. If there is no valid saved Wonder Card or if the
+ @ ram script is invalid then this does nothing.
+ .macro gotowondercardscript
.byte 0xcf
.endm
- @ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
.macro setworldmapflag worldmapflag:req
.byte 0xd0
.2byte \worldmapflag
.endm
- @ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source]
- .macro warpteleport2 map:req, warp:req, x:req, y:req
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warpspinenter map:req, a, b, c
.byte 0xd1
- map \map
- .byte \warp
- .2byte \x
- .2byte \y
+ formatwarp \map, \a, \b, \c
.endm
@ Changes the location where the player caught the Pokemon in the specified slot of their party.
@@ -1531,37 +1595,36 @@
.byte \location
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Moves the objects on the colored puzzle
- @ specified by puzzleNumber one rotation
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Moves the objects one rotation
+ @ on the colored puzzle specified by puzzleNumber.
.macro moverotatingtileobjects puzzleNumber:req
.byte 0xd3
.2byte \puzzleNumber
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Updates the facing direction of all objects on the puzzle tiles
.macro turnrotatingtileobjects
.byte 0xd4
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Allocates memory for the puzzle objects.
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Allocates memory for the puzzle objects.
@ isTrickHouse is needed to determine which of the two maps the puzzle is on, in order to know where in the tileset
- @ the puzzle tiles start. In FireRed, this command is a nop.
+ @ the puzzle tiles start (TRUE for Trick House Room, FALSE for Mossdeep Gym).
.macro initrotatingtilepuzzle isTrickHouse:req
.byte 0xd5
.2byte \isTrickHouse
.endm
- @ For the rotating tile puzzles in Mossdeep Gym/Trick House Room 7. Frees the memory allocated for the puzzle objects.
+ @ For the rotating tile puzzles in Mossdeep Gym / Trick House Room 7. Frees the memory allocated for the puzzle objects.
.macro freerotatingtilepuzzle
.byte 0xd6
.endm
- .macro warpmossdeepgym map:req, warpId:req, x:req, y:req
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warpmossdeepgym map:req, a, b, c
.byte 0xd7
- map \map
- .byte \warpId
- .2byte \x
- .2byte \y
+ formatwarp \map, \a, \b, \c
.endm
.macro selectapproachingtrainer
@@ -1572,6 +1635,7 @@
.byte 0xd9
.endm
+ @ Destroys the window created by braillemessage.
.macro closebraillemessage
.byte 0xda
.endm
@@ -1586,44 +1650,47 @@
.byte \mode
.endm
- .macro buffertrainerclassname out:req, class:req
+ .macro buffertrainerclassname stringVarId:req, class:req
.byte 0xdd
- .byte \out
+ stringvar \stringVarId
.2byte \class
.endm
- .macro buffertrainername out:req, trainer:req
+ @ Buffers the specified trainer's name to the given string var.
+ @ If the trainer id is >= TRAINERS_COUNT it will be treated as TRAINER_NONE.
+ .macro buffertrainername stringVarId:req, trainerId:req
.byte 0xde
- .byte \out
- .2byte \trainer
+ stringvar \stringVarId
+ .2byte \trainerId
.endm
- .macro pokenavcall pointer:req
+ @ Starts a Pokenav call with the given text.
+ .macro pokenavcall text:req
.byte 0xdf
- .4byte \pointer
+ .4byte \text
.endm
- .macro warpsootopolislegend map:req, byte:req, word1:req, word2:req
+ @ Warp commands can be given either the id of which warp location to go to on the destination map
+ @ or a pair of x/y coordinates to go to directly on the destination map.
+ .macro warpsootopolislegend map:req, a, b, c
.byte 0xe0
- map \map
- .byte \byte
- .2byte \word1
- .2byte \word2
+ formatwarp \map, \a, \b, \c
.endm
- .macro buffercontesttypestring out:req, word:req
+ @ Buffers the name of the contest category to the buffer.
+ @ For example a category of CONTEST_CATEGORY_COOL will buffer the string "COOLNESS CONTEST".
+ .macro buffercontestname stringVarId:req, category:req
.byte 0xe1
- .byte \out
- .2byte \word
+ stringvar \stringVarId
+ .2byte \category
.endm
- @ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or
- @ Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended).
- @ If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization).
- @ If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead.
- .macro bufferitemnameplural out:req, item:req, quantity:req
+ @ Writes the name of the specified item to the specified buffer. If 'item' is a Berry or ITEM_POKE_BALL
+ @ and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended).
+ @ If the specified item is >= ITEMS_COUNT then the name of ITEM_NONE ("????????") is buffered instead.
+ .macro bufferitemnameplural stringVarId:req, item:req, quantity:req
.byte 0xe2
- .byte \out
+ stringvar \stringVarId
.2byte \item
.2byte \quantity
.endm
@@ -1753,6 +1820,7 @@
MSGBOX_YESNO = 5
MSGBOX_AUTOCLOSE = 6
MSGBOX_GETPOINTS = 9
+ MSGBOX_POKENAV = 10
YES = 1
NO = 0
@@ -1762,6 +1830,10 @@
callstd \type
.endm
+ @ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare.
+ @ If the player doesn't have space for all the items then as many are added as possible, the
+ @ message indicates there is no room, and VAR_RESULT is set to FALSE.
+ @ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s).
.macro giveitem item:req, amount=1
setorcopyvar VAR_0x8000, \item
setorcopyvar VAR_0x8001, \amount
@@ -1793,6 +1865,7 @@
dofieldeffect FLDEFF_SPARKLE
.endm
+ @ Prints a braille message, waits for an A or B press, then closes the message.
.macro braillemsgbox text:req
braillemessage \text
waitbuttonpress
diff --git a/data/event_scripts.s b/data/event_scripts.s
index c33932a53..c6d6a5fa2 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -99,7 +99,7 @@ gStdScripts::
.4byte Std_ObtainDecoration @ STD_OBTAIN_DECORATION
.4byte Std_RegisteredInMatchCall @ STD_REGISTER_MATCH_CALL
.4byte Std_MsgboxGetPoints @ MSGBOX_GETPOINTS
- .4byte Std_10
+ .4byte Std_MsgboxPokenav @ MSGBOX_POKENAV
gStdScripts_End::
.include "data/maps/PetalburgCity/scripts.inc"
@@ -820,7 +820,7 @@ Common_EventScript_NameReceivedPartyMon::
return
Common_EventScript_PlayerHandedOverTheItem::
- bufferitemname 0, VAR_0x8004
+ bufferitemname STR_VAR_1, VAR_0x8004
playfanfare MUS_OBTAIN_TMHM
message gText_PlayerHandedOverTheItem
waitmessage
@@ -1001,7 +1001,7 @@ Common_EventScript_LegendaryFlewAway::
fadescreenswapbuffers FADE_TO_BLACK
removeobject VAR_LAST_TALKED
fadescreenswapbuffers FADE_FROM_BLACK
- bufferspeciesname 0, VAR_0x8004
+ bufferspeciesname STR_VAR_1, VAR_0x8004
msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc
index 99dfa7bd8..6bb3352ab 100644
--- a/data/maps/AbandonedShip_CaptainsOffice/scripts.inc
+++ b/data/maps/AbandonedShip_CaptainsOffice/scripts.inc
@@ -5,7 +5,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide::
lock
faceplayer
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
- checkitem ITEM_SCANNER, 1
+ checkitem ITEM_SCANNER
compare VAR_RESULT, TRUE
goto_if_eq AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
diff --git a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
index dd70c9dd3..09d758495 100644
--- a/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
+++ b/data/maps/AbandonedShip_Corridors_B1F/scripts.inc
@@ -4,7 +4,7 @@ AbandonedShip_Corridors_B1F_MapScripts::
.byte 0
AbandonedShip_Corridors_B1F_OnResume:
- setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4
+ setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 5, 4
end
AbandonedShip_Corridors_B1F_OnLoad:
@@ -13,11 +13,11 @@ AbandonedShip_Corridors_B1F_OnLoad:
end
AbandonedShip_Corridors_B1F_EventScript_LockStorageRoom::
- setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1
+ setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE
return
AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom::
- setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1
+ setmetatile 11, 4, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE
return
AbandonedShip_Corridors_B1F_EventScript_TuberM::
@@ -27,7 +27,7 @@ AbandonedShip_Corridors_B1F_EventScript_TuberM::
AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor::
lockall
goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked
- checkitem ITEM_STORAGE_KEY, 1
+ checkitem ITEM_STORAGE_KEY
compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked
msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT
diff --git a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
index 4ec63a7e1..3a7bc7731 100644
--- a/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
+++ b/data/maps/AbandonedShip_HiddenFloorCorridors/scripts.inc
@@ -4,7 +4,7 @@ AbandonedShip_HiddenFloorCorridors_MapScripts::
.byte 0
AbandonedShip_HiddenFloorCorridors_OnResume:
- setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4
+ setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 5, 4
end
AbandonedShip_HiddenFloorCorridors_OnLoad:
@@ -19,41 +19,41 @@ AbandonedShip_HiddenFloorCorridors_OnLoad:
end
AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom1::
- setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1
+ setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE
return
AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom2::
- setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, 1
+ setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Unlocked, TRUE
return
AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom4::
- setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Unlocked, 0
+ setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Unlocked, FALSE
return
AbandonedShip_HiddenFloorCorridors_EventScript_UnlockRoom6::
- setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Unlocked, 0
+ setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Unlocked, FALSE
return
AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom1::
- setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1
+ setmetatile 3, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE
return
AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom2::
- setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, 1
+ setmetatile 6, 8, METATILE_InsideShip_IntactDoor_Bottom_Locked, TRUE
return
AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom4::
- setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Locked, 0
+ setmetatile 3, 3, METATILE_InsideShip_DoorIndent_Locked, FALSE
return
AbandonedShip_HiddenFloorCorridors_EventScript_LockRoom6::
- setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Locked, 0
+ setmetatile 9, 3, METATILE_InsideShip_DoorIndent_Locked, FALSE
return
AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door::
lockall
goto_if_set FLAG_USED_ROOM_1_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
- checkitem ITEM_ROOM_1_KEY, 1
+ checkitem ITEM_ROOM_1_KEY
compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm1IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
@@ -68,7 +68,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room1Door::
AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door::
lockall
goto_if_set FLAG_USED_ROOM_2_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
- checkitem ITEM_ROOM_2_KEY, 1
+ checkitem ITEM_ROOM_2_KEY
compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm2IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
@@ -83,7 +83,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room2Door::
AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door::
lockall
goto_if_set FLAG_USED_ROOM_4_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
- checkitem ITEM_ROOM_4_KEY, 1
+ checkitem ITEM_ROOM_4_KEY
compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm4IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
@@ -98,7 +98,7 @@ AbandonedShip_HiddenFloorCorridors_EventScript_Room4Door::
AbandonedShip_HiddenFloorCorridors_EventScript_Room6Door::
lockall
goto_if_set FLAG_USED_ROOM_6_KEY, AbandonedShip_HiddenFloorCorridors_EventScript_TheDoorIsOpen
- checkitem ITEM_ROOM_6_KEY, 1
+ checkitem ITEM_ROOM_6_KEY
compare VAR_RESULT, FALSE
goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_Rm6IsLocked
msgbox AbandonedShip_HiddenFloorCorridors_Text_InsertedKey, MSGBOX_DEFAULT
diff --git a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc
index a716972ff..484f15ba1 100644
--- a/data/maps/AbandonedShip_Rooms_B1F/scripts.inc
+++ b/data/maps/AbandonedShip_Rooms_B1F/scripts.inc
@@ -3,7 +3,7 @@ AbandonedShip_Rooms_B1F_MapScripts::
.byte 0
AbandonedShip_Rooms_B1F_OnResume:
- setdivewarp MAP_ABANDONED_SHIP_UNDERWATER2, 255, 17, 4
+ setdivewarp MAP_ABANDONED_SHIP_UNDERWATER2, 17, 4
end
AbandonedShip_Rooms_B1F_EventScript_FatMan::
diff --git a/data/maps/AbandonedShip_Underwater1/scripts.inc b/data/maps/AbandonedShip_Underwater1/scripts.inc
index 9b3528b77..0f47704d1 100644
--- a/data/maps/AbandonedShip_Underwater1/scripts.inc
+++ b/data/maps/AbandonedShip_Underwater1/scripts.inc
@@ -3,6 +3,6 @@ AbandonedShip_Underwater1_MapScripts::
.byte 0
AbandonedShip_Underwater1_OnResume:
- setdivewarp MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, 255, 0, 10
+ setdivewarp MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, 0, 10
end
diff --git a/data/maps/AbandonedShip_Underwater2/scripts.inc b/data/maps/AbandonedShip_Underwater2/scripts.inc
index bb139bd51..6258b50c1 100644
--- a/data/maps/AbandonedShip_Underwater2/scripts.inc
+++ b/data/maps/AbandonedShip_Underwater2/scripts.inc
@@ -3,6 +3,6 @@ AbandonedShip_Underwater2_MapScripts::
.byte 0
AbandonedShip_Underwater2_OnResume:
- setdivewarp MAP_ABANDONED_SHIP_ROOMS_B1F, 255, 13, 7
+ setdivewarp MAP_ABANDONED_SHIP_ROOMS_B1F, 13, 7
end
diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc
index f2e242bbd..03070a731 100644
--- a/data/maps/AncientTomb/scripts.inc
+++ b/data/maps/AncientTomb/scripts.inc
@@ -29,12 +29,12 @@ AncientTomb_OnLoad:
end
AncientTomb_EventScript_HideRegiEntrance::
- 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
+ setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
return
AncientTomb_EventScript_CaveEntranceMiddle::
diff --git a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
index adea508ae..36e7a8d11 100644
--- a/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaBattleRoom/scripts.inc
@@ -110,7 +110,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_DeclareOpponentWinner::
msgbox BattleFrontier_BattleArenaBattleRoom_Text_WinnerIsOpponent, MSGBOX_DEFAULT
BattleFrontier_BattleArenaBattleRoom_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
- warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 255, 7, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 7, 8
waitstate
BattleFrontier_BattleArenaBattleRoom_EventScript_DefeatedOpponent::
@@ -210,7 +210,7 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_ContinueChallenge::
BattleFrontier_BattleArenaBattleRoom_EventScript_ReturnToLobbyWon::
delay 60
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
- warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 255, 7, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY, 7, 8
waitstate
BattleFrontier_BattleArenaBattleRoom_EventScript_ReadyFor2ndOpponent::
diff --git a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc
index 1752b9342..708681956 100644
--- a/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaCorridor/scripts.inc
@@ -22,7 +22,7 @@ BattleFrontier_BattleArenaCorridor_EventScript_WalkToBattleRoom::
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleArenaCorridor_Movement_PlayerEnterDoor
waitmovement 0
setvar VAR_0x8006, 0
- warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 255, 7, 5
+ warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM, 7, 5
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
index 12b600f69..e6394d2a8 100644
--- a/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleArenaLobby/scripts.inc
@@ -173,7 +173,7 @@ BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge::
call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50
compare VAR_RESULT, FRONTIER_LVL_OPEN
call_if_eq BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen
- warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 255, 9, 13
+ warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 9, 13
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
index 76088f54d..809be00f3 100644
--- a/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeBattleRoom/scripts.inc
@@ -164,7 +164,7 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_DefeatedOpponent::
switch VAR_RESULT
case DOME_ROUNDS_COUNT, BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney
setvar VAR_0x8006, 1
- warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 255, 5, 3
+ warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 5, 3
waitstate
BattleFrontier_BattleDomeBattleRoom_EventScript_WonTourney::
@@ -885,12 +885,12 @@ BattleFrontier_BattleDomeBattleRoom_EventScript_WarpToLobby::
copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, FRONTIER_MODE_DOUBLES
goto_if_eq BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles
- warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 5, 11
+ warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 5, 11
waitstate
end
BattleFrontier_BattleDomePreBattleRoom_EventScript_WarpToLobbyDoubles::
- warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 255, 17, 11
+ warp MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY, 17, 11
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc
index 32f3c82ba..246694439 100644
--- a/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeCorridor/scripts.inc
@@ -40,7 +40,7 @@ BattleFrontier_BattleDomeCorridor_EventScript_WalkToBattleRoomLvOpen::
BattleFrontier_BattleDomeCorridor_EventScript_WarpToPreBattleRoom::
waitmovement 0
setvar VAR_0x8006, 0
- warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 255, 5, 7
+ warp MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM, 5, 7
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
index 04df6f38c..ae82a5558 100644
--- a/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomeLobby/scripts.inc
@@ -202,7 +202,7 @@ BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge::
closemessage
call BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor
special HealPlayerParty
- warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 255, 23, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 23, 6
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
index ca441cf1f..da5b4371a 100644
--- a/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleDomePreBattleRoom/scripts.inc
@@ -163,7 +163,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_ContinueChallenge::
waitmovement 0
closedoor 5, 1
waitdooranim
- warp MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM, 255, 9, 5
+ warp MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM, 9, 5
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
index 24f5ebe10..b0529153e 100644
--- a/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryBattleRoom/scripts.inc
@@ -119,7 +119,7 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_IncrementBattleNum::
switch VAR_RESULT
case 7, BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon
setvar VAR_0x8006, 1
- warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 8
waitstate
BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyWon::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
@@ -247,12 +247,12 @@ BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobby::
copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, FRONTIER_MODE_DOUBLES
goto_if_eq BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles
- warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 4, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 4, 8
waitstate
end
BattleFrontier_BattleFactoryBattleRoom_EventScript_WarpToLobbyDoubles::
- warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 255, 14, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY, 14, 8
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
index 3b1139294..da36d96e2 100644
--- a/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryLobby/scripts.inc
@@ -181,7 +181,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge::
applymovement VAR_LAST_TALKED, BattleFrontier_BattleFactoryLobby_Movement_AttendantEnterDoor
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor
waitmovement 0
- warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 255, 8, 13
+ warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 13
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
index ce3cb357c..f83b77fbb 100644
--- a/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleFactoryPreBattleRoom/scripts.inc
@@ -54,7 +54,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom::
compare VAR_RESULT, FRONTIER_LVL_OPEN
call_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_WalkToBattleRoomLvOpen
waitmovement 0
- warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 255, 6, 11
+ warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM, 6, 11
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
index 13015dd3e..1d46ea044 100644
--- a/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceBattleRoom/scripts.inc
@@ -419,12 +419,12 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobby::
copyvar VAR_RESULT, VAR_FRONTIER_BATTLE_MODE
compare VAR_RESULT, FRONTIER_MODE_DOUBLES
goto_if_eq BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles
- warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 5, 7
+ warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 5, 7
waitstate
end
BattleFrontier_BattlePalaceBattleRoom_EventScript_WarpToLobbyDoubles::
- warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 255, 19, 7
+ warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY, 19, 7
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc
index 011170bae..68de944c0 100644
--- a/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceCorridor/scripts.inc
@@ -53,7 +53,7 @@ BattleFrontier_BattlePalaceCorridor_EventScript_WalkToOpenBattleRoom::
closedoor 10, 3
waitdooranim
BattleFrontier_BattlePalaceCorridor_EventScript_WarpToBattleRoom::
- warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 255, 7, 4
+ warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM, 7, 4
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
index a51fa48fd..0bd08ae44 100644
--- a/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePalaceLobby/scripts.inc
@@ -192,7 +192,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge::
msgbox BattleFrontier_BattlePalaceLobby_Text_FollowMe, MSGBOX_DEFAULT
closemessage
call BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor
- warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 255, 8, 13
+ warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 8, 13
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
index 44539747b..fe2c6ed00 100644
--- a/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeCorridor/scripts.inc
@@ -25,7 +25,7 @@ BattleFrontier_BattlePikeCorridor_EventScript_EnterCorridor::
waitmovement 0
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 99
call BattleFrontier_BattlePike_EventScript_CloseCurtain
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 6, 10
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
index ecbbafef2..4bb6e2327 100644
--- a/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeLobby/scripts.inc
@@ -159,7 +159,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge::
call BattleFrontier_BattlePikeLobby_EventScript_WalkToCorridor
special HealPlayerParty
call BattleFrontier_BattlePike_EventScript_CloseCurtain
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 255, 6, 7
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 6, 7
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc
index 15ebbeb3f..e0246ed57 100644
--- a/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRoomFinal/scripts.inc
@@ -18,7 +18,7 @@ BattleFrontier_BattlePikeRoomFinal_EventScript_EnterRoom::
msgbox BattleFrontier_BattlePikeRoomFinal_Text_CongratsThisWayPlease, MSGBOX_DEFAULT
closemessage
releaseall
- warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc
index 5bd04bfb4..5888c140d 100644
--- a/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRoomNormal/scripts.inc
@@ -44,7 +44,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_EnterSingleBattleRoom::
case 1, BattleFrontier_BattlePikeRoomNormal_EventScript_WonSingleBattle
BattleFrontier_BattlePikeRoomNormal_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
- warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6
waitstate
end
@@ -608,46 +608,46 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_StatusMon::
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesMostlyClosed::
- setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, 1
- setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, 1
- setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, 1
- setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, 1
- setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, 1
- setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, 0
- setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, 1
+ setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage1_Tile0, TRUE
+ setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage1_Tile1, TRUE
+ setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage1_Tile2, TRUE
+ setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage1_Tile3, TRUE
+ setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage1_Tile4, TRUE
+ setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage1_Tile5, FALSE
+ setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage1_Tile6, TRUE
special DrawWholeMapView
return
BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesLittleClosed::
- setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, 1
- setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, 1
- setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, 1
- setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, 1
- setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, 1
- setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, 0
- setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, 1
+ setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage2_Tile0, TRUE
+ setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage2_Tile1, TRUE
+ setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage2_Tile2, TRUE
+ setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage2_Tile3, TRUE
+ setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage2_Tile4, TRUE
+ setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage2_Tile5, FALSE
+ setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage2_Tile6, TRUE
special DrawWholeMapView
return
BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesOpen::
- setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, 1
- setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, 1
- setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, 1
- setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, 1
- setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, 1
- setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, 0
- setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, 1
+ setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage3_Tile0, TRUE
+ setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage3_Tile1, TRUE
+ setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage3_Tile2, TRUE
+ setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage3_Tile3, TRUE
+ setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage3_Tile4, TRUE
+ setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage3_Tile5, FALSE
+ setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage3_Tile6, TRUE
special DrawWholeMapView
return
BattleFrontier_BattlePikeRoomNormal_EventScript_SetCurtainTilesClosed::
- setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, 1
- setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, 1
- setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, 1
- setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, 1
- setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, 1
- setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, 0
- setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, 1
+ setmetatile 4, 1, METATILE_BattlePike_Curtain_Stage0_Tile0, TRUE
+ setmetatile 3, 2, METATILE_BattlePike_Curtain_Stage0_Tile1, TRUE
+ setmetatile 4, 2, METATILE_BattlePike_Curtain_Stage0_Tile2, TRUE
+ setmetatile 5, 2, METATILE_BattlePike_Curtain_Stage0_Tile3, TRUE
+ setmetatile 3, 3, METATILE_BattlePike_Curtain_Stage0_Tile4, TRUE
+ setmetatile 4, 3, METATILE_BattlePike_Curtain_Stage0_Tile5, FALSE
+ setmetatile 5, 3, METATILE_BattlePike_Curtain_Stage0_Tile6, TRUE
special DrawWholeMapView
return
diff --git a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc
index ee9e548f6..0c055f631 100644
--- a/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeRoomWildMons/scripts.inc
@@ -16,7 +16,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_SetInWildMonRoom::
BattleFrontier_BattlePikeRoomWildMons_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
- warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
index 37737554f..301a8f476 100644
--- a/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePikeThreePathRoom/scripts.inc
@@ -28,7 +28,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus::
end
BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby::
- warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc
index 8993418ee..ebc3a8d3e 100644
--- a/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidFloor/scripts.inc
@@ -70,7 +70,7 @@ BattleFrontier_BattlePyramid_EventScript_WarpToLobby::
pyramid_updatelight 0, PYRAMID_LIGHT_SET_RADIUS
pyramid_clearhelditems
special HealPlayerParty
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13
waitstate
end
@@ -102,12 +102,12 @@ BattlePyramid_WarpToNextFloor::
pyramid_seedfloor
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_RESULT, 0
- warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1
+ warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1
waitstate
end
BattlePyramid_WarpToTop::
- warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 255, 17, 17
+ warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP, 17, 17
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
index c93deee3e..761f5f663 100644
--- a/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidLobby/scripts.inc
@@ -173,7 +173,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_RESULT, 0
special HealPlayerParty
- warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 255, 1, 1
+ warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
index 0c1db1eea..f7054d202 100644
--- a/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
+++ b/data/maps/BattleFrontier_BattlePyramidTop/scripts.inc
@@ -93,7 +93,7 @@ BattleFrontier_BattlePyramidTop_EventScript_Attendant::
closemessage
BattleFrontier_BattlePyramidTop_EventScript_WarpToLobbyWon::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
- warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 255, 7, 13
+ warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY, 7, 13
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
index c909239be..ab25442a2 100644
--- a/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerBattleRoom/scripts.inc
@@ -428,23 +428,23 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobby::
goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis
compare VAR_RESULT, FRONTIER_MODE_LINK_MULTIS
goto_if_eq BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 6, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 6, 6
waitstate
end
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyDoubles::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 10, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 10, 6
waitstate
end
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 14, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 14, 6
waitstate
end
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis::
tower_closelink
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 18, 6
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
index c09c897e9..b4ddb0788 100644
--- a/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerCorridor/scripts.inc
@@ -8,13 +8,13 @@ BattleFrontier_BattleTowerCorridor_MapScripts::
BattleFrontier_BattleTowerCorridor_OnLoad:
compare VAR_0x8006, 1
goto_if_eq BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor
- setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0
- setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0
+ setmetatile 12, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE
+ setmetatile 12, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE
end
BattleFrontier_BattleTowerCorridor_EventScript_OpenFarDoor::
- setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, 0
- setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, 0
+ setmetatile 15, 0, METATILE_BattleFrontier_CorridorOpenDoor_Top, FALSE
+ setmetatile 15, 1, METATILE_BattleFrontier_CorridorOpenDoor_Bottom, FALSE
end
BattleFrontier_BattleTowerCorridor_OnFrame:
@@ -37,7 +37,7 @@ BattleFrontier_BattleTowerCorridor_EventScript_WalkToFarDoor::
BattleFrontier_BattleTowerCorridor_EventScript_WarpToBattleRoom::
setvar VAR_TEMP_0, 0
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 255, 4, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8
waitstate
end
diff --git a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
index 0021b9e84..1f7e05ca5 100644
--- a/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerElevator/scripts.inc
@@ -37,23 +37,23 @@ BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoom::
return
BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridor::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR, 255, 8, 1
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR, 8, 1
waitstate
return
BattleFrontier_BattleTowerElevator_EventScript_WarpToNextRoomMulti::
goto_if_unset FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER, BattleFrontier_BattleTowerElevator_EventScript_WarpToPartnerRoom
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 255, 7, 2
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 7, 2
waitstate
return
BattleFrontier_BattleTowerElevator_EventScript_WarpToCorridorMulti::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 255, 7, 2
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR, 7, 2
waitstate
return
BattleFrontier_BattleTowerElevator_EventScript_WarpToPartnerRoom::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 255, 10, 1
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 1
waitstate
return
diff --git a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
index ab2a62043..3d10a08a0 100644
--- a/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
@@ -615,7 +615,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad::
goto_if_ne BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad
call BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom
clearflag FLAG_CANCEL_BATTLE_ROOM_CHALLENGE
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 255, 1, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6
setvar VAR_TEMP_0, 0
waitstate
end
@@ -686,19 +686,19 @@ BattleFrontier_BattleTowerLobby_EventScript_BufferModeText::
return
BattleFrontier_BattleTowerLobby_EventScript_BufferTextSingle::
- bufferstdstring 0, STDSTRING_SINGLE
+ bufferstdstring STR_VAR_1, STDSTRING_SINGLE
return
BattleFrontier_BattleTowerLobby_EventScript_BufferTextDouble::
- bufferstdstring 0, STDSTRING_DOUBLE
+ bufferstdstring STR_VAR_1, STDSTRING_DOUBLE
return
BattleFrontier_BattleTowerLobby_EventScript_BufferTextMulti::
- bufferstdstring 0, STDSTRING_MULTI
+ bufferstdstring STR_VAR_1, STDSTRING_MULTI
return
BattleFrontier_BattleTowerLobby_EventScript_BufferTextLinkMulti::
- bufferstdstring 0, STDSTRING_MULTI_LINK
+ bufferstdstring STR_VAR_1, STDSTRING_MULTI_LINK
return
BattleFrontier_BattleTowerLobby_EventScript_SetAttendantTalkedTo::
diff --git a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc
index 70922d473..c977ecb5f 100644
--- a/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerMultiCorridor/scripts.inc
@@ -106,18 +106,18 @@ BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToBattleRoom::
return
BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToNormalBattleRoom::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 255, 4, 8
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM, 4, 8
waitstate
return
BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToMultiBattleRoom::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 255, 4, 5
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 4, 5
waitstate
return
@ Unnecessary duplicate of the above
BattleFrontier_BattleTowerMultiCorridor_EventScript_WarpToLinkMultiBattleRoom::
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 255, 4, 5
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM, 4, 5
waitstate
return
diff --git a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc
index 06038b43c..3beaa38c7 100644
--- a/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc
+++ b/data/maps/BattleFrontier_BattleTowerMultiPartnerRoom/scripts.inc
@@ -108,7 +108,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_EnterElevator::
call BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_MoveToElevator
closedoor 10, 1
waitdooranim
- warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 255, 1, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6
waitstate
releaseall
end
@@ -189,7 +189,7 @@ BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_TalkToPotentialPartner::
call_if_eq BattleFrontier_BattleTowerMultiPartnerRoom_EventScript_PartnerExitSouth
removeobject VAR_LAST_TALKED
setflag FLAG_CHOSEN_MULTI_BATTLE_NPC_PARTNER
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 255, 10, 3
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM, 10, 3
waitstate
release
end
diff --git a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc
index 360b8162c..bba92ebe4 100644
--- a/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc
+++ b/data/maps/BattleFrontier_ExchangeServiceCorner/scripts.inc
@@ -56,7 +56,7 @@ BattleFrontier_ExchangeServiceCorner_EventScript_NoRoomForDecor::
end
BattleFrontier_ExchangeServiceCorner_EventScript_TryGiveItem::
- checkitemspace VAR_0x8009, 1
+ checkitemspace VAR_0x8009
compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_ExchangeServiceCorner_EventScript_BagFull
copyvar VAR_0x8004, VAR_0x8008
diff --git a/data/maps/BattleFrontier_Lounge1/scripts.inc b/data/maps/BattleFrontier_Lounge1/scripts.inc
index 0455d577c..4447e1032 100644
--- a/data/maps/BattleFrontier_Lounge1/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge1/scripts.inc
@@ -14,9 +14,9 @@ BattleFrontier_Lounge1_EventScript_Breeder::
BattleFrontier_Lounge1_EventScript_ChooseMonToShowBreeder::
special ChoosePartyMon
waitstate
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_ne BattleFrontier_Lounge1_EventScript_ShowMonToBreeder
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq BattleFrontier_Lounge1_EventScript_CancelMonSelect
end
diff --git a/data/maps/BattleFrontier_Lounge2/scripts.inc b/data/maps/BattleFrontier_Lounge2/scripts.inc
index d98a9f64e..e3a7fc172 100644
--- a/data/maps/BattleFrontier_Lounge2/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge2/scripts.inc
@@ -61,43 +61,43 @@ BattleFrontier_Lounge2_EventScript_FacilityNews::
return
BattleFrontier_Lounge2_EventScript_BufferSingle::
- bufferstdstring 0, STDSTRING_SINGLE
+ bufferstdstring STR_VAR_1, STDSTRING_SINGLE
return
BattleFrontier_Lounge2_EventScript_BufferDouble::
- bufferstdstring 0, STDSTRING_DOUBLE
+ bufferstdstring STR_VAR_1, STDSTRING_DOUBLE
return
BattleFrontier_Lounge2_EventScript_BufferMulti::
- bufferstdstring 0, STDSTRING_MULTI
+ bufferstdstring STR_VAR_1, STDSTRING_MULTI
return
BattleFrontier_Lounge2_EventScript_BufferMultiLink::
- bufferstdstring 0, STDSTRING_MULTI_LINK
+ bufferstdstring STR_VAR_1, STDSTRING_MULTI_LINK
return
BattleFrontier_Lounge2_EventScript_BufferBattleDome::
- bufferstdstring 0, STDSTRING_BATTLE_DOME
+ bufferstdstring STR_VAR_1, STDSTRING_BATTLE_DOME
return
BattleFrontier_Lounge2_EventScript_BufferBattleFactory::
- bufferstdstring 0, STDSTRING_BATTLE_FACTORY
+ bufferstdstring STR_VAR_1, STDSTRING_BATTLE_FACTORY
return
BattleFrontier_Lounge2_EventScript_BufferBattlePalace::
- bufferstdstring 0, STDSTRING_BATTLE_PALACE
+ bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PALACE
return
BattleFrontier_Lounge2_EventScript_BufferBattleArena::
- bufferstdstring 0, STDSTRING_BATTLE_ARENA
+ bufferstdstring STR_VAR_1, STDSTRING_BATTLE_ARENA
return
BattleFrontier_Lounge2_EventScript_BufferBattlePike::
- bufferstdstring 0, STDSTRING_BATTLE_PIKE
+ bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PIKE
return
BattleFrontier_Lounge2_EventScript_BufferBattlePyramid::
- bufferstdstring 0, STDSTRING_BATTLE_PYRAMID
+ bufferstdstring STR_VAR_1, STDSTRING_BATTLE_PYRAMID
return
BattleFrontier_Lounge2_EventScript_Maniac1::
diff --git a/data/maps/BattleFrontier_Lounge3/scripts.inc b/data/maps/BattleFrontier_Lounge3/scripts.inc
index c0a941738..1c9c5bc3b 100644
--- a/data/maps/BattleFrontier_Lounge3/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge3/scripts.inc
@@ -144,17 +144,17 @@ BattleFrontier_Lounge3_EventScript_LostChallenge::
end
BattleFrontier_Lounge3_EventScript_RewardBet5::
- buffernumberstring 0, (BET_AMOUNT_5 * 2)
+ buffernumberstring STR_VAR_1, (BET_AMOUNT_5 * 2)
setvar VAR_0x8004, (BET_AMOUNT_5 * 2)
return
BattleFrontier_Lounge3_EventScript_RewardBet10::
- buffernumberstring 0, (BET_AMOUNT_10 * 2)
+ buffernumberstring STR_VAR_1, (BET_AMOUNT_10 * 2)
setvar VAR_0x8004, (BET_AMOUNT_10 * 2)
return
BattleFrontier_Lounge3_EventScript_RewardBet15::
- buffernumberstring 0, (BET_AMOUNT_15 * 2)
+ buffernumberstring STR_VAR_1, (BET_AMOUNT_15 * 2)
setvar VAR_0x8004, (BET_AMOUNT_15 * 2)
return
diff --git a/data/maps/BattleFrontier_Lounge5/scripts.inc b/data/maps/BattleFrontier_Lounge5/scripts.inc
index 61ac0cb9e..d680156f3 100644
--- a/data/maps/BattleFrontier_Lounge5/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge5/scripts.inc
@@ -11,7 +11,7 @@ BattleFrontier_Lounge5_EventScript_NatureGirl::
waitstate
lock
faceplayer
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq BattleFrontier_Lounge5_EventScript_NatureGirlNoneShown
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
compare VAR_RESULT, SPECIES_EGG
diff --git a/data/maps/BattleFrontier_Lounge6/scripts.inc b/data/maps/BattleFrontier_Lounge6/scripts.inc
index f88c69324..65fd940c1 100644
--- a/data/maps/BattleFrontier_Lounge6/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge6/scripts.inc
@@ -15,7 +15,7 @@ BattleFrontier_Lounge6_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq BattleFrontier_Lounge6_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies
@@ -38,7 +38,7 @@ BattleFrontier_Lounge6_EventScript_DeclineTrade::
end
BattleFrontier_Lounge6_EventScript_NotRequestedMon::
- bufferspeciesname 0, VAR_0x8009
+ bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox BattleFrontier_Lounge6_Text_DontTradeForAnythingButMon, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/BattleFrontier_Lounge7/scripts.inc b/data/maps/BattleFrontier_Lounge7/scripts.inc
index 287844470..7953ec820 100644
--- a/data/maps/BattleFrontier_Lounge7/scripts.inc
+++ b/data/maps/BattleFrontier_Lounge7/scripts.inc
@@ -249,7 +249,7 @@ BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection::
copyvar VAR_0x8004, VAR_TEMP_D
copyvar VAR_0x8005, VAR_TEMP_E
special BufferBattleFrontierTutorMoveName
- buffernumberstring 1, VAR_0x8008
+ buffernumberstring STR_VAR_2, VAR_0x8008
copyvar VAR_0x8004, VAR_TEMP_C
msgbox BattleFrontier_Lounge7_Text_MoveWillBeXBattlePoints, MSGBOX_YESNO
compare VAR_RESULT, NO
diff --git a/data/maps/BattleFrontier_OutsideWest/scripts.inc b/data/maps/BattleFrontier_OutsideWest/scripts.inc
index d359ee89a..f3af2b058 100644
--- a/data/maps/BattleFrontier_OutsideWest/scripts.inc
+++ b/data/maps/BattleFrontier_OutsideWest/scripts.inc
@@ -20,7 +20,7 @@ BattleFrontier_OutsideWest_EventScript_FerryAttendant::
lock
faceplayer
msgbox BattleFrontier_OutsideWest_Text_MayISeeYourTicket, MSGBOX_DEFAULT
- checkitem ITEM_SS_TICKET, 1
+ checkitem ITEM_SS_TICKET
compare VAR_RESULT, FALSE
goto_if_eq BattleFrontier_OutsideWest_EventScript_NoSSTicket
message BattleFrontier_OutsideWest_Text_WhereWouldYouLikeToGo
@@ -48,7 +48,7 @@ BattleFrontier_OutsideWest_EventScript_FerryToSlateport::
goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination
msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT
call BattleFrontier_OutsideWest_EventScript_BoardFerry
- warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11
+ warp MAP_SLATEPORT_CITY_HARBOR, 8, 11
waitstate
release
end
@@ -59,7 +59,7 @@ BattleFrontier_OutsideWest_EventScript_FerryToLilycove::
goto_if_eq BattleFrontier_OutsideWest_EventScript_ChooseNewFerryDestination
msgbox BattleFrontier_OutsideWest_Text_PleaseBoardFerry, MSGBOX_DEFAULT
call BattleFrontier_OutsideWest_EventScript_BoardFerry
- warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
+ warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
end
diff --git a/data/maps/BattleFrontier_ScottsHouse/scripts.inc b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
index edb4bdf41..9d2bc5947 100644
--- a/data/maps/BattleFrontier_ScottsHouse/scripts.inc
+++ b/data/maps/BattleFrontier_ScottsHouse/scripts.inc
@@ -176,25 +176,25 @@ BattleFrontier_ScottsHouse_EventScript_WelcomeToFrontier::
end
BattleFrontier_ScottsHouse_EventScript_Give4BattlePoints::
- buffernumberstring 0, 4
+ buffernumberstring STR_VAR_1, 4
setvar VAR_0x8004, 4
goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints
end
BattleFrontier_ScottsHouse_EventScript_Give3BattlePoints::
- buffernumberstring 0, 3
+ buffernumberstring STR_VAR_1, 3
setvar VAR_0x8004, 3
goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints
end
BattleFrontier_ScottsHouse_EventScript_Give2BattlePoints::
- buffernumberstring 0, 2
+ buffernumberstring STR_VAR_1, 2
setvar VAR_0x8004, 2
goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints
end
BattleFrontier_ScottsHouse_EventScript_Give1BattlePoint::
- buffernumberstring 0, 1
+ buffernumberstring STR_VAR_1, 1
setvar VAR_0x8004, 1
goto BattleFrontier_ScottsHouse_EventScript_GiveBattlePoints
end
diff --git a/data/maps/BirthIsland_Harbor/scripts.inc b/data/maps/BirthIsland_Harbor/scripts.inc
index 06c5b08e9..8d3fa5b5e 100644
--- a/data/maps/BirthIsland_Harbor/scripts.inc
+++ b/data/maps/BirthIsland_Harbor/scripts.inc
@@ -18,7 +18,7 @@ BirthIsland_Harbor_EventScript_Sailor::
hideobjectat LOCALID_SAILOR, MAP_BIRTH_ISLAND_HARBOR
setvar VAR_0x8004, LOCALID_SS_TIDAL
call Common_EventScript_FerryDepartIsland
- warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
+ warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
end
diff --git a/data/maps/CaveOfOrigin_Entrance/scripts.inc b/data/maps/CaveOfOrigin_Entrance/scripts.inc
index 091246ae0..40ca7a654 100644
--- a/data/maps/CaveOfOrigin_Entrance/scripts.inc
+++ b/data/maps/CaveOfOrigin_Entrance/scripts.inc
@@ -3,6 +3,6 @@ CaveOfOrigin_Entrance_MapScripts::
.byte 0
CaveOfOrigin_Entrance_OnResume:
- setescapewarp MAP_SOOTOPOLIS_CITY, 255, 31, 17
+ setescapewarp MAP_SOOTOPOLIS_CITY, 31, 17
end
diff --git a/data/maps/ContestHall/scripts.inc b/data/maps/ContestHall/scripts.inc
index 535e28b78..3dd633f8f 100644
--- a/data/maps/ContestHall/scripts.inc
+++ b/data/maps/ContestHall/scripts.inc
@@ -418,27 +418,27 @@ ContestHall_EventScript_SetExitWarp::
return
ContestHall_EventScript_SetExitWarpNormalContest::
- warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4
+ warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4
waitstate
end
ContestHall_EventScript_SetExitWarpSuperContest::
- warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4
+ warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4
waitstate
end
ContestHall_EventScript_SetExitWarpHyperContest::
- warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4
+ warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4
waitstate
end
ContestHall_EventScript_SetExitWarpMasterContest::
- warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 14, 4
+ warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 14, 4
waitstate
end
ContestHall_EventScript_SetExitWarpLinkContest::
- warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 255, 15, 4
+ warp MAP_LILYCOVE_CITY_CONTEST_LOBBY, 15, 4
waitstate
end
diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc
index 443915d7e..0e7a3c281 100644
--- a/data/maps/DesertRuins/scripts.inc
+++ b/data/maps/DesertRuins/scripts.inc
@@ -20,12 +20,12 @@ DesertRuins_OnLoad:
end
DesertRuins_EventScript_HideRegiEntrance::
- 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
+ setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
return
DesertRuins_OnTransition:
diff --git a/data/maps/DewfordTown/scripts.inc b/data/maps/DewfordTown/scripts.inc
index 281648aeb..ca6e82250 100644
--- a/data/maps/DewfordTown/scripts.inc
+++ b/data/maps/DewfordTown/scripts.inc
@@ -128,8 +128,8 @@ DewfordTown_EventScript_FishingNotSoGood::
DewfordTown_EventScript_SailToPetalburg::
call EventScript_BackupMrBrineyLocation
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 0
applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_DEWFORD
@@ -151,8 +151,8 @@ DewfordTown_EventScript_SailToPetalburg::
setflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
hideobjectat LOCALID_BOAT_DEWFORD, MAP_DEWFORD_TOWN
setvar VAR_BOARD_BRINEY_BOAT_STATE, 2
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
- warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 255, 5, 4
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
+ warp MAP_ROUTE104_MR_BRINEYS_HOUSE, 5, 4
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
waitstate
release
@@ -160,8 +160,8 @@ DewfordTown_EventScript_SailToPetalburg::
DewfordTown_EventScript_SailToSlateport::
call EventScript_BackupMrBrineyLocation
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN, 1
applymovement LOCALID_BRINEY_DEWFORD, DewfordTown_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_DEWFORD
@@ -178,7 +178,7 @@ DewfordTown_EventScript_SailToSlateport::
waitmovement 0
setobjectxyperm LOCALID_BRINEY_R109, 21, 26
addobject LOCALID_BRINEY_R109
- setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
+ setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
applymovement LOCALID_BRINEY_R109, DewfordTown_Movement_BrineyExitBoat
waitmovement 0
clearflag FLAG_HIDE_ROUTE_109_MR_BRINEY
@@ -190,8 +190,8 @@ DewfordTown_EventScript_SailToSlateport::
call_if_set FLAG_DELIVERED_DEVON_GOODS, DewfordTown_EventScript_LandedSlateport
closemessage
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
- resetobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_DEWFORD_TOWN
+ resetobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109
copyobjectxytoperm LOCALID_BRINEY_R109
release
end
diff --git a/data/maps/DewfordTown_Gym/scripts.inc b/data/maps/DewfordTown_Gym/scripts.inc
index d2b51766a..355ca15f4 100644
--- a/data/maps/DewfordTown_Gym/scripts.inc
+++ b/data/maps/DewfordTown_Gym/scripts.inc
@@ -3,57 +3,59 @@ DewfordTown_Gym_MapScripts::
.byte 0
DewfordTown_Gym_OnTransition:
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
end
-DewfordTown_Gym_EventScript_SetFlashRadius::
+DewfordTown_Gym_EventScript_SetFlashLevel::
goto_if_defeated TRAINER_BRAWLY_1, DewfordTown_Gym_EventScript_SetLightsOn
call DewfordTown_Gym_EventScript_CountTrainersDefeated
copyvar VAR_0x8001, VAR_0x8000
compare VAR_0x8000, 0
- goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius7
+ goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel7
compare VAR_0x8000, 1
- goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius6
+ goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel6
compare VAR_0x8000, 2
- goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius5
+ goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel5
compare VAR_0x8000, 3
- goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius4
+ goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel4
compare VAR_0x8000, 4
- goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius3
+ goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel3
compare VAR_0x8000, 5
- goto_if_eq DewfordTown_Gym_EventScript_SetFlashRadius2
- goto DewfordTown_Gym_EventScript_SetFlashRadius1
+ goto_if_eq DewfordTown_Gym_EventScript_SetFlashLevel2
+ goto DewfordTown_Gym_EventScript_SetFlashLevel1
DewfordTown_Gym_EventScript_SetLightsOn::
- setflashradius 0
+ setflashlevel 0
return
-DewfordTown_Gym_EventScript_SetFlashRadius1::
- setflashradius 1
+@ Brightest
+DewfordTown_Gym_EventScript_SetFlashLevel1::
+ setflashlevel 1
return
-DewfordTown_Gym_EventScript_SetFlashRadius2::
- setflashradius 2
+DewfordTown_Gym_EventScript_SetFlashLevel2::
+ setflashlevel 2
return
-DewfordTown_Gym_EventScript_SetFlashRadius3::
- setflashradius 3
+DewfordTown_Gym_EventScript_SetFlashLevel3::
+ setflashlevel 3
return
-DewfordTown_Gym_EventScript_SetFlashRadius4::
- setflashradius 4
+DewfordTown_Gym_EventScript_SetFlashLevel4::
+ setflashlevel 4
return
-DewfordTown_Gym_EventScript_SetFlashRadius5::
- setflashradius 5
+DewfordTown_Gym_EventScript_SetFlashLevel5::
+ setflashlevel 5
return
-DewfordTown_Gym_EventScript_SetFlashRadius6::
- setflashradius 6
+DewfordTown_Gym_EventScript_SetFlashLevel6::
+ setflashlevel 6
return
-DewfordTown_Gym_EventScript_SetFlashRadius7::
- setflashradius 7
+@ Darkest
+DewfordTown_Gym_EventScript_SetFlashLevel7::
+ setflashlevel 7
return
DewfordTown_Gym_EventScript_BrightenRoom::
@@ -82,43 +84,43 @@ DewfordTown_Gym_EventScript_NoLightChange::
DewfordTown_Gym_EventScript_AnimateFlash1Trainer::
playse SE_SWITCH
animateflash 6
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_AnimateFlash2Trainers::
playse SE_SWITCH
animateflash 5
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_AnimateFlash3Trainers::
playse SE_SWITCH
animateflash 4
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_AnimateFlash4Trainers::
playse SE_SWITCH
animateflash 3
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_AnimateFlash5Trainers::
playse SE_SWITCH
animateflash 2
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_AnimateFlash6Trainers::
playse SE_SWITCH
animateflash 1
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_AnimateFlashFullBrightness::
playse SE_SWITCH
animateflash 0
- call DewfordTown_Gym_EventScript_SetFlashRadius
+ call DewfordTown_Gym_EventScript_SetFlashLevel
return
DewfordTown_Gym_EventScript_CountTrainersDefeated::
diff --git a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
index 6b9281ae6..d33c57df8 100644
--- a/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
+++ b/data/maps/EverGrandeCity_ChampionsRoom/scripts.inc
@@ -50,8 +50,8 @@ EverGrandeCity_ChampionsRoom_EventScript_Wallace::
EverGrandeCity_ChampionsRoom_EventScript_Defeated::
playse SE_DOOR
- setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, 0
- setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, 0
+ setmetatile 6, 1, METATILE_EliteFour_OpenDoorChampion_Frame, FALSE
+ setmetatile 6, 2, METATILE_EliteFour_OpenDoorChampion_Opening, FALSE
special DrawWholeMapView
msgbox EverGrandeCity_ChampionsRoom_Text_PostBattleSpeech, MSGBOX_DEFAULT
closemessage
@@ -141,7 +141,7 @@ EverGrandeCity_ChampionsRoom_EventScript_BirchArrivesExitForHoF::
applymovement OBJ_EVENT_ID_PLAYER, EverGrandeCity_ChampionsRoom_Movement_PlayerExit
waitmovement 0
setflag FLAG_HIDE_PETALBURG_GYM_GREETER
- warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 255, 7, 16
+ warp MAP_EVER_GRANDE_CITY_HALL_OF_FAME, 7, 16
waitstate
releaseall
end
diff --git a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
index 3f51ba393..7fc90e4e1 100644
--- a/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentBattleRoom/scripts.inc
@@ -71,7 +71,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_NextOpponentEnter::
FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
special LoadPlayerParty
- warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
+ warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 6, 6
waitstate
FallarborTown_BattleTentBattleRoom_EventScript_DefeatedOpponent::
@@ -142,7 +142,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon::
delay 60
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
special LoadPlayerParty
- warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
+ warp MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 6, 6
waitstate
@ Unreachable code block? The flow into the next block also doesnt make sense
diff --git a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc
index 077cdfe79..023dc919f 100644
--- a/data/maps/FallarborTown_BattleTentCorridor/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentCorridor/scripts.inc
@@ -22,7 +22,7 @@ FallarborTown_BattleTentCorridor_EventScript_EnterCorridor::
closedoor 2, 1
waitdooranim
setvar VAR_0x8006, 0
- warp MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM, 255, 4, 4
+ warp MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM, 4, 4
waitstate
releaseall
end
diff --git a/data/maps/FallarborTown_BattleTentLobby/scripts.inc b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
index 6a2c8713f..d6826f037 100644
--- a/data/maps/FallarborTown_BattleTentLobby/scripts.inc
+++ b/data/maps/FallarborTown_BattleTentLobby/scripts.inc
@@ -161,7 +161,7 @@ FallarborTown_BattleTentLobby_EventScript_EnterChallenge::
msgbox FallarborTown_BattleTentLobby_Text_GuideYouToBattleTent, MSGBOX_DEFAULT
closemessage
call FallarborTown_BattleTentLobby_EventScript_WalkToDoor
- warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7
+ warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/FallarborTown_CozmosHouse/scripts.inc b/data/maps/FallarborTown_CozmosHouse/scripts.inc
index 43a9dca7f..3e5d02f2d 100644
--- a/data/maps/FallarborTown_CozmosHouse/scripts.inc
+++ b/data/maps/FallarborTown_CozmosHouse/scripts.inc
@@ -5,7 +5,7 @@ FallarborTown_CozmosHouse_EventScript_ProfCozmo::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite
- checkitem ITEM_METEORITE, 1
+ checkitem ITEM_METEORITE
compare VAR_RESULT, TRUE
goto_if_eq FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite
msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT
diff --git a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc
index 1bd54b4b8..096f13877 100644
--- a/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc
+++ b/data/maps/FallarborTown_MoveRelearnersHouse/scripts.inc
@@ -14,7 +14,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_MoveRelearner::
end
FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove::
- checkitem ITEM_HEART_SCALE, 1
+ checkitem ITEM_HEART_SCALE
compare VAR_RESULT, FALSE
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
msgbox FallarborTown_MoveRelearnersHouse_Text_ThatsAHeartScaleWantMeToTeachMove, MSGBOX_YESNO
@@ -27,7 +27,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon::
msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT
special ChooseMonForMoveRelearner
waitstate
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale
special IsSelectedMonEgg
compare VAR_RESULT, TRUE
diff --git a/data/maps/FarawayIsland_Entrance/scripts.inc b/data/maps/FarawayIsland_Entrance/scripts.inc
index 15deb95e6..2f4db2651 100644
--- a/data/maps/FarawayIsland_Entrance/scripts.inc
+++ b/data/maps/FarawayIsland_Entrance/scripts.inc
@@ -33,7 +33,7 @@ FarawayIsland_Entrance_EventScript_Sailor::
hideobjectat LOCALID_SAILOR, MAP_FARAWAY_ISLAND_ENTRANCE
setvar VAR_0x8004, LOCALID_SS_TIDAL
call Common_EventScript_FerryDepartIsland
- warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
+ warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
end
diff --git a/data/maps/FortreeCity/scripts.inc b/data/maps/FortreeCity/scripts.inc
index 6371d5b0c..a9fe64ade 100644
--- a/data/maps/FortreeCity/scripts.inc
+++ b/data/maps/FortreeCity/scripts.inc
@@ -55,7 +55,7 @@ FortreeCity_EventScript_GymSign::
FortreeCity_EventScript_Kecleon::
lock
faceplayer
- checkitem ITEM_DEVON_SCOPE, 1
+ checkitem ITEM_DEVON_SCOPE
compare VAR_RESULT, TRUE
goto_if_eq FortreeCity_EventScript_AskUseDevonScope
msgbox FortreeCity_Text_SomethingUnseeable, MSGBOX_DEFAULT
diff --git a/data/maps/FortreeCity_House1/scripts.inc b/data/maps/FortreeCity_House1/scripts.inc
index e25334ee9..a16c26112 100644
--- a/data/maps/FortreeCity_House1/scripts.inc
+++ b/data/maps/FortreeCity_House1/scripts.inc
@@ -15,7 +15,7 @@ FortreeCity_House1_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq FortreeCity_House1_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies
@@ -27,7 +27,7 @@ FortreeCity_House1_EventScript_Trader::
special CreateInGameTradePokemon
special DoInGameTradeScene
waitstate
- bufferspeciesname 0, VAR_0x8009
+ bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox FortreeCity_House1_Text_MonYouTakeCare, MSGBOX_DEFAULT
setflag FLAG_FORTREE_NPC_TRADE_COMPLETED
release
@@ -39,7 +39,7 @@ FortreeCity_House1_EventScript_DeclineTrade::
end
FortreeCity_House1_EventScript_NotRequestedMon::
- bufferspeciesname 0, VAR_0x8009
+ bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox FortreeCity_House1_Text_ThisIsntAMon, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/GraniteCave_B1F/scripts.inc b/data/maps/GraniteCave_B1F/scripts.inc
index f1b52ce66..24519aef6 100644
--- a/data/maps/GraniteCave_B1F/scripts.inc
+++ b/data/maps/GraniteCave_B1F/scripts.inc
@@ -6,6 +6,6 @@ GraniteCave_B1F_MapScripts::
GraniteCave_B1F_SetHoleWarp:
setstepcallback STEP_CB_CRACKED_FLOOR
- setholewarp MAP_GRANITE_CAVE_B2F, 255, 0, 0
+ setholewarp MAP_GRANITE_CAVE_B2F
end
diff --git a/data/maps/InsideOfTruck/scripts.inc b/data/maps/InsideOfTruck/scripts.inc
index 3068b1184..515279449 100644
--- a/data/maps/InsideOfTruck/scripts.inc
+++ b/data/maps/InsideOfTruck/scripts.inc
@@ -4,9 +4,9 @@ InsideOfTruck_MapScripts::
.byte 0
InsideOfTruck_OnLoad:
- setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, 0
- setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, 0
- setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, 0
+ setmetatile 4, 1, METATILE_InsideOfTruck_ExitLight_Top, FALSE
+ setmetatile 4, 2, METATILE_InsideOfTruck_ExitLight_Mid, FALSE
+ setmetatile 4, 3, METATILE_InsideOfTruck_ExitLight_Bottom, FALSE
end
InsideOfTruck_OnResume:
@@ -32,7 +32,7 @@ InsideOfTruck_EventScript_SetIntroFlagsMale::
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_RIVAL_SIBLING
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F_POKE_BALL
setvar VAR_LITTLEROOT_HOUSES_STATE_BRENDAN, 1
- setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 3, 10
+ setdynamicwarp MAP_LITTLEROOT_TOWN, 3, 10
releaseall
end
@@ -45,7 +45,7 @@ InsideOfTruck_EventScript_SetIntroFlagsFemale::
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_RIVAL_SIBLING
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_2F_POKE_BALL
setvar VAR_LITTLEROOT_HOUSES_STATE_MAY, 1
- setdynamicwarp MAP_LITTLEROOT_TOWN, 255, 12, 10
+ setdynamicwarp MAP_LITTLEROOT_TOWN, 12, 10
releaseall
end
diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc
index d660aadf0..83e4d015a 100644
--- a/data/maps/IslandCave/scripts.inc
+++ b/data/maps/IslandCave/scripts.inc
@@ -20,12 +20,12 @@ IslandCave_OnLoad:
end
IslandCave_EventScript_HideRegiEntrance::
- 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
+ setmetatile 7, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 8, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 9, 19, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 7, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 8, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 9, 20, METATILE_Cave_SealedChamberBraille_Mid, TRUE
return
IslandCave_OnTransition:
@@ -39,12 +39,12 @@ IslandCave_EventScript_ShowRegice::
return
IslandCave_EventScript_OpenRegiEntrance::
- 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
+ setmetatile 7, 19, METATILE_Cave_SealedChamberEntrance_TopLeft, TRUE
+ setmetatile 8, 19, METATILE_Cave_SealedChamberEntrance_TopMid, TRUE
+ setmetatile 9, 19, METATILE_Cave_SealedChamberEntrance_TopRight, TRUE
+ setmetatile 7, 20, METATILE_Cave_SealedChamberEntrance_BottomLeft, TRUE
+ setmetatile 8, 20, METATILE_Cave_SealedChamberEntrance_BottomMid, FALSE
+ setmetatile 9, 20, METATILE_Cave_SealedChamberEntrance_BottomRight, TRUE
special DrawWholeMapView
playse SE_BANG
setflag FLAG_SYS_BRAILLE_REGICE_COMPLETED
diff --git a/data/maps/JaggedPass/scripts.inc b/data/maps/JaggedPass/scripts.inc
index 754ee00cf..18a8c2999 100644
--- a/data/maps/JaggedPass/scripts.inc
+++ b/data/maps/JaggedPass/scripts.inc
@@ -13,7 +13,7 @@ JaggedPass_OnResume:
end
JaggedPass_EventScript_CheckHasMagmaEmblem::
- checkitem ITEM_MAGMA_EMBLEM, 1
+ checkitem ITEM_MAGMA_EMBLEM
compare VAR_RESULT, TRUE
goto_if_eq JaggedPass_EventScript_SetReadyToOpenHideout
return
@@ -38,8 +38,8 @@ JaggedPass_OnLoad:
end
JaggedPass_EventScript_ConcealHideoutEntrance::
- setmetatile 16, 17, METATILE_Lavaridge_RockWall, 1
- setmetatile 16, 18, METATILE_Lavaridge_RockWall, 1
+ setmetatile 16, 17, METATILE_Lavaridge_RockWall, TRUE
+ setmetatile 16, 18, METATILE_Lavaridge_RockWall, TRUE
end
JaggedPass_EventScript_OpenMagmaHideout::
@@ -59,8 +59,8 @@ JaggedPass_EventScript_OpenMagmaHideout::
special ShakeCamera
waitstate
playse SE_EFFECTIVE
- setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, 1
- setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, 0
+ setmetatile 16, 17, METATILE_Lavaridge_CaveEntrance_Top, TRUE
+ setmetatile 16, 18, METATILE_Lavaridge_CaveEntrance_Bottom, FALSE
special DrawWholeMapView
delay 30
setvar VAR_JAGGED_PASS_STATE, 2
diff --git a/data/maps/LilycoveCity/scripts.inc b/data/maps/LilycoveCity/scripts.inc
index eb3f140a8..648aae564 100644
--- a/data/maps/LilycoveCity/scripts.inc
+++ b/data/maps/LilycoveCity/scripts.inc
@@ -19,18 +19,18 @@ LilycoveCity_OnLoad:
end
LilycoveCity_EventScript_SetWailmerMetatiles::
- 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
+ setmetatile 76, 12, METATILE_Lilycove_Wailmer0, TRUE
+ setmetatile 77, 12, METATILE_Lilycove_Wailmer1, TRUE
+ setmetatile 76, 13, METATILE_Lilycove_Wailmer2, TRUE
+ setmetatile 77, 13, METATILE_Lilycove_Wailmer3, TRUE
+ setmetatile 76, 14, METATILE_Lilycove_Wailmer0_Alt, TRUE
+ setmetatile 77, 14, METATILE_Lilycove_Wailmer1_Alt, TRUE
+ setmetatile 76, 15, METATILE_Lilycove_Wailmer2, TRUE
+ setmetatile 77, 15, METATILE_Lilycove_Wailmer3, TRUE
+ setmetatile 77, 16, METATILE_Lilycove_Wailmer0_Alt, TRUE
+ setmetatile 78, 16, METATILE_Lilycove_Wailmer1_Alt, TRUE
+ setmetatile 77, 17, METATILE_Lilycove_Wailmer2, TRUE
+ setmetatile 78, 17, METATILE_Lilycove_Wailmer3, TRUE
return
LilycoveCity_EventScript_BerryGentleman::
diff --git a/data/maps/LilycoveCity_ContestLobby/scripts.inc b/data/maps/LilycoveCity_ContestLobby/scripts.inc
index 7bfa1419a..84a790aed 100644
--- a/data/maps/LilycoveCity_ContestLobby/scripts.inc
+++ b/data/maps/LilycoveCity_ContestLobby/scripts.inc
@@ -17,7 +17,7 @@ LilycoveCity_ContestLobby_OnTransition:
end
LilycoveCity_ContestLobby_EventScript_TryShowBlendMaster::
- getpricereduction POKENEWS_BLENDMASTER
+ getpokenewsactive POKENEWS_BLENDMASTER
compare VAR_RESULT, TRUE
goto_if_eq LilycoveCity_ContestLobby_EventScript_ShowBlendMaster
clearflag FLAG_HIDE_LILYCOVE_CONTEST_HALL_BLEND_MASTER_REPLACEMENT
@@ -384,31 +384,31 @@ LilycoveCity_ContestLobby_EventScript_WarpToContestHall::
return
LilycoveCity_ContestLobby_EventScript_WarpToCoolContestHall::
- setwarp MAP_CONTEST_HALL_COOL, 255, 7, 5
+ setwarp MAP_CONTEST_HALL_COOL, 7, 5
special DoContestHallWarp
waitstate
return
LilycoveCity_ContestLobby_EventScript_WarpToBeautyContestHall::
- setwarp MAP_CONTEST_HALL_BEAUTY, 255, 7, 5
+ setwarp MAP_CONTEST_HALL_BEAUTY, 7, 5
special DoContestHallWarp
waitstate
return
LilycoveCity_ContestLobby_EventScript_WarpToCuteContestHall::
- setwarp MAP_CONTEST_HALL_CUTE, 255, 7, 5
+ setwarp MAP_CONTEST_HALL_CUTE, 7, 5
special DoContestHallWarp
waitstate
return
LilycoveCity_ContestLobby_EventScript_WarpToSmartContestHall::
- setwarp MAP_CONTEST_HALL_SMART, 255, 7, 5
+ setwarp MAP_CONTEST_HALL_SMART, 7, 5
special DoContestHallWarp
waitstate
return
LilycoveCity_ContestLobby_EventScript_WarpToToughContestHall::
- setwarp MAP_CONTEST_HALL_TOUGH, 255, 7, 5
+ setwarp MAP_CONTEST_HALL_TOUGH, 7, 5
special DoContestHallWarp
waitstate
return
@@ -418,14 +418,14 @@ LilycoveCity_ContestLobby_EventScript_LeadToContestHall::
applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistApproachCounter
waitmovement 0
playse SE_BRIDGE_WALK
- setmetatile 12, 2, METATILE_Contest_WallShadow, 1
- setmetatile 12, 3, METATILE_Contest_FloorShadow, 1
+ setmetatile 12, 2, METATILE_Contest_WallShadow, TRUE
+ setmetatile 12, 3, METATILE_Contest_FloorShadow, TRUE
special DrawWholeMapView
applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistExitCounter
waitmovement 0
playse SE_BRIDGE_WALK
- setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, 1
- setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, 1
+ setmetatile 12, 2, METATILE_Contest_CounterFlap_Top, TRUE
+ setmetatile 12, 3, METATILE_Contest_CounterFlap_Bottom, TRUE
special DrawWholeMapView
delay 20
applymovement LOCALID_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_ReceptionistFacePlayer
@@ -724,7 +724,7 @@ LilycoveCity_ContestLobby_EventScript_ChooseLinkContestMon::
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon3, MSGBOX_DEFAULT
setvar VAR_CONTEST_RANK, 0
choosecontestmon
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelLinkContest
special TryEnterContestMon
compare VAR_RESULT, CANT_ENTER_CONTEST
@@ -836,7 +836,7 @@ LilycoveCity_ContestLobby_EventScript_CancelLinkTransmissionError::
LilycoveCity_ContestLobby_EventScript_StartLinkContest::
special GetContestPlayerId
addvar VAR_0x8004, 1
- buffernumberstring 1, VAR_0x8004
+ buffernumberstring STR_VAR_2, VAR_0x8004
messageautoscroll LilycoveCity_ContestLobby_Text_YourMonIsEntryNumX
waitmessage
subvar VAR_0x8004, 1
@@ -939,14 +939,14 @@ LilycoveCity_ContestLobby_EventScript_LeadToLinkContestHall::
applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistApproachCounter
waitmovement 0
playse SE_BRIDGE_WALK
- setmetatile 17, 2, METATILE_Contest_WallShadow, 1
- setmetatile 17, 3, METATILE_Contest_FloorShadow, 1
+ setmetatile 17, 2, METATILE_Contest_WallShadow, TRUE
+ setmetatile 17, 3, METATILE_Contest_FloorShadow, TRUE
special DrawWholeMapView
applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistExitCounter
waitmovement 0
playse SE_BRIDGE_WALK
- setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, 1
- setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, 1
+ setmetatile 17, 2, METATILE_Contest_CounterFlap_Top, TRUE
+ setmetatile 17, 3, METATILE_Contest_CounterFlap_Bottom, TRUE
special DrawWholeMapView
delay 20
applymovement LOCALID_LINK_RECEPTIONIST, LilycoveCity_ContestLobby_Movement_LinkReceptionistFacePlayer
diff --git a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
index b6ad2e4e6..3e7c4c4f6 100644
--- a/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreElevator/scripts.inc
@@ -59,7 +59,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_ChooseFloor::
LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor::
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_1F
- setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 255, 2, 1
+ setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F, 2, 1
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_1F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
@@ -69,7 +69,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_1stFloor::
LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor::
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_2F
- setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 255, 2, 1
+ setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F, 2, 1
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_2F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
@@ -79,7 +79,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_2ndFloor::
LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor::
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_3F
- setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 255, 2, 1
+ setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F, 2, 1
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_3F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
@@ -89,7 +89,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_3rdFloor::
LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor::
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_4F
- setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 255, 2, 1
+ setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F, 2, 1
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_4F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
@@ -99,7 +99,7 @@ LilycoveCity_DepartmentStoreElevator_EventScript_4thFloor::
LilycoveCity_DepartmentStoreElevator_EventScript_5thFloor::
setvar VAR_0x8006, DEPT_STORE_FLOORNUM_5F
- setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 255, 2, 1
+ setdynamicwarp MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F, 2, 1
compare VAR_DEPT_STORE_FLOOR, DEPT_STORE_FLOORNUM_5F
goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_ExitFloorSelect
call LilycoveCity_DepartmentStoreElevator_EventScript_MoveElevator
diff --git a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
index e91ca7745..224d3c778 100644
--- a/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStoreRooftop/scripts.inc
@@ -3,7 +3,7 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts::
.byte 0
LilycoveCity_DepartmentStoreRooftop_OnTransition:
- getpricereduction POKENEWS_LILYCOVE
+ getpokenewsactive POKENEWS_LILYCOVE
compare VAR_RESULT, TRUE
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ShowSaleWoman
compare VAR_RESULT, FALSE
@@ -51,7 +51,7 @@ LilycoveCity_DepartmentStoreRooftop_PokemartDecor_ClearOutSale:
LilycoveCity_DepartmentStoreRooftop_EventScript_Man::
lock
faceplayer
- getpricereduction POKENEWS_LILYCOVE
+ getpokenewsactive POKENEWS_LILYCOVE
compare VAR_RESULT, TRUE
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_ManClearOutSale
msgbox LilycoveCity_DepartmentStoreRooftop_Text_SetDatesForClearOutSales, MSGBOX_DEFAULT
@@ -71,7 +71,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_VendingMachine::
lockall
message LilycoveCity_DepartmentStoreRooftop_Text_WhichDrinkWouldYouLike
waitmessage
- showmoneybox 0, 0, 0
+ showmoneybox 0, 0
goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseDrink
end
@@ -102,27 +102,27 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_Lemonade::
end
LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyFreshWater::
- checkmoney 200, 0
+ checkmoney 200
return
LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneySodaPop::
- checkmoney 300, 0
+ checkmoney 300
return
LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade::
- checkmoney 350, 0
+ checkmoney 350
return
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyFreshWater::
- removemoney 200, 0
+ removemoney 200
return
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop::
- removemoney 300, 0
+ removemoney 300
return
LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade::
- removemoney 350, 0
+ removemoney 350
return
LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
@@ -134,7 +134,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_CheckMoneyLemonade
compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NotEnoughMoneyForDrink
- checkitemspace VAR_TEMP_0, 1
+ checkitemspace VAR_TEMP_0
compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
compare VAR_TEMP_1, 0
@@ -143,37 +143,37 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_TryBuyDrink::
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneySodaPop
compare VAR_TEMP_1, 2
call_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_RemoveMoneyLemonade
- updatemoneybox 0, 0
- bufferitemname 0, VAR_TEMP_0
+ updatemoneybox
+ bufferitemname STR_VAR_1, VAR_TEMP_0
playse SE_VEND
msgbox LilycoveCity_DepartmentStoreRooftop_Text_CanOfDrinkDroppedDown, MSGBOX_DEFAULT
additem VAR_TEMP_0
- bufferitemname 1, VAR_TEMP_0
- bufferstdstring 2, STDSTRING_ITEMS
+ bufferitemname STR_VAR_2, VAR_TEMP_0
+ bufferstdstring STR_VAR_3, STDSTRING_ITEMS
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
random 64 @ 1/64 chance of an additional drink dropping
compare VAR_RESULT, 0
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
- checkitemspace VAR_TEMP_0, 1
+ checkitemspace VAR_TEMP_0
compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
playse SE_VEND
msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT
additem VAR_TEMP_0
- bufferitemname 1, VAR_TEMP_0
- bufferstdstring 2, STDSTRING_ITEMS
+ bufferitemname STR_VAR_2, VAR_TEMP_0
+ bufferstdstring STR_VAR_3, STDSTRING_ITEMS
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
random 64 @ 1/64 * the prev 1/64 chance of a third additional drink dropping, ~ 0.02% chance
compare VAR_RESULT, 0
goto_if_ne LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
- checkitemspace VAR_TEMP_0, 1
+ checkitemspace VAR_TEMP_0
compare VAR_RESULT, 0
goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_NoRoomForDrink
playse SE_VEND
msgbox LilycoveCity_DepartmentStoreRooftop_Text_ExtraCanOfDrinkDroppedDown, MSGBOX_DEFAULT
additem VAR_TEMP_0
- bufferitemname 1, VAR_TEMP_0
- bufferstdstring 2, STDSTRING_ITEMS
+ bufferitemname STR_VAR_2, VAR_TEMP_0
+ bufferstdstring STR_VAR_3, STDSTRING_ITEMS
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
goto LilycoveCity_DepartmentStoreRooftop_EventScript_ChooseNewDrink
end
diff --git a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
index fb82ba47a..45a0a844e 100644
--- a/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
+++ b/data/maps/LilycoveCity_DepartmentStore_1F/scripts.inc
@@ -41,7 +41,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_LotteryClerk::
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPartyMon
compare VAR_0x8006, 1
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TicketMatchPCMon
- bufferitemname 0, VAR_0x8005
+ bufferitemname STR_VAR_1, VAR_0x8005
compare VAR_0x8004, 1
call_if_eq LilycoveCity_DepartmentStore_1F_EventScript_TwoDigitMatch
compare VAR_0x8004, 2
diff --git a/data/maps/LilycoveCity_Harbor/scripts.inc b/data/maps/LilycoveCity_Harbor/scripts.inc
index 216a6ff03..d8dfa0f21 100644
--- a/data/maps/LilycoveCity_Harbor/scripts.inc
+++ b/data/maps/LilycoveCity_Harbor/scripts.inc
@@ -8,7 +8,7 @@ LilycoveCity_Harbor_MapScripts::
.byte 0
LilycoveCity_Harbor_OnTransition:
- setescapewarp MAP_LILYCOVE_CITY, 255, 12, 33
+ setescapewarp MAP_LILYCOVE_CITY, 12, 33
end
LilycoveCity_Harbor_EventScript_FerryAttendant::
@@ -64,28 +64,28 @@ LilycoveCity_Harbor_EventScript_FerryRegularLocationSelect::
LilycoveCity_Harbor_EventScript_GoToSouthernIsland::
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22
+ warp MAP_SOUTHERN_ISLAND_EXTERIOR, 13, 22
waitstate
release
end
LilycoveCity_Harbor_EventScript_GoToNavelRock::
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4
+ warp MAP_NAVEL_ROCK_HARBOR, 8, 4
waitstate
release
end
LilycoveCity_Harbor_EventScript_GoToBirthIsland::
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4
+ warp MAP_BIRTH_ISLAND_HARBOR, 8, 4
waitstate
release
end
LilycoveCity_Harbor_EventScript_GoToFarawayIsland::
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38
+ warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38
waitstate
release
end
@@ -96,7 +96,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateport::
goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
+ warp MAP_SS_TIDAL_CORRIDOR, 1, 10
waitstate
release
end
@@ -106,7 +106,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontier::
compare VAR_RESULT, NO
goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67
+ warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67
waitstate
release
end
@@ -114,7 +114,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontier::
LilycoveCity_Harbor_EventScript_GetEonTicketState::
setvar VAR_TEMP_E, 0
goto_if_unset FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, Common_EventScript_NopReturn
- checkitem ITEM_EON_TICKET, 1
+ checkitem ITEM_EON_TICKET
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_E, 1
@@ -125,7 +125,7 @@ LilycoveCity_Harbor_EventScript_GetEonTicketState::
LilycoveCity_Harbor_EventScript_GetAuroraTicketState::
setvar VAR_TEMP_D, 0
goto_if_unset FLAG_ENABLE_SHIP_BIRTH_ISLAND, Common_EventScript_NopReturn
- checkitem ITEM_AURORA_TICKET, 1
+ checkitem ITEM_AURORA_TICKET
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_D, 1
@@ -136,7 +136,7 @@ LilycoveCity_Harbor_EventScript_GetAuroraTicketState::
LilycoveCity_Harbor_EventScript_GetOldSeaMapState::
setvar VAR_TEMP_C, 0
goto_if_unset FLAG_ENABLE_SHIP_FARAWAY_ISLAND, Common_EventScript_NopReturn
- checkitem ITEM_OLD_SEA_MAP, 1
+ checkitem ITEM_OLD_SEA_MAP
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_C, 1
@@ -147,7 +147,7 @@ LilycoveCity_Harbor_EventScript_GetOldSeaMapState::
LilycoveCity_Harbor_EventScript_GetMysticTicketState::
setvar VAR_TEMP_9, 0
goto_if_unset FLAG_ENABLE_SHIP_NAVEL_ROCK, Common_EventScript_NopReturn
- checkitem ITEM_MYSTIC_TICKET, 1
+ checkitem ITEM_MYSTIC_TICKET
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_NopReturn
setvar VAR_TEMP_9, 1
@@ -223,7 +223,7 @@ LilycoveCity_Harbor_EventScript_EonTicketFirstTime::
LilycoveCity_Harbor_EventScript_GoToSouthernIslandFirstTime::
closemessage
call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
- warp MAP_SOUTHERN_ISLAND_EXTERIOR, 255, 13, 22
+ warp MAP_SOUTHERN_ISLAND_EXTERIOR, 13, 22
waitstate
release
end
@@ -240,7 +240,7 @@ LilycoveCity_Harbor_EventScript_AuroraTicketFirstTime::
LilycoveCity_Harbor_EventScript_GoToBirthIslandFirstTime::
closemessage
call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
- warp MAP_BIRTH_ISLAND_HARBOR, 255, 8, 4
+ warp MAP_BIRTH_ISLAND_HARBOR, 8, 4
waitstate
release
end
@@ -281,7 +281,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime::
call_if_eq LilycoveCity_Harbor_EventScript_BoardFerryWithBrineyAndSailorEast
setvar VAR_0x8004, LOCALID_SS_TIDAL
call Common_EventScript_FerryDepart
- warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38
+ warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38
waitstate
release
end
@@ -289,7 +289,7 @@ LilycoveCity_Harbor_EventScript_OldSeaMapFirstTime::
LilycoveCity_Harbor_EventScript_GoToFarawayIslandFirstTime::
closemessage
call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
- warp MAP_FARAWAY_ISLAND_ENTRANCE, 255, 13, 38
+ warp MAP_FARAWAY_ISLAND_ENTRANCE, 13, 38
waitstate
release
end
@@ -306,7 +306,7 @@ LilycoveCity_Harbor_EventScript_MysticTicketFirstTime::
LilycoveCity_Harbor_EventScript_GoToNavelRockFirstTime::
closemessage
call LilycoveCity_Harbor_EventScript_BoardFerryWithSailor
- warp MAP_NAVEL_ROCK_HARBOR, 255, 8, 4
+ warp MAP_NAVEL_ROCK_HARBOR, 8, 4
waitstate
release
end
@@ -399,7 +399,7 @@ LilycoveCity_Harbor_EventScript_GoToSlateportUnused::
goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_LILYCOVE
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
+ warp MAP_SS_TIDAL_CORRIDOR, 1, 10
waitstate
release
end
@@ -410,7 +410,7 @@ LilycoveCity_Harbor_EventScript_GoToBattleFrontierUnused::
compare VAR_RESULT, NO
goto_if_eq LilycoveCity_Harbor_EventScript_FerryDestinationChangeMind
call LilycoveCity_Harbor_EventScript_BoardFerry
- warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67
+ warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67
waitstate
release
end
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
index e5d855633..12c4ead3e 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_1F/scripts.inc
@@ -52,7 +52,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorNorth::
lockall
applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorNorth
waitmovement 0
- warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8
+ warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8
waitstate
end
@@ -60,7 +60,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorWest::
lockall
applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorWest
waitmovement 0
- warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8
+ warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8
waitstate
end
@@ -68,7 +68,7 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_FollowCuratorEast::
lockall
applymovement OBJ_EVENT_ID_PLAYER, LilycoveCity_LilycoveMuseum_1F_Movement_FollowCuratorEast
waitmovement 0
- warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 255, 11, 8
+ warp MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, 11, 8
waitstate
end
diff --git a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
index 929bba3e1..bf220b04f 100644
--- a/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
+++ b/data/maps/LilycoveCity_LilycoveMuseum_2F/scripts.inc
@@ -30,32 +30,32 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_CheckToughPainting::
end
LilycoveCity_LilycoveMuseum_2F_EventScript_SetCoolPainting::
- setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, 1
- setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, 1
+ setmetatile 10, 6, METATILE_LilycoveMuseum_Painting2_Left, TRUE
+ setmetatile 11, 6, METATILE_LilycoveMuseum_Painting2_Right, TRUE
goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckBeautyPainting
end
LilycoveCity_LilycoveMuseum_2F_EventScript_SetBeautyPainting::
- setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, 1
- setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, 1
+ setmetatile 18, 6, METATILE_LilycoveMuseum_Painting1_Left, TRUE
+ setmetatile 19, 6, METATILE_LilycoveMuseum_Painting1_Right, TRUE
goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckCutePainting
end
LilycoveCity_LilycoveMuseum_2F_EventScript_SetCutePainting::
- setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, 1
- setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, 1
+ setmetatile 14, 10, METATILE_LilycoveMuseum_Painting3_Left, TRUE
+ setmetatile 15, 10, METATILE_LilycoveMuseum_Painting3_Right, TRUE
goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckSmartPainting
end
LilycoveCity_LilycoveMuseum_2F_EventScript_SetSmartPainting::
- setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, 1
- setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, 1
+ setmetatile 6, 10, METATILE_LilycoveMuseum_Painting0_Left, TRUE
+ setmetatile 7, 10, METATILE_LilycoveMuseum_Painting0_Right, TRUE
goto LilycoveCity_LilycoveMuseum_2F_EventScript_CheckToughPainting
end
LilycoveCity_LilycoveMuseum_2F_EventScript_SetToughPainting::
- setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, 1
- setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, 1
+ setmetatile 2, 6, METATILE_LilycoveMuseum_Painting4_Left, TRUE
+ setmetatile 3, 6, METATILE_LilycoveMuseum_Painting4_Right, TRUE
end
LilycoveCity_LilycoveMuseum_2F_OnFrame:
diff --git a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
index ff340c9f3..eead1f675 100644
--- a/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
+++ b/data/maps/LilycoveCity_MoveDeletersHouse/scripts.inc
@@ -18,7 +18,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_ChooseMonAndMoveToForget::
msgbox LilycoveCity_MoveDeletersHouse_Text_WhichMonShouldForget, MSGBOX_DEFAULT
special ChoosePartyMon
waitstate
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_ComeAgain
special IsSelectedMonEgg
compare VAR_RESULT, TRUE
diff --git a/data/maps/LittlerootTown/scripts.inc b/data/maps/LittlerootTown/scripts.inc
index 1936b5ad8..f8a7244bf 100644
--- a/data/maps/LittlerootTown/scripts.inc
+++ b/data/maps/LittlerootTown/scripts.inc
@@ -129,7 +129,7 @@ LittlerootTown_EventScript_StepOffTruckMale::
setvar VAR_0x8005, 8
call LittlerootTown_EventScript_GoInsideWithMom
setflag FLAG_HIDE_LITTLEROOT_TOWN_BRENDANS_HOUSE_TRUCK
- warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 255, 8, 8
+ warpsilent MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, 8, 8
waitstate
releaseall
end
@@ -140,7 +140,7 @@ LittlerootTown_EventScript_StepOffTruckFemale::
setvar VAR_0x8005, 8
call LittlerootTown_EventScript_GoInsideWithMom
setflag FLAG_HIDE_LITTLEROOT_TOWN_MAYS_HOUSE_TRUCK
- warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 255, 2, 8
+ warpsilent MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F, 2, 8
waitstate
releaseall
end
@@ -230,7 +230,7 @@ LittlerootTown_EventScript_BeginDexUpgradeScene::
clearflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCH
delay 20
clearflag FLAG_HIDE_MAP_NAME_POPUP
- warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5
+ warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5
waitstate
releaseall
end
diff --git a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
index 2e4ff739d..15bd96f25 100644
--- a/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_BrendansHouse_1F/scripts.inc
@@ -15,8 +15,8 @@ LittlerootTown_BrendansHouse_1F_OnLoad:
end
LittlerootTown_BrendansHouse_1F_EventScript_SetMovingBoxes::
- setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1
- setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1
+ setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, TRUE
+ setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, TRUE
return
LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual::
@@ -26,7 +26,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_CheckShowShoesManual::
return
LittlerootTown_BrendansHouse_1F_EventScript_ShowRunningShoesManual::
- setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, 1
+ setmetatile 3, 7, METATILE_BrendansMaysHouse_BookOnTable, TRUE
return
LittlerootTown_BrendansHouse_1F_OnTransition:
@@ -70,7 +70,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_GoUpstairsToSetClock::
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs
applymovement LOCALID_MOM, LittlerootTown_BrendansHouse_1F_Movement_PushTowardStairs
waitmovement 0
- warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 255, 7, 1
+ warp MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, 7, 1
waitstate
releaseall
end
diff --git a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
index 5fcec1951..b022402d0 100644
--- a/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
+++ b/data/maps/LittlerootTown_MaysHouse_1F/scripts.inc
@@ -15,8 +15,8 @@ LittlerootTown_MaysHouse_1F_OnLoad:
end
LittlerootTown_MaysHouse_1F_EventScript_SetMovingBoxes::
- setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, 1
- setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, 1
+ setmetatile 5, 4, METATILE_BrendansMaysHouse_MovingBox_Open, TRUE
+ setmetatile 5, 2, METATILE_BrendansMaysHouse_MovingBox_Closed, TRUE
return
LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual::
@@ -26,7 +26,7 @@ LittlerootTown_MaysHouse_1F_EventScript_CheckShowShoesManual::
return
LittlerootTown_MaysHouse_1F_EventScript_ShowRunningShoesManual::
- setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, 1
+ setmetatile 6, 7, METATILE_BrendansMaysHouse_BookOnTable, TRUE
return
LittlerootTown_MaysHouse_1F_OnTransition:
@@ -69,7 +69,7 @@ LittlerootTown_MaysHouse_1F_EventScript_GoUpstairsToSetClock::
applymovement OBJ_EVENT_ID_PLAYER, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs
applymovement LOCALID_MOM, LittlerootTown_MaysHouse_1F_Movement_PushTowardStairs
waitmovement 0
- warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 255, 1, 1
+ warp MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F, 1, 1
waitstate
releaseall
end
diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
index 0a828c426..857099f26 100644
--- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
+++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
@@ -117,7 +117,7 @@ LittlerootTown_ProfessorBirchsLab_OnFrame:
@ This is just where the game tells you its yours and lets you nickname it
LittlerootTown_ProfessorBirchsLab_EventScript_GiveStarterEvent::
lockall
- bufferleadmonspeciesname 0
+ bufferleadmonspeciesname STR_VAR_1
message LittlerootTown_ProfessorBirchsLab_Text_LikeYouToHavePokemon
waitmessage
playfanfare MUS_OBTAIN_ITEM
@@ -357,7 +357,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime::
end
LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil::
- bufferspeciesname 0, SPECIES_CYNDAQUIL
+ bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL
setvar VAR_TEMP_1, SPECIES_CYNDAQUIL
givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE
compare VAR_RESULT, 0
@@ -402,7 +402,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil::
end
LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile::
- bufferspeciesname 0, SPECIES_TOTODILE
+ bufferspeciesname STR_VAR_1, SPECIES_TOTODILE
setvar VAR_TEMP_1, SPECIES_TOTODILE
givemon SPECIES_TOTODILE, 5, ITEM_NONE
compare VAR_RESULT, 0
@@ -447,7 +447,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile::
end
LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita::
- bufferspeciesname 0, SPECIES_CHIKORITA
+ bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA
setvar VAR_TEMP_1, SPECIES_CHIKORITA
givemon SPECIES_CHIKORITA, 5, ITEM_NONE
compare VAR_RESULT, 0
diff --git a/data/maps/MarineCave_Entrance/scripts.inc b/data/maps/MarineCave_Entrance/scripts.inc
index a075d2c30..172a19d26 100644
--- a/data/maps/MarineCave_Entrance/scripts.inc
+++ b/data/maps/MarineCave_Entrance/scripts.inc
@@ -3,6 +3,6 @@ MarineCave_Entrance_MapScripts::
.byte 0
MarineCave_Entrance_OnResume:
- setdivewarp MAP_UNDERWATER_MARINE_CAVE, 255, 9, 6
+ setdivewarp MAP_UNDERWATER_MARINE_CAVE, 9, 6
end
diff --git a/data/maps/MauvilleCity_BikeShop/scripts.inc b/data/maps/MauvilleCity_BikeShop/scripts.inc
index 45efbe8f3..5ce43c1ba 100644
--- a/data/maps/MauvilleCity_BikeShop/scripts.inc
+++ b/data/maps/MauvilleCity_BikeShop/scripts.inc
@@ -71,10 +71,10 @@ MauvilleCity_BikeShop_EventScript_AskSwitchBikes::
@ If the player does not have a bike on them Rydel assumes its stored in the PC
MauvilleCity_BikeShop_EventScript_SwitchBikes::
msgbox MauvilleCity_BikeShop_Text_IllSwitchBikes, MSGBOX_DEFAULT
- checkitem ITEM_ACRO_BIKE, 1
+ checkitem ITEM_ACRO_BIKE
compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchAcroForMach
- checkitem ITEM_MACH_BIKE, 1
+ checkitem ITEM_MACH_BIKE
compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_BikeShop_EventScript_SwitchMachForAcro
msgbox MauvilleCity_BikeShop_Text_OhYourBikeIsInPC, MSGBOX_DEFAULT
diff --git a/data/maps/MauvilleCity_GameCorner/scripts.inc b/data/maps/MauvilleCity_GameCorner/scripts.inc
index 896dfa680..451e8acb5 100644
--- a/data/maps/MauvilleCity_GameCorner/scripts.inc
+++ b/data/maps/MauvilleCity_GameCorner/scripts.inc
@@ -16,12 +16,12 @@ MauvilleCity_GameCorner_EventScript_CoinsClerk::
lock
faceplayer
msgbox MauvilleCity_GameCorner_Text_ThisIsMauvilleGameCorner, MSGBOX_DEFAULT
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NeedCoinCase
message MauvilleCity_GameCorner_Text_WereYouLookingForCoins
waitmessage
- showmoneybox 0, 0, 0
+ showmoneybox 0, 0
showcoinsbox 1, 6
goto MauvilleCity_GameCorner_EventScript_ChooseCoinsDefault50
@@ -46,12 +46,12 @@ MauvilleCity_GameCorner_EventScript_Buy50Coins::
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, (MAX_COINS + 1 - 50)
goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins
- checkmoney COINS_PRICE_50, 0
+ checkmoney COINS_PRICE_50
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney
addcoins 50
- removemoney COINS_PRICE_50, 0
- updatemoneybox 0, 0
+ removemoney COINS_PRICE_50
+ updatemoneybox
updatecoinsbox 1, 6
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT
@@ -64,12 +64,12 @@ MauvilleCity_GameCorner_EventScript_Buy500Coins::
checkcoins VAR_TEMP_1
compare VAR_TEMP_1, (MAX_COINS + 1 - 500)
goto_if_ge MauvilleCity_GameCorner_EventScript_NoRoomForCoins
- checkmoney COINS_PRICE_500, 0
+ checkmoney COINS_PRICE_500
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NotEnoughMoney
addcoins 500
- removemoney COINS_PRICE_500, 0
- updatemoneybox 0, 0
+ removemoney COINS_PRICE_500
+ updatemoneybox
updatecoinsbox 1, 6
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_ThankYouHereAreYourCoins, MSGBOX_DEFAULT
@@ -108,7 +108,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerDolls::
lock
faceplayer
msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseDollPrizeMessage
release
@@ -138,17 +138,17 @@ MauvilleCity_GameCorner_EventScript_ChooseDollPrize::
MauvilleCity_GameCorner_EventScript_TreeckoDoll::
setvar VAR_TEMP_1, 1
- bufferdecorationname 0, DECOR_TREECKO_DOLL
+ bufferdecorationname STR_VAR_1, DECOR_TREECKO_DOLL
goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize
MauvilleCity_GameCorner_EventScript_TorchicDoll::
setvar VAR_TEMP_1, 2
- bufferdecorationname 0, DECOR_TORCHIC_DOLL
+ bufferdecorationname STR_VAR_1, DECOR_TORCHIC_DOLL
goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize
MauvilleCity_GameCorner_EventScript_MudkipDoll::
setvar VAR_TEMP_1, 3
- bufferdecorationname 0, DECOR_MUDKIP_DOLL
+ bufferdecorationname STR_VAR_1, DECOR_MUDKIP_DOLL
goto MauvilleCity_GameCorner_EventScript_ConfirmDollPrize
MauvilleCity_GameCorner_EventScript_ConfirmDollPrize::
@@ -165,7 +165,7 @@ MauvilleCity_GameCorner_EventScript_BuyTreeckoDoll::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, DOLL_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll
- bufferdecorationname 1, DECOR_TREECKO_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL
checkdecorspace DECOR_TREECKO_DOLL
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll
@@ -181,7 +181,7 @@ MauvilleCity_GameCorner_EventScript_BuyTorchicDoll::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, DOLL_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll
- bufferdecorationname 1, DECOR_TORCHIC_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL
checkdecorspace DECOR_TORCHIC_DOLL
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll
@@ -197,7 +197,7 @@ MauvilleCity_GameCorner_EventScript_BuyMudkipDoll::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, DOLL_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForDoll
- bufferdecorationname 1, DECOR_MUDKIP_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL
checkdecorspace DECOR_MUDKIP_DOLL
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForDoll
@@ -229,7 +229,7 @@ MauvilleCity_GameCorner_EventScript_PrizeCornerTMs::
lock
faceplayer
msgbox MauvilleCity_GameCorner_Text_ExchangeCoinsForPrizes, MSGBOX_DEFAULT
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_GameCorner_EventScript_ChooseTMPrizeMessage
release
@@ -261,31 +261,31 @@ MauvilleCity_GameCorner_EventScript_ChooseTMPrize::
MauvilleCity_GameCorner_EventScript_TM32::
setvar VAR_TEMP_1, 1
- bufferitemname 0, ITEM_TM32
+ bufferitemname STR_VAR_1, ITEM_TM32
setvar VAR_0x8004, ITEM_TM32
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM29::
setvar VAR_TEMP_1, 2
- bufferitemname 0, ITEM_TM29
+ bufferitemname STR_VAR_1, ITEM_TM29
setvar VAR_0x8004, ITEM_TM29
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM35::
setvar VAR_TEMP_1, 3
- bufferitemname 0, ITEM_TM35
+ bufferitemname STR_VAR_1, ITEM_TM35
setvar VAR_0x8004, ITEM_TM35
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM24::
setvar VAR_TEMP_1, 4
- bufferitemname 0, ITEM_TM24
+ bufferitemname STR_VAR_1, ITEM_TM24
setvar VAR_0x8004, ITEM_TM24
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM13::
setvar VAR_TEMP_1, 5
- bufferitemname 0, ITEM_TM13
+ bufferitemname STR_VAR_1, ITEM_TM13
setvar VAR_0x8004, ITEM_TM13
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
@@ -306,7 +306,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM32::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM32_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
- checkitemspace ITEM_TM32, 1
+ checkitemspace ITEM_TM32
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM32_COINS
@@ -321,7 +321,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM29::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM29_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
- checkitemspace ITEM_TM29, 1
+ checkitemspace ITEM_TM29
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM29_COINS
@@ -336,7 +336,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM35::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM35_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
- checkitemspace ITEM_TM35, 1
+ checkitemspace ITEM_TM35
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM35_COINS
@@ -351,7 +351,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM24::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM24_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
- checkitemspace ITEM_TM24, 1
+ checkitemspace ITEM_TM24
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM24_COINS
@@ -366,7 +366,7 @@ MauvilleCity_GameCorner_EventScript_BuyTM13::
checkcoins VAR_TEMP_2
compare VAR_TEMP_2, TM13_COINS
goto_if_lt MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
- checkitemspace ITEM_TM13, 1
+ checkitemspace ITEM_TM13
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM13_COINS
@@ -415,7 +415,7 @@ MauvilleCity_GameCorner_EventScript_Girl::
end
MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll::
- bufferdecorationname 1, DECOR_TREECKO_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_TREECKO_DOLL
checkdecorspace DECOR_TREECKO_DOLL
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll
@@ -426,7 +426,7 @@ MauvilleCity_GameCorner_EventScript_GiveTreeckoDoll::
end
MauvilleCity_GameCorner_EventScript_GiveTorchicDoll::
- bufferdecorationname 1, DECOR_TORCHIC_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_TORCHIC_DOLL
checkdecorspace DECOR_TORCHIC_DOLL
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll
@@ -437,7 +437,7 @@ MauvilleCity_GameCorner_EventScript_GiveTorchicDoll::
end
MauvilleCity_GameCorner_EventScript_GiveMudkipDoll::
- bufferdecorationname 1, DECOR_MUDKIP_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_MUDKIP_DOLL
checkdecorspace DECOR_MUDKIP_DOLL
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoRoomForStarterDoll
@@ -466,7 +466,7 @@ MauvilleCity_GameCorner_EventScript_ReceivedStarterDoll::
MauvilleCity_GameCorner_EventScript_PokefanM::
lock
faceplayer
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_GameCorner_EventScript_TryGive20Coins
msgbox MauvilleCity_GameCorner_Text_NeedCoinCaseGoNextDoor, MSGBOX_DEFAULT
@@ -534,7 +534,7 @@ MauvilleCity_GameCorner_EventScript_Woman::
MauvilleCity_GameCorner_EventScript_SlotMachine0::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 0
@@ -545,7 +545,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine0::
MauvilleCity_GameCorner_EventScript_SlotMachine1::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 1
@@ -556,7 +556,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine1::
MauvilleCity_GameCorner_EventScript_SlotMachine2::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 2
@@ -567,7 +567,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine2::
MauvilleCity_GameCorner_EventScript_SlotMachine3::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 3
@@ -578,7 +578,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine3::
MauvilleCity_GameCorner_EventScript_SlotMachine4::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 4
@@ -589,7 +589,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine4::
MauvilleCity_GameCorner_EventScript_SlotMachine5::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 5
@@ -600,7 +600,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine5::
MauvilleCity_GameCorner_EventScript_SlotMachine6::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 6
@@ -611,7 +611,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine6::
MauvilleCity_GameCorner_EventScript_SlotMachine7::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 7
@@ -622,7 +622,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine7::
MauvilleCity_GameCorner_EventScript_SlotMachine8::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 8
@@ -633,7 +633,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine8::
MauvilleCity_GameCorner_EventScript_SlotMachine9::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 9
@@ -644,7 +644,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine9::
MauvilleCity_GameCorner_EventScript_SlotMachine10::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 10
@@ -655,7 +655,7 @@ MauvilleCity_GameCorner_EventScript_SlotMachine10::
MauvilleCity_GameCorner_EventScript_SlotMachine11::
lockall
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 11
diff --git a/data/maps/MauvilleCity_Gym/scripts.inc b/data/maps/MauvilleCity_Gym/scripts.inc
index 3c09ecfa2..d446e44b9 100644
--- a/data/maps/MauvilleCity_Gym/scripts.inc
+++ b/data/maps/MauvilleCity_Gym/scripts.inc
@@ -17,32 +17,32 @@ MauvilleCity_Gym_EventScript_UpdateBarriers::
end
MauvilleCity_Gym_EventScript_SetAltBarriers::
- 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, 10, METATILE_MauvilleGym_RedBeamH1_On, 0
- setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, 0
- setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, 1
- setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, 1
- setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, 0
- setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, 0
- setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, 1
- setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, 1
- setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, 0
- setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, 0
- setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, 0
- setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, 0
- setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, 0
- setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, 0
- setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, 0
- setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, 0
- setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, 1
- setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, 0
- setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, 0
- setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, 0
- setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, 0
- setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, 0
- setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, 0
+ setmetatile 3, 11, METATILE_MauvilleGym_RedBeamV1_On, TRUE
+ setmetatile 3, 12, METATILE_MauvilleGym_RedBeamV2_On, TRUE
+ setmetatile 3, 13, METATILE_MauvilleGym_PoleTop_On, TRUE
+ setmetatile 4, 10, METATILE_MauvilleGym_RedBeamH1_On, FALSE
+ setmetatile 5, 10, METATILE_MauvilleGym_RedBeamH2_On, FALSE
+ setmetatile 4, 11, METATILE_MauvilleGym_RedBeamH3_On, TRUE
+ setmetatile 5, 11, METATILE_MauvilleGym_RedBeamH4_On, TRUE
+ setmetatile 7, 10, METATILE_MauvilleGym_RedBeamH1_On, FALSE
+ setmetatile 8, 10, METATILE_MauvilleGym_RedBeamH2_On, FALSE
+ setmetatile 7, 11, METATILE_MauvilleGym_RedBeamH3_On, TRUE
+ setmetatile 8, 11, METATILE_MauvilleGym_RedBeamH4_On, TRUE
+ setmetatile 4, 13, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE
+ setmetatile 5, 13, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE
+ setmetatile 4, 14, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE
+ setmetatile 5, 14, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE
+ setmetatile 1, 10, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE
+ setmetatile 2, 10, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE
+ setmetatile 1, 11, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE
+ setmetatile 2, 11, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE
+ setmetatile 6, 8, METATILE_MauvilleGym_PoleBottom_On, TRUE
+ setmetatile 6, 9, METATILE_MauvilleGym_FloorTile, FALSE
+ setmetatile 6, 10, METATILE_MauvilleGym_PoleTop_Off, FALSE
+ setmetatile 4, 6, METATILE_MauvilleGym_GreenBeamH1_Off, FALSE
+ setmetatile 5, 6, METATILE_MauvilleGym_GreenBeamH2_Off, FALSE
+ setmetatile 4, 7, METATILE_MauvilleGym_GreenBeamH3_Off, FALSE
+ setmetatile 5, 7, METATILE_MauvilleGym_GreenBeamH4_Off, FALSE
end
MauvilleCity_Gym_EventScript_Switch1Pressed::
diff --git a/data/maps/MauvilleCity_House2/scripts.inc b/data/maps/MauvilleCity_House2/scripts.inc
index 178b79f9b..441a4f165 100644
--- a/data/maps/MauvilleCity_House2/scripts.inc
+++ b/data/maps/MauvilleCity_House2/scripts.inc
@@ -6,7 +6,7 @@ MauvilleCity_House2_EventScript_Woman::
faceplayer
goto_if_set FLAG_RECEIVED_COIN_CASE, MauvilleCity_House2_EventScript_ReceivedCoinCase
msgbox MauvilleCity_House2_Text_BuyHarborMailAtSlateport, MSGBOX_DEFAULT
- checkitem ITEM_HARBOR_MAIL, 1
+ checkitem ITEM_HARBOR_MAIL
compare VAR_RESULT, TRUE
goto_if_eq MauvilleCity_House2_EventScript_AskToTradeForHarborMail
release
diff --git a/data/maps/MeteorFalls_1F_1R/scripts.inc b/data/maps/MeteorFalls_1F_1R/scripts.inc
index 23ae9728d..b81f5de26 100644
--- a/data/maps/MeteorFalls_1F_1R/scripts.inc
+++ b/data/maps/MeteorFalls_1F_1R/scripts.inc
@@ -13,10 +13,10 @@ MeteorFalls_1F_1R_OnLoad:
end
MeteorFalls_1F_1R_EventScript_OpenStevensCave::
- setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, 1
- setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, 1
- setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, 0
- setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, 1
+ setmetatile 4, 1, METATILE_MeteorFalls_CaveEntrance_Top, TRUE
+ setmetatile 3, 2, METATILE_MeteorFalls_CaveEntrance_Left, TRUE
+ setmetatile 4, 2, METATILE_MeteorFalls_CaveEntrance_Bottom, FALSE
+ setmetatile 5, 2, METATILE_MeteorFalls_CaveEntrance_Right, TRUE
return
MeteorFalls_1F_1R_EventScript_MagmaStealsMeteoriteScene::
diff --git a/data/maps/MirageTower_2F/scripts.inc b/data/maps/MirageTower_2F/scripts.inc
index 3d53359d4..39d2be7f4 100644
--- a/data/maps/MirageTower_2F/scripts.inc
+++ b/data/maps/MirageTower_2F/scripts.inc
@@ -6,6 +6,6 @@ MirageTower_2F_MapScripts::
MirageTower_2F_SetHoleWarp:
setstepcallback STEP_CB_CRACKED_FLOOR
- setholewarp MAP_MIRAGE_TOWER_1F, 255, 0, 0
+ setholewarp MAP_MIRAGE_TOWER_1F
end
diff --git a/data/maps/MirageTower_3F/scripts.inc b/data/maps/MirageTower_3F/scripts.inc
index 02b086400..1b2f04aee 100644
--- a/data/maps/MirageTower_3F/scripts.inc
+++ b/data/maps/MirageTower_3F/scripts.inc
@@ -6,6 +6,6 @@ MirageTower_3F_MapScripts::
MirageTower_3F_SetHoleWarp:
setstepcallback STEP_CB_CRACKED_FLOOR
- setholewarp MAP_MIRAGE_TOWER_2F, 255, 0, 0
+ setholewarp MAP_MIRAGE_TOWER_2F
end
diff --git a/data/maps/MirageTower_4F/scripts.inc b/data/maps/MirageTower_4F/scripts.inc
index 2c96710d1..8d88c6990 100644
--- a/data/maps/MirageTower_4F/scripts.inc
+++ b/data/maps/MirageTower_4F/scripts.inc
@@ -57,7 +57,7 @@ MirageTower_4F_EventScript_CollapseMirageTower::
waitstate
setvar VAR_MIRAGE_TOWER_STATE, 1
clearflag FLAG_LANDMARK_MIRAGE_TOWER
- warp MAP_ROUTE111, 255, 19, 59
+ warp MAP_ROUTE111, 19, 59
waitstate
release
end
diff --git a/data/maps/MossdeepCity_Gym/scripts.inc b/data/maps/MossdeepCity_Gym/scripts.inc
index 22c2e17ab..7b63de2e7 100644
--- a/data/maps/MossdeepCity_Gym/scripts.inc
+++ b/data/maps/MossdeepCity_Gym/scripts.inc
@@ -26,26 +26,26 @@ MossdeepCity_Gym_EventScript_CheckSwitch4::
@ All the below set metatile scripts are leftover from RS and are functionally unused
MossdeepCity_Gym_EventScript_SetSwitch1Metatiles::
- setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0
- setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
+ setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_CheckSwitch2
end
MossdeepCity_Gym_EventScript_SetSwitch2Metatiles::
- setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0
- setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
+ setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_CheckSwitch3
end
MossdeepCity_Gym_EventScript_SetSwitch3Metatiles::
- setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0
- setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE
+ setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_CheckSwitch4
end
MossdeepCity_Gym_EventScript_SetSwitch4Metatiles::
- setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0
- setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE
+ setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE
end
MossdeepCity_Gym_EventScript_TateAndLiza::
@@ -119,8 +119,8 @@ MossdeepCity_Gym_EventScript_Switch1::
setflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, 0
- setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
+ setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -134,8 +134,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch1::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, 0
- setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, 1
+ setmetatile 5, 5, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE
+ setmetatile 2, 7, METATILE_RS_MossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -145,8 +145,8 @@ MossdeepCity_Gym_EventScript_Switch2::
setflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, 0
- setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
+ setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -154,8 +154,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch2::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, 0
- setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, 1
+ setmetatile 8, 14, METATILE_RS_MossdeepGym_RedArrow_Down, FALSE
+ setmetatile 8, 10, METATILE_RS_MossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -165,8 +165,8 @@ MossdeepCity_Gym_EventScript_Switch3::
setflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, 0
- setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Left, FALSE
+ setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -174,8 +174,8 @@ MossdeepCity_Gym_EventScript_ClearSwitch3::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, 0
- setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, 1
+ setmetatile 15, 17, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
+ setmetatile 17, 15, METATILE_RS_MossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -185,8 +185,8 @@ MossdeepCity_Gym_EventScript_Switch4::
setflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, 0
- setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, 1
+ setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Up, FALSE
+ setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Down, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
@@ -194,14 +194,14 @@ MossdeepCity_Gym_EventScript_ClearSwitch4::
clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_Gym_Movement_WaitAfterSwitchUse
waitmovement 0
- setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, 0
- setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, 1
+ setmetatile 1, 23, METATILE_RS_MossdeepGym_RedArrow_Right, FALSE
+ setmetatile 5, 24, METATILE_RS_MossdeepGym_Switch_Up, TRUE
goto MossdeepCity_Gym_EventScript_DrawMapAfterSwitchUsed
end
MossdeepCity_Gym_EventScript_WarpToEntrance::
lockall
- warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 255, 7, 30
+ warpmossdeepgym MAP_MOSSDEEP_CITY_GYM, 7, 30
waitstate
releaseall
end
diff --git a/data/maps/MossdeepCity_House1/scripts.inc b/data/maps/MossdeepCity_House1/scripts.inc
index 99224a795..1bb1dede6 100644
--- a/data/maps/MossdeepCity_House1/scripts.inc
+++ b/data/maps/MossdeepCity_House1/scripts.inc
@@ -4,7 +4,7 @@ MossdeepCity_House1_MapScripts::
MossdeepCity_House1_EventScript_BlackBelt::
lock
faceplayer
- bufferleadmonspeciesname 0
+ bufferleadmonspeciesname STR_VAR_1
msgbox MossdeepCity_House1_Text_HmmYourPokemon, MSGBOX_DEFAULT
specialvar VAR_RESULT, GetPokeblockNameByMonNature
compare VAR_RESULT, 0
diff --git a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
index b44b343a6..4177c73ac 100644
--- a/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
+++ b/data/maps/MossdeepCity_SpaceCenter_1F/scripts.inc
@@ -52,7 +52,7 @@ MossdeepCity_SpaceCenter_1F_OnLoad:
end
MossdeepCity_SpaceCenter_1F_EventScript_SetMagmaNote::
- setmetatile 2, 5, METATILE_Facility_DataPad, 1
+ setmetatile 2, 5, METATILE_Facility_DataPad, TRUE
return
MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter::
@@ -62,7 +62,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounter::
goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma
dotimebasedevents
specialvar VAR_RESULT, GetWeekCount
- buffernumberstring 0, VAR_RESULT
+ buffernumberstring STR_VAR_1, VAR_RESULT
compare VAR_RESULT, 0
call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYet
compare VAR_RESULT, 1
@@ -84,7 +84,7 @@ MossdeepCity_SpaceCenter_1F_EventScript_ShowLaunchNumber::
MossdeepCity_SpaceCenter_1F_EventScript_RocketLaunchCounterMagma::
dotimebasedevents
specialvar VAR_RESULT, GetWeekCount
- buffernumberstring 0, VAR_RESULT
+ buffernumberstring STR_VAR_1, VAR_RESULT
compare VAR_RESULT, 0
call_if_eq MossdeepCity_SpaceCenter_1F_EventScript_NoLaunchesYetMagma
compare VAR_RESULT, 1
diff --git a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
index 044979c12..02278a13b 100644
--- a/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
+++ b/data/maps/MossdeepCity_SpaceCenter_2F/scripts.inc
@@ -54,7 +54,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_ThreeMagmaGrunts::
closemessage
applymovement OBJ_EVENT_ID_PLAYER, MossdeepCity_SpaceCenter_2F_Movement_PlayerExit
waitmovement 0
- warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 255, 13, 1
+ warp MAP_MOSSDEEP_CITY_SPACE_CENTER_1F, 13, 1
waitstate
releaseall
end
diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc
index 22b26f392..a5a3d0980 100644
--- a/data/maps/MossdeepCity_StevensHouse/scripts.inc
+++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc
@@ -12,7 +12,7 @@ MossdeepCity_StevensHouse_OnLoad:
end
MossdeepCity_StevensHouse_EventScript_HideStevensNote::
- setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, 1
+ setmetatile 6, 4, METATILE_GenericBuilding_TableEdge, TRUE
return
MossdeepCity_StevensHouse_OnTransition:
@@ -121,13 +121,13 @@ MossdeepCity_StevensHouse_EventScript_BeldumTransferredToPC::
end
MossdeepCity_StevensHouse_EventScript_ReceivedBeldumFanfare::
- bufferspeciesname 1, SPECIES_BELDUM
+ bufferspeciesname STR_VAR_2, SPECIES_BELDUM
removeobject LOCALID_BELDUM_BALL
playfanfare MUS_OBTAIN_ITEM
message MossdeepCity_StevensHouse_Text_ObtainedBeldum
waitmessage
waitfanfare
- bufferspeciesname 0, SPECIES_BELDUM
+ bufferspeciesname STR_VAR_1, SPECIES_BELDUM
return
MossdeepCity_StevensHouse_EventScript_ReceivedBeldum::
diff --git a/data/maps/MtChimney/scripts.inc b/data/maps/MtChimney/scripts.inc
index 320e2dc19..7081e54de 100644
--- a/data/maps/MtChimney/scripts.inc
+++ b/data/maps/MtChimney/scripts.inc
@@ -107,15 +107,15 @@ MtChimney_EventScript_ArchieExitNorth::
MtChimney_EventScript_LavaCookieLady::
lock
faceplayer
- showmoneybox 0, 0, 0
+ showmoneybox 0, 0
msgbox MtChimney_Text_LavaCookiesJust200, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq MtChimney_EventScript_DeclineLavaCookie
- checkmoney 200, 0
+ checkmoney 200
compare VAR_RESULT, FALSE
goto_if_eq MtChimney_EventScript_NotEnoughMoney
msgbox MtChimney_Text_ThankYouDear, MSGBOX_DEFAULT
- checkitemspace ITEM_LAVA_COOKIE, 1
+ checkitemspace ITEM_LAVA_COOKIE
compare VAR_RESULT, TRUE
call_if_eq MtChimney_EventScript_RemoveMoney
giveitem ITEM_LAVA_COOKIE
@@ -132,8 +132,8 @@ MtChimney_EventScript_BagIsFull::
end
MtChimney_EventScript_RemoveMoney::
- removemoney 200, 0
- updatemoneybox 0, 0
+ removemoney 200
+ updatemoneybox
return
MtChimney_EventScript_DeclineLavaCookie::
diff --git a/data/maps/MtPyre_2F/scripts.inc b/data/maps/MtPyre_2F/scripts.inc
index 9fe7bf9d2..381d03459 100644
--- a/data/maps/MtPyre_2F/scripts.inc
+++ b/data/maps/MtPyre_2F/scripts.inc
@@ -6,7 +6,7 @@ MtPyre_2F_MapScripts::
MtPyre_2F_SetHoleWarp:
setstepcallback STEP_CB_CRACKED_FLOOR
- setholewarp MAP_MT_PYRE_1F, 255, 0, 0
+ setholewarp MAP_MT_PYRE_1F
end
MtPyre_2F_EventScript_Woman::
diff --git a/data/maps/NavelRock_Harbor/scripts.inc b/data/maps/NavelRock_Harbor/scripts.inc
index b12e62248..759434cde 100644
--- a/data/maps/NavelRock_Harbor/scripts.inc
+++ b/data/maps/NavelRock_Harbor/scripts.inc
@@ -18,7 +18,7 @@ NavelRock_Harbor_EventScript_Sailor::
hideobjectat LOCALID_SAILOR, MAP_NAVEL_ROCK_HARBOR
setvar VAR_0x8004, LOCALID_SS_TIDAL
call Common_EventScript_FerryDepartIsland
- warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
+ warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
end
diff --git a/data/maps/NewMauville_Entrance/scripts.inc b/data/maps/NewMauville_Entrance/scripts.inc
index 0a98d4ba6..50582ce38 100644
--- a/data/maps/NewMauville_Entrance/scripts.inc
+++ b/data/maps/NewMauville_Entrance/scripts.inc
@@ -9,12 +9,12 @@ NewMauville_Entrance_OnLoad:
end
NewMauville_Entrance_EventScript_CloseDoor::
- 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
+ setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile0, TRUE
+ setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile1, TRUE
+ setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Closed_Tile2, TRUE
+ setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile3, TRUE
+ setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile4, TRUE
+ setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Closed_Tile5, TRUE
return
NewMauville_Entrance_OnTransition:
@@ -26,19 +26,19 @@ NewMauville_Entrance_EventScript_Door::
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
msgbox NewMauville_Entrance_Text_DoorIsLocked, MSGBOX_DEFAULT
- checkitem ITEM_BASEMENT_KEY, 1
+ checkitem ITEM_BASEMENT_KEY
compare VAR_RESULT, FALSE
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
msgbox NewMauville_Entrance_Text_UseBasementKey, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq NewMauville_Entrance_EventScript_DontOpenDoor
msgbox NewMauville_Entrance_Text_UsedBasementKey, MSGBOX_DEFAULT
- 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
+ setmetatile 3, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile0, FALSE
+ setmetatile 4, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile1, FALSE
+ setmetatile 5, 0, METATILE_Facility_NewMauvilleDoor_Open_Tile2, FALSE
+ setmetatile 3, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile3, TRUE
+ setmetatile 4, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile4, FALSE
+ setmetatile 5, 1, METATILE_Facility_NewMauvilleDoor_Open_Tile5, TRUE
special DrawWholeMapView
playse SE_BANG
setvar VAR_NEW_MAUVILLE_STATE, 1
diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc
index d924651ce..543b030e1 100644
--- a/data/maps/NewMauville_Inside/scripts.inc
+++ b/data/maps/NewMauville_Inside/scripts.inc
@@ -65,83 +65,83 @@ NewMauville_Inside_EventScript_GreenButton::
end
NewMauville_Inside_EventScript_SetBarrierStateBlueButton::
- 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
+ setmetatile 23, 34, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 23, 35, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 23, 36, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 23, 37, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 10, 16, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 10, 17, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 10, 18, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 10, 19, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 10, 0, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 10, 1, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 10, 2, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 10, 3, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 37, 33, METATILE_BikeShop_Barrier_Green_Top, TRUE
+ setmetatile 37, 34, METATILE_BikeShop_Barrier_Green_TopMid, TRUE
+ setmetatile 37, 35, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE
+ setmetatile 37, 36, METATILE_BikeShop_Barrier_Green_Bottom, TRUE
+ setmetatile 28, 22, METATILE_BikeShop_Barrier_Green_Top, TRUE
+ setmetatile 28, 23, METATILE_BikeShop_Barrier_Green_TopMid, TRUE
+ setmetatile 28, 24, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE
+ setmetatile 28, 25, METATILE_BikeShop_Barrier_Green_Bottom, TRUE
+ setmetatile 10, 24, METATILE_BikeShop_Barrier_Green_Top, TRUE
+ setmetatile 10, 25, METATILE_BikeShop_Barrier_Green_TopMid, TRUE
+ setmetatile 10, 26, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE
+ setmetatile 10, 27, METATILE_BikeShop_Barrier_Green_Bottom, TRUE
+ setmetatile 21, 2, METATILE_BikeShop_Barrier_Green_Top, TRUE
+ setmetatile 21, 3, METATILE_BikeShop_Barrier_Green_TopMid, TRUE
+ setmetatile 21, 4, METATILE_BikeShop_Barrier_Green_BottomMid, TRUE
+ setmetatile 21, 5, METATILE_BikeShop_Barrier_Green_Bottom, TRUE
+ setmetatile 6, 11, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 13, 10, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 16, 22, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 4, 26, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 30, 38, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 2, 11, METATILE_BikeShop_Button_Green, FALSE
+ setmetatile 17, 10, METATILE_BikeShop_Button_Green, FALSE
+ setmetatile 25, 18, METATILE_BikeShop_Button_Green, FALSE
+ setmetatile 18, 36, METATILE_BikeShop_Button_Green, FALSE
return
NewMauville_Inside_EventScript_SetBarrierStateGreenButton::
- 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
+ setmetatile 23, 34, METATILE_BikeShop_Barrier_Blue_Top, TRUE
+ setmetatile 23, 35, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE
+ setmetatile 23, 36, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE
+ setmetatile 23, 37, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE
+ setmetatile 10, 16, METATILE_BikeShop_Barrier_Blue_Top, TRUE
+ setmetatile 10, 17, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE
+ setmetatile 10, 18, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE
+ setmetatile 10, 19, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE
+ setmetatile 10, 0, METATILE_BikeShop_Barrier_Blue_Top, TRUE
+ setmetatile 10, 1, METATILE_BikeShop_Barrier_Blue_TopMid, TRUE
+ setmetatile 10, 2, METATILE_BikeShop_Barrier_Blue_BottomMid, TRUE
+ setmetatile 10, 3, METATILE_BikeShop_Barrier_Blue_Bottom, TRUE
+ setmetatile 37, 33, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 37, 34, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 37, 35, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 37, 36, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 28, 22, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 28, 23, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 28, 24, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 28, 25, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 10, 24, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 10, 25, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 10, 26, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 10, 27, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 21, 2, METATILE_BikeShop_Barrier_Hidden_Top, TRUE
+ setmetatile 21, 3, METATILE_BikeShop_Barrier_Hidden_Bottom, TRUE
+ setmetatile 21, 4, METATILE_BikeShop_Floor_Shadow_Top, FALSE
+ setmetatile 21, 5, METATILE_BikeShop_Wall_Edge_Top, FALSE
+ setmetatile 2, 11, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 17, 10, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 25, 18, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 18, 36, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 6, 11, METATILE_BikeShop_Button_Blue, FALSE
+ setmetatile 13, 10, METATILE_BikeShop_Button_Blue, FALSE
+ setmetatile 16, 22, METATILE_BikeShop_Button_Blue, FALSE
+ setmetatile 4, 26, METATILE_BikeShop_Button_Blue, FALSE
+ setmetatile 30, 38, METATILE_BikeShop_Button_Blue, FALSE
return
NewMauville_Inside_EventScript_RedButton::
@@ -153,15 +153,15 @@ NewMauville_Inside_EventScript_RedButton::
end
NewMauville_Inside_EventScript_SetGeneratorOffMetatiles::
- 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
+ setmetatile 33, 6, METATILE_BikeShop_Button_Pressed, FALSE
+ setmetatile 32, 2, METATILE_BikeShop_Generator_Off_Tile0, TRUE
+ setmetatile 33, 2, METATILE_BikeShop_Generator_Off_Tile1, TRUE
+ setmetatile 34, 2, METATILE_BikeShop_Generator_Off_Tile2, TRUE
+ setmetatile 35, 2, METATILE_BikeShop_Generator_Off_Tile3, TRUE
+ setmetatile 32, 3, METATILE_BikeShop_Generator_Off_Tile4, TRUE
+ setmetatile 33, 3, METATILE_BikeShop_Generator_Off_Tile5, TRUE
+ setmetatile 34, 3, METATILE_BikeShop_Generator_Off_Tile6, TRUE
+ setmetatile 35, 3, METATILE_BikeShop_Generator_Off_Tile7, TRUE
special DrawWholeMapView
return
diff --git a/data/maps/PacifidlogTown_House2/scripts.inc b/data/maps/PacifidlogTown_House2/scripts.inc
index 27f966e96..ea0710c3d 100644
--- a/data/maps/PacifidlogTown_House2/scripts.inc
+++ b/data/maps/PacifidlogTown_House2/scripts.inc
@@ -68,7 +68,7 @@ PacifidlogTown_House2_EventScript_GiveFrustration::
PacifidlogTown_House2_EventScript_ComeBackInXDays::
specialvar VAR_RESULT, GetDaysUntilPacifidlogTMAvailable
- buffernumberstring 0, VAR_RESULT
+ buffernumberstring STR_VAR_1, VAR_RESULT
msgbox PacifidlogTown_House2_Text_GetGoodTMInXDays, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/PacifidlogTown_House3/scripts.inc b/data/maps/PacifidlogTown_House3/scripts.inc
index c53ef0519..fbdeb74a5 100644
--- a/data/maps/PacifidlogTown_House3/scripts.inc
+++ b/data/maps/PacifidlogTown_House3/scripts.inc
@@ -15,7 +15,7 @@ PacifidlogTown_House3_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq PacifidlogTown_House3_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies
@@ -27,7 +27,7 @@ PacifidlogTown_House3_EventScript_Trader::
special CreateInGameTradePokemon
special DoInGameTradeScene
waitstate
- bufferspeciesname 0, VAR_0x8009
+ bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox PacifidlogTown_House3_Text_ItsSubtlyDifferentThankYou, MSGBOX_DEFAULT
setflag FLAG_PACIFIDLOG_NPC_TRADE_COMPLETED
release
@@ -39,7 +39,7 @@ PacifidlogTown_House3_EventScript_DeclineTrade::
end
PacifidlogTown_House3_EventScript_NotRequestedMon::
- bufferspeciesname 0, VAR_0x8009
+ bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox PacifidlogTown_House3_Text_WontAcceptAnyLessThanRealMon, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/PetalburgCity/scripts.inc b/data/maps/PetalburgCity/scripts.inc
index a77939c4d..25b39a3eb 100644
--- a/data/maps/PetalburgCity/scripts.inc
+++ b/data/maps/PetalburgCity/scripts.inc
@@ -60,7 +60,7 @@ PetalburgCity_EventScript_WallyTutorial::
clearflag FLAG_DONT_TRANSITION_MUSIC
special LoadPlayerParty
setvar VAR_PETALBURG_GYM_STATE, 1
- warp MAP_PETALBURG_CITY_GYM, 255, 4, 108
+ warp MAP_PETALBURG_CITY_GYM, 4, 108
waitstate
releaseall
end
@@ -85,7 +85,7 @@ PetalburgCity_EventScript_WalkToWallyHouse::
clearflag FLAG_HIDE_MAP_NAME_POPUP
fadedefaultbgm
clearflag FLAG_DONT_TRANSITION_MUSIC
- warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 255, 2, 4
+ warp MAP_PETALBURG_CITY_WALLYS_HOUSE, 2, 4
waitstate
releaseall
end
diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc
index cae696a50..251f24aa6 100644
--- a/data/maps/PetalburgCity_Gym/scripts.inc
+++ b/data/maps/PetalburgCity_Gym/scripts.inc
@@ -220,7 +220,7 @@ PetalburgCity_Gym_EventScript_BeginWallyTutorial::
clearflag FLAG_HIDE_PETALBURG_GYM_WALLY
setflag FLAG_HIDE_LITTLEROOT_TOWN_BIRCHS_LAB_RIVAL
special InitBirchState
- warp MAP_PETALBURG_CITY, 255, 15, 8
+ warp MAP_PETALBURG_CITY, 15, 8
waitstate
release
end
@@ -383,10 +383,10 @@ PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry::
specialvar VAR_RESULT, IsEnigmaBerryValid
compare VAR_RESULT, FALSE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
- checkitem ITEM_ENIGMA_BERRY, 1
+ checkitem ITEM_ENIGMA_BERRY
compare VAR_RESULT, TRUE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
- checkpcitem ITEM_ENIGMA_BERRY, 1
+ checkpcitem ITEM_ENIGMA_BERRY
compare VAR_RESULT, TRUE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
compare VAR_ENIGMA_BERRY_AVAILABLE, 0
@@ -497,7 +497,7 @@ PetalburgCity_Gym_EventScript_WallysDadArrives::
removeobject LOCALID_WALLYS_DAD
setvar VAR_PETALBURG_CITY_STATE, 4
clearflag FLAG_HIDE_PETALBURG_CITY_WALLYS_DAD
- warp MAP_PETALBURG_CITY, 255, 15, 8
+ warp MAP_PETALBURG_CITY, 15, 8
waitstate
release
end
@@ -796,7 +796,7 @@ PetalburgCity_Gym_EventScript_SpeedRoomDoor::
PetalburgCity_Gym_EventScript_EnterRoom::
closemessage
delay 30
- warpdoor MAP_PETALBURG_CITY_GYM, 255, VAR_0x8008, VAR_0x8009
+ warpdoor MAP_PETALBURG_CITY_GYM, VAR_0x8008, VAR_0x8009
waitstate
releaseall
end
@@ -1138,51 +1138,51 @@ PetalburgCity_Gym_EventScript_OpenOHKORoomDoors::
return
PetalburgCity_Gym_EventScript_SetEntranceRoomDoorMetatiles::
- 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
+ setmetatile 6, 85, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 7, 85, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
+ setmetatile 1, 98, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 2, 98, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetSpeedRoomDoorMetatiles::
- 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
+ setmetatile 6, 46, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 7, 46, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
+ setmetatile 1, 59, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 2, 59, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetAccuracyRoomDoorMetatiles::
- 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
+ setmetatile 6, 59, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 7, 59, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
+ setmetatile 1, 72, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 2, 72, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetConfusionRoomDoorMetatiles::
- setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, 0
- setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, 0
+ setmetatile 1, 20, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 2, 20, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetDefenseRoomDoorMetatiles::
- 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
+ setmetatile 6, 20, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 7, 20, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
+ setmetatile 1, 33, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 2, 33, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetRecoveryRoomDoorMetatiles::
- setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, 0
- setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, 0
+ setmetatile 6, 33, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 7, 33, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetStrengthRoomDoorMetatiles::
- setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0
- setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0
+ setmetatile 1, 7, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 2, 7, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SetOHKORoomDoorMetatiles::
- setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, 0
- setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, 0
+ setmetatile 6, 7, METATILE_PetalburgGym_RoomEntrance_Left, FALSE
+ setmetatile 7, 7, METATILE_PetalburgGym_RoomEntrance_Right, FALSE
return
PetalburgCity_Gym_EventScript_SlideOpenRoomDoors::
diff --git a/data/maps/Route101/scripts.inc b/data/maps/Route101/scripts.inc
index a41bc2fcb..02071aad1 100644
--- a/data/maps/Route101/scripts.inc
+++ b/data/maps/Route101/scripts.inc
@@ -245,7 +245,7 @@ Route101_EventScript_BirchsBag::
call_if_eq Route101_EventScript_HideMayInBedroom
compare VAR_RESULT, FEMALE
call_if_eq Route101_EventScript_HideBrendanInBedroom
- warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 255, 6, 5
+ warp MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, 6, 5
waitstate
release
end
diff --git a/data/maps/Route103/scripts.inc b/data/maps/Route103/scripts.inc
index 4553f431c..cf7bc72b5 100644
--- a/data/maps/Route103/scripts.inc
+++ b/data/maps/Route103/scripts.inc
@@ -15,8 +15,8 @@ Route103_OnLoad:
end
Route103_EventScript_OpenAlteringCave::
- setmetatile 45, 5, METATILE_General_CaveEntrance_Top, 1
- setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, 0
+ setmetatile 45, 5, METATILE_General_CaveEntrance_Top, TRUE
+ setmetatile 45, 6, METATILE_General_CaveEntrance_Bottom, FALSE
return
Route103_EventScript_Rival::
diff --git a/data/maps/Route104/scripts.inc b/data/maps/Route104/scripts.inc
index d58bc5060..4cbe5c045 100644
--- a/data/maps/Route104/scripts.inc
+++ b/data/maps/Route104/scripts.inc
@@ -361,8 +361,8 @@ Route104_EventScript_Girl2::
end
Route104_EventScript_SailToDewford::
- setobjectpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0
+ setobjectsubpriority LOCALID_BRINEY_R104, MAP_ROUTE104, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104, 0
applymovement LOCALID_BRINEY_R104, Route104_Movement_BrineyBoardBoat
waitmovement 0
removeobject LOCALID_BRINEY_R104
@@ -409,7 +409,7 @@ Route104_EventScript_ArriveInDewford::
waitmovement 0
setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8
addobject LOCALID_BRINEY_DEWFORD
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN
applymovement LOCALID_BRINEY_DEWFORD, Route104_Movement_BrineyExitBoat
waitmovement 0
@@ -419,8 +419,8 @@ Route104_EventScript_ArriveInDewford::
setflag FLAG_HIDE_ROUTE_104_MR_BRINEY_BOAT
hideobjectat LOCALID_BOAT_R104, MAP_ROUTE104
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104
- resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE104
+ resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
copyobjectxytoperm LOCALID_BRINEY_DEWFORD
setvar VAR_BOARD_BRINEY_BOAT_STATE, 0
goto_if_unset FLAG_DELIVERED_STEVEN_LETTER, Route104_EventScript_DeliverLetterReminder
diff --git a/data/maps/Route104_MrBrineysHouse/scripts.inc b/data/maps/Route104_MrBrineysHouse/scripts.inc
index f2e169d10..ed2a5d717 100644
--- a/data/maps/Route104_MrBrineysHouse/scripts.inc
+++ b/data/maps/Route104_MrBrineysHouse/scripts.inc
@@ -86,7 +86,7 @@ Route104_MrBrineysHouse_EventScript_SailToDewford::
setvar VAR_ROUTE104_STATE, 2
setflag FLAG_HIDE_RUSTBORO_CITY_RIVAL
setflag FLAG_HIDE_ROUTE_104_RIVAL
- warp MAP_ROUTE104, 255, 13, 51
+ warp MAP_ROUTE104, 13, 51
waitstate
releaseall
end
diff --git a/data/maps/Route105/scripts.inc b/data/maps/Route105/scripts.inc
index b60cd181f..2184edf5a 100644
--- a/data/maps/Route105/scripts.inc
+++ b/data/maps/Route105/scripts.inc
@@ -13,8 +13,8 @@ Route105_OnLoad:
end
Route105_CloseRegiEntrance::
- setmetatile 9, 19, METATILE_General_RockWall_RockBase, 1
- setmetatile 9, 20, METATILE_General_RockWall_SandBase, 1
+ setmetatile 9, 19, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 9, 20, METATILE_General_RockWall_SandBase, TRUE
return
Route105_OnTransition:
diff --git a/data/maps/Route109/scripts.inc b/data/maps/Route109/scripts.inc
index 37852c873..08f0a1701 100644
--- a/data/maps/Route109/scripts.inc
+++ b/data/maps/Route109/scripts.inc
@@ -6,8 +6,8 @@ Route109_MapScripts::
Route109_EventScript_StartDepartForDewford::
call EventScript_BackupMrBrineyLocation
- setobjectpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
- setobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0
+ setobjectsubpriority LOCALID_BRINEY_R109, MAP_ROUTE109, 0
+ setobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109, 0
applymovement LOCALID_BRINEY_R109, Route109_Movement_BrineyEnterBoat
waitmovement 0
removeobject LOCALID_BRINEY_R109
@@ -50,7 +50,7 @@ Route109_EventScript_DoSailToDewford::
clearflag FLAG_HIDE_MR_BRINEY_BOAT_DEWFORD_TOWN
setobjectxyperm LOCALID_BRINEY_DEWFORD, 12, 8
addobject LOCALID_BRINEY_DEWFORD
- setobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
+ setobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN, 0
applymovement LOCALID_BRINEY_DEWFORD, Route109_Movement_BrineyExitBoat
waitmovement 0
clearflag FLAG_HIDE_MR_BRINEY_DEWFORD_TOWN
@@ -59,8 +59,8 @@ Route109_EventScript_DoSailToDewford::
msgbox DewfordTown_Text_BrineyLandedInDewford, MSGBOX_DEFAULT
closemessage
copyvar VAR_BRINEY_LOCATION, VAR_0x8008
- resetobjectpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109
- resetobjectpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
+ resetobjectsubpriority OBJ_EVENT_ID_PLAYER, MAP_ROUTE109
+ resetobjectsubpriority LOCALID_BRINEY_DEWFORD, MAP_DEWFORD_TOWN
copyobjectxytoperm LOCALID_BRINEY_DEWFORD
release
end
diff --git a/data/maps/Route109_SeashoreHouse/scripts.inc b/data/maps/Route109_SeashoreHouse/scripts.inc
index c4cfd1576..d1a892b7c 100644
--- a/data/maps/Route109_SeashoreHouse/scripts.inc
+++ b/data/maps/Route109_SeashoreHouse/scripts.inc
@@ -37,7 +37,7 @@ Route109_SeashoreHouse_EventScript_BagFull::
end
Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop::
- showmoneybox 0, 0, 0
+ showmoneybox 0, 0
msgbox Route109_SeashoreHouse_Text_WantToBuySodaPop, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq Route109_SeashoreHouse_EventScript_BuySodaPop
@@ -47,15 +47,15 @@ Route109_SeashoreHouse_EventScript_AlreadyReceivedSodaPop::
end
Route109_SeashoreHouse_EventScript_BuySodaPop::
- checkmoney 300, 0
+ checkmoney 300
compare VAR_RESULT, FALSE
goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughMoney
- checkitemspace ITEM_SODA_POP, 1
+ checkitemspace ITEM_SODA_POP
compare VAR_RESULT, FALSE
goto_if_eq Route109_SeashoreHouse_EventScript_NotEnoughSpace
msgbox Route109_SeashoreHouse_Text_HereYouGo, MSGBOX_DEFAULT
- removemoney 300, 0
- updatemoneybox 0, 0
+ removemoney 300
+ updatemoneybox
giveitem ITEM_SODA_POP
hidemoneybox
release
diff --git a/data/maps/Route110_TrickHouseEnd/scripts.inc b/data/maps/Route110_TrickHouseEnd/scripts.inc
index f30d74f01..116c3a4fe 100644
--- a/data/maps/Route110_TrickHouseEnd/scripts.inc
+++ b/data/maps/Route110_TrickHouseEnd/scripts.inc
@@ -39,7 +39,7 @@ Route110_TrickHouseEnd_EventScript_CloseDoor::
end
Route110_TrickHouseEnd_EventScript_SetDoorClosedMetatile::
- setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, 1
+ setmetatile 10, 1, METATILE_GenericBuilding_TrickHouse_Door_Closed, TRUE
return
Route110_TrickHouseEnd_EventScript_TrickMaster::
diff --git a/data/maps/Route110_TrickHouseEntrance/scripts.inc b/data/maps/Route110_TrickHouseEntrance/scripts.inc
index e756feadc..a0250c44c 100644
--- a/data/maps/Route110_TrickHouseEntrance/scripts.inc
+++ b/data/maps/Route110_TrickHouseEntrance/scripts.inc
@@ -269,7 +269,7 @@ Route110_TrickHouseEntrance_EventScript_FoundTrickMaster::
call_if_eq Route110_TrickHouseEntrance_EventScript_FoundBeneathCushion
closemessage
setvar VAR_TRICK_HOUSE_FOUND_TRICK_MASTER, 1
- warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 255, 6, 2
+ warpsilent MAP_ROUTE110_TRICK_HOUSE_ENTRANCE, 6, 2
waitstate
releaseall
end
@@ -512,7 +512,7 @@ Route110_TrickHouseEntrance_EventScript_GoInHolePrompt::
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom::
- setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, 0
+ setmetatile 5, 1, METATILE_GenericBuilding_TrickHouse_Stairs_Down, FALSE
special DrawWholeMapView
delay 20
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp
@@ -535,49 +535,49 @@ Route110_TrickHouseEntrance_Movement_EnterRoom:
step_end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom1::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE1, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE1, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom2::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE2, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE2, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom3::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE3, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE3, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom4::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE4, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE4, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom5::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom6::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE6, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE6, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom7::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 0, 21
waitstate
releaseall
end
Route110_TrickHouseEntrance_EventScript_EnterPuzzleRoom8::
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE8, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE8, 0, 21
waitstate
releaseall
end
@@ -618,7 +618,7 @@ Route110_TrickHousePuzzle1_EventScript_Door::
msgbox Route110_TrickHousePuzzle1_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_1_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -629,7 +629,7 @@ Route110_TrickHousePuzzle2_EventScript_Door::
msgbox Route110_TrickHousePuzzle2_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_2_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -640,7 +640,7 @@ Route110_TrickHousePuzzle3_EventScript_Door::
msgbox Route110_TrickHousePuzzle3_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_3_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -651,7 +651,7 @@ Route110_TrickHousePuzzle4_EventScript_Door::
msgbox Route110_TrickHousePuzzle4_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_4_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -662,7 +662,7 @@ Route110_TrickHousePuzzle5_EventScript_Door::
msgbox Route110_TrickHousePuzzle5_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_5_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -673,7 +673,7 @@ Route110_TrickHousePuzzle6_EventScript_Door::
msgbox Route110_TrickHousePuzzle6_Text_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_6_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -684,7 +684,7 @@ Route110_TrickHousePuzzle7_EventScript_Door::
msgbox Route110_TrickHousePuzzle7_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
@@ -695,7 +695,7 @@ Route110_TrickHousePuzzle8_EventScript_Door::
msgbox Route110_TrickHousePuzzle8_EventScript_WroteSecretCodeLockOpened, MSGBOX_DEFAULT
playse SE_PIN
setvar VAR_TRICK_HOUSE_PUZZLE_8_STATE, 2
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
special DrawWholeMapView
releaseall
end
diff --git a/data/maps/Route110_TrickHousePuzzle1/scripts.inc b/data/maps/Route110_TrickHousePuzzle1/scripts.inc
index 6fc6adcd5..920a43819 100644
--- a/data/maps/Route110_TrickHousePuzzle1/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle1/scripts.inc
@@ -8,7 +8,7 @@ Route110_TrickHousePuzzle1_OnLoad:
end
Route110_TrickHousePuzzle1_EventScript_OpenDoor::
- setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, 0
+ setmetatile 13, 1, METATILE_TrickHousePuzzle_Stairs_Down, FALSE
end
Route110_TrickHousePuzzle1_EventScript_Scroll::
diff --git a/data/maps/Route110_TrickHousePuzzle2/scripts.inc b/data/maps/Route110_TrickHousePuzzle2/scripts.inc
index a0222733a..4e8c52cf4 100644
--- a/data/maps/Route110_TrickHousePuzzle2/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle2/scripts.inc
@@ -70,23 +70,23 @@ Route110_TrickHousePuzzle2_EventScript_Button4::
end
Route110_TrickHousePuzzle2_EventScript_PressButton1::
- setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, 0
- setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, 0
+ setmetatile 11, 12, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
+ setmetatile 1, 13, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE
return
Route110_TrickHousePuzzle2_EventScript_PressButton2::
- setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, 0
- setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, 0
+ setmetatile 0, 4, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
+ setmetatile 5, 6, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE
return
Route110_TrickHousePuzzle2_EventScript_PressButton3::
- setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0
- setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, 0
+ setmetatile 14, 5, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
+ setmetatile 7, 15, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE
return
Route110_TrickHousePuzzle2_EventScript_PressButton4::
- setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0
- setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, 0
+ setmetatile 7, 11, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
+ setmetatile 14, 12, METATILE_TrickHousePuzzle_Door_Shuttered, FALSE
return
Route110_TrickHousePuzzle2_EventScript_Ted::
diff --git a/data/maps/Route110_TrickHousePuzzle3/scripts.inc b/data/maps/Route110_TrickHousePuzzle3/scripts.inc
index 4e706268c..2b732124f 100644
--- a/data/maps/Route110_TrickHousePuzzle3/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle3/scripts.inc
@@ -21,10 +21,10 @@ Route110_TrickHousePuzzle3_OnTransition:
end
Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles::
- setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, 0
- setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, 0
- setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, 0
- setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, 0
+ setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Up, FALSE
+ setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Up, FALSE
+ setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Up, FALSE
+ setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Up, FALSE
compare VAR_TEMP_8, 1
call_if_eq Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile
compare VAR_TEMP_8, 2
@@ -36,173 +36,173 @@ Route110_TrickHousePuzzle3_EventScript_UpdateButtonMetatiles::
return
Route110_TrickHousePuzzle3_EventScript_PressedButton1Metatile::
- setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, 0
+ setmetatile 4, 14, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
return
Route110_TrickHousePuzzle3_EventScript_PressedButton2Metatile::
- setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, 0
+ setmetatile 3, 11, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
return
Route110_TrickHousePuzzle3_EventScript_PressedButton3Metatile::
- setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, 0
+ setmetatile 12, 5, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
return
Route110_TrickHousePuzzle3_EventScript_PressedButton4Metatile::
- setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, 0
+ setmetatile 8, 2, METATILE_TrickHousePuzzle_Button_Pressed, FALSE
return
Route110_TrickHousePuzzle3_EventScript_SetDoorsState0::
- 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 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0
- setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0
- setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0
- setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, 0
- setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, 0
- setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, 0
- setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, 0
- setmetatile 5, 16, 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, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1
- setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0
- setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1
- setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0
- setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1
- setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0
- setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1
- setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0
- setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, 1
- setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, 0
- setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1
- setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 2, 13, 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 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1
- setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1
- setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1
- setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 11, 7, 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 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, 0
- setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, 0
- setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, 1
- setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, 1
- setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1
- setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1
- setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, 1
- setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, 1
+ setmetatile 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE
+ setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE
+ setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE
+ setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE
+ setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE
+ setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE
+ setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE
+ setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE
+ setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE
+ setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE
+ setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE
+ setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE
+ setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE
+ setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE
+ setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE
+ setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE
+ setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile0, FALSE
+ setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile1, FALSE
+ setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile2, FALSE
+ setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Open_Tile3, FALSE
+ setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE
+ setmetatile 3, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE
+ setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE
+ setmetatile 3, 14, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE
+ setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE
+ setmetatile 6, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE
+ setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE
+ setmetatile 9, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE
+ setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Retracted, TRUE
+ setmetatile 12, 8, METATILE_TrickHousePuzzle_Floor_ShadowTop, FALSE
+ setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile0, FALSE
+ setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile1, FALSE
+ setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile2, TRUE
+ setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Closed_Tile3, TRUE
+ setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Open0, TRUE
+ setmetatile 3, 17, METATILE_TrickHousePuzzle_RedDoorV_Open1, TRUE
+ setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Open0, TRUE
+ setmetatile 9, 5, METATILE_TrickHousePuzzle_RedDoorV_Open1, TRUE
return
Route110_TrickHousePuzzle3_EventScript_SetDoorsState1::
- 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 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0
- setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0
- setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1
- setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, 1
- setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, 0
- setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, 0
- setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, 1
- setmetatile 5, 16, 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, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1
- setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1
- setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1
- setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1
- setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1
- setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1
- setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1
- setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1
- setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, 1
- setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, 1
- setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0
- setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 2, 13, 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 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0
- setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0
- setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0
- setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 11, 7, 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 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, 0
- setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, 0
- setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, 0
- setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, 0
- setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, 1
- setmetatile 3, 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 1, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE
+ setmetatile 2, 6, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE
+ setmetatile 1, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE
+ setmetatile 2, 7, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE
+ setmetatile 1, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE
+ setmetatile 2, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE
+ setmetatile 1, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE
+ setmetatile 2, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE
+ setmetatile 4, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE
+ setmetatile 5, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE
+ setmetatile 4, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE
+ setmetatile 5, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE
+ setmetatile 13, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE
+ setmetatile 14, 9, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE
+ setmetatile 13, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE
+ setmetatile 14, 10, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE
+ setmetatile 13, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile0, FALSE
+ setmetatile 14, 15, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile1, FALSE
+ setmetatile 13, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile2, TRUE
+ setmetatile 14, 16, METATILE_TrickHousePuzzle_BlueDoorH_Closed_Tile3, TRUE
+ setmetatile 3, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE
+ setmetatile 3, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE
+ setmetatile 3, 13, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE
+ setmetatile 3, 14, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE
+ setmetatile 6, 4, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE
+ setmetatile 6, 5, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE
+ setmetatile 9, 16, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE
+ setmetatile 9, 17, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE
+ setmetatile 12, 7, METATILE_TrickHousePuzzle_BlueDoorV_Open0, TRUE
+ setmetatile 12, 8, METATILE_TrickHousePuzzle_BlueDoorV_Open1, TRUE
+ setmetatile 1, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 2, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 1, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 2, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 1, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 2, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 1, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 2, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 4, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 5, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 4, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 5, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 4, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 5, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 4, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 5, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 4, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 5, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 4, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 5, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 7, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 8, 9, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 7, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 8, 10, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 10, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 11, 6, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 10, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 11, 7, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 10, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 11, 12, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 10, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 11, 13, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 10, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 11, 18, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 10, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 11, 19, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 13, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile0, FALSE
+ setmetatile 14, 3, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile1, FALSE
+ setmetatile 13, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile2, FALSE
+ setmetatile 14, 4, METATILE_TrickHousePuzzle_RedDoorH_Open_Tile3, FALSE
+ setmetatile 3, 16, METATILE_TrickHousePuzzle_RedDoorV_Retracted, TRUE
+ setmetatile 3, 17, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, FALSE
+ setmetatile 9, 4, METATILE_TrickHousePuzzle_RedDoorV_Retracted, TRUE
+ setmetatile 9, 5, METATILE_TrickHousePuzzle_Floor_ShadowTop_Alt, FALSE
return
Route110_TrickHousePuzzle3_EventScript_Button1::
diff --git a/data/maps/Route110_TrickHousePuzzle5/scripts.inc b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
index 3c574441e..c15c4ee73 100644
--- a/data/maps/Route110_TrickHousePuzzle5/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle5/scripts.inc
@@ -465,7 +465,7 @@ Route110_TrickHousePuzzle5_EventScript_IncorrectAnswer::
waitmovement 0
msgbox Route110_TrickHousePuzzle5_Text_WaitForNextChallenge, MSGBOX_DEFAULT
closemessage
- warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 255, 0, 21
+ warp MAP_ROUTE110_TRICK_HOUSE_PUZZLE5, 0, 21
waitstate
releaseall
end
diff --git a/data/maps/Route110_TrickHousePuzzle7/scripts.inc b/data/maps/Route110_TrickHousePuzzle7/scripts.inc
index b0f1cbea1..473c39992 100644
--- a/data/maps/Route110_TrickHousePuzzle7/scripts.inc
+++ b/data/maps/Route110_TrickHousePuzzle7/scripts.inc
@@ -22,53 +22,53 @@ Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles::
@ Leftover from R/S, none of the below metatile scripts are ever called
Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOn::
- setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0
- setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, 1
+ setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE
+ setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOn::
- setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0
- setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, 1
+ setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE
+ setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOn::
- setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, 0
- setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, 1
+ setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE
+ setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOn::
- setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, 0
- setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, 1
+ setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, FALSE
+ setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOn::
- setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0
- setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, 1
+ setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE
+ setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOff::
- setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0
- setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, 1
+ setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE
+ setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOff::
- setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, 0
- setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, 1
+ setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE
+ setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOff::
- setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, 0
- setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, 1
+ setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE
+ setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOff::
- setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, 0
- setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, 1
+ setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, FALSE
+ setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff::
- setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, 0
- setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, 1
+ setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, FALSE
+ setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_OnTransition:
@@ -113,7 +113,7 @@ Route110_TrickHousePuzzle7_EventScript_FoundScroll::
Route110_TrickHousePuzzle7_EventScript_TeleportPad::
lockall
setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1
- warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 255, 3, 19
+ warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 3, 19
waitstate
releaseall
end
diff --git a/data/maps/Route111/scripts.inc b/data/maps/Route111/scripts.inc
index 72e30958a..2007c89f6 100644
--- a/data/maps/Route111/scripts.inc
+++ b/data/maps/Route111/scripts.inc
@@ -20,30 +20,30 @@ Route111_OnLoad:
end
Route111_EventScript_CloseDesertRuins::
- setmetatile 29, 86, METATILE_General_RockWall_RockBase, 1
- setmetatile 29, 87, METATILE_General_RockWall_SandBase, 1
+ setmetatile 29, 86, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 29, 87, METATILE_General_RockWall_SandBase, TRUE
return
@ Show Mirage Tower just prior to disintegration. Mirage Tower is otherwise handled by the map layout
Route111_EventScript_ShowTemporaryMirageTower::
- setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, 0
- setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, 0
- setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, 0
- setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, 0
- setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, 0
- setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, 0
- setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, 0
- setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, 0
- setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, 0
- setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, 0
- setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, 0
- setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, 0
- setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, 0
- setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, 0
- setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, 0
- setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, 0
- setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, 0
- setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, 0
+ setmetatile 18, 53, METATILE_Mauville_MirageTower_Tile0, FALSE
+ setmetatile 19, 53, METATILE_Mauville_MirageTower_Tile1, FALSE
+ setmetatile 20, 53, METATILE_Mauville_MirageTower_Tile2, FALSE
+ setmetatile 18, 54, METATILE_Mauville_MirageTower_Tile3, FALSE
+ setmetatile 19, 54, METATILE_Mauville_MirageTower_Tile4, FALSE
+ setmetatile 20, 54, METATILE_Mauville_MirageTower_Tile5, FALSE
+ setmetatile 18, 55, METATILE_Mauville_MirageTower_Tile6, FALSE
+ setmetatile 19, 55, METATILE_Mauville_MirageTower_Tile7, FALSE
+ setmetatile 20, 55, METATILE_Mauville_MirageTower_Tile8, FALSE
+ setmetatile 18, 56, METATILE_Mauville_MirageTower_Tile9, FALSE
+ setmetatile 19, 56, METATILE_Mauville_MirageTower_TileA, FALSE
+ setmetatile 20, 56, METATILE_Mauville_MirageTower_TileB, FALSE
+ setmetatile 18, 57, METATILE_Mauville_MirageTower_TileC, FALSE
+ setmetatile 19, 57, METATILE_Mauville_MirageTower_TileD, FALSE
+ setmetatile 20, 57, METATILE_Mauville_MirageTower_TileE, FALSE
+ setmetatile 18, 58, METATILE_Mauville_MirageTower_TileF, FALSE
+ setmetatile 19, 58, METATILE_Mauville_MirageTower_Tile10, FALSE
+ setmetatile 20, 58, METATILE_Mauville_MirageTower_Tile11, FALSE
return
Route111_OnTransition:
@@ -210,7 +210,7 @@ Route111_EventScript_ViciousSandstormTriggerRight::
end
Route111_EventScript_ViciousSandstormTrigger::
- checkitem ITEM_GO_GOGGLES, 1
+ checkitem ITEM_GO_GOGGLES
compare VAR_RESULT, FALSE
goto_if_eq Route111_EventScript_PreventRouteAccess
setvar VAR_TEMP_3, 1
diff --git a/data/maps/Route112_CableCarStation/scripts.inc b/data/maps/Route112_CableCarStation/scripts.inc
index 86fe61a05..0fcbc0a34 100644
--- a/data/maps/Route112_CableCarStation/scripts.inc
+++ b/data/maps/Route112_CableCarStation/scripts.inc
@@ -6,7 +6,7 @@ Route112_CableCarStation_MapScripts::
.byte 0
Route112_CableCarStation_OnTransition:
- setescapewarp MAP_ROUTE112, 255, 28, 28
+ setescapewarp MAP_ROUTE112, 28, 28
compare VAR_CABLE_CAR_STATION_STATE, 2
call_if_eq Route112_CableCarStation_EventScript_MoveAttendantAside
end
diff --git a/data/maps/Route113_GlassWorkshop/scripts.inc b/data/maps/Route113_GlassWorkshop/scripts.inc
index bad739806..fd980bf84 100644
--- a/data/maps/Route113_GlassWorkshop/scripts.inc
+++ b/data/maps/Route113_GlassWorkshop/scripts.inc
@@ -43,7 +43,7 @@ Route113_GlassWorkshop_EventScript_ExplainSootSack::
end
Route113_GlassWorkshop_EventScript_CheckCollectedAsh::
- checkitem ITEM_SOOT_SACK, 1
+ checkitem ITEM_SOOT_SACK
compare VAR_RESULT, FALSE
goto_if_eq Route113_GlassWorkshop_EventScript_SootSackNotInBag
msgbox Route113_GlassWorkshop_Text_LetsSeeCollectedAshes, MSGBOX_DEFAULT
@@ -78,7 +78,7 @@ Route113_GlassWorkshop_EventScript_ChooseGlassItem::
Route113_GlassWorkshop_EventScript_BlueFlute::
setvar VAR_0x8008, ITEM_BLUE_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, BLUE_FLUTE_PRICE
compare VAR_ASH_GATHER_COUNT, BLUE_FLUTE_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -92,7 +92,7 @@ Route113_GlassWorkshop_EventScript_BlueFlute::
Route113_GlassWorkshop_EventScript_YellowFlute::
setvar VAR_0x8008, ITEM_YELLOW_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, YELLOW_FLUTE_PRICE
compare VAR_ASH_GATHER_COUNT, YELLOW_FLUTE_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -106,7 +106,7 @@ Route113_GlassWorkshop_EventScript_YellowFlute::
Route113_GlassWorkshop_EventScript_RedFlute::
setvar VAR_0x8008, ITEM_RED_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, RED_FLUTE_PRICE
compare VAR_ASH_GATHER_COUNT, RED_FLUTE_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -120,7 +120,7 @@ Route113_GlassWorkshop_EventScript_RedFlute::
Route113_GlassWorkshop_EventScript_WhiteFlute::
setvar VAR_0x8008, ITEM_WHITE_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, WHITE_FLUTE_PRICE
compare VAR_ASH_GATHER_COUNT, WHITE_FLUTE_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -134,7 +134,7 @@ Route113_GlassWorkshop_EventScript_WhiteFlute::
Route113_GlassWorkshop_EventScript_BlackFlute::
setvar VAR_0x8008, ITEM_BLACK_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, BLACK_FLUTE_PRICE
compare VAR_ASH_GATHER_COUNT, BLACK_FLUTE_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -149,7 +149,7 @@ Route113_GlassWorkshop_EventScript_BlackFlute::
Route113_GlassWorkshop_EventScript_PrettyChair::
setvar VAR_0x8009, 1
setvar VAR_0x8008, DECOR_PRETTY_CHAIR
- bufferdecorationname 0, VAR_0x8008
+ bufferdecorationname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, PRETTY_CHAIR_PRICE
compare VAR_ASH_GATHER_COUNT, PRETTY_CHAIR_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -164,7 +164,7 @@ Route113_GlassWorkshop_EventScript_PrettyChair::
Route113_GlassWorkshop_EventScript_PrettyDesk::
setvar VAR_0x8009, 1
setvar VAR_0x8008, DECOR_PRETTY_DESK
- bufferdecorationname 0, VAR_0x8008
+ bufferdecorationname STR_VAR_1, VAR_0x8008
setvar VAR_0x800A, PRETTY_DESK_PRICE
compare VAR_ASH_GATHER_COUNT, PRETTY_DESK_PRICE
goto_if_lt Route113_GlassWorkshop_EventScript_NotEnoughAshForItem
@@ -184,14 +184,14 @@ Route113_GlassWorkshop_EventScript_CancelGlassItemSelect::
Route113_GlassWorkshop_EventScript_NotEnoughAsh::
setvar VAR_0x800A, LOWEST_ASH_PRICE
subvar VAR_0x800A, VAR_ASH_GATHER_COUNT
- buffernumberstring 0, VAR_0x800A
+ buffernumberstring STR_VAR_1, VAR_0x800A
msgbox Route113_GlassWorkshop_Text_NotEnoughAshNeedX, MSGBOX_DEFAULT
release
end
Route113_GlassWorkshop_EventScript_NotEnoughAshForItem::
subvar VAR_0x800A, VAR_ASH_GATHER_COUNT
- buffernumberstring 1, VAR_0x800A
+ buffernumberstring STR_VAR_2, VAR_0x800A
message Route113_GlassWorkshop_Text_NotEnoughAshToMakeItem
waitmessage
goto Route113_GlassWorkshop_EventScript_ChooseGlassItem
@@ -257,49 +257,49 @@ Route113_GlassWorkshop_EventScript_GiveItemAfterNoRoom::
Route113_GlassWorkshop_EventScript_GiveBlueFlute::
setvar VAR_0x8009, 0
setvar VAR_0x8008, ITEM_BLUE_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
Route113_GlassWorkshop_EventScript_GiveYellowFlute::
setvar VAR_0x8009, 0
setvar VAR_0x8008, ITEM_YELLOW_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
Route113_GlassWorkshop_EventScript_GiveRedFlute::
setvar VAR_0x8009, 0
setvar VAR_0x8008, ITEM_RED_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
Route113_GlassWorkshop_EventScript_GiveWhiteFlute::
setvar VAR_0x8009, 0
setvar VAR_0x8008, ITEM_WHITE_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
Route113_GlassWorkshop_EventScript_GiveBlackFlute::
setvar VAR_0x8009, 0
setvar VAR_0x8008, ITEM_BLACK_FLUTE
- bufferitemname 0, VAR_0x8008
+ bufferitemname STR_VAR_1, VAR_0x8008
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
Route113_GlassWorkshop_EventScript_GivePrettyChair::
setvar VAR_0x8009, 1
setvar VAR_0x8008, DECOR_PRETTY_CHAIR
- bufferdecorationname 0, DECOR_PRETTY_CHAIR
+ bufferdecorationname STR_VAR_1, DECOR_PRETTY_CHAIR
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
Route113_GlassWorkshop_EventScript_GivePrettyDesk::
setvar VAR_0x8009, 1
setvar VAR_0x8008, DECOR_PRETTY_DESK
- bufferdecorationname 0, DECOR_PRETTY_DESK
+ bufferdecorationname STR_VAR_1, DECOR_PRETTY_DESK
goto Route113_GlassWorkshop_EventScript_TryGiveItemAgain
end
diff --git a/data/maps/Route114_FossilManiacsTunnel/scripts.inc b/data/maps/Route114_FossilManiacsTunnel/scripts.inc
index 3a6dd785c..500e12bee 100644
--- a/data/maps/Route114_FossilManiacsTunnel/scripts.inc
+++ b/data/maps/Route114_FossilManiacsTunnel/scripts.inc
@@ -19,8 +19,8 @@ Route114_FossilManiacsTunnel_OnLoad:
end
Route114_FossilManiacsTunnel_EventScript_CloseDesertUnderpass::
- setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, 1
- setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, 1
+ setmetatile 6, 1, METATILE_Fallarbor_RedRockWall, TRUE
+ setmetatile 6, 2, METATILE_Fallarbor_RedRockWall, TRUE
return
Route114_FossilManiacsTunnel_EventScript_ManiacMentionCaveIn::
@@ -37,10 +37,10 @@ Route114_FossilManiacsTunnel_EventScript_FossilManiac::
lock
faceplayer
goto_if_set FLAG_RECEIVED_REVIVED_FOSSIL_MON, Route114_FossilManiacsTunnel_EventScript_PlayerRevivedFossil
- checkitem ITEM_ROOT_FOSSIL, 1
+ checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil
- checkitem ITEM_CLAW_FOSSIL, 1
+ checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq Route114_FossilManiacsTunnel_EventScript_PlayerHasFossil
msgbox Route114_FossilManiacsTunnel_Text_LookInDesertForFossils, MSGBOX_DEFAULT
diff --git a/data/maps/Route116/scripts.inc b/data/maps/Route116/scripts.inc
index 0ef6a05e1..7657e2061 100644
--- a/data/maps/Route116/scripts.inc
+++ b/data/maps/Route116/scripts.inc
@@ -165,7 +165,7 @@ Route116_EventScript_BrineyTrigger::
Route116_EventScript_GlassesMan::
lock
faceplayer
- checkitem ITEM_BLACK_GLASSES, 1
+ checkitem ITEM_BLACK_GLASSES
compare VAR_RESULT, TRUE
goto_if_eq Route116_EventScript_PlayerHasGlasses
specialvar VAR_RESULT, FoundBlackGlasses
diff --git a/data/maps/Route119_WeatherInstitute_2F/scripts.inc b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
index 3b94d5cc1..3a2957d5e 100644
--- a/data/maps/Route119_WeatherInstitute_2F/scripts.inc
+++ b/data/maps/Route119_WeatherInstitute_2F/scripts.inc
@@ -128,7 +128,7 @@ Route119_WeatherInstitute_2F_EventScript_ReceivedCastformFanfare::
message Route119_WeatherInstitute_2F_Text_PlayerReceivedCastform
waitmessage
waitfanfare
- bufferspeciesname 0, SPECIES_CASTFORM
+ bufferspeciesname STR_VAR_1, SPECIES_CASTFORM
return
Route119_WeatherInstitute_2F_EventScript_ExplainCastform::
diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc
index 588fa17a0..e28637592 100644
--- a/data/maps/Route120/scripts.inc
+++ b/data/maps/Route120/scripts.inc
@@ -49,15 +49,15 @@ Route120_OnLoad:
end
Route120_EventScript_CloseAncientTomb::
- setmetatile 7, 54, METATILE_General_RockWall_RockBase, 1
- setmetatile 7, 55, METATILE_General_RockWall_SandBase, 1
+ setmetatile 7, 54, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 7, 55, METATILE_General_RockWall_SandBase, TRUE
return
Route120_EventScript_SetBridgeClearMetatiles::
- setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, 0
- setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, 0
- setmetatile 12, 17, METATILE_General_ReflectiveWater, 0
- setmetatile 13, 17, METATILE_General_ReflectiveWater, 0
+ setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE
+ setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE
+ setmetatile 12, 17, METATILE_General_ReflectiveWater, FALSE
+ setmetatile 13, 17, METATILE_General_ReflectiveWater, FALSE
return
Route120_EventScript_SetBridgeKecleonMovement::
@@ -253,10 +253,10 @@ Route120_EventScript_StevenGiveDeconScope::
delay 15
removeobject LOCALID_STEVEN
waitfieldeffect FLDEFF_NPCFLY_OUT
- setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, 0
- setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, 0
- setmetatile 12, 17, METATILE_General_ReflectiveWater, 0
- setmetatile 13, 17, METATILE_General_ReflectiveWater, 0
+ setmetatile 13, 15, METATILE_Fortree_WoodBridge1_Top, FALSE
+ setmetatile 12, 16, METATILE_Fortree_WoodBridge1_Bottom, FALSE
+ setmetatile 12, 17, METATILE_General_ReflectiveWater, FALSE
+ setmetatile 13, 17, METATILE_General_ReflectiveWater, FALSE
special DrawWholeMapView
release
end
diff --git a/data/maps/Route121_SafariZoneEntrance/scripts.inc b/data/maps/Route121_SafariZoneEntrance/scripts.inc
index 8bd5dac04..5050612f7 100644
--- a/data/maps/Route121_SafariZoneEntrance/scripts.inc
+++ b/data/maps/Route121_SafariZoneEntrance/scripts.inc
@@ -48,7 +48,7 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger::
lockall
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkInPlaceFasterUp
waitmovement 0
- showmoneybox 0, 0, 0
+ showmoneybox 0, 0
msgbox Route121_SafariZoneEntrance_Text_WouldYouLikeToPlay, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone
@@ -57,17 +57,17 @@ Route121_SafariZoneEntrance_EventScript_EntranceCounterTrigger::
end
Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone::
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_NoPokeblockCase
call Route121_SafariZoneEntrance_EventScript_CheckHasRoomForPokemon
- checkmoney 500, 0
+ checkmoney 500
compare VAR_RESULT, 0
goto_if_eq Route121_SafariZoneEntrance_EventScript_NotEnoughMoney
playse SE_SHOP
msgbox Route121_SafariZoneEntrance_Text_ThatWillBe500Please, MSGBOX_DEFAULT
- removemoney 500, 0
- updatemoneybox 0, 0
+ removemoney 500
+ updatemoneybox
msgbox Route121_SafariZoneEntrance_Text_HereAreYourSafariBalls, MSGBOX_DEFAULT
playfanfare MUS_OBTAIN_ITEM
message Route121_SafariZoneEntrance_Text_Received30SafariBalls
@@ -80,7 +80,7 @@ Route121_SafariZoneEntrance_EventScript_TryEnterSafariZone::
special EnterSafariMode
setvar VAR_SAFARI_ZONE_STATE, 2
clearflag FLAG_GOOD_LUCK_SAFARI_ZONE
- warp MAP_SAFARI_ZONE_SOUTH, 255, 32, 33
+ warp MAP_SAFARI_ZONE_SOUTH, 32, 33
waitstate
end
diff --git a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
index 63bee6ed5..06e16be35 100644
--- a/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
+++ b/data/maps/Route124_DivingTreasureHuntersHouse/scripts.inc
@@ -29,16 +29,16 @@ Route124_DivingTreasureHuntersHouse_EventScript_CheckPlayerHasShard::
Route124_DivingTreasureHuntersHouse_EventScript_GetPlayersShards::
setvar VAR_TEMP_1, 0
- checkitem ITEM_RED_SHARD, 1
+ checkitem ITEM_RED_SHARD
compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasRedShard
- checkitem ITEM_YELLOW_SHARD, 1
+ checkitem ITEM_YELLOW_SHARD
compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasYellowShard
- checkitem ITEM_BLUE_SHARD, 1
+ checkitem ITEM_BLUE_SHARD
compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasBlueShard
- checkitem ITEM_GREEN_SHARD, 1
+ checkitem ITEM_GREEN_SHARD
compare VAR_RESULT, TRUE
call_if_eq Route124_DivingTreasureHuntersHouse_EventScript_HasGreenShard
return
@@ -243,12 +243,12 @@ Route124_DivingTreasureHuntersHouse_EventScript_TradeGreenShard::
goto Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard
Route124_DivingTreasureHuntersHouse_EventScript_TryTradeShard::
- bufferitemname 0, VAR_0x8008
- bufferitemname 1, VAR_0x8009
+ bufferitemname STR_VAR_1, VAR_0x8008
+ bufferitemname STR_VAR_2, VAR_0x8009
msgbox Route124_DivingTreasureHuntersHouse_Text_YoullTradeShardForStone, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_DeclineTrade
- checkitemspace VAR_0x8009, 1
+ checkitemspace VAR_0x8009
compare VAR_RESULT, TRUE
goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_TradeShard
checkitem VAR_0x8008, 2
diff --git a/data/maps/Route134/scripts.inc b/data/maps/Route134/scripts.inc
index 043835373..226135c1d 100644
--- a/data/maps/Route134/scripts.inc
+++ b/data/maps/Route134/scripts.inc
@@ -3,7 +3,7 @@ Route134_MapScripts::
.byte 0
Route134_OnResume:
- setdivewarp MAP_UNDERWATER_ROUTE134, 255, 8, 6
+ setdivewarp MAP_UNDERWATER_ROUTE134, 8, 6
end
Route134_EventScript_Jack::
diff --git a/data/maps/RustboroCity/scripts.inc b/data/maps/RustboroCity/scripts.inc
index 8d286d5de..48c413b04 100644
--- a/data/maps/RustboroCity/scripts.inc
+++ b/data/maps/RustboroCity/scripts.inc
@@ -621,7 +621,7 @@ RustboroCity_EventScript_ReturnGoods::
setflag FLAG_HIDE_RUSTBORO_CITY_DEVON_EMPLOYEE_1
setvar VAR_RUSTBORO_CITY_STATE, 5
delay 30
- warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 255, 2, 2
+ warp MAP_RUSTBORO_CITY_DEVON_CORP_3F, 2, 2
waitstate
releaseall
end
diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
index 326cd946e..1f2f1ea80 100644
--- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
@@ -69,10 +69,10 @@ RustboroCity_DevonCorp_2F_EventScript_FossilScientist::
compare VAR_FOSSIL_RESURRECTION_STATE, 1
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_StillRegenerating
msgbox RustboroCity_DevonCorp_2F_Text_DevelopDeviceToResurrectFossils, MSGBOX_DEFAULT
- checkitem ITEM_ROOT_FOSSIL, 1
+ checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil
- checkitem ITEM_CLAW_FOSSIL, 1
+ checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil
release
@@ -89,14 +89,14 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeRootFossil::
msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
- checkitem ITEM_CLAW_FOSSIL, 1
+ checkitem ITEM_CLAW_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil
end
RustboroCity_DevonCorp_2F_EventScript_GiveRootFossil::
- bufferitemname 0, ITEM_ROOT_FOSSIL
+ bufferitemname STR_VAR_1, ITEM_ROOT_FOSSIL
msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT
removeitem ITEM_ROOT_FOSSIL
setvar VAR_FOSSIL_RESURRECTION_STATE, 1
@@ -114,14 +114,14 @@ RustboroCity_DevonCorp_2F_EventScript_NoticeClawFossil::
msgbox RustboroCity_DevonCorp_2F_Text_WantToBringFossilBackToLife, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_DeclineGiveFossil
- checkitem ITEM_ROOT_FOSSIL, 1
+ checkitem ITEM_ROOT_FOSSIL
compare VAR_RESULT, TRUE
goto_if_eq RustboroCity_DevonCorp_2F_EventScript_ChooseFossil
goto RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil
end
RustboroCity_DevonCorp_2F_EventScript_GiveClawFossil::
- bufferitemname 0, ITEM_CLAW_FOSSIL
+ bufferitemname STR_VAR_1, ITEM_CLAW_FOSSIL
msgbox RustboroCity_DevonCorp_2F_Text_HandedFossilToResearcher, MSGBOX_DEFAULT
removeitem ITEM_CLAW_FOSSIL
setvar VAR_FOSSIL_RESURRECTION_STATE, 1
@@ -147,13 +147,13 @@ RustboroCity_DevonCorp_2F_EventScript_FossilMonReady::
end
RustboroCity_DevonCorp_2F_EventScript_LileepReady::
- bufferspeciesname 1, SPECIES_LILEEP
+ bufferspeciesname STR_VAR_2, SPECIES_LILEEP
msgbox RustboroCity_DevonCorp_2F_Text_FossilizedMonBroughtBackToLife, MSGBOX_DEFAULT
goto RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep
end
RustboroCity_DevonCorp_2F_EventScript_AnorithReady::
- bufferspeciesname 1, SPECIES_ANORITH
+ bufferspeciesname STR_VAR_2, SPECIES_ANORITH
msgbox RustboroCity_DevonCorp_2F_Text_FossilizedMonBroughtBackToLife, MSGBOX_DEFAULT
goto RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith
end
@@ -193,12 +193,12 @@ RustboroCity_DevonCorp_2F_EventScript_TransferLileepToPC::
end
RustboroCity_DevonCorp_2F_EventScript_ReceivedLileepFanfare::
- bufferspeciesname 1, SPECIES_LILEEP
+ bufferspeciesname STR_VAR_2, SPECIES_LILEEP
playfanfare MUS_OBTAIN_ITEM
message RustboroCity_DevonCorp_2F_Text_ReceivedMonFromResearcher
waitmessage
waitfanfare
- bufferspeciesname 0, SPECIES_LILEEP
+ bufferspeciesname STR_VAR_1, SPECIES_LILEEP
return
RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep::
@@ -242,12 +242,12 @@ RustboroCity_DevonCorp_2F_EventScript_TransferAnorithToPC::
end
RustboroCity_DevonCorp_2F_EventScript_ReceivedAnorithFanfare::
- bufferspeciesname 1, SPECIES_ANORITH
+ bufferspeciesname STR_VAR_2, SPECIES_ANORITH
playfanfare MUS_OBTAIN_ITEM
message RustboroCity_DevonCorp_2F_Text_ReceivedMonFromResearcher
waitmessage
waitfanfare
- bufferspeciesname 0, SPECIES_ANORITH
+ bufferspeciesname STR_VAR_1, SPECIES_ANORITH
return
RustboroCity_DevonCorp_2F_EventScript_FinishReceivingAnorith::
diff --git a/data/maps/RustboroCity_House1/scripts.inc b/data/maps/RustboroCity_House1/scripts.inc
index 0b7de48bc..20e93506b 100644
--- a/data/maps/RustboroCity_House1/scripts.inc
+++ b/data/maps/RustboroCity_House1/scripts.inc
@@ -15,7 +15,7 @@ RustboroCity_House1_EventScript_Trader::
special ChoosePartyMon
waitstate
copyvar VAR_0x800A, VAR_0x8004
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq RustboroCity_House1_EventScript_DeclineTrade
copyvar VAR_0x8005, VAR_0x800A
specialvar VAR_RESULT, GetTradeSpecies
@@ -38,7 +38,7 @@ RustboroCity_House1_EventScript_DeclineTrade::
end
RustboroCity_House1_EventScript_NotRequestedMon::
- bufferspeciesname 0, VAR_0x8009
+ bufferspeciesname STR_VAR_1, VAR_0x8009
msgbox RustboroCity_House1_Text_DoesntLookLikeMonToMe, MSGBOX_DEFAULT
release
end
diff --git a/data/maps/SSTidalCorridor/scripts.inc b/data/maps/SSTidalCorridor/scripts.inc
index 4aa94de23..c99d3ad03 100644
--- a/data/maps/SSTidalCorridor/scripts.inc
+++ b/data/maps/SSTidalCorridor/scripts.inc
@@ -129,7 +129,7 @@ SSTidalCorridor_EventScript_ExitLilycove::
setrespawn HEAL_LOCATION_LILYCOVE_CITY
msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver
- warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
+ warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
end
@@ -138,7 +138,7 @@ SSTidalCorridor_EventScript_ExitSlateport::
setrespawn HEAL_LOCATION_SLATEPORT_CITY
msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver
- warp MAP_SLATEPORT_CITY_HARBOR, 255, 8, 11
+ warp MAP_SLATEPORT_CITY_HARBOR, 8, 11
waitstate
release
end
diff --git a/data/maps/SafariZone_South/scripts.inc b/data/maps/SafariZone_South/scripts.inc
index 791572fe0..c361d9f2e 100644
--- a/data/maps/SafariZone_South/scripts.inc
+++ b/data/maps/SafariZone_South/scripts.inc
@@ -94,7 +94,7 @@ SafariZone_South_EventScript_ExitEarlyEast::
SafariZone_South_EventScript_Exit::
setvar VAR_SAFARI_ZONE_STATE, 1
special ExitSafariMode
- warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5
+ warpdoor MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5
waitstate
end
diff --git a/data/maps/SeafloorCavern_Entrance/scripts.inc b/data/maps/SeafloorCavern_Entrance/scripts.inc
index a4c621e3e..a999c4a15 100644
--- a/data/maps/SeafloorCavern_Entrance/scripts.inc
+++ b/data/maps/SeafloorCavern_Entrance/scripts.inc
@@ -5,8 +5,8 @@ SeafloorCavern_Entrance_MapScripts::
.byte 0
SeafloorCavern_Entrance_OnResume:
- setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5
- setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 255, 6, 5
+ setdivewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 6, 5
+ setescapewarp MAP_UNDERWATER_SEAFLOOR_CAVERN, 6, 5
end
SeafloorCavern_Entrance_EventScript_Grunt::
diff --git a/data/maps/SeafloorCavern_Room9/scripts.inc b/data/maps/SeafloorCavern_Room9/scripts.inc
index 3db2348a4..63e6baf3c 100644
--- a/data/maps/SeafloorCavern_Room9/scripts.inc
+++ b/data/maps/SeafloorCavern_Room9/scripts.inc
@@ -145,7 +145,7 @@ SeafloorCavern_Room9_EventScript_ArchieAwakenKyogre::
setflag FLAG_HIDE_SEAFLOOR_CAVERN_ROOM_9_KYOGRE
setflag FLAG_HIDE_SEAFLOOR_CAVERN_AQUA_GRUNTS
setflag FLAG_HIDE_MAP_NAME_POPUP
- warp MAP_ROUTE128, 255, 38, 22
+ warp MAP_ROUTE128, 38, 22
waitstate
releaseall
end
diff --git a/data/maps/SealedChamber_OuterRoom/scripts.inc b/data/maps/SealedChamber_OuterRoom/scripts.inc
index 7d57ea544..bf02c7fe3 100644
--- a/data/maps/SealedChamber_OuterRoom/scripts.inc
+++ b/data/maps/SealedChamber_OuterRoom/scripts.inc
@@ -5,8 +5,8 @@ SealedChamber_OuterRoom_MapScripts::
.byte 0
SealedChamber_OuterRoom_OnResume:
- setdivewarp MAP_UNDERWATER_SEALED_CHAMBER, 255, 12, 44
- setescapewarp MAP_UNDERWATER_SEALED_CHAMBER, 255, 12, 44
+ setdivewarp MAP_UNDERWATER_SEALED_CHAMBER, 12, 44
+ setescapewarp MAP_UNDERWATER_SEALED_CHAMBER, 12, 44
end
SealedChamber_OuterRoom_OnTransition:
@@ -18,12 +18,12 @@ SealedChamber_OuterRoom_OnLoad:
end
SealedChamber_OuterRoom_EventScript_CloseInnerRoomEntrance::
- 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
+ setmetatile 9, 1, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 10, 1, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 11, 1, METATILE_Cave_EntranceCover, TRUE
+ setmetatile 9, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 10, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE
+ setmetatile 11, 2, METATILE_Cave_SealedChamberBraille_Mid, TRUE
return
SealedChamber_OuterRoom_EventScript_BrailleABC::
diff --git a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
index a1206dfb4..74f24c859 100644
--- a/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideEntranceRoom/scripts.inc
@@ -29,7 +29,7 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert::
msgbox ShoalCave_LowTideEntranceRoom_Text_WouldYouLikeShellBell, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_DeclineShellBell
- checkitemspace ITEM_SHELL_BELL, 1
+ checkitemspace ITEM_SHELL_BELL
compare VAR_RESULT, FALSE
call_if_eq ShoalCave_LowTideEntranceRoom_EventScript_CheckSpaceWillBeFreed
compare VAR_RESULT, 2
@@ -68,10 +68,10 @@ ShoalCave_LowTideEntranceRoom_EventScript_NoRoomForShellBell::
end
ShoalCave_LowTideEntranceRoom_EventScript_NotEnoughShoalSaltOrShells::
- checkitem ITEM_SHOAL_SALT, 1
+ checkitem ITEM_SHOAL_SALT
compare VAR_RESULT, TRUE
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
- checkitem ITEM_SHOAL_SHELL, 1
+ checkitem ITEM_SHOAL_SHELL
compare VAR_RESULT, TRUE
goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_HasSomeShoalSaltOrShell
msgbox ShoalCave_LowTideEntranceRoom_Text_AreYouPlanningOnGoingInThere, MSGBOX_DEFAULT
diff --git a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
index 9692d2f69..37b7beb04 100644
--- a/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideInnerRoom/scripts.inc
@@ -22,38 +22,38 @@ ShoalCave_LowTideInnerRoom_OnLoad:
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles::
goto_if_set FLAG_RECEIVED_SHOAL_SALT_1, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2
goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2
- setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, 1
+ setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE
goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2
end
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles2::
goto_if_set FLAG_RECEIVED_SHOAL_SALT_2, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3
goto_if_set FLAG_SYS_SHOAL_TIDE, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3
- setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, 1
+ setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE
goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3
end
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles3::
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_1, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4
- setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, 1
+ setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE
goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4
end
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles4::
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_2, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5
- setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, 1
+ setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE
goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5
end
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles5::
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_3, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6
- setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, 1
+ setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE
goto ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6
end
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatiles6::
goto_if_set FLAG_RECEIVED_SHOAL_SHELL_4, ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatilesEnd
- setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, 1
+ setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Large, TRUE
return
ShoalCave_LowTideInnerRoom_EventScript_SetShoalItemMetatilesEnd::
@@ -65,7 +65,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell1::
giveitem ITEM_SHOAL_SHELL
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, 0
+ setmetatile 41, 20, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_1
releaseall
@@ -82,7 +82,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell2::
giveitem ITEM_SHOAL_SHELL
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, 0
+ setmetatile 41, 10, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_2
releaseall
@@ -94,7 +94,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell3::
giveitem ITEM_SHOAL_SHELL
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, 0
+ setmetatile 6, 9, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_3
releaseall
@@ -106,7 +106,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalShell4::
giveitem ITEM_SHOAL_SHELL
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, 0
+ setmetatile 16, 13, METATILE_Cave_ShoalCave_BlueStone_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SHELL_4
releaseall
@@ -118,7 +118,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt1::
giveitem ITEM_SHOAL_SALT
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, 0
+ setmetatile 31, 8, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_1
releaseall
@@ -135,7 +135,7 @@ ShoalCave_LowTideInnerRoom_EventScript_ShoalSalt2::
giveitem ITEM_SHOAL_SALT
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, 0
+ setmetatile 14, 26, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_2
releaseall
diff --git a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
index d7937998e..15dcd326d 100644
--- a/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideLowerRoom/scripts.inc
@@ -8,7 +8,7 @@ ShoalCave_LowTideLowerRoom_OnLoad:
ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatiles::
goto_if_set FLAG_RECEIVED_SHOAL_SALT_4, ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatilesEnd
- setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Large, 1
+ setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE
return
ShoalCave_LowTideLowerRoom_EventScript_SetShoalItemMetatilesEnd::
@@ -20,7 +20,7 @@ ShoalCave_LowTideLowerRoom_EventScript_ShoalSalt4::
giveitem ITEM_SHOAL_SALT
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, 0
+ setmetatile 18, 2, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_4
releaseall
diff --git a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
index a778a18e1..f1a5b030b 100644
--- a/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
+++ b/data/maps/ShoalCave_LowTideStairsRoom/scripts.inc
@@ -8,7 +8,7 @@ ShoalCave_LowTideStairsRoom_OnLoad:
ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatiles::
goto_if_set FLAG_RECEIVED_SHOAL_SALT_3, ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatilesEnd
- setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, 1
+ setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Large, TRUE
return
ShoalCave_LowTideStairsRoom_EventScript_SetShoalItemMetatilesEnd::
@@ -20,7 +20,7 @@ ShoalCave_LowTideStairsRoom_EventScript_ShoalSalt3::
giveitem ITEM_SHOAL_SALT
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
- setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, 0
+ setmetatile 11, 11, METATILE_Cave_ShoalCave_DirtPile_Small, FALSE
special DrawWholeMapView
setflag FLAG_RECEIVED_SHOAL_SALT_3
releaseall
diff --git a/data/maps/SkyPillar_2F/scripts.inc b/data/maps/SkyPillar_2F/scripts.inc
index 9990ebba9..ba2fe889b 100644
--- a/data/maps/SkyPillar_2F/scripts.inc
+++ b/data/maps/SkyPillar_2F/scripts.inc
@@ -16,6 +16,6 @@ SkyPillar_2F_EventScript_CleanFloor::
SkyPillar_2F_SetHoleWarp:
setstepcallback STEP_CB_CRACKED_FLOOR
- setholewarp MAP_SKY_PILLAR_1F, 255, 0, 0
+ setholewarp MAP_SKY_PILLAR_1F
end
diff --git a/data/maps/SkyPillar_4F/scripts.inc b/data/maps/SkyPillar_4F/scripts.inc
index bed91a175..b3ff931ad 100644
--- a/data/maps/SkyPillar_4F/scripts.inc
+++ b/data/maps/SkyPillar_4F/scripts.inc
@@ -16,6 +16,6 @@ SkyPillar_4F_EventScript_CleanFloor::
SkyPillar_4F_SetHoleWarp:
setstepcallback STEP_CB_CRACKED_FLOOR
- setholewarp MAP_SKY_PILLAR_3F, 255, 0, 0
+ setholewarp MAP_SKY_PILLAR_3F
end
diff --git a/data/maps/SkyPillar_Outside/scripts.inc b/data/maps/SkyPillar_Outside/scripts.inc
index 9ffcd2de7..89e71a1ce 100644
--- a/data/maps/SkyPillar_Outside/scripts.inc
+++ b/data/maps/SkyPillar_Outside/scripts.inc
@@ -26,8 +26,8 @@ SkyPillar_Outside_OnLoad:
end
SkyPillar_Outside_EventScript_OpenDoor::
- setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, 0
- setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, 0
+ setmetatile 14, 4, METATILE_Pacifidlog_SkyPillar_DoorOpen_Top, FALSE
+ setmetatile 14, 5, METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom, FALSE
return
SkyPillar_Outside_OnFrame:
diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc
index 2b3c02120..c59707e14 100644
--- a/data/maps/SkyPillar_Top/scripts.inc
+++ b/data/maps/SkyPillar_Top/scripts.inc
@@ -88,7 +88,7 @@ SkyPillar_Top_EventScript_RanFromRayquaza2::
fadescreenswapbuffers FADE_TO_BLACK
removeobject VAR_LAST_TALKED
fadescreenswapbuffers FADE_FROM_BLACK
- bufferspeciesname 0, VAR_0x8004
+ bufferspeciesname STR_VAR_1, VAR_0x8004
msgbox gText_LegendaryFlewAway, MSGBOX_DEFAULT
releaseall
end
diff --git a/data/maps/SlateportCity/scripts.inc b/data/maps/SlateportCity/scripts.inc
index 3e8648531..2e7ed6cbe 100644
--- a/data/maps/SlateportCity/scripts.inc
+++ b/data/maps/SlateportCity/scripts.inc
@@ -19,6 +19,8 @@
.set LOCALID_GRUNT_11, 33
.set LOCALID_SCOTT, 35
+@ Note: LOCALID_SLATEPORT_ENERGY_GURU is a local id for this map used elsewhere. It's defined in event_objects.h
+
SlateportCity_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_OnTransition
map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_OnFrame
@@ -162,7 +164,7 @@ SlateportCity_Pokemart_EnergyGuru:
SlateportCity_EventScript_EffortRibbonWoman::
lock
faceplayer
- bufferleadmonspeciesname 0
+ bufferleadmonspeciesname STR_VAR_1
msgbox SlateportCity_Text_OhYourPokemon, MSGBOX_DEFAULT
specialvar VAR_RESULT, LeadMonHasEffortRibbon
compare VAR_RESULT, TRUE
@@ -635,7 +637,7 @@ SlateportCity_EventScript_CaptStern::
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_AQUA_GRUNT
clearflag FLAG_HIDE_SLATEPORT_CITY_HARBOR_ARCHIE
setvar VAR_SLATEPORT_CITY_STATE, 2
- warp MAP_SLATEPORT_CITY_HARBOR, 255, 11, 14
+ warp MAP_SLATEPORT_CITY_HARBOR, 11, 14
waitstate
releaseall
end
@@ -793,77 +795,77 @@ SlateportCity_EventScript_ChooseBerryPowderItem::
end
SlateportCity_EventScript_EnergyPowder::
- bufferitemname 0, ITEM_ENERGY_POWDER
+ bufferitemname STR_VAR_1, ITEM_ENERGY_POWDER
setvar VAR_0x8008, ITEM_ENERGY_POWDER
setvar VAR_0x8009, 50
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_EnergyRoot::
- bufferitemname 0, ITEM_ENERGY_ROOT
+ bufferitemname STR_VAR_1, ITEM_ENERGY_ROOT
setvar VAR_0x8008, ITEM_ENERGY_ROOT
setvar VAR_0x8009, 80
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_HealPowder::
- bufferitemname 0, ITEM_HEAL_POWDER
+ bufferitemname STR_VAR_1, ITEM_HEAL_POWDER
setvar VAR_0x8008, ITEM_HEAL_POWDER
setvar VAR_0x8009, 50
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_RevivalHerb::
- bufferitemname 0, ITEM_REVIVAL_HERB
+ bufferitemname STR_VAR_1, ITEM_REVIVAL_HERB
setvar VAR_0x8008, ITEM_REVIVAL_HERB
setvar VAR_0x8009, 300
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_Protein::
- bufferitemname 0, ITEM_PROTEIN
+ bufferitemname STR_VAR_1, ITEM_PROTEIN
setvar VAR_0x8008, ITEM_PROTEIN
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_Iron::
- bufferitemname 0, ITEM_IRON
+ bufferitemname STR_VAR_1, ITEM_IRON
setvar VAR_0x8008, ITEM_IRON
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_Carbos::
- bufferitemname 0, ITEM_CARBOS
+ bufferitemname STR_VAR_1, ITEM_CARBOS
setvar VAR_0x8008, ITEM_CARBOS
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_Calcium::
- bufferitemname 0, ITEM_CALCIUM
+ bufferitemname STR_VAR_1, ITEM_CALCIUM
setvar VAR_0x8008, ITEM_CALCIUM
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_Zinc::
- bufferitemname 0, ITEM_ZINC
+ bufferitemname STR_VAR_1, ITEM_ZINC
setvar VAR_0x8008, ITEM_ZINC
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_HPUp::
- bufferitemname 0, ITEM_HP_UP
+ bufferitemname STR_VAR_1, ITEM_HP_UP
setvar VAR_0x8008, ITEM_HP_UP
setvar VAR_0x8009, 1000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
end
SlateportCity_EventScript_PPUp::
- bufferitemname 0, ITEM_PP_UP
+ bufferitemname STR_VAR_1, ITEM_PP_UP
setvar VAR_0x8008, ITEM_PP_UP
setvar VAR_0x8009, 3000
goto SlateportCity_EventScript_TryBuyBerryPowderItem
diff --git a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc
index 06052e145..285c567ec 100644
--- a/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentBattleRoom/scripts.inc
@@ -68,7 +68,7 @@ SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom::
SlateportCity_BattleTent_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
special LoadPlayerParty
- warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6
+ warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 6, 6
waitstate
@ forced stop
@@ -79,14 +79,14 @@ SlateportCity_BattleTentBattleRoom_EventScript_DefeatedOpponent::
switch VAR_RESULT
case 3, SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon
setvar VAR_0x8006, 1
- warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 3
+ warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 3
waitstate
@ forced stop
SlateportCity_BattleTentBattleRoom_EventScript_WarpToLobbyWon::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
special LoadPlayerParty
- warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6
+ warp MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY, 6, 6
waitstate
@ forced stop
diff --git a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
index 37b0f6fc8..309b709d1 100644
--- a/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentCorridor/scripts.inc
@@ -52,7 +52,7 @@ SlateportCity_BattleTentCorridor_EventScript_EnterBattleRoom::
waitmovement 0
closedoor 2, 1
waitdooranim
- warp MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM, 255, 4, 4
+ warp MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM, 4, 4
waitstate
end
diff --git a/data/maps/SlateportCity_BattleTentLobby/scripts.inc b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
index 8361cdfcc..7ed9420b0 100644
--- a/data/maps/SlateportCity_BattleTentLobby/scripts.inc
+++ b/data/maps/SlateportCity_BattleTentLobby/scripts.inc
@@ -134,7 +134,7 @@ SlateportCity_BattleTentLobby_EventScript_EnterChallenge::
msgbox SlateportCity_BattleTentLobby_Text_StepThisWay, MSGBOX_DEFAULT
closemessage
call SlateportCity_BattleTentLobby_EventScript_WalkToDoor
- warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 255, 2, 7
+ warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/maps/SlateportCity_Harbor/scripts.inc b/data/maps/SlateportCity_Harbor/scripts.inc
index 58e5978cf..ff1315923 100644
--- a/data/maps/SlateportCity_Harbor/scripts.inc
+++ b/data/maps/SlateportCity_Harbor/scripts.inc
@@ -9,7 +9,7 @@ SlateportCity_Harbor_MapScripts::
.byte 0
SlateportCity_Harbor_OnTransition:
- setescapewarp MAP_SLATEPORT_CITY, 255, 28, 13
+ setescapewarp MAP_SLATEPORT_CITY, 28, 13
setvar VAR_TEMP_1, 0
compare VAR_SLATEPORT_HARBOR_STATE, 1
call_if_eq SlateportCity_Harbor_EventScript_ReadyAquaEscapeScene
@@ -210,7 +210,7 @@ SlateportCity_Harbor_EventScript_Lilycove::
goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination
setvar VAR_SS_TIDAL_STATE, SS_TIDAL_BOARD_SLATEPORT
call SlateportCity_Harbor_EventScript_BoardFerry
- warp MAP_SS_TIDAL_CORRIDOR, 255, 1, 10
+ warp MAP_SS_TIDAL_CORRIDOR, 1, 10
waitstate
release
end
@@ -220,7 +220,7 @@ SlateportCity_Harbor_EventScript_BattleFrontier::
compare VAR_RESULT, NO
goto_if_eq SlateportCity_Harbor_EventScript_ChooseNewDestination
call SlateportCity_Harbor_EventScript_BoardFerry
- warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 255, 19, 67
+ warp MAP_BATTLE_FRONTIER_OUTSIDE_WEST, 19, 67
waitstate
release
end
@@ -332,7 +332,7 @@ SlateportCity_Harbor_EventScript_NeedDive::
SlateportCity_Harbor_EventScript_CaptSternFerryOrScannerComment::
compare VAR_TEMP_1, 1
goto_if_eq SlateportCity_Harbor_EventScript_TradedScanner
- checkitem ITEM_SCANNER, 1
+ checkitem ITEM_SCANNER
compare VAR_RESULT, TRUE
goto_if_eq SlateportCity_Harbor_EventScript_AskToTradeScanner
goto_if_set FLAG_SYS_GAME_CLEAR, SlateportCity_Harbor_EventScript_FerryFinished
diff --git a/data/maps/SlateportCity_NameRatersHouse/scripts.inc b/data/maps/SlateportCity_NameRatersHouse/scripts.inc
index 87ed2d07f..3242050e7 100644
--- a/data/maps/SlateportCity_NameRatersHouse/scripts.inc
+++ b/data/maps/SlateportCity_NameRatersHouse/scripts.inc
@@ -15,9 +15,9 @@ SlateportCity_NameRatersHouse_EventScript_ChooseMonToRate::
msgbox SlateportCity_NameRatersHouse_Text_CritiqueWhichMonNickname, MSGBOX_DEFAULT
special ChoosePartyMon
waitstate
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_ne SlateportCity_NameRatersHouse_EventScript_RateMonNickname
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq SlateportCity_NameRatersHouse_EventScript_DeclineNameRate
end
diff --git a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
index cfe547de5..901b05e2a 100644
--- a/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
+++ b/data/maps/SlateportCity_OceanicMuseum_1F/scripts.inc
@@ -22,7 +22,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFeeRight::
end
SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee::
- showmoneybox 0, 0, 0
+ showmoneybox 0, 0
msgbox SlateportCity_OceanicMuseum_1F_Text_WouldYouLikeToEnter, MSGBOX_YESNO
compare VAR_RESULT, YES
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee
@@ -34,12 +34,12 @@ SlateportCity_OceanicMuseum_1F_EventScript_PayEntranceFee::
end
SlateportCity_OceanicMuseum_1F_EventScript_CheckMoneyForFee::
- checkmoney 50, 0
+ checkmoney 50
compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_NotEnoughMoney
playse SE_SHOP
- removemoney 50, 0
- updatemoneybox 0, 0
+ removemoney 50
+ updatemoneybox
msgbox SlateportCity_OceanicMuseum_1F_Text_PleaseEnjoyYourself, MSGBOX_DEFAULT
setvar VAR_SLATEPORT_MUSEUM_1F_STATE, 1
hidemoneybox
diff --git a/data/maps/SlateportCity_PokemonFanClub/scripts.inc b/data/maps/SlateportCity_PokemonFanClub/scripts.inc
index 96e1a7633..4599548b5 100644
--- a/data/maps/SlateportCity_PokemonFanClub/scripts.inc
+++ b/data/maps/SlateportCity_PokemonFanClub/scripts.inc
@@ -47,7 +47,7 @@ SlateportCity_PokemonFanClub_EventScript_ChairmanAssessLeadMon::
call_if_unset FLAG_RECEIVED_PINK_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonCute
call_if_unset FLAG_RECEIVED_BLUE_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonBeauty
call_if_unset FLAG_RECEIVED_RED_SCARF, SlateportCity_PokemonFanClub_EventScript_CheckMonCool
- bufferleadmonspeciesname 0
+ bufferleadmonspeciesname STR_VAR_1
switch VAR_TEMP_1
case 0, SlateportCity_PokemonFanClub_EventScript_NoHighConditions
case 1, SlateportCity_PokemonFanClub_EventScript_GiveRedScarf
@@ -72,7 +72,7 @@ SlateportCity_PokemonFanClub_EventScript_NoHighConditions::
end
SlateportCity_PokemonFanClub_EventScript_GiveRedScarf::
- checkitemspace ITEM_RED_SCARF, 1
+ checkitemspace ITEM_RED_SCARF
compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -83,7 +83,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveRedScarf::
end
SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf::
- checkitemspace ITEM_BLUE_SCARF, 1
+ checkitemspace ITEM_BLUE_SCARF
compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -94,7 +94,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveBlueScarf::
end
SlateportCity_PokemonFanClub_EventScript_GivePinkScarf::
- checkitemspace ITEM_PINK_SCARF, 1
+ checkitemspace ITEM_PINK_SCARF
compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -105,7 +105,7 @@ SlateportCity_PokemonFanClub_EventScript_GivePinkScarf::
end
SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf::
- checkitemspace ITEM_GREEN_SCARF, 1
+ checkitemspace ITEM_GREEN_SCARF
compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
@@ -116,7 +116,7 @@ SlateportCity_PokemonFanClub_EventScript_GiveGreenScarf::
end
SlateportCity_PokemonFanClub_EventScript_GiveYellowScarf::
- checkitemspace ITEM_YELLOW_SCARF, 1
+ checkitemspace ITEM_YELLOW_SCARF
compare VAR_RESULT, FALSE
goto_if_eq SlateportCity_PokemonFanClub_EventScript_NoRoomForScarf
msgbox SlateportCity_PokemonFanClub_Text_MonMostImpressiveGiveItThis, MSGBOX_DEFAULT
diff --git a/data/maps/SootopolisCity/scripts.inc b/data/maps/SootopolisCity/scripts.inc
index f3f8ea024..6ef5b7790 100644
--- a/data/maps/SootopolisCity/scripts.inc
+++ b/data/maps/SootopolisCity/scripts.inc
@@ -34,19 +34,19 @@ SootopolisCity_EventScript_LegendariesNotArrived::
end
SootopolisCity_EventScript_LockHouseDoors::
- 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 51, 36, METATILE_Sootopolis_Door_Closed, 1
+ setmetatile 9, 6, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 9, 17, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 9, 26, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 44, 17, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 8, 35, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 53, 28, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 45, 6, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 48, 25, METATILE_Sootopolis_Door_Closed, TRUE
+ setmetatile 51, 36, METATILE_Sootopolis_Door_Closed, TRUE
return
SootopolisCity_EventScript_LockGymDoor::
- setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, 1
+ setmetatile 31, 32, METATILE_Sootopolis_GymDoor_Closed, TRUE
return
SootopolisCity_OnTransition:
@@ -206,7 +206,7 @@ SootopolisCity_EventScript_PlayerFaceLegendaries2::
return
SootopolisCity_OnResume:
- setdivewarp MAP_UNDERWATER_SOOTOPOLIS_CITY, 255, 9, 6
+ setdivewarp MAP_UNDERWATER_SOOTOPOLIS_CITY, 9, 6
end
SootopolisCity_OnFrame:
@@ -565,7 +565,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter::
fadenewbgm MUS_SOOTOPOLIS
delay 120
clearflag FLAG_HIDE_MAP_NAME_POPUP
- warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 43, 32
+ warpsootopolislegend MAP_SOOTOPOLIS_CITY, 43, 32
waitstate
end
@@ -618,35 +618,35 @@ SootopolisCity_EventScript_RayquazaSceneFromDive::
fadenewbgm MUS_SURF
delay 120
clearflag FLAG_HIDE_MAP_NAME_POPUP
- warpsootopolislegend MAP_SOOTOPOLIS_CITY, 255, 29, 53
+ warpsootopolislegend MAP_SOOTOPOLIS_CITY, 29, 53
waitstate
end
SootopolisCity_EventScript_SetRoughWater::
- setmetatile 27, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 28, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 29, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 30, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 27, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 28, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 29, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 30, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 27, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 28, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 29, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 30, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 32, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 33, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 34, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 35, 43, METATILE_Sootopolis_RoughWater, 0
- setmetatile 32, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 33, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 34, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 35, 44, METATILE_Sootopolis_RoughWater, 0
- setmetatile 32, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 33, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 34, 45, METATILE_Sootopolis_RoughWater, 0
- setmetatile 35, 45, METATILE_Sootopolis_RoughWater, 0
+ setmetatile 27, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 28, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 29, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 30, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 27, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 28, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 29, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 30, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 27, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 28, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 29, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 30, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 32, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 33, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 34, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 35, 43, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 32, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 33, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 34, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 35, 44, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 32, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 33, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 34, 45, METATILE_Sootopolis_RoughWater, FALSE
+ setmetatile 35, 45, METATILE_Sootopolis_RoughWater, FALSE
return
SootopolisCity_Movement_RayquazaFlyOff:
@@ -1003,7 +1003,7 @@ SootopolisCity_EventScript_StevenLeadPlayerCaveOfOrigin::
setflag FLAG_STEVEN_GUIDES_TO_CAVE_OF_ORIGIN
applymovement OBJ_EVENT_ID_PLAYER, SootopolisCity_Movement_PlayerEnterCaveOfOrigin
waitmovement 0
- warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 255, 9, 20
+ warp MAP_CAVE_OF_ORIGIN_ENTRANCE, 9, 20
waitstate
end
@@ -1460,7 +1460,7 @@ SootopolisCity_EventScript_MaxieArchieLeave::
clearflag FLAG_HIDE_MT_PYRE_SUMMIT_MAXIE
clearflag FLAG_HIDE_MT_PYRE_SUMMIT_ARCHIE
setvar VAR_MT_PYRE_STATE, 2
- warpsilent MAP_SOOTOPOLIS_CITY, 255, 31, 34
+ warpsilent MAP_SOOTOPOLIS_CITY, 31, 34
waitstate
releaseall
end
diff --git a/data/maps/SootopolisCity_Gym_1F/scripts.inc b/data/maps/SootopolisCity_Gym_1F/scripts.inc
index b20cf7888..4a21dcdcd 100644
--- a/data/maps/SootopolisCity_Gym_1F/scripts.inc
+++ b/data/maps/SootopolisCity_Gym_1F/scripts.inc
@@ -25,14 +25,14 @@ SootopolisCity_Gym_1F_EventScript_CheckSetStairMetatiles::
goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstStairs
compare VAR_ICE_STEP_COUNT, 67
goto_if_lt SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs
- setmetatile 8, 4, METATILE_SootopolisGym_Stairs, 0
- setmetatile 8, 5, METATILE_SootopolisGym_Stairs, 0
+ setmetatile 8, 4, METATILE_SootopolisGym_Stairs, FALSE
+ setmetatile 8, 5, METATILE_SootopolisGym_Stairs, FALSE
SootopolisCity_Gym_1F_EventScript_OpenFirstAndSecondStairs::
- setmetatile 8, 10, METATILE_SootopolisGym_Stairs, 0
- setmetatile 8, 11, METATILE_SootopolisGym_Stairs, 0
+ setmetatile 8, 10, METATILE_SootopolisGym_Stairs, FALSE
+ setmetatile 8, 11, METATILE_SootopolisGym_Stairs, FALSE
SootopolisCity_Gym_1F_EventScript_OpenFirstStairs::
- setmetatile 8, 15, METATILE_SootopolisGym_Stairs, 0
- setmetatile 8, 16, METATILE_SootopolisGym_Stairs, 0
+ setmetatile 8, 15, METATILE_SootopolisGym_Stairs, FALSE
+ setmetatile 8, 16, METATILE_SootopolisGym_Stairs, FALSE
SootopolisCity_Gym_1F_EventScript_StopCheckingStairs::
return
diff --git a/data/maps/SootopolisCity_House6/scripts.inc b/data/maps/SootopolisCity_House6/scripts.inc
index be2dad11f..fd570fc68 100644
--- a/data/maps/SootopolisCity_House6/scripts.inc
+++ b/data/maps/SootopolisCity_House6/scripts.inc
@@ -27,7 +27,7 @@ SootopolisCity_House6_EventScript_ReceivedWailmerDoll::
end
SootopolisCity_House6_EventScript_NoRoomForWailmerDoll::
- bufferdecorationname 1, DECOR_WAILMER_DOLL
+ bufferdecorationname STR_VAR_2, DECOR_WAILMER_DOLL
msgbox gText_NoRoomLeftForAnother, MSGBOX_DEFAULT
msgbox SootopolisCity_House6_Text_IllHoldItForYou, MSGBOX_DEFAULT
release
diff --git a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc
index ab087696e..5620bb3e4 100644
--- a/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc
+++ b/data/maps/SootopolisCity_LotadAndSeedotHouse/scripts.inc
@@ -9,7 +9,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_SeedotBrother::
special ChoosePartyMon
waitstate
copyvar VAR_RESULT, VAR_0x8004
- compare VAR_RESULT, 255
+ compare VAR_RESULT, PARTY_NOTHING_CHOSEN
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowSeedot
special CompareSeedotSize
compare VAR_RESULT, 1
@@ -58,7 +58,7 @@ SootopolisCity_LotadAndSeedotHouse_EventScript_LotadBrother::
special ChoosePartyMon
waitstate
copyvar VAR_RESULT, VAR_0x8004
- compare VAR_RESULT, 255
+ compare VAR_RESULT, PARTY_NOTHING_CHOSEN
goto_if_eq SootopolisCity_LotadAndSeedotHouse_EventScript_CancelShowLotad
special CompareLotadSize
compare VAR_RESULT, 1
diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
index 1fb8a8f72..70dbc98aa 100644
--- a/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
+++ b/data/maps/SootopolisCity_MysteryEventsHouse_1F/scripts.inc
@@ -115,7 +115,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_TrainerVisiting::
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementEast
compare VAR_FACING, DIR_WEST
call_if_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_EnterBasementWest
- warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 255, 3, 1
+ warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F, 3, 1
waitstate
release
end
diff --git a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc
index f0ebbf516..93f008925 100644
--- a/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc
+++ b/data/maps/SootopolisCity_MysteryEventsHouse_B1F/scripts.inc
@@ -34,7 +34,7 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_BattleVisitingTrainer::
waitmovement 0
special LoadPlayerParty
setvar VAR_TEMP_1, 1
- warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 255, 3, 1
+ warp MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 3, 1
waitstate
releaseall
end
diff --git a/data/maps/SouthernIsland_Exterior/scripts.inc b/data/maps/SouthernIsland_Exterior/scripts.inc
index b491c2f6c..e40c7819e 100644
--- a/data/maps/SouthernIsland_Exterior/scripts.inc
+++ b/data/maps/SouthernIsland_Exterior/scripts.inc
@@ -23,7 +23,7 @@ SouthernIsland_Exterior_EventScript_Sailor::
hideobjectat LOCALID_SAILOR, MAP_SOUTHERN_ISLAND_EXTERIOR
setvar VAR_0x8004, LOCALID_SS_TIDAL
call Common_EventScript_FerryDepartIsland
- warp MAP_LILYCOVE_CITY_HARBOR, 255, 8, 11
+ warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
end
diff --git a/data/maps/TrainerHill_Elevator/scripts.inc b/data/maps/TrainerHill_Elevator/scripts.inc
index f4ebc7ea9..05878fe85 100644
--- a/data/maps/TrainerHill_Elevator/scripts.inc
+++ b/data/maps/TrainerHill_Elevator/scripts.inc
@@ -15,7 +15,7 @@ TrainerHill_Elevator_EventScript_ExitToRoof::
applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevatorToRoof
waitmovement 0
releaseall
- warp MAP_TRAINER_HILL_ROOF, 255, 15, 5
+ warp MAP_TRAINER_HILL_ROOF, 15, 5
waitstate
end
@@ -37,7 +37,7 @@ TrainerHill_Elevator_EventScript_EnterElevator::
delay 25
applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Elevator_Movement_PlayerExitElevator
waitmovement 0
- warp MAP_TRAINER_HILL_ENTRANCE, 255, 17, 8
+ warp MAP_TRAINER_HILL_ENTRANCE, 17, 8
waitstate
end
diff --git a/data/maps/TrainerHill_Entrance/scripts.inc b/data/maps/TrainerHill_Entrance/scripts.inc
index af4a4c123..4c76ccb52 100644
--- a/data/maps/TrainerHill_Entrance/scripts.inc
+++ b/data/maps/TrainerHill_Entrance/scripts.inc
@@ -53,7 +53,7 @@ TrainerHill_Entrance_OnLoad:
end
TrainerHill_Entrance_EventScript_OpenCounterDoor::
- setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, 0
+ setmetatile 17, 10, METATILE_TrainerHill_GreenFloorTile, FALSE
return
TrainerHill_Entrance_OnFrame:
@@ -67,7 +67,7 @@ TrainerHill_Entrance_EventScript_ExitElevator::
lockall
applymovement OBJ_EVENT_ID_PLAYER, TrainerHill_Entrance_Movement_PlayerExitElevator
waitmovement 0
- setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, 1
+ setmetatile 17, 10, METATILE_TrainerHill_CounterDoor, TRUE
special DrawWholeMapView
playse SE_CLICK
waitse
diff --git a/data/maps/Underwater_MarineCave/scripts.inc b/data/maps/Underwater_MarineCave/scripts.inc
index cbd158e27..6c8762835 100644
--- a/data/maps/Underwater_MarineCave/scripts.inc
+++ b/data/maps/Underwater_MarineCave/scripts.inc
@@ -8,6 +8,6 @@ Underwater_MarineCave_OnTransition:
end
Underwater_MarineCave_OnResume:
- setdivewarp MAP_MARINE_CAVE_ENTRANCE, 255, 10, 17
+ setdivewarp MAP_MARINE_CAVE_ENTRANCE, 10, 17
end
diff --git a/data/maps/Underwater_Route134/scripts.inc b/data/maps/Underwater_Route134/scripts.inc
index 909b2f8b1..b5ab48e26 100644
--- a/data/maps/Underwater_Route134/scripts.inc
+++ b/data/maps/Underwater_Route134/scripts.inc
@@ -3,6 +3,6 @@ Underwater_Route134_MapScripts::
.byte 0
Underwater_Route134_OnResume:
- setdivewarp MAP_ROUTE134, 255, 60, 31
+ setdivewarp MAP_ROUTE134, 60, 31
end
diff --git a/data/maps/Underwater_SeafloorCavern/scripts.inc b/data/maps/Underwater_SeafloorCavern/scripts.inc
index 2e0613c04..7f1231fef 100644
--- a/data/maps/Underwater_SeafloorCavern/scripts.inc
+++ b/data/maps/Underwater_SeafloorCavern/scripts.inc
@@ -18,22 +18,22 @@ Underwater_SeafloorCavern_OnLoad:
end
Underwater_SeafloorCavern_EventScript_SetSubmarineGoneMetatiles::
- 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
+ setmetatile 5, 3, METATILE_Underwater_RockWall, TRUE
+ setmetatile 6, 3, METATILE_Underwater_RockWall, TRUE
+ setmetatile 7, 3, METATILE_Underwater_RockWall, TRUE
+ setmetatile 8, 3, METATILE_Underwater_RockWall, TRUE
+ setmetatile 5, 4, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 6, 4, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 7, 4, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 8, 4, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 5, 5, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 6, 5, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 7, 5, METATILE_Underwater_FloorShadow, FALSE
+ setmetatile 8, 5, METATILE_Underwater_FloorShadow, FALSE
return
Underwater_SeafloorCavern_OnResume:
- setdivewarp MAP_SEAFLOOR_CAVERN_ENTRANCE, 255, 10, 17
+ setdivewarp MAP_SEAFLOOR_CAVERN_ENTRANCE, 10, 17
end
Underwater_SeafloorCavern_EventScript_CheckStolenSub::
diff --git a/data/maps/Underwater_SealedChamber/scripts.inc b/data/maps/Underwater_SealedChamber/scripts.inc
index 2b3fe5e0d..f670cce0b 100644
--- a/data/maps/Underwater_SealedChamber/scripts.inc
+++ b/data/maps/Underwater_SealedChamber/scripts.inc
@@ -11,11 +11,11 @@ Underwater_SealedChamber_OnDive:
goto Underwater_SealedChamber_EventScript_SurfaceSealedChamber
Underwater_SealedChamber_EventScript_SurfaceRoute134::
- setdivewarp MAP_ROUTE134, 255, 60, 31
+ setdivewarp MAP_ROUTE134, 60, 31
end
Underwater_SealedChamber_EventScript_SurfaceSealedChamber::
- setdivewarp MAP_SEALED_CHAMBER_OUTER_ROOM, 255, 10, 19
+ setdivewarp MAP_SEALED_CHAMBER_OUTER_ROOM, 10, 19
end
Underwater_SealedChamber_EventScript_Braille::
diff --git a/data/maps/Underwater_SootopolisCity/scripts.inc b/data/maps/Underwater_SootopolisCity/scripts.inc
index 4346c284f..8bf30560c 100644
--- a/data/maps/Underwater_SootopolisCity/scripts.inc
+++ b/data/maps/Underwater_SootopolisCity/scripts.inc
@@ -3,6 +3,6 @@ Underwater_SootopolisCity_MapScripts::
.byte 0
Underwater_SootopolisCity_OnResume:
- setdivewarp MAP_SOOTOPOLIS_CITY, 255, 29, 53
+ setdivewarp MAP_SOOTOPOLIS_CITY, 29, 53
end
diff --git a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
index b349a395c..badbe1849 100644
--- a/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentBattleRoom/scripts.inc
@@ -59,7 +59,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter::
VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyLost::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST
special LoadPlayerParty
- warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
+ warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 6, 6
waitstate
VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent::
@@ -120,7 +120,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge::
VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_WON
special LoadPlayerParty
- warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
+ warp MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 6, 6
waitstate
VerdanturfTown_BattleTentBattleRoom_EventScript_PauseChallenge::
diff --git a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc
index c2e9dbd6a..debf1b177 100644
--- a/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentCorridor/scripts.inc
@@ -22,7 +22,7 @@ VerdanturfTown_BattleTentCorridor_EventScript_EnterCorridor::
closedoor 2, 1
waitdooranim
setvar VAR_0x8006, 0
- warp MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM, 255, 6, 5
+ warp MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM, 6, 5
waitstate
releaseall
end
diff --git a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
index dd8f0eaa4..4f863f171 100644
--- a/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
+++ b/data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
@@ -162,7 +162,7 @@ VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge::
msgbox VerdanturfTown_BattleTentLobby_Text_NowFollowMe, MSGBOX_DEFAULT
closemessage
call VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor
- warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 255, 2, 7
+ warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_0, 0
waitstate
end
diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc
index dcc0da9f7..3d2ab82a9 100644
--- a/data/script_cmd_table.inc
+++ b/data/script_cmd_table.inc
@@ -150,14 +150,14 @@ gScriptCmdTable::
.4byte ScrCmd_showmoneybox @ 0x93
.4byte ScrCmd_hidemoneybox @ 0x94
.4byte ScrCmd_updatemoneybox @ 0x95
- .4byte ScrCmd_getpricereduction @ 0x96
+ .4byte ScrCmd_getpokenewsactive @ 0x96
.4byte ScrCmd_fadescreen @ 0x97
.4byte ScrCmd_fadescreenspeed @ 0x98
- .4byte ScrCmd_setflashradius @ 0x99
+ .4byte ScrCmd_setflashlevel @ 0x99
.4byte ScrCmd_animateflash @ 0x9a
.4byte ScrCmd_messageautoscroll @ 0x9b
.4byte ScrCmd_dofieldeffect @ 0x9c
- .4byte ScrCmd_setfieldeffectarg @ 0x9d
+ .4byte ScrCmd_setfieldeffectargument @ 0x9d
.4byte ScrCmd_waitfieldeffect @ 0x9e
.4byte ScrCmd_setrespawn @ 0x9f
.4byte ScrCmd_checkplayergender @ 0xa0
@@ -168,8 +168,8 @@ gScriptCmdTable::
.4byte ScrCmd_doweather @ 0xa5
.4byte ScrCmd_setstepcallback @ 0xa6
.4byte ScrCmd_setmaplayoutindex @ 0xa7
- .4byte ScrCmd_setobjectpriority @ 0xa8
- .4byte ScrCmd_resetobjectpriority @ 0xa9
+ .4byte ScrCmd_setobjectsubpriority @ 0xa8
+ .4byte ScrCmd_resetobjectsubpriority @ 0xa9
.4byte ScrCmd_createvobject @ 0xaa
.4byte ScrCmd_turnvobject @ 0xab
.4byte ScrCmd_opendoor @ 0xac
@@ -207,7 +207,7 @@ gScriptCmdTable::
.4byte ScrCmd_nop1 @ 0xcc
.4byte ScrCmd_setmoneventlegal @ 0xcd
.4byte ScrCmd_checkmoneventlegal @ 0xce
- .4byte ScrCmd_gotoram @ 0xcf
+ .4byte ScrCmd_gotowondercardscript @ 0xcf
.4byte ScrCmd_nop1 @ 0xd0
.4byte ScrCmd_warpspinenter @ 0xd1
.4byte ScrCmd_setmonmetlocation @ 0xd2
@@ -225,7 +225,7 @@ gScriptCmdTable::
.4byte ScrCmd_buffertrainername @ 0xde
.4byte ScrCmd_pokenavcall @ 0xdf
.4byte ScrCmd_warpsootopolislegend @ 0xe0
- .4byte ScrCmd_buffercontesttype @ 0xe1
+ .4byte ScrCmd_buffercontestname @ 0xe1
.4byte ScrCmd_bufferitemnameplural @ 0xe2
gScriptCmdTableEnd::
diff --git a/data/scripts/abnormal_weather.inc b/data/scripts/abnormal_weather.inc
index 9af24c45d..c38982da8 100644
--- a/data/scripts/abnormal_weather.inc
+++ b/data/scripts/abnormal_weather.inc
@@ -1,161 +1,161 @@
AbnormalWeather_EventScript_PlaceTilesRoute114North::
- setmetatile 7, 3, METATILE_Fallarbor_RedCaveEntrance_Top, 1
- setmetatile 7, 4, METATILE_Fallarbor_RedCaveEntrance_Bottom, 0
+ setmetatile 7, 3, METATILE_Fallarbor_RedCaveEntrance_Top, TRUE
+ setmetatile 7, 4, METATILE_Fallarbor_RedCaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute114South::
- setmetatile 6, 45, METATILE_Fallarbor_BrownCaveEntrance_Top, 1
- setmetatile 6, 46, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0
+ setmetatile 6, 45, METATILE_Fallarbor_BrownCaveEntrance_Top, TRUE
+ setmetatile 6, 46, METATILE_Fallarbor_BrownCaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute115West::
- setmetatile 21, 5, METATILE_Fallarbor_BrownCaveEntrance_Top, 1
- setmetatile 21, 6, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0
+ setmetatile 21, 5, METATILE_Fallarbor_BrownCaveEntrance_Top, TRUE
+ setmetatile 21, 6, METATILE_Fallarbor_BrownCaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute115East::
- setmetatile 36, 9, METATILE_Fallarbor_BrownCaveEntrance_Top, 1
- setmetatile 36, 10, METATILE_Fallarbor_BrownCaveEntrance_Bottom, 0
+ setmetatile 36, 9, METATILE_Fallarbor_BrownCaveEntrance_Top, TRUE
+ setmetatile 36, 10, METATILE_Fallarbor_BrownCaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute116North::
- setmetatile 59, 12, METATILE_General_CaveEntrance_Top, 1
- setmetatile 59, 13, METATILE_General_CaveEntrance_Bottom, 0
+ setmetatile 59, 12, METATILE_General_CaveEntrance_Top, TRUE
+ setmetatile 59, 13, METATILE_General_CaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute116South::
- setmetatile 79, 5, METATILE_General_CaveEntrance_Top, 1
- setmetatile 79, 6, METATILE_General_CaveEntrance_Bottom, 0
+ setmetatile 79, 5, METATILE_General_CaveEntrance_Top, TRUE
+ setmetatile 79, 6, METATILE_General_CaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute118East::
- setmetatile 42, 5, METATILE_General_CaveEntrance_Top, 1
- setmetatile 42, 6, METATILE_General_CaveEntrance_Bottom, 0
+ setmetatile 42, 5, METATILE_General_CaveEntrance_Top, TRUE
+ setmetatile 42, 6, METATILE_General_CaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute118West::
- setmetatile 9, 5, METATILE_General_CaveEntrance_Top, 1
- setmetatile 9, 6, METATILE_General_CaveEntrance_Bottom, 0
+ setmetatile 9, 5, METATILE_General_CaveEntrance_Top, TRUE
+ setmetatile 9, 6, METATILE_General_CaveEntrance_Bottom, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute105North::
- setmetatile 10, 28, METATILE_General_RoughWater, 0
- setmetatile 11, 28, METATILE_General_RoughWater, 0
- setmetatile 9, 29, METATILE_General_RoughWater, 0
- setmetatile 10, 29, METATILE_General_RoughDeepWater, 0
- setmetatile 11, 29, METATILE_General_RoughDeepWater, 0
- setmetatile 12, 29, METATILE_General_RoughWater, 0
- setmetatile 9, 30, METATILE_General_RoughWater, 0
- setmetatile 10, 30, METATILE_General_RoughDeepWater, 0
- setmetatile 11, 30, METATILE_General_RoughDeepWater, 0
- setmetatile 12, 30, METATILE_General_RoughWater, 0
- setmetatile 10, 31, METATILE_General_RoughWater, 0
- setmetatile 11, 31, METATILE_General_RoughWater, 0
+ setmetatile 10, 28, METATILE_General_RoughWater, FALSE
+ setmetatile 11, 28, METATILE_General_RoughWater, FALSE
+ setmetatile 9, 29, METATILE_General_RoughWater, FALSE
+ setmetatile 10, 29, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 11, 29, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 12, 29, METATILE_General_RoughWater, FALSE
+ setmetatile 9, 30, METATILE_General_RoughWater, FALSE
+ setmetatile 10, 30, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 11, 30, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 12, 30, METATILE_General_RoughWater, FALSE
+ setmetatile 10, 31, METATILE_General_RoughWater, FALSE
+ setmetatile 11, 31, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute105South::
- setmetatile 20, 53, METATILE_General_RoughWater, 0
- setmetatile 21, 53, METATILE_General_RoughWater, 0
- setmetatile 19, 54, METATILE_General_RoughWater, 0
- setmetatile 20, 54, METATILE_General_RoughDeepWater, 0
- setmetatile 21, 54, METATILE_General_RoughDeepWater, 0
- setmetatile 22, 54, METATILE_General_RoughWater, 0
- setmetatile 19, 55, METATILE_General_RoughWater, 0
- setmetatile 20, 55, METATILE_General_RoughDeepWater, 0
- setmetatile 21, 55, METATILE_General_RoughDeepWater, 0
- setmetatile 22, 55, METATILE_General_RoughWater, 0
- setmetatile 20, 56, METATILE_General_RoughWater, 0
- setmetatile 21, 56, METATILE_General_RoughWater, 0
+ setmetatile 20, 53, METATILE_General_RoughWater, FALSE
+ setmetatile 21, 53, METATILE_General_RoughWater, FALSE
+ setmetatile 19, 54, METATILE_General_RoughWater, FALSE
+ setmetatile 20, 54, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 21, 54, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 22, 54, METATILE_General_RoughWater, FALSE
+ setmetatile 19, 55, METATILE_General_RoughWater, FALSE
+ setmetatile 20, 55, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 21, 55, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 22, 55, METATILE_General_RoughWater, FALSE
+ setmetatile 20, 56, METATILE_General_RoughWater, FALSE
+ setmetatile 21, 56, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute125West::
- setmetatile 8, 16, METATILE_General_RoughWater, 0
- setmetatile 9, 16, METATILE_General_RoughWater, 0
- setmetatile 7, 17, METATILE_General_RoughWater, 0
- setmetatile 8, 17, METATILE_General_RoughDeepWater, 0
- setmetatile 9, 17, METATILE_General_RoughDeepWater, 0
- setmetatile 10, 17, METATILE_General_RoughWater, 0
- setmetatile 7, 18, METATILE_General_RoughWater, 0
- setmetatile 8, 18, METATILE_General_RoughDeepWater, 0
- setmetatile 9, 18, METATILE_General_RoughDeepWater, 0
- setmetatile 10, 18, METATILE_General_RoughWater, 0
- setmetatile 8, 19, METATILE_General_RoughWater, 0
- setmetatile 9, 19, METATILE_General_RoughWater, 0
+ setmetatile 8, 16, METATILE_General_RoughWater, FALSE
+ setmetatile 9, 16, METATILE_General_RoughWater, FALSE
+ setmetatile 7, 17, METATILE_General_RoughWater, FALSE
+ setmetatile 8, 17, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 9, 17, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 10, 17, METATILE_General_RoughWater, FALSE
+ setmetatile 7, 18, METATILE_General_RoughWater, FALSE
+ setmetatile 8, 18, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 9, 18, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 10, 18, METATILE_General_RoughWater, FALSE
+ setmetatile 8, 19, METATILE_General_RoughWater, FALSE
+ setmetatile 9, 19, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute125East::
- setmetatile 53, 18, METATILE_General_RoughWater, 0
- setmetatile 54, 18, METATILE_General_RoughWater, 0
- setmetatile 52, 19, METATILE_General_RoughWater, 0
- setmetatile 53, 19, METATILE_General_RoughDeepWater, 0
- setmetatile 54, 19, METATILE_General_RoughDeepWater, 0
- setmetatile 55, 19, METATILE_General_RoughWater, 0
- setmetatile 52, 20, METATILE_General_RoughWater, 0
- setmetatile 53, 20, METATILE_General_RoughDeepWater, 0
- setmetatile 54, 20, METATILE_General_RoughDeepWater, 0
- setmetatile 55, 20, METATILE_General_RoughWater, 0
- setmetatile 53, 21, METATILE_General_RoughWater, 0
- setmetatile 54, 21, METATILE_General_RoughWater, 0
+ setmetatile 53, 18, METATILE_General_RoughWater, FALSE
+ setmetatile 54, 18, METATILE_General_RoughWater, FALSE
+ setmetatile 52, 19, METATILE_General_RoughWater, FALSE
+ setmetatile 53, 19, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 54, 19, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 55, 19, METATILE_General_RoughWater, FALSE
+ setmetatile 52, 20, METATILE_General_RoughWater, FALSE
+ setmetatile 53, 20, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 54, 20, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 55, 20, METATILE_General_RoughWater, FALSE
+ setmetatile 53, 21, METATILE_General_RoughWater, FALSE
+ setmetatile 54, 21, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute127North::
- setmetatile 57, 9, METATILE_General_RoughWater, 0
- setmetatile 58, 9, METATILE_General_RoughWater, 0
- setmetatile 56, 10, METATILE_General_RoughWater, 0
- setmetatile 57, 10, METATILE_General_RoughDeepWater, 0
- setmetatile 58, 10, METATILE_General_RoughDeepWater, 0
- setmetatile 59, 10, METATILE_General_RoughWater, 0
- setmetatile 56, 11, METATILE_General_RoughWater, 0
- setmetatile 57, 11, METATILE_General_RoughDeepWater, 0
- setmetatile 58, 11, METATILE_General_RoughDeepWater, 0
- setmetatile 59, 11, METATILE_General_RoughWater, 0
- setmetatile 57, 12, METATILE_General_RoughWater, 0
- setmetatile 58, 12, METATILE_General_RoughWater, 0
+ setmetatile 57, 9, METATILE_General_RoughWater, FALSE
+ setmetatile 58, 9, METATILE_General_RoughWater, FALSE
+ setmetatile 56, 10, METATILE_General_RoughWater, FALSE
+ setmetatile 57, 10, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 58, 10, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 59, 10, METATILE_General_RoughWater, FALSE
+ setmetatile 56, 11, METATILE_General_RoughWater, FALSE
+ setmetatile 57, 11, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 58, 11, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 59, 11, METATILE_General_RoughWater, FALSE
+ setmetatile 57, 12, METATILE_General_RoughWater, FALSE
+ setmetatile 58, 12, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute127South::
- setmetatile 61, 30, METATILE_General_RoughWater, 0
- setmetatile 62, 30, METATILE_General_RoughWater, 0
- setmetatile 60, 31, METATILE_General_RoughWater, 0
- setmetatile 61, 31, METATILE_General_RoughDeepWater, 0
- setmetatile 62, 31, METATILE_General_RoughDeepWater, 0
- setmetatile 63, 31, METATILE_General_RoughWater, 0
- setmetatile 60, 32, METATILE_General_RoughWater, 0
- setmetatile 61, 32, METATILE_General_RoughDeepWater, 0
- setmetatile 62, 32, METATILE_General_RoughDeepWater, 0
- setmetatile 63, 32, METATILE_General_RoughWater, 0
- setmetatile 61, 33, METATILE_General_RoughWater, 0
- setmetatile 62, 33, METATILE_General_RoughWater, 0
+ setmetatile 61, 30, METATILE_General_RoughWater, FALSE
+ setmetatile 62, 30, METATILE_General_RoughWater, FALSE
+ setmetatile 60, 31, METATILE_General_RoughWater, FALSE
+ setmetatile 61, 31, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 62, 31, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 63, 31, METATILE_General_RoughWater, FALSE
+ setmetatile 60, 32, METATILE_General_RoughWater, FALSE
+ setmetatile 61, 32, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 62, 32, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 63, 32, METATILE_General_RoughWater, FALSE
+ setmetatile 61, 33, METATILE_General_RoughWater, FALSE
+ setmetatile 62, 33, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute129West::
- setmetatile 16, 14, METATILE_General_RoughWater, 0
- setmetatile 17, 14, METATILE_General_RoughWater, 0
- setmetatile 15, 15, METATILE_General_RoughWater, 0
- setmetatile 16, 15, METATILE_General_RoughDeepWater, 0
- setmetatile 17, 15, METATILE_General_RoughDeepWater, 0
- setmetatile 18, 15, METATILE_General_RoughWater, 0
- setmetatile 15, 16, METATILE_General_RoughWater, 0
- setmetatile 16, 16, METATILE_General_RoughDeepWater, 0
- setmetatile 17, 16, METATILE_General_RoughDeepWater, 0
- setmetatile 18, 16, METATILE_General_RoughWater, 0
- setmetatile 16, 17, METATILE_General_RoughWater, 0
- setmetatile 17, 17, METATILE_General_RoughWater, 0
+ setmetatile 16, 14, METATILE_General_RoughWater, FALSE
+ setmetatile 17, 14, METATILE_General_RoughWater, FALSE
+ setmetatile 15, 15, METATILE_General_RoughWater, FALSE
+ setmetatile 16, 15, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 17, 15, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 18, 15, METATILE_General_RoughWater, FALSE
+ setmetatile 15, 16, METATILE_General_RoughWater, FALSE
+ setmetatile 16, 16, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 17, 16, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 18, 16, METATILE_General_RoughWater, FALSE
+ setmetatile 16, 17, METATILE_General_RoughWater, FALSE
+ setmetatile 17, 17, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_PlaceTilesRoute129East::
- setmetatile 42, 19, METATILE_General_RoughWater, 0
- setmetatile 43, 19, METATILE_General_RoughWater, 0
- setmetatile 41, 20, METATILE_General_RoughWater, 0
- setmetatile 42, 20, METATILE_General_RoughDeepWater, 0
- setmetatile 43, 20, METATILE_General_RoughDeepWater, 0
- setmetatile 44, 20, METATILE_General_RoughWater, 0
- setmetatile 41, 21, METATILE_General_RoughWater, 0
- setmetatile 42, 21, METATILE_General_RoughDeepWater, 0
- setmetatile 43, 21, METATILE_General_RoughDeepWater, 0
- setmetatile 44, 21, METATILE_General_RoughWater, 0
- setmetatile 42, 22, METATILE_General_RoughWater, 0
- setmetatile 43, 22, METATILE_General_RoughWater, 0
+ setmetatile 42, 19, METATILE_General_RoughWater, FALSE
+ setmetatile 43, 19, METATILE_General_RoughWater, FALSE
+ setmetatile 41, 20, METATILE_General_RoughWater, FALSE
+ setmetatile 42, 20, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 43, 20, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 44, 20, METATILE_General_RoughWater, FALSE
+ setmetatile 41, 21, METATILE_General_RoughWater, FALSE
+ setmetatile 42, 21, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 43, 21, METATILE_General_RoughDeepWater, FALSE
+ setmetatile 44, 21, METATILE_General_RoughWater, FALSE
+ setmetatile 42, 22, METATILE_General_RoughWater, FALSE
+ setmetatile 43, 22, METATILE_General_RoughWater, FALSE
return
AbnormalWeather_EventScript_HideMapNamePopup::
@@ -222,163 +222,163 @@ AbnormalWeather_EventScript_CleanupMapTiles::
return
AbnormalWeather_EventScript_CleanupRoute114North::
- setmetatile 7, 3, METATILE_Fallarbor_RedRockWall, 1
- setmetatile 7, 4, METATILE_Fallarbor_RedRockWall, 1
+ setmetatile 7, 3, METATILE_Fallarbor_RedRockWall, TRUE
+ setmetatile 7, 4, METATILE_Fallarbor_RedRockWall, TRUE
return
AbnormalWeather_EventScript_CleanupRoute114South::
- setmetatile 6, 45, METATILE_Fallarbor_BrownRockWall, 1
- setmetatile 6, 46, METATILE_Fallarbor_BrownRockWall, 1
+ setmetatile 6, 45, METATILE_Fallarbor_BrownRockWall, TRUE
+ setmetatile 6, 46, METATILE_Fallarbor_BrownRockWall, TRUE
return
AbnormalWeather_EventScript_CleanupRoute115West::
- setmetatile 21, 5, METATILE_Fallarbor_BrownRockWall, 1
- setmetatile 21, 6, METATILE_Fallarbor_BrownRockWall, 1
+ setmetatile 21, 5, METATILE_Fallarbor_BrownRockWall, TRUE
+ setmetatile 21, 6, METATILE_Fallarbor_BrownRockWall, TRUE
return
AbnormalWeather_EventScript_CleanupRoute115East::
- setmetatile 36, 9, METATILE_Fallarbor_BrownRockWall, 1
- setmetatile 36, 10, METATILE_Fallarbor_BrownRockWall, 1
+ setmetatile 36, 9, METATILE_Fallarbor_BrownRockWall, TRUE
+ setmetatile 36, 10, METATILE_Fallarbor_BrownRockWall, TRUE
return
AbnormalWeather_EventScript_CleanupRoute116North::
- setmetatile 59, 12, METATILE_General_RockWall_RockBase, 1
- setmetatile 59, 13, METATILE_General_RockWall_RockBase, 1
+ setmetatile 59, 12, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 59, 13, METATILE_General_RockWall_RockBase, TRUE
return
AbnormalWeather_EventScript_CleanupRoute116South::
- setmetatile 79, 5, METATILE_General_RockWall_RockBase, 1
- setmetatile 79, 6, METATILE_General_RockWall_RockBase, 1
+ setmetatile 79, 5, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 79, 6, METATILE_General_RockWall_RockBase, TRUE
return
AbnormalWeather_EventScript_CleanupRoute118East::
- setmetatile 42, 5, METATILE_General_RockWall_RockBase, 1
- setmetatile 42, 6, METATILE_General_RockWall_GrassBase, 1
+ setmetatile 42, 5, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 42, 6, METATILE_General_RockWall_GrassBase, TRUE
return
AbnormalWeather_EventScript_CleanupRoute118West::
- setmetatile 9, 5, METATILE_General_RockWall_RockBase, 1
- setmetatile 9, 6, METATILE_General_RockWall_GrassBase, 1
+ setmetatile 9, 5, METATILE_General_RockWall_RockBase, TRUE
+ setmetatile 9, 6, METATILE_General_RockWall_GrassBase, TRUE
return
AbnormalWeather_EventScript_CleanupRoute105North::
- setmetatile 10, 28, METATILE_General_CalmWater, 0
- setmetatile 11, 28, METATILE_General_CalmWater, 0
- setmetatile 9, 29, METATILE_General_CalmWater, 0
- setmetatile 10, 29, METATILE_General_CalmWater, 0
- setmetatile 11, 29, METATILE_General_CalmWater, 0
- setmetatile 12, 29, METATILE_General_CalmWater, 0
- setmetatile 9, 30, METATILE_General_CalmWater, 0
- setmetatile 10, 30, METATILE_General_CalmWater, 0
- setmetatile 11, 30, METATILE_General_CalmWater, 0
- setmetatile 12, 30, METATILE_General_CalmWater, 0
- setmetatile 10, 31, METATILE_General_CalmWater, 0
- setmetatile 11, 31, METATILE_General_CalmWater, 0
+ setmetatile 10, 28, METATILE_General_CalmWater, FALSE
+ setmetatile 11, 28, METATILE_General_CalmWater, FALSE
+ setmetatile 9, 29, METATILE_General_CalmWater, FALSE
+ setmetatile 10, 29, METATILE_General_CalmWater, FALSE
+ setmetatile 11, 29, METATILE_General_CalmWater, FALSE
+ setmetatile 12, 29, METATILE_General_CalmWater, FALSE
+ setmetatile 9, 30, METATILE_General_CalmWater, FALSE
+ setmetatile 10, 30, METATILE_General_CalmWater, FALSE
+ setmetatile 11, 30, METATILE_General_CalmWater, FALSE
+ setmetatile 12, 30, METATILE_General_CalmWater, FALSE
+ setmetatile 10, 31, METATILE_General_CalmWater, FALSE
+ setmetatile 11, 31, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute105South::
- setmetatile 20, 53, METATILE_General_CalmWater, 0
- setmetatile 21, 53, METATILE_General_CalmWater, 0
- setmetatile 19, 54, METATILE_General_CalmWater, 0
- setmetatile 20, 54, METATILE_General_CalmWater, 0
- setmetatile 21, 54, METATILE_General_CalmWater, 0
- setmetatile 22, 54, METATILE_General_CalmWater, 0
- setmetatile 19, 55, METATILE_General_CalmWater, 0
- setmetatile 20, 55, METATILE_General_CalmWater, 0
- setmetatile 21, 55, METATILE_General_CalmWater, 0
- setmetatile 22, 55, METATILE_General_CalmWater, 0
- setmetatile 20, 56, METATILE_General_CalmWater, 0
- setmetatile 21, 56, METATILE_General_CalmWater, 0
+ setmetatile 20, 53, METATILE_General_CalmWater, FALSE
+ setmetatile 21, 53, METATILE_General_CalmWater, FALSE
+ setmetatile 19, 54, METATILE_General_CalmWater, FALSE
+ setmetatile 20, 54, METATILE_General_CalmWater, FALSE
+ setmetatile 21, 54, METATILE_General_CalmWater, FALSE
+ setmetatile 22, 54, METATILE_General_CalmWater, FALSE
+ setmetatile 19, 55, METATILE_General_CalmWater, FALSE
+ setmetatile 20, 55, METATILE_General_CalmWater, FALSE
+ setmetatile 21, 55, METATILE_General_CalmWater, FALSE
+ setmetatile 22, 55, METATILE_General_CalmWater, FALSE
+ setmetatile 20, 56, METATILE_General_CalmWater, FALSE
+ setmetatile 21, 56, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute125West::
- setmetatile 8, 16, METATILE_General_CalmWater, 0
- setmetatile 9, 16, METATILE_General_CalmWater, 0
- setmetatile 7, 17, METATILE_General_CalmWater, 0
- setmetatile 8, 17, METATILE_General_CalmWater, 0
- setmetatile 9, 17, METATILE_General_CalmWater, 0
- setmetatile 10, 17, METATILE_General_CalmWater, 0
- setmetatile 7, 18, METATILE_General_CalmWater, 0
- setmetatile 8, 18, METATILE_General_CalmWater, 0
- setmetatile 9, 18, METATILE_General_CalmWater, 0
- setmetatile 10, 18, METATILE_General_CalmWater, 0
- setmetatile 8, 19, METATILE_General_CalmWater, 0
- setmetatile 9, 19, METATILE_General_CalmWater, 0
+ setmetatile 8, 16, METATILE_General_CalmWater, FALSE
+ setmetatile 9, 16, METATILE_General_CalmWater, FALSE
+ setmetatile 7, 17, METATILE_General_CalmWater, FALSE
+ setmetatile 8, 17, METATILE_General_CalmWater, FALSE
+ setmetatile 9, 17, METATILE_General_CalmWater, FALSE
+ setmetatile 10, 17, METATILE_General_CalmWater, FALSE
+ setmetatile 7, 18, METATILE_General_CalmWater, FALSE
+ setmetatile 8, 18, METATILE_General_CalmWater, FALSE
+ setmetatile 9, 18, METATILE_General_CalmWater, FALSE
+ setmetatile 10, 18, METATILE_General_CalmWater, FALSE
+ setmetatile 8, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 9, 19, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute125East::
- setmetatile 53, 18, METATILE_General_CalmWater, 0
- setmetatile 54, 18, METATILE_General_CalmWater, 0
- setmetatile 52, 19, METATILE_General_CalmWater, 0
- setmetatile 53, 19, METATILE_General_CalmWater, 0
- setmetatile 54, 19, METATILE_General_CalmWater, 0
- setmetatile 55, 19, METATILE_General_CalmWater, 0
- setmetatile 52, 20, METATILE_General_CalmWater, 0
- setmetatile 53, 20, METATILE_General_CalmWater, 0
- setmetatile 54, 20, METATILE_General_CalmWater, 0
- setmetatile 55, 20, METATILE_General_CalmWater, 0
- setmetatile 53, 21, METATILE_General_CalmWater, 0
- setmetatile 54, 21, METATILE_General_CalmWater, 0
+ setmetatile 53, 18, METATILE_General_CalmWater, FALSE
+ setmetatile 54, 18, METATILE_General_CalmWater, FALSE
+ setmetatile 52, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 53, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 54, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 55, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 52, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 53, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 54, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 55, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 53, 21, METATILE_General_CalmWater, FALSE
+ setmetatile 54, 21, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute127North::
- setmetatile 57, 9, METATILE_General_CalmWater, 0
- setmetatile 58, 9, METATILE_General_CalmWater, 0
- setmetatile 56, 10, METATILE_General_CalmWater, 0
- setmetatile 57, 10, METATILE_General_CalmWater, 0
- setmetatile 58, 10, METATILE_General_CalmWater, 0
- setmetatile 59, 10, METATILE_General_CalmWater, 0
- setmetatile 56, 11, METATILE_General_CalmWater, 0
- setmetatile 57, 11, METATILE_General_CalmWater, 0
- setmetatile 58, 11, METATILE_General_CalmWater, 0
- setmetatile 59, 11, METATILE_General_CalmWater, 0
- setmetatile 57, 12, METATILE_General_CalmWater, 0
- setmetatile 58, 12, METATILE_General_CalmWater, 0
+ setmetatile 57, 9, METATILE_General_CalmWater, FALSE
+ setmetatile 58, 9, METATILE_General_CalmWater, FALSE
+ setmetatile 56, 10, METATILE_General_CalmWater, FALSE
+ setmetatile 57, 10, METATILE_General_CalmWater, FALSE
+ setmetatile 58, 10, METATILE_General_CalmWater, FALSE
+ setmetatile 59, 10, METATILE_General_CalmWater, FALSE
+ setmetatile 56, 11, METATILE_General_CalmWater, FALSE
+ setmetatile 57, 11, METATILE_General_CalmWater, FALSE
+ setmetatile 58, 11, METATILE_General_CalmWater, FALSE
+ setmetatile 59, 11, METATILE_General_CalmWater, FALSE
+ setmetatile 57, 12, METATILE_General_CalmWater, FALSE
+ setmetatile 58, 12, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute127South::
- setmetatile 61, 30, METATILE_General_CalmWater, 0
- setmetatile 62, 30, METATILE_General_CalmWater, 0
- setmetatile 60, 31, METATILE_General_CalmWater, 0
- setmetatile 61, 31, METATILE_General_CalmWater, 0
- setmetatile 62, 31, METATILE_General_CalmWater, 0
- setmetatile 63, 31, METATILE_General_CalmWater, 0
- setmetatile 60, 32, METATILE_General_CalmWater, 0
- setmetatile 61, 32, METATILE_General_CalmWater, 0
- setmetatile 62, 32, METATILE_General_CalmWater, 0
- setmetatile 63, 32, METATILE_General_CalmWater, 0
- setmetatile 61, 33, METATILE_General_CalmWater, 0
- setmetatile 62, 33, METATILE_General_CalmWater, 0
+ setmetatile 61, 30, METATILE_General_CalmWater, FALSE
+ setmetatile 62, 30, METATILE_General_CalmWater, FALSE
+ setmetatile 60, 31, METATILE_General_CalmWater, FALSE
+ setmetatile 61, 31, METATILE_General_CalmWater, FALSE
+ setmetatile 62, 31, METATILE_General_CalmWater, FALSE
+ setmetatile 63, 31, METATILE_General_CalmWater, FALSE
+ setmetatile 60, 32, METATILE_General_CalmWater, FALSE
+ setmetatile 61, 32, METATILE_General_CalmWater, FALSE
+ setmetatile 62, 32, METATILE_General_CalmWater, FALSE
+ setmetatile 63, 32, METATILE_General_CalmWater, FALSE
+ setmetatile 61, 33, METATILE_General_CalmWater, FALSE
+ setmetatile 62, 33, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute129West::
- setmetatile 16, 14, METATILE_General_CalmWater, 0
- setmetatile 17, 14, METATILE_General_CalmWater, 0
- setmetatile 15, 15, METATILE_General_CalmWater, 0
- setmetatile 16, 15, METATILE_General_CalmWater, 0
- setmetatile 17, 15, METATILE_General_CalmWater, 0
- setmetatile 18, 15, METATILE_General_CalmWater, 0
- setmetatile 15, 16, METATILE_General_CalmWater, 0
- setmetatile 16, 16, METATILE_General_CalmWater, 0
- setmetatile 17, 16, METATILE_General_CalmWater, 0
- setmetatile 18, 16, METATILE_General_CalmWater, 0
- setmetatile 16, 17, METATILE_General_CalmWater, 0
- setmetatile 17, 17, METATILE_General_CalmWater, 0
+ setmetatile 16, 14, METATILE_General_CalmWater, FALSE
+ setmetatile 17, 14, METATILE_General_CalmWater, FALSE
+ setmetatile 15, 15, METATILE_General_CalmWater, FALSE
+ setmetatile 16, 15, METATILE_General_CalmWater, FALSE
+ setmetatile 17, 15, METATILE_General_CalmWater, FALSE
+ setmetatile 18, 15, METATILE_General_CalmWater, FALSE
+ setmetatile 15, 16, METATILE_General_CalmWater, FALSE
+ setmetatile 16, 16, METATILE_General_CalmWater, FALSE
+ setmetatile 17, 16, METATILE_General_CalmWater, FALSE
+ setmetatile 18, 16, METATILE_General_CalmWater, FALSE
+ setmetatile 16, 17, METATILE_General_CalmWater, FALSE
+ setmetatile 17, 17, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_EventScript_CleanupRoute129East::
- setmetatile 42, 19, METATILE_General_CalmWater, 0
- setmetatile 43, 19, METATILE_General_CalmWater, 0
- setmetatile 41, 20, METATILE_General_CalmWater, 0
- setmetatile 42, 20, METATILE_General_CalmWater, 0
- setmetatile 43, 20, METATILE_General_CalmWater, 0
- setmetatile 44, 20, METATILE_General_CalmWater, 0
- setmetatile 41, 21, METATILE_General_CalmWater, 0
- setmetatile 42, 21, METATILE_General_CalmWater, 0
- setmetatile 43, 21, METATILE_General_CalmWater, 0
- setmetatile 44, 21, METATILE_General_CalmWater, 0
- setmetatile 42, 22, METATILE_General_CalmWater, 0
- setmetatile 43, 22, METATILE_General_CalmWater, 0
+ setmetatile 42, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 43, 19, METATILE_General_CalmWater, FALSE
+ setmetatile 41, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 42, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 43, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 44, 20, METATILE_General_CalmWater, FALSE
+ setmetatile 41, 21, METATILE_General_CalmWater, FALSE
+ setmetatile 42, 21, METATILE_General_CalmWater, FALSE
+ setmetatile 43, 21, METATILE_General_CalmWater, FALSE
+ setmetatile 44, 21, METATILE_General_CalmWater, FALSE
+ setmetatile 42, 22, METATILE_General_CalmWater, FALSE
+ setmetatile 43, 22, METATILE_General_CalmWater, FALSE
return
AbnormalWeather_Underwater_SetupEscapeWarp::
@@ -394,33 +394,33 @@ AbnormalWeather_Underwater_SetupEscapeWarp::
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute105North::
- setescapewarp MAP_ROUTE105, 255, 11, 29
+ setescapewarp MAP_ROUTE105, 11, 29
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute105South::
- setescapewarp MAP_ROUTE105, 255, 21, 54
+ setescapewarp MAP_ROUTE105, 21, 54
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute125West::
- setescapewarp MAP_ROUTE125, 255, 9, 17
+ setescapewarp MAP_ROUTE125, 9, 17
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute125East::
- setescapewarp MAP_ROUTE125, 255, 54, 19
+ setescapewarp MAP_ROUTE125, 54, 19
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute127North::
- setescapewarp MAP_ROUTE127, 255, 58, 10
+ setescapewarp MAP_ROUTE127, 58, 10
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute127South::
- setescapewarp MAP_ROUTE127, 255, 62, 31
+ setescapewarp MAP_ROUTE127, 62, 31
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute129West::
- setescapewarp MAP_ROUTE129, 255, 17, 15
+ setescapewarp MAP_ROUTE129, 17, 15
return
AbnormalWeather_Underwater_SetupEscapeWarpRoute129East::
- setescapewarp MAP_ROUTE129, 255, 43, 20
+ setescapewarp MAP_ROUTE129, 43, 20
return
diff --git a/data/scripts/battle_pike.inc b/data/scripts/battle_pike.inc
index 3260bcfd8..e11f99762 100644
--- a/data/scripts/battle_pike.inc
+++ b/data/scripts/battle_pike.inc
@@ -114,7 +114,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpNPCRoom::
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 255, 4, 7
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL, 4, 7
waitstate
end
@@ -122,7 +122,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpWildMonRoom::
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 255, 4, 19
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS, 4, 19
waitstate
end
@@ -184,14 +184,14 @@ BattleFrontier_BattlePikeRoom_EventScript_WarpToFinalRoom::
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 255, 2, 7
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL, 2, 7
return
BattleFrontier_BattlePikeRoom_EventScript_WarpToThreePathRoom::
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattlePikeRoom_Movement_HidePlayer
waitmovement 0
call BattleFrontier_BattlePike_EventScript_CloseCurtain
- warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 255, 6, 10
+ warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM, 6, 10
return
BattleFrontier_BattlePikeRoomWildMons_EventScript_Exit::
@@ -230,7 +230,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack::
BattleFrontier_BattlePike_EventScript_Retire::
frontier_set FRONTIER_DATA_CHALLENGE_STATUS CHALLENGE_STATUS_LOST
- warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 255, 5, 6
+ warp MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY, 5, 6
waitstate
end
diff --git a/data/scripts/berry_blender.inc b/data/scripts/berry_blender.inc
index 1d833f470..71f3a1276 100644
--- a/data/scripts/berry_blender.inc
+++ b/data/scripts/berry_blender.inc
@@ -296,7 +296,7 @@ BerryBlender_EventScript_ExplainBlending1:
end
BerryBlender_EventScript_TryUseBerryBlender1:
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender1NoCase
specialvar VAR_RESULT, GetFirstFreePokeblockSlot
@@ -370,7 +370,7 @@ BerryBlender_EventScript_TryUseBerryBlender2:
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender2NoBerries
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender2NoCase
msgbox BerryBlender_Text_Okay, MSGBOX_DEFAULT
@@ -436,7 +436,7 @@ BerryBlender_EventScript_TryUseBlender3:
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender3NoBerries
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_Blender3NoCase
msgbox BerryBlender_Text_OhDear, MSGBOX_DEFAULT
@@ -473,7 +473,7 @@ BerryBlender_EventScript_BlendMasterNoBerries:
end
BerryBlender_EventScript_TryBlendWithBlendMaster:
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_BlendMasterNoCase
specialvar VAR_RESULT, PlayerHasBerries
@@ -542,7 +542,7 @@ BerryBlender_EventScript_ExpertMPlayerHasBerries:
end
BerryBlender_EventScript_ExpertMNoBerries:
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_ExpertMNoSpareBerries
specialvar VAR_RESULT, GetFirstFreePokeblockSlot
@@ -575,7 +575,7 @@ BerryBlender_EventScript_BerryBlenderLink::
specialvar VAR_RESULT, PlayerHasBerries
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_LinkBlenderNoBerries
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq BerryBlender_EventScript_LinkBlenderNoCase
specialvar VAR_RESULT, GetFirstFreePokeblockSlot
diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc
index e415d0c65..a1f743681 100644
--- a/data/scripts/berry_tree.inc
+++ b/data/scripts/berry_tree.inc
@@ -92,20 +92,20 @@ BerryTree_EventScript_GetCareAdverb::
goto_if_eq BerryTree_EventScript_SetAdverbPoor
compare VAR_0x8005, 4
goto_if_eq BerryTree_EventScript_SetAdverbGreat
- bufferstring 1, BerryTree_Text_CareAdverbGood
+ bufferstring STR_VAR_2, BerryTree_Text_CareAdverbGood
return
BerryTree_EventScript_SetAdverbGreat::
- bufferstring 1, BerryTree_Text_CareAdverbGreat
+ bufferstring STR_VAR_2, BerryTree_Text_CareAdverbGreat
return
BerryTree_EventScript_SetAdverbPoor::
- bufferstring 1, BerryTree_Text_CareAdverbPoor
+ bufferstring STR_VAR_2, BerryTree_Text_CareAdverbPoor
return
@ VAR_0x8006 here is the number of berries
BerryTree_EventScript_CheckBerryFullyGrown::
- buffernumberstring 1, VAR_0x8006
+ buffernumberstring STR_VAR_2, VAR_0x8006
lock
faceplayer
special ObjectEventInteractionGetBerryCountString
@@ -154,8 +154,8 @@ BerryTree_EventScript_ItemUsePlantBerry::
end
BerryTree_EventScript_WantToWater::
- checkitem ITEM_WAILMER_PAIL, 1
- compare VAR_RESULT, 0
+ checkitem ITEM_WAILMER_PAIL
+ compare VAR_RESULT, FALSE
goto_if_eq BerryTree_EventScript_DontWater
special ObjectEventInteractionGetBerryName
msgbox BerryTree_Text_WantToWater, MSGBOX_YESNO
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index d6ea1a707..790871d14 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -24,22 +24,20 @@ CableClub_EventScript_MysteryGiftMan::
specialvar VAR_RESULT, ShouldDistributeEonTicket
compare VAR_RESULT, TRUE
goto_if_eq CableClub_EventScript_DistributeEonTicket
- goto CableClub_EventScript_AlreadyGotEonTicket
+ goto CableClub_EventScript_TryWonderCardScript
end
-CableClub_EventScript_AlreadyGotEonTicket::
- gotoram
-
-@ Unused?
+CableClub_EventScript_TryWonderCardScript::
+ gotowondercardscript
CableClub_EventScript_MysteryGiftThankYou::
msgbox gText_ThankYouForAccessingMysteryGift, MSGBOX_NPC
end
CableClub_EventScript_DistributeEonTicket::
- checkitem ITEM_EON_TICKET, 1
+ checkitem ITEM_EON_TICKET
compare VAR_RESULT, TRUE
- goto_if_eq CableClub_EventScript_AlreadyGotEonTicket
- goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_AlreadyGotEonTicket
+ goto_if_eq CableClub_EventScript_TryWonderCardScript
+ goto_if_set FLAG_ENABLE_SHIP_SOUTHERN_ISLAND, CableClub_EventScript_TryWonderCardScript
msgbox MysteryGift_Text_TheresATicketForYou, MSGBOX_DEFAULT
giveitem ITEM_EON_TICKET
setflag FLAG_ENABLE_SHIP_SOUTHERN_ISLAND
@@ -390,7 +388,7 @@ CableClub_EventScript_EnterColosseum::
compare VAR_0x8004, USING_MULTI_BATTLE
goto_if_eq CableClub_EventScript_WarpTo4PColosseum
special SetCableClubWarp
- warp MAP_BATTLE_COLOSSEUM_2P, 255, 6, 8
+ warp MAP_BATTLE_COLOSSEUM_2P, 6, 8
special DoCableClubWarp
waitstate
end
@@ -403,7 +401,7 @@ CableClub_EventScript_PlayerApproachLinkRoomRight::
CableClub_EventScript_WarpTo4PColosseum::
special SetCableClubWarp
- warp MAP_BATTLE_COLOSSEUM_4P, 255, 5, 8
+ warp MAP_BATTLE_COLOSSEUM_4P, 5, 8
special DoCableClubWarp
waitstate
end
@@ -493,7 +491,7 @@ CableClub_EventScript_EnterTradeCenter::
waitdooranim
release
special SetCableClubWarp
- setwarp MAP_TRADE_CENTER, 255, 5, 8
+ setwarp MAP_TRADE_CENTER, 5, 8
special DoCableClubWarp
waitstate
end
@@ -568,7 +566,7 @@ CableClub_EventScript_EnterRecordCorner::
waitdooranim
release
special SetCableClubWarp
- setwarp MAP_RECORD_CORNER, 255, 8, 9
+ setwarp MAP_RECORD_CORNER, 8, 9
special DoCableClubWarp
waitstate
end
@@ -829,7 +827,7 @@ EventScript_RecordCenter_Spot3::
end
RecordCorner_EventScript_ReceivedGiftItem::
- bufferitemname 1, VAR_TEMP_1
+ bufferitemname STR_VAR_2, VAR_TEMP_1
message RecordCorner_Text_PlayerSentOverOneX
waitmessage
waitbuttonpress
@@ -970,7 +968,7 @@ CableClub_EventScript_EnterUnionRoom::
waitdooranim
special Script_ResetUnionRoomTrade
special SetCableClubWarp
- warpteleport2 MAP_UNION_ROOM, 255, 7, 11
+ warpspinenter MAP_UNION_ROOM, 7, 11
waitstate
special RunUnionRoom
waitstate
@@ -1035,7 +1033,7 @@ CableClub_EventScript_DirectCornerAttendant::
end
CableClub_EventScript_DirectCornerSelectService::
- checkitem ITEM_POWDER_JAR, 1
+ checkitem ITEM_POWDER_JAR
compare VAR_RESULT, FALSE
goto_if_eq CableClub_EventScript_DirectCornerNoBerry
goto_if_set FLAG_VISITED_MAUVILLE_CITY, CableClub_EventScript_DirectCornerSelectAllServices
@@ -1322,33 +1320,33 @@ CableClub_EventScript_AdapterNotConnected::
end
CableClub_EventScript_OpenUnionRoomBarrier::
- setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0
- setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0
+ setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, FALSE
+ setmetatile 5, 3, METATILE_PokemonCenter_Floor_Plain_Alt, FALSE
return
CableClub_EventScript_CloseUnionRoomBarrier::
- setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1
- setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, 1
+ setmetatile 5, 2, METATILE_PokemonCenter_Floor_ShadowTop, TRUE
+ setmetatile 5, 3, METATILE_PokemonCenter_CounterBarrier, TRUE
return
CableClub_EventScript_OpenDirectCornerBarrier::
- setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, 0
- setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, 0
+ setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop_Alt, FALSE
+ setmetatile 9, 3, METATILE_PokemonCenter_Floor_Plain_Alt, FALSE
return
CableClub_EventScript_CloseDirectCornerBarrier::
- setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, 1
- setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, 1
+ setmetatile 9, 2, METATILE_PokemonCenter_Floor_ShadowTop, TRUE
+ setmetatile 9, 3, METATILE_PokemonCenter_CounterBarrier, TRUE
return
EventScript_OpenMossdeepGameCornerBarrier::
- setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, 0
- setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, 0
+ setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterOpen_Top, FALSE
+ setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterOpen_Bottom, FALSE
return
EventScript_CloseMossdeepGameCornerBarrier::
- setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, 1
- setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, 1
+ setmetatile 5, 2, METATILE_MossdeepGameCorner_CounterClosed_Top, TRUE
+ setmetatile 5, 3, METATILE_MossdeepGameCorner_CounterClosed_Bottom, TRUE
return
CableClub_OnResume:
diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc
index 17364559b..5ff2abe0c 100644
--- a/data/scripts/contest_hall.inc
+++ b/data/scripts/contest_hall.inc
@@ -103,7 +103,7 @@ LilycoveCity_ContestLobby_EventScript_CancelEnterContest::
LilycoveCity_ContestLobby_EventScript_ChooseContestMon::
msgbox LilycoveCity_ContestLobby_Text_EnterWhichPokemon1, MSGBOX_DEFAULT
choosecontestmon
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq LilycoveCity_ContestLobby_EventScript_CancelEnterContest
special TryEnterContestMon
compare VAR_RESULT, CANT_ENTER_CONTEST
@@ -283,8 +283,8 @@ ContestHall_EventScript_GetCategoryTough::
return
ContestHall_EventScript_ContestGettingStarted::
- buffercontesttypestring 1, VAR_0x8008
- bufferstdstring 2, VAR_0x8009
+ buffercontestname STR_VAR_2, VAR_0x8008
+ bufferstdstring STR_VAR_3, VAR_0x8009
call ContestHall_EventScript_GettingStarted
lockall
applymovement LOCALID_MC, ContestHall_Movement_MCBackUp
@@ -393,7 +393,7 @@ ContestHall_EventScript_Player4WalkToCenter::
ContestHall_EventScript_ShowContestMonPic::
special BufferContestTrainerAndMonNames
addvar VAR_0x8006, 1
- buffernumberstring 1, VAR_0x8006
+ buffernumberstring STR_VAR_2, VAR_0x8006
lockall
applymovement VAR_0x800B, ContestHall_Movement_ContestantDelay32
waitmovement 0
@@ -1000,7 +1000,7 @@ ContestHall_EventScript_CongratulateWinner::
special BufferContestWinnerTrainerName
special BufferContestWinnerMonName
addvar VAR_0x8005, 1
- buffernumberstring 1, VAR_0x8005
+ buffernumberstring STR_VAR_2, VAR_0x8005
addvar VAR_0x8005, -1
call ContestHall_EventScript_CongratsWinner
applymovement VAR_TEMP_3, ContestHall_Movement_WinningPlayerWalkUp
diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc
index 8d529d5e1..ba61fb004 100644
--- a/data/scripts/day_care.inc
+++ b/data/scripts/day_care.inc
@@ -107,7 +107,7 @@ Route117_PokemonDayCare_EventScript_GiveMonToRaise::
fadescreen FADE_TO_BLACK
special ChooseSendDaycareMon
waitstate
- compare VAR_0x8004, 255
+ compare VAR_0x8004, PARTY_NOTHING_CHOSEN
goto_if_eq Route117_PokemonDayCare_EventScript_ComeAgain
specialvar VAR_RESULT, CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
compare VAR_RESULT, 0
diff --git a/data/scripts/elite_four.inc b/data/scripts/elite_four.inc
index 0ae319061..97d7f4131 100644
--- a/data/scripts/elite_four.inc
+++ b/data/scripts/elite_four.inc
@@ -2,18 +2,18 @@ PokemonLeague_EliteFour_SetAdvanceToNextRoomMetatiles::
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_Delay32
waitmovement 0
playse SE_DOOR
- 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
+ setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, FALSE
+ setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, FALSE
+ setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
special DrawWholeMapView
return
@@ -21,42 +21,42 @@ PokemonLeague_EliteFour_EventScript_WalkInCloseDoor::
applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_WalkUp6
waitmovement 0
playse SE_TRUCK_DOOR
- 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 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
special DrawWholeMapView
return
@ Essentially unused, only necessary when re-entering an Elite Four room after defeating the member, which isnt normally possible
PokemonLeague_EliteFour_EventScript_ResetAdvanceToNextRoom::
- 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
+ setmetatile 6, 1, METATILE_EliteFour_OpenDoor_Frame, FALSE
+ setmetatile 6, 2, METATILE_EliteFour_OpenDoor_Opening, FALSE
+ setmetatile 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 0, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 1, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 2, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 3, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 4, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 8, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 9, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 10, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
+ setmetatile 11, 2, METATILE_EliteFour_RightSpotlightOff, TRUE
+ setmetatile 12, 2, METATILE_EliteFour_LeftSpotlightOff, TRUE
return
PokemonLeague_EliteFour_EventScript_CloseDoor::
- 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 5, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 6, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 7, 12, METATILE_EliteFour_EntryDoor_ClosedTop, TRUE
+ setmetatile 5, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 6, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
+ setmetatile 7, 13, METATILE_EliteFour_EntryDoor_ClosedBottom, TRUE
return
diff --git a/data/scripts/field_move_scripts.inc b/data/scripts/field_move_scripts.inc
index b81ca21dd..39a04ae1a 100644
--- a/data/scripts/field_move_scripts.inc
+++ b/data/scripts/field_move_scripts.inc
@@ -6,8 +6,8 @@ EventScript_CutTree::
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CheckTreeCantCut
setfieldeffectargument 0, VAR_RESULT
- bufferpartymonnick 0, VAR_RESULT
- buffermovename 1, MOVE_CUT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
+ buffermovename STR_VAR_2, MOVE_CUT
msgbox Text_WantToCut, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq EventScript_CancelCut
@@ -67,8 +67,8 @@ EventScript_RockSmash::
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantSmashRock
setfieldeffectargument 0, VAR_RESULT
- bufferpartymonnick 0, VAR_RESULT
- buffermovename 1, MOVE_ROCK_SMASH
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
+ buffermovename STR_VAR_2, MOVE_ROCK_SMASH
msgbox Text_WantToSmash, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq EventScript_CancelSmash
@@ -195,7 +195,7 @@ EventScript_UseWaterfall::
checkpartymove MOVE_WATERFALL
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantWaterfall
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
msgbox Text_WantToWaterfall, MSGBOX_YESNO
compare VAR_RESULT, NO
@@ -230,7 +230,7 @@ EventScript_UseDive::
checkpartymove MOVE_DIVE
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantDive
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox Text_WantToDive, MSGBOX_YESNO
@@ -255,7 +255,7 @@ EventScript_UseDiveUnderwater::
checkpartymove MOVE_DIVE
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_CantSurface
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
setfieldeffectargument 1, 1
msgbox Text_WantToSurface, MSGBOX_YESNO
diff --git a/data/scripts/flash.inc b/data/scripts/flash.inc
index a69975a16..dbfec2314 100644
--- a/data/scripts/flash.inc
+++ b/data/scripts/flash.inc
@@ -1,4 +1,4 @@
EventScript_UseFlash::
animateflash 1
- setflashradius 1
+ setflashlevel 1
end
diff --git a/data/scripts/gift_aurora_ticket.inc b/data/scripts/gift_aurora_ticket.inc
index c9250b9f9..760bea939 100644
--- a/data/scripts/gift_aurora_ticket.inc
+++ b/data/scripts/gift_aurora_ticket.inc
@@ -4,13 +4,13 @@ MysteryGiftScript_AuroraTicket::
faceplayer
vgoto_if_set FLAG_RECEIVED_AURORA_TICKET, AuroraTicket_Obtained
vgoto_if_set FLAG_BATTLED_DEOXYS, AuroraTicket_Obtained
- checkitem ITEM_AURORA_TICKET, 1
+ checkitem ITEM_AURORA_TICKET
compare VAR_RESULT, TRUE
vgoto_if_eq AuroraTicket_Obtained
vmessage sText_AuroraTicketForYou
waitmessage
waitbuttonpress
- checkitemspace ITEM_AURORA_TICKET, 1
+ checkitemspace ITEM_AURORA_TICKET
compare VAR_RESULT, FALSE
vgoto_if_eq AuroraTicket_NoBagSpace
giveitem ITEM_AURORA_TICKET
diff --git a/data/scripts/gift_mystic_ticket.inc b/data/scripts/gift_mystic_ticket.inc
index 29c325f72..1a28dd4ce 100644
--- a/data/scripts/gift_mystic_ticket.inc
+++ b/data/scripts/gift_mystic_ticket.inc
@@ -5,13 +5,13 @@ MysteryGiftScript_MysticTicket::
vgoto_if_set FLAG_RECEIVED_MYSTIC_TICKET, MysticTicket_Obtained
vgoto_if_set FLAG_CAUGHT_LUGIA, MysticTicket_Obtained
vgoto_if_set FLAG_CAUGHT_HO_OH, MysticTicket_Obtained
- checkitem ITEM_MYSTIC_TICKET, 1
+ checkitem ITEM_MYSTIC_TICKET
compare VAR_RESULT, TRUE
vgoto_if_eq MysticTicket_Obtained
vmessage sText_MysticTicketForYou
waitmessage
waitbuttonpress
- checkitemspace ITEM_MYSTIC_TICKET, 1
+ checkitemspace ITEM_MYSTIC_TICKET
compare VAR_RESULT, FALSE
vgoto_if_eq MysticTicket_NoBagSpace
giveitem ITEM_MYSTIC_TICKET
diff --git a/data/scripts/gift_old_sea_map.inc b/data/scripts/gift_old_sea_map.inc
index 5e47a10df..b0f258807 100644
--- a/data/scripts/gift_old_sea_map.inc
+++ b/data/scripts/gift_old_sea_map.inc
@@ -4,13 +4,13 @@ MysteryGiftScript_OldSeaMap::
faceplayer
vgoto_if_set FLAG_RECEIVED_OLD_SEA_MAP, OldSeaMap_Obtained
vgoto_if_set FLAG_CAUGHT_MEW, OldSeaMap_Obtained
- checkitem ITEM_OLD_SEA_MAP, 1
+ checkitem ITEM_OLD_SEA_MAP
compare VAR_RESULT, TRUE
vgoto_if_eq OldSeaMap_Obtained
vmessage sText_MysteryGiftOldSeaMapForYou
waitmessage
waitbuttonpress
- checkitemspace ITEM_OLD_SEA_MAP, 1
+ checkitemspace ITEM_OLD_SEA_MAP
compare VAR_RESULT, FALSE
vgoto_if_eq OldSeaMap_NoBagSpace
giveitem ITEM_OLD_SEA_MAP
diff --git a/data/scripts/gift_stamp_card.inc b/data/scripts/gift_stamp_card.inc
index f6e1eb7c7..4ac399bec 100644
--- a/data/scripts/gift_stamp_card.inc
+++ b/data/scripts/gift_stamp_card.inc
@@ -5,7 +5,7 @@ MysteryGiftScript_StampCard::
setorcopyvar VAR_RESULT, GET_NUM_STAMPS
specialvar VAR_0x8009, GetMysteryGiftCardStat
subvar VAR_0x8008, VAR_0x8009
- buffernumberstring 0, VAR_0x8008
+ buffernumberstring STR_VAR_1, VAR_0x8008
lock
faceplayer
vmessage sText_MysteryGiftStampCard
diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc
index 82eca777d..355e9ad4a 100644
--- a/data/scripts/kecleon.inc
+++ b/data/scripts/kecleon.inc
@@ -48,8 +48,8 @@ Route119_EventScript_Kecleon2::
end
EventScript_Kecleon::
- checkitem ITEM_DEVON_SCOPE, 1
- compare VAR_RESULT, 1
+ checkitem ITEM_DEVON_SCOPE
+ compare VAR_RESULT, TRUE
goto_if_eq EventScript_AskUseDevonScope
msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_DEFAULT
release
diff --git a/data/scripts/lilycove_lady.inc b/data/scripts/lilycove_lady.inc
index 576fa28ad..6c11da105 100644
--- a/data/scripts/lilycove_lady.inc
+++ b/data/scripts/lilycove_lady.inc
@@ -405,7 +405,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_GivenPokeblock::
LilycoveCity_PokemonCenter_1F_EventScript_AskForPokeblock::
special Script_BufferContestLadyCategoryAndMonName
msgbox LilycoveCity_PokemonCenter_1F_Text_MyFriendDisplaysQuality, MSGBOX_DEFAULT
- checkitem ITEM_POKEBLOCK_CASE, 1
+ checkitem ITEM_POKEBLOCK_CASE
compare VAR_RESULT, FALSE
goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_NoPokeblockCase
msgbox LilycoveCity_PokemonCenter_1F_Text_AskingForOnePokeblock, MSGBOX_YESNO
diff --git a/data/scripts/obtain_item.inc b/data/scripts/obtain_item.inc
index 382f5ce32..8fa6a68a7 100644
--- a/data/scripts/obtain_item.inc
+++ b/data/scripts/obtain_item.inc
@@ -1,55 +1,58 @@
+.set ITEMID, VAR_0x8000
+.set AMOUNT, VAR_0x8001
+
Std_ObtainItem::
- additem VAR_0x8000, VAR_0x8001
+ additem ITEMID, AMOUNT
copyvar VAR_0x8007, VAR_RESULT
call EventScript_ObtainItemMessage
return
EventScript_ObtainItemMessage::
- bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
- checkitemtype VAR_0x8000
+ bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT
+ checkitemtype ITEMID
call EventScript_BufferPocketNameAndTryFanfare
- compare VAR_0x8007, 1
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_ObtainedItem
- compare VAR_0x8007, 0
+ compare VAR_0x8007, FALSE
call_if_eq EventScript_NoRoomForItem
return
EventScript_BufferPocketNameAndTryFanfare::
switch VAR_RESULT
- case POCKET_ITEMS, EventScript_BufferItemsPocket
- case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket
+ case POCKET_ITEMS, EventScript_BufferItemsPocket
+ case POCKET_KEY_ITEMS, EventScript_BufferKeyItemsPocket
case POCKET_POKE_BALLS, EventScript_BufferPokeballsPocket
- case POCKET_TM_HM, EventScript_BufferTMHMsPocket
- case POCKET_BERRIES, EventScript_BufferBerriesPocket
+ case POCKET_TM_HM, EventScript_BufferTMHMsPocket
+ case POCKET_BERRIES, EventScript_BufferBerriesPocket
end
EventScript_BufferItemsPocket::
- bufferstdstring 2, STDSTRING_ITEMS
- compare VAR_0x8007, 1
+ bufferstdstring STR_VAR_3, STDSTRING_ITEMS
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
EventScript_BufferKeyItemsPocket::
- bufferstdstring 2, STDSTRING_KEYITEMS
- compare VAR_0x8007, 1
+ bufferstdstring STR_VAR_3, STDSTRING_KEYITEMS
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
EventScript_BufferPokeballsPocket::
- bufferstdstring 2, STDSTRING_POKEBALLS
- compare VAR_0x8007, 1
+ bufferstdstring STR_VAR_3, STDSTRING_POKEBALLS
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
EventScript_BufferTMHMsPocket::
- bufferstdstring 2, STDSTRING_TMHMS
- compare VAR_0x8007, 1
+ bufferstdstring STR_VAR_3, STDSTRING_TMHMS
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedTMHM
return
EventScript_BufferBerriesPocket::
- bufferstdstring 2, STDSTRING_BERRIES
- compare VAR_0x8007, 1
+ bufferstdstring STR_VAR_3, STDSTRING_BERRIES
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_PlayFanfareObtainedItem
return
@@ -57,11 +60,11 @@ EventScript_ObtainedItem::
message gText_ObtainedTheItem
waitfanfare
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
- setvar VAR_RESULT, 1
+ setvar VAR_RESULT, TRUE
return
EventScript_NoRoomForItem::
- setvar VAR_RESULT, 0
+ setvar VAR_RESULT, FALSE
return
EventScript_PlayFanfareObtainedItem::
@@ -73,16 +76,16 @@ EventScript_PlayFanfareObtainedTMHM::
return
Std_ObtainDecoration::
- adddecoration VAR_0x8000
+ adddecoration ITEMID
copyvar VAR_0x8007, VAR_RESULT
call EventScript_ObtainDecorationMessage
return
EventScript_ObtainDecorationMessage::
- bufferdecorationname 1, VAR_0x8000
- compare VAR_0x8007, 1
+ bufferdecorationname STR_VAR_2, ITEMID
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_ObtainedDecor
- compare VAR_0x8007, 0
+ compare VAR_0x8007, FALSE
call_if_eq EventScript_NoRoomForDecor
return
@@ -91,27 +94,27 @@ EventScript_ObtainedDecor::
message gText_ObtainedTheDecor
waitfanfare
msgbox gText_TheDecorWasTransferredToThePC, MSGBOX_DEFAULT
- setvar VAR_RESULT, 1
+ setvar VAR_RESULT, TRUE
return
EventScript_NoRoomForDecor::
- setvar VAR_RESULT, 0
+ setvar VAR_RESULT, FALSE
return
Std_FindItem::
lock
faceplayer
waitse
- copyvar VAR_0x8004, VAR_0x8000
- copyvar VAR_0x8005, VAR_0x8001
- checkitemspace VAR_0x8000, VAR_0x8001
+ copyvar VAR_0x8004, ITEMID
+ copyvar VAR_0x8005, AMOUNT
+ checkitemspace ITEMID, AMOUNT
copyvar VAR_0x8007, VAR_RESULT
- bufferitemnameplural 1, VAR_0x8000, VAR_0x8001
- checkitemtype VAR_0x8000
+ bufferitemnameplural STR_VAR_2, ITEMID, AMOUNT
+ checkitemtype ITEMID
call EventScript_BufferPocketNameAndTryFanfare
- compare VAR_0x8007, 1
+ compare VAR_0x8007, TRUE
call_if_eq EventScript_PickUpItem
- compare VAR_0x8007, 0
+ compare VAR_0x8007, FALSE
call_if_eq EventScript_NoRoomToPickUpItem
release
return
@@ -121,15 +124,15 @@ EventScript_PickUpItem::
additem VAR_0x8004, VAR_0x8005
specialvar VAR_RESULT, BufferTMHMMoveName
copyvar VAR_0x8008, VAR_RESULT
- compare VAR_0x8008, 1
+ compare VAR_0x8008, TRUE
call_if_eq EventScript_FoundTMHM
- compare VAR_0x8008, 0
+ compare VAR_0x8008, FALSE
call_if_eq EventScript_FoundItem
waitfanfare
waitmessage
- bufferitemnameplural 1, VAR_0x8004, VAR_0x8005
+ bufferitemnameplural STR_VAR_2, VAR_0x8004, VAR_0x8005
pyramid_inchallenge
- compare VAR_RESULT, 1
+ compare VAR_RESULT, TRUE
goto_if_eq EventScript_PutBattlePyramidItemInBag
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
return
@@ -139,7 +142,7 @@ EventScript_PutBattlePyramidItemInBag::
return
EventScript_FoundTMHM::
- bufferitemnameplural 0, VAR_0x8004, VAR_0x8005
+ bufferitemnameplural STR_VAR_1, VAR_0x8004, VAR_0x8005
message gText_PlayerFoundOneTMHM
return
@@ -150,7 +153,7 @@ EventScript_FoundItem::
EventScript_NoRoomToPickUpItem::
msgbox gText_ObtainedTheItem, MSGBOX_DEFAULT
msgbox gText_TooBadBagIsFull, MSGBOX_DEFAULT
- setvar VAR_RESULT, 0
+ setvar VAR_RESULT, FALSE
return
EventScript_HiddenItemScript::
@@ -158,12 +161,12 @@ EventScript_HiddenItemScript::
waitse
additem VAR_0x8005
copyvar VAR_0x8007, VAR_RESULT
- bufferitemnameplural 1, VAR_0x8005, 1
+ bufferitemnameplural STR_VAR_2, VAR_0x8005, 1
checkitemtype VAR_0x8005
call EventScript_BufferPocketNameAndTryFanfare
- compare VAR_0x8007, 1
+ compare VAR_0x8007, TRUE
goto_if_eq EventScript_PickUpHiddenItem
- compare VAR_0x8007, 0
+ compare VAR_0x8007, FALSE
goto_if_eq EventScript_NoRoomForHiddenItem
end
@@ -171,14 +174,14 @@ EventScript_PickUpHiddenItem::
copyvar VAR_0x8008, VAR_0x8004
copyvar VAR_0x8004, VAR_0x8005
specialvar VAR_RESULT, BufferTMHMMoveName
- compare VAR_RESULT, 1
+ compare VAR_RESULT, TRUE
goto_if_eq EventScript_FoundHiddenTMHM
- compare VAR_RESULT, 0
+ compare VAR_RESULT, FALSE
goto_if_eq EventScript_FoundHiddenItem
end
EventScript_FoundHiddenTMHM::
- bufferitemnameplural 0, VAR_0x8004, 1
+ bufferitemnameplural STR_VAR_1, VAR_0x8004, 1
message gText_PlayerFoundOneTMHM
goto EventScript_PutHiddenItemInPocket
end
@@ -191,7 +194,7 @@ EventScript_FoundHiddenItem::
EventScript_PutHiddenItemInPocket::
waitmessage
waitfanfare
- bufferitemnameplural 1, VAR_0x8004, 1
+ bufferitemnameplural STR_VAR_2, VAR_0x8004, 1
copyvar VAR_0x8004, VAR_0x8008
msgbox gText_PutItemInPocket, MSGBOX_DEFAULT
special TryPutTreasureInvestigatorsOnAir
diff --git a/data/scripts/pc_transfer.inc b/data/scripts/pc_transfer.inc
index 1fe575d55..da92ef1d5 100644
--- a/data/scripts/pc_transfer.inc
+++ b/data/scripts/pc_transfer.inc
@@ -14,22 +14,22 @@ Common_EventScript_NameReceivedBoxMon::
return
Common_EventScript_TransferredToPC::
- bufferboxname 0, VAR_PC_BOX_TO_SEND_MON
- bufferspeciesname 1, VAR_TEMP_1
+ bufferboxname STR_VAR_1, VAR_PC_BOX_TO_SEND_MON
+ bufferspeciesname STR_VAR_2, VAR_TEMP_1
call_if_unset FLAG_SYS_PC_LANETTE, EventScript_TransferredSomeonesPC
call_if_set FLAG_SYS_PC_LANETTE, EventScript_TransferredLanettesPC
return
EventScript_TransferredSomeonesPC::
specialvar VAR_RESULT, ShouldShowBoxWasFullMessage
- compare VAR_RESULT, 1
+ compare VAR_RESULT, TRUE
goto_if_eq EventScript_SomeonesPCBoxFull
msgbox gText_PkmnTransferredSomeonesPC, MSGBOX_DEFAULT
return
EventScript_SomeonesPCBoxFull::
specialvar VAR_RESULT, GetPCBoxToSendMon
- bufferboxname 2, VAR_RESULT
+ bufferboxname STR_VAR_3, VAR_RESULT
msgbox gText_PkmnTransferredSomeonesPCBoxFull, MSGBOX_DEFAULT
return
@@ -42,7 +42,7 @@ EventScript_TransferredLanettesPC::
EventScript_LanettesPCBoxFull::
specialvar VAR_RESULT, GetPCBoxToSendMon
- bufferboxname 2, VAR_RESULT
+ bufferboxname STR_VAR_3, VAR_RESULT
msgbox gText_PkmnTransferredLanettesPCBoxFull, MSGBOX_DEFAULT
return
diff --git a/data/scripts/prof_birch.inc b/data/scripts/prof_birch.inc
index 7eb1730fc..97a967138 100644
--- a/data/scripts/prof_birch.inc
+++ b/data/scripts/prof_birch.inc
@@ -73,8 +73,8 @@ ProfBirch_EventScript_RatePokedex::
copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006
copyvar VAR_0x800A, VAR_RESULT
- buffernumberstring 0, VAR_0x8008 @ Num Hoenn seen
- buffernumberstring 1, VAR_0x8009 @ Num Hoenn caught
+ buffernumberstring STR_VAR_1, VAR_0x8008 @ Num Hoenn seen
+ buffernumberstring STR_VAR_2, VAR_0x8009 @ Num Hoenn caught
msgbox gBirchDexRatingText_SoYouveSeenAndCaught, MSGBOX_DEFAULT
call ProfBirch_EventScript_ShowRatingMessage
compare VAR_0x800A, 0
@@ -83,7 +83,7 @@ ProfBirch_EventScript_RatePokedex::
specialvar VAR_RESULT, ScriptGetPokedexInfo
copyvar VAR_0x8008, VAR_0x8005
copyvar VAR_0x8009, VAR_0x8006
- buffernumberstring 0, VAR_0x8008 @ Num National seen
- buffernumberstring 1, VAR_0x8009 @ Num National caught
+ buffernumberstring STR_VAR_1, VAR_0x8008 @ Num National seen
+ buffernumberstring STR_VAR_2, VAR_0x8009 @ Num National caught
msgbox gBirchDexRatingText_OnANationwideBasis, MSGBOX_DEFAULT
return
diff --git a/data/scripts/roulette.inc b/data/scripts/roulette.inc
index 1167a765b..96f5809d7 100644
--- a/data/scripts/roulette.inc
+++ b/data/scripts/roulette.inc
@@ -1,9 +1,9 @@
Roulette_EventScript_Table1::
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 0
- getpricereduction POKENEWS_GAME_CORNER
+ getpokenewsactive POKENEWS_GAME_CORNER
compare VAR_RESULT, FALSE
goto_if_eq Roulette_EventScript_Play
addvar VAR_0x8004, ROULETTE_SPECIAL_RATE
@@ -11,11 +11,11 @@ Roulette_EventScript_Table1::
end
Roulette_EventScript_Table2::
- checkitem ITEM_COIN_CASE, 1
+ checkitem ITEM_COIN_CASE
compare VAR_RESULT, FALSE
goto_if_eq MauvilleCity_GameCorner_EventScript_NoCoinCase
setvar VAR_0x8004, 1
- getpricereduction POKENEWS_GAME_CORNER
+ getpokenewsactive POKENEWS_GAME_CORNER
compare VAR_RESULT, FALSE
goto_if_eq Roulette_EventScript_Play
addvar VAR_0x8004, ROULETTE_SPECIAL_RATE
diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc
index 6dd0767f0..3b7d85a67 100644
--- a/data/scripts/safari_zone.inc
+++ b/data/scripts/safari_zone.inc
@@ -1,13 +1,13 @@
SafariZone_EventScript_OutOfBallsMidBattle::
setvar VAR_SAFARI_ZONE_STATE, 1
special ExitSafariMode
- setwarp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5
+ setwarp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5
end
SafariZone_EventScript_Exit::
setvar VAR_SAFARI_ZONE_STATE, 1
special ExitSafariMode
- warp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 255, 2, 5
+ warp MAP_ROUTE121_SAFARI_ZONE_ENTRANCE, 2, 5
waitstate
end
diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc
index ae802cdfd..f024f0901 100644
--- a/data/scripts/secret_base.inc
+++ b/data/scripts/secret_base.inc
@@ -31,7 +31,7 @@ SecretBase_EventScript_CheckEntrance::
goto_if_eq SecretBase_EventScript_AlreadyHasSecretBase
checkpartymove MOVE_SECRET_POWER
setfieldeffectargument 0, VAR_RESULT
- buffermovename 1, MOVE_SECRET_POWER
+ buffermovename STR_VAR_2, MOVE_SECRET_POWER
compare VAR_0x8007, SECRET_BASE_RED_CAVE
goto_if_eq SecretBase_EventScript_Cave
compare VAR_0x8007, SECRET_BASE_BROWN_CAVE
@@ -50,7 +50,7 @@ SecretBase_EventScript_Cave::
lockall
compare VAR_RESULT, PARTY_SIZE
goto_if_eq SecretBase_EventScript_CaveNoSecretPower
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
msgbox SecretBase_Text_IndentUseSecretPower, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq SecretBase_EventScript_CancelOnEntrance
@@ -82,7 +82,7 @@ SecretBase_EventScript_Tree::
lockall
compare VAR_RESULT, PARTY_SIZE
goto_if_eq SecretBase_EventScript_TreeNoSecretPower
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
msgbox SecretBase_Text_TreeUseSecretPower, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq SecretBase_EventScript_CancelOnEntrance
@@ -114,7 +114,7 @@ SecretBase_EventScript_Shrub::
lockall
compare VAR_RESULT, PARTY_SIZE
goto_if_eq SecretBase_EventScript_ShrubNoSecretPower
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
msgbox SecretBase_Text_ClumpUseSecretPower, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq SecretBase_EventScript_CancelOnEntrance
@@ -221,8 +221,8 @@ SecretBase_EventScript_AlreadyHasSecretBase::
msgbox SecretBase_Text_MovingCompletedUseSecretPower, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq SecretBase_EventScript_CancelOnEntrance
- bufferpartymonnick 0, VAR_0x8004
- buffermovename 1, MOVE_SECRET_POWER
+ bufferpartymonnick STR_VAR_1, VAR_0x8004
+ buffermovename STR_VAR_2, MOVE_SECRET_POWER
msgbox Text_MonUsedFieldMove, MSGBOX_DEFAULT
closemessage
closemessage
diff --git a/data/scripts/std_msgbox.inc b/data/scripts/std_msgbox.inc
index 941cc0e96..c46da56cb 100644
--- a/data/scripts/std_msgbox.inc
+++ b/data/scripts/std_msgbox.inc
@@ -1,7 +1,7 @@
Std_MsgboxNPC:
lock
faceplayer
- message 0x0
+ message NULL
waitmessage
waitbuttonpress
release
@@ -9,33 +9,34 @@ Std_MsgboxNPC:
Std_MsgboxSign:
lockall
- message 0x0
+ message NULL
waitmessage
waitbuttonpress
releaseall
return
Std_MsgboxDefault:
- message 0x0
+ message NULL
waitmessage
waitbuttonpress
return
Std_MsgboxYesNo:
- message 0x0
+ message NULL
waitmessage
yesnobox 20, 8
return
Std_MsgboxGetPoints:
- message 0x0
+ message NULL
playfanfare MUS_OBTAIN_B_POINTS
waitfanfare
waitmessage
return
-Std_10:
- pokenavcall 0x0
+@ Never used, pokenavcall is always used directly instead
+Std_MsgboxPokenav:
+ pokenavcall NULL
waitmessage
return
diff --git a/data/scripts/surf.inc b/data/scripts/surf.inc
index 91580422e..c2bc35d5a 100644
--- a/data/scripts/surf.inc
+++ b/data/scripts/surf.inc
@@ -2,7 +2,7 @@ EventScript_UseSurf::
checkpartymove MOVE_SURF
compare VAR_RESULT, PARTY_SIZE
goto_if_eq EventScript_EndUseSurf
- bufferpartymonnick 0, VAR_RESULT
+ bufferpartymonnick STR_VAR_1, VAR_RESULT
setfieldeffectargument 0, VAR_RESULT
lockall
msgbox gText_WantToUseSurf, MSGBOX_YESNO
diff --git a/data/scripts/trainer_battle.inc b/data/scripts/trainer_battle.inc
index a59b58a6f..0528c815c 100644
--- a/data/scripts/trainer_battle.inc
+++ b/data/scripts/trainer_battle.inc
@@ -136,7 +136,7 @@ EventScript_EndTrainerBattle::
end
Std_MsgboxAutoclose::
- message 0x0
+ message NULL
waitmessage
waitbuttonpress
release
diff --git a/data/scripts/trainer_hill.inc b/data/scripts/trainer_hill.inc
index f3ba5f035..8804b71b0 100644
--- a/data/scripts/trainer_hill.inc
+++ b/data/scripts/trainer_hill.inc
@@ -41,7 +41,7 @@ TrainerHill_1F_EventScript_DummyWarpToEntranceCounter::
@ Never reached
TrainerHill_1F_EventScript_WarpSilentToEntranceCounter::
- warpsilent MAP_TRAINER_HILL_ENTRANCE, 255, 9, 6
+ warpsilent MAP_TRAINER_HILL_ENTRANCE, 9, 6
waitstate
end
@@ -53,7 +53,7 @@ TrainerHill_1F_EventScript_Lost::
TrainerHill_EventScript_WarpToEntranceCounter::
setvar VAR_TEMP_1, 0
- warp MAP_TRAINER_HILL_ENTRANCE, 255, 9, 6
+ warp MAP_TRAINER_HILL_ENTRANCE, 9, 6
waitstate
end
diff --git a/data/scripts/trainer_script.inc b/data/scripts/trainer_script.inc
index 2a2384c66..5c6303082 100644
--- a/data/scripts/trainer_script.inc
+++ b/data/scripts/trainer_script.inc
@@ -1,6 +1,6 @@
Std_RegisteredInMatchCall::
- buffertrainerclassname 0, VAR_0x8000
- buffertrainername 1, VAR_0x8000
+ buffertrainerclassname STR_VAR_1, VAR_0x8000
+ buffertrainername STR_VAR_2, VAR_0x8000
closemessage
delay 30
playfanfare MUS_REGISTER_MATCH_CALL
@@ -12,7 +12,7 @@ Std_RegisteredInMatchCall::
EventScript_TryGetTrainerScript::
special ShouldTryGetTrainerScript
- compare VAR_RESULT, 1
+ compare VAR_RESULT, TRUE
goto_if_eq EventScript_GotoTrainerScript
releaseall
end
diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc
index 14f3ade48..f8832a3ab 100644
--- a/data/scripts/tv.inc
+++ b/data/scripts/tv.inc
@@ -52,11 +52,13 @@ EventScript_PlayersHouseLatiNewsFlash::
releaseall
end
+@ The following is a loop for the TV show messages
+@ VAR_RESULT is set to TRUE when the show has printed its final message
EventScript_DoTVShow::
special DoTVShow
waitmessage
waitbuttonpress
- compare VAR_RESULT, 1
+ compare VAR_RESULT, TRUE
goto_if_ne EventScript_DoTVShow
goto EventScript_TurnOffTV
end
diff --git a/gflib/sprite.h b/gflib/sprite.h
index 595ecd7db..e53737981 100644
--- a/gflib/sprite.h
+++ b/gflib/sprite.h
@@ -281,7 +281,6 @@ void FreeSpriteTiles(struct Sprite *sprite);
void FreeSpritePalette(struct Sprite *sprite);
void FreeSpriteOamMatrix(struct Sprite *sprite);
void DestroySpriteAndFreeResources(struct Sprite *sprite);
-void sub_800142C(u32 a1, u32 a2, u16 *a3, u16 a4, u32 a5);
void AnimateSprite(struct Sprite *sprite);
void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y);
void StartSpriteAnim(struct Sprite *sprite, u8 animNum);
diff --git a/include/battle_anim.h b/include/battle_anim.h
index 8745b0d26..d8b2cd4db 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -112,7 +112,6 @@ void GetBattleAnimBg1Data(struct BattleAnimBgData*);
void GetBattleAnimBgData(struct BattleAnimBgData*, u32 arg1);
u8 GetBattlerSpriteSubpriority(u8 battlerId);
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite);
-void sub_80A6630(struct Sprite *sprite);
void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite);
void ResetSpriteRotScale(u8 spriteId);
void SetSpriteRotScale(u8 spriteId, s16 xScale, s16 yScale, u16 rotation);
@@ -129,7 +128,6 @@ void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const vo
void AnimLoadCompressedBgGfx(u32, const u32*, u32);
void UpdateAnimBg3ScreenSize(bool8);
void TranslateSpriteInGrowingCircle(struct Sprite *);
-void sub_80A653C(struct Sprite *);
void SetBattlerSpriteYOffsetFromYScale(u8 spriteId);
void PrepareEruptAnimTaskData(struct Task *task, u8 a2, s16 a3, s16 a4, s16 a5, s16 a6, u16 a7);
u8 UpdateEruptAnimTask(struct Task *task);
diff --git a/include/constants/event_objects.h b/include/constants/event_objects.h
index 1958c792e..6b99f19bd 100644
--- a/include/constants/event_objects.h
+++ b/include/constants/event_objects.h
@@ -311,5 +311,6 @@
#define LOCALID_MOSSDEEP_MART_CLERK 1
#define LOCALID_SOOTOPOLIS_MART_CLERK 1
#define LOCALID_BATTLE_FRONTIER_MART_CLERK 1
+#define LOCALID_SLATEPORT_ENERGY_GURU 25
#endif // GUARD_CONSTANTS_EVENT_OBJECTS_H
diff --git a/include/constants/maps.h b/include/constants/maps.h
index b849749a9..6524f8c14 100644
--- a/include/constants/maps.h
+++ b/include/constants/maps.h
@@ -15,4 +15,16 @@
#define MAP_GROUP_SPECIAL_MONS_1 MAP_GROUP(METEOR_FALLS_1F_1R)
#define MAP_GROUP_SPECIAL_MONS_2 MAP_GROUP(SAFARI_ZONE_NORTHWEST)
+// IDs for dynamic warps. Both are used in the dest_warp_id field for warp events, but they
+// are never read in practice. A dest_map of MAP_NONE is used to indicate that a
+// dynamic warp should be used, at which point the warp id is ignored. It can be passed to
+// SetDynamicWarp/SetDynamicWarpWithCoords as the first argument, but this argument is unused.
+// As only one dynamic warp is saved at a time there's no need to distinguish between them.
+#define WARP_ID_SECRET_BASE 0x7E
+#define WARP_ID_DYNAMIC 0x7F
+
+// Used to indicate an invalid warp id, for dummy warps or when a warp should
+// use the given coordinates rather than the coordinates of a target warp.
+#define WARP_ID_NONE (-1)
+
#endif // GUARD_CONSTANTS_MAPS_H
diff --git a/include/constants/metatile_behaviors.h b/include/constants/metatile_behaviors.h
index dde821358..5f37713f3 100755
--- a/include/constants/metatile_behaviors.h
+++ b/include/constants/metatile_behaviors.h
@@ -117,10 +117,10 @@
#define MB_BRIDGE_OVER_POND_LOW 0x71
#define MB_BRIDGE_OVER_POND_MED 0x72
#define MB_BRIDGE_OVER_POND_HIGH 0x73
-#define MB_PACIFIDLOG_VERTICAL_LOG_1 0x74
-#define MB_PACIFIDLOG_VERTICAL_LOG_2 0x75
-#define MB_PACIFIDLOG_HORIZONTAL_LOG_1 0x76
-#define MB_PACIFIDLOG_HORIZONTAL_LOG_2 0x77
+#define MB_PACIFIDLOG_VERTICAL_LOG_TOP 0x74
+#define MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM 0x75
+#define MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT 0x76
+#define MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT 0x77
#define MB_FORTREE_BRIDGE 0x78
#define MB_UNUSED_79 0x79
#define MB_BRIDGE_OVER_POND_MED_EDGE_1 0x7A
diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h
index 519120082..3c484e39a 100644
--- a/include/constants/metatile_labels.h
+++ b/include/constants/metatile_labels.h
@@ -182,22 +182,22 @@
#define METATILE_Cave_ShoalCave_BlueStone_Small 0x35B
// gTileset_Pacifidlog
-#define METATILE_Pacifidlog_Door 0x21A
-#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
-#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237
-#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA
-#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2
+#define METATILE_Pacifidlog_Door 0x21A
+#define METATILE_Pacifidlog_FloatingLogs_HorizontalLeft 0x250
+#define METATILE_Pacifidlog_FloatingLogs_HorizontalRight 0x251
+#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft 0x252
+#define METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight 0x253
+#define METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft 0x254
+#define METATILE_Pacifidlog_SubmergedLogs_HorizontalRight 0x255
+#define METATILE_Pacifidlog_FloatingLogs_VerticalTop 0x258
+#define METATILE_Pacifidlog_FloatingLogs_VerticalBottom 0x260
+#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop 0x259
+#define METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom 0x261
+#define METATILE_Pacifidlog_SubmergedLogs_VerticalTop 0x25A
+#define METATILE_Pacifidlog_SubmergedLogs_VerticalBottom 0x262
+#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237
+#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Top 0x2AA
+#define METATILE_Pacifidlog_SkyPillar_DoorOpen_Bottom 0x2B2
// gTileset_Fortree
#define METATILE_Fortree_LongGrass_Root 0x208
diff --git a/include/constants/party_menu.h b/include/constants/party_menu.h
index e31debb49..f95bfa90f 100644
--- a/include/constants/party_menu.h
+++ b/include/constants/party_menu.h
@@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_PARTY_MENU_H
#define GUARD_CONSTANTS_PARTY_MENU_H
+#define PARTY_NOTHING_CHOSEN 0xFF
+
#define AILMENT_NONE 0
#define AILMENT_PSN 1
#define AILMENT_PRZ 2
diff --git a/include/constants/slot_machine.h b/include/constants/slot_machine.h
index 81848f208..865d7e5d0 100644
--- a/include/constants/slot_machine.h
+++ b/include/constants/slot_machine.h
@@ -3,4 +3,13 @@
#define SLOT_MACHINE_COUNT 12
+// Slot machine IDs
+#define SLOT_MACHINE_UNLUCKIEST 0
+#define SLOT_MACHINE_UNLUCKIER 1
+#define SLOT_MACHINE_UNLUCKY 2
+#define SLOT_MACHINE_LUCKY 3
+#define SLOT_MACHINE_LUCKIER 4
+#define SLOT_MACHINE_LUCKIEST 5
+#define NUM_SLOT_MACHINE_IDS 6
+
#endif // GUARD_CONSTANTS_SLOT_MACHINE_H
diff --git a/include/constants/tv.h b/include/constants/tv.h
index 3fe6c57b2..4c8dd4fa8 100644
--- a/include/constants/tv.h
+++ b/include/constants/tv.h
@@ -8,6 +8,14 @@
#define POKENEWS_BLENDMASTER 4
#define NUM_POKENEWS_TYPES 4 // Excludes NONE
+#define POKENEWS_STATE_INACTIVE 0
+#define POKENEWS_STATE_UPCOMING 1
+#define POKENEWS_STATE_ACTIVE 2
+
+// Number of days to count down until the news event occurs.
+// Nothing is aired on TV the first day
+#define POKENEWS_COUNTDOWN 4
+
// TV shows are categorized as being in one of 3 groups
// - TVGROUP_NORMAL, TV shows that can appear without Record Mixing
// - TVGROUP_RECORD_MIX, TV shows that can only appear via Record Mixing
diff --git a/include/event_object_movement.h b/include/event_object_movement.h
index 6ad4b55e4..8ceea4d29 100644
--- a/include/event_object_movement.h
+++ b/include/event_object_movement.h
@@ -110,8 +110,8 @@ const struct ObjectEventGraphicsInfo *GetObjectEventGraphicsInfo(u8 graphicsId);
void SetObjectInvisibility(u8, u8, u8, bool8);
void FreeAndReserveObjectSpritePalettes(void);
void SetObjectEventSpritePosByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
-void ResetObjectPriority(u8, u8, u8);
-void SetObjectPriority(u8, u8, u8, u8);
+void ResetObjectSubpriority(u8, u8, u8);
+void SetObjectSubpriority(u8, u8, u8, u8);
void AllowObjectAtPosTriggerGroundEffects(s16, s16);
void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup);
void ShiftObjectEventCoords(struct ObjectEvent *, s16, s16);
diff --git a/include/field_control_avatar.h b/include/field_control_avatar.h
index 17e5afb63..e02fcd5af 100644
--- a/include/field_control_avatar.h
+++ b/include/field_control_avatar.h
@@ -25,15 +25,9 @@ struct FieldInput
void FieldClearPlayerInput(struct FieldInput *pStruct);
void FieldGetPlayerInput(struct FieldInput *pStruct, u16 keys, u16 heldKeys);
int ProcessPlayerFieldInput(struct FieldInput *pStruct);
-u8 *sub_80682A8(struct MapPosition *, u8, u8);
void overworld_poison_timer_set(void);
void RestartWildEncounterImmunitySteps(void);
-u8 *sub_8068E24(struct MapPosition *);
const u8 *GetObjectEventScriptPointerPlayerFacing(void);
-bool8 sub_8068870(u16 a);
-bool8 sub_8068894(void);
-bool8 sub_8068A64(struct MapPosition *, u16);
-u8 sub_8068F18(void);
bool8 TryDoDiveWarp(struct MapPosition *position, u16 b);
int SetCableClubWarp(void);
u8 TrySetDiveWarp(void);
diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h
index 4e4725041..973e06ef3 100644
--- a/include/field_screen_effect.h
+++ b/include/field_screen_effect.h
@@ -33,13 +33,12 @@ void DoMossdeepGymWarp(void);
void DoPortholeWarp(void);
void DoCableClubWarp(void);
void DoContestHallWarp(void);
-void AnimateFlash(u8 flashLevel);
+void AnimateFlash(u8 newFlashLevel);
void WriteBattlePyramidViewScanlineEffectBuffer(void);
void DoSpinEnterWarp(void);
void DoSpinExitWarp(void);
void DoOrbEffect(void);
void FadeOutOrbEffect(void);
-void sub_80B05B4(void);
void WriteFlashScanlineEffectBuffer(u8 flashLevel);
bool8 IsPlayerStandingStill(void);
diff --git a/include/field_special_scene.h b/include/field_special_scene.h
index a54b344d9..3f701f41b 100644
--- a/include/field_special_scene.h
+++ b/include/field_special_scene.h
@@ -9,7 +9,6 @@ void Task_Truck3(u8 taskId);
void Task_HandleTruckSequence(u8 taskId);
void ExecuteTruckSequence(void);
void EndTruckSequence(u8);
-void sub_80C791C(void);
void FieldCB_ShowPortholeView(void);
#endif // GUARD_FIELD_SPECIAL_SCENE_H
diff --git a/include/field_weather.h b/include/field_weather.h
index 72a56ab6e..1d8cfe422 100644
--- a/include/field_weather.h
+++ b/include/field_weather.h
@@ -221,9 +221,9 @@ void Bubbles_Main(void);
void Bubbles_InitAll(void);
bool8 Bubbles_Finish(void);
-u8 GetSav1Weather(void);
-void SetSav1Weather(u32 weather);
-void SetSav1WeatherFromCurrMapHeader(void);
+u8 GetSavedWeather(void);
+void SetSavedWeather(u32 weather);
+void SetSavedWeatherFromCurrMapHeader(void);
void SetWeather(u32 weather);
void DoCurrentWeather(void);
void UpdateWeatherPerDay(u16 increment);
diff --git a/include/global.h b/include/global.h
index 53e9ba134..024280f98 100644
--- a/include/global.h
+++ b/include/global.h
@@ -10,6 +10,7 @@
#include "constants/vars.h"
#include "constants/species.h"
#include "constants/berry.h"
+#include "constants/maps.h"
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
@@ -971,10 +972,10 @@ struct SaveBlock1
/*0x2B92*/ u8 outbreakLocationMapNum;
/*0x2B93*/ u8 outbreakLocationMapGroup;
/*0x2B94*/ u8 outbreakPokemonLevel;
- /*0x2B95*/ u8 outbreakUnk1;
- /*0x2B96*/ u16 outbreakUnk2;
+ /*0x2B95*/ u8 outbreakUnused1;
+ /*0x2B96*/ u16 outbreakUnused2;
/*0x2B98*/ u16 outbreakPokemonMoves[MAX_MON_MOVES];
- /*0x2BA0*/ u8 outbreakUnk4;
+ /*0x2BA0*/ u8 outbreakUnused3;
/*0x2BA1*/ u8 outbreakPokemonProbability;
/*0x2BA2*/ u16 outbreakDaysLeft;
/*0x2BA4*/ struct GabbyAndTyData gabbyAndTyData;
diff --git a/include/global.tv.h b/include/global.tv.h
index 2bc7dda99..e24ead3f2 100644
--- a/include/global.tv.h
+++ b/include/global.tv.h
@@ -61,7 +61,7 @@ typedef union // size = 0x24
/*0x0F*/ u8 filler_0F[1];
/*0x10*/ u8 nickname[PLAYER_NAME_LENGTH + 1];
/*0x18*/ u16 words18[2];
- /*0x1C*/ u16 words[4];
+ /*0x1C*/ u16 words[2];
} fanclubOpinions;
// TVSHOW_DUMMY
@@ -334,7 +334,7 @@ typedef union // size = 0x24
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
/*0x02*/ u8 avgLevel;
- /*0x03*/ u8 nDecorations;
+ /*0x03*/ u8 numDecorations;
/*0x04*/ u8 decorations[4];
/*0x08*/ u16 species;
/*0x0a*/ u16 move;
@@ -437,8 +437,8 @@ typedef union // size = 0x24
struct {
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
- /*0x02*/ u8 nMonsCaught;
- /*0x03*/ u8 nPkblkUsed;
+ /*0x02*/ u8 monsCaught;
+ /*0x03*/ u8 pokeblocksUsed;
/*0x04*/ u8 language;
/*0x05*/ u8 filler_05[14];
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
@@ -449,27 +449,27 @@ typedef union // size = 0x24
struct {
/*0x00*/ u8 kind;
/*0x01*/ bool8 active;
- /*0x02*/ u8 var02;
- /*0x03*/ u8 var03;
+ /*0x02*/ u8 unused1;
+ /*0x03*/ u8 unused3;
/*0x04*/ u16 moves[MAX_MON_MOVES];
/*0x0C*/ u16 species;
- /*0x0E*/ u16 var0E;
+ /*0x0E*/ u16 unused2;
/*0x10*/ u8 locationMapNum;
/*0x11*/ u8 locationMapGroup;
- /*0x12*/ u8 var12;
+ /*0x12*/ u8 unused4;
/*0x13*/ u8 probability;
/*0x14*/ u8 level;
- /*0x15*/ u8 var15;
+ /*0x15*/ u8 unused5;
/*0x16*/ u16 daysLeft;
/*0x18*/ u8 language;
} massOutbreak;
} TVShow;
-typedef struct // 2b50
+typedef struct
{
u8 kind;
u8 state;
- u16 days;
+ u16 dayCountdown;
} PokeNews;
struct GabbyAndTyData
diff --git a/include/mail.h b/include/mail.h
index 8236811cb..68c532b31 100644
--- a/include/mail.h
+++ b/include/mail.h
@@ -27,7 +27,7 @@ u16 MailSpeciesToSpecies(u16 mailSpecies, u16 *buffer);
u8 GiveMailToMon(struct Pokemon *mon, struct Mail *mail);
void TakeMailFromMon(struct Pokemon *mon);
void ClearMailItemId(u8 mailId);
-u8 TakeMailFromMon2(struct Pokemon *mon);
+u8 TakeMailFromMonAndSave(struct Pokemon *mon);
bool8 ItemIsMail(u16 itemId);
#endif // GUARD_MAIL_H
diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h
index 23a3cabfb..b22294f1b 100644
--- a/include/mauville_old_man.h
+++ b/include/mauville_old_man.h
@@ -6,9 +6,7 @@ extern struct BardSong gBardSong;
void SetMauvilleOldMan(void);
u8 GetCurrentMauvilleOldMan(void);
void SetMauvilleOldManObjEventGfx(void);
-u8 sub_81201C8(void);
void SanitizeMauvilleOldManForRuby(OldMan *dest);
-void sub_8120670(void);
void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 r1, u32 r6);
void SanitizeReceivedEmeraldOldMan(union OldMan * oldMan, u32 unused, u32 a2);
void ResetMauvilleOldManFlag(void);
diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h
index 23c84dffb..5895426cf 100644
--- a/include/metatile_behavior.h
+++ b/include/metatile_behavior.h
@@ -102,10 +102,10 @@ bool8 MetatileBehavior_IsShortGrass(u8);
bool8 MetatileBehavior_IsHotSprings(u8);
bool8 MetatileBehavior_IsWaterfall(u8);
bool8 MetatileBehavior_IsFortreeBridge(u8);
-bool8 MetatileBehavior_IsPacifidlogVerticalLog1(u8);
-bool8 MetatileBehavior_IsPacifidlogVerticalLog2(u8);
-bool8 MetatileBehavior_IsPacifidlogHorizontalLog1(u8);
-bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8);
+bool8 MetatileBehavior_IsPacifidlogVerticalLogTop(u8);
+bool8 MetatileBehavior_IsPacifidlogVerticalLogBottom(u8);
+bool8 MetatileBehavior_IsPacifidlogHorizontalLogLeft(u8);
+bool8 MetatileBehavior_IsPacifidlogHorizontalLogRight(u8);
bool8 MetatileBehavior_IsPacifidlogLog(u8);
bool8 MetatileBehavior_IsTrickHousePuzzleDoor(u8);
bool8 MetatileBehavior_IsRegionMap(u8);
diff --git a/include/overworld.h b/include/overworld.h
index e1cf100db..04b61f7fd 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -67,8 +67,8 @@ void SetGameStat(u8 index, u32 value);
void ApplyNewEncryptionKeyToGameStats(u32 newKey);
void LoadObjEventTemplatesFromHeader(void);
void LoadSaveblockObjEventScripts(void);
-void Overworld_SetObjEventTemplateCoords(u8 localId, s16 x, s16 y);
-void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType);
+void SetObjEventTemplateCoords(u8 localId, s16 x, s16 y);
+void SetObjEventTemplateMovementType(u8 localId, u8 movementType);
const struct MapLayout *GetMapLayout(void);
void ApplyCurrentWarp(void);
struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
@@ -98,8 +98,8 @@ void ResetInitialPlayerAvatarState(void);
void StoreInitialPlayerAvatarState(void);
bool32 Overworld_IsBikingAllowed(void);
void SetDefaultFlashLevel(void);
-void Overworld_SetFlashLevel(s32 flashLevel);
-u8 Overworld_GetFlashLevel(void);
+void SetFlashLevel(s32 flashLevel);
+u8 GetFlashLevel(void);
void SetCurrentMapLayout(u16 mapLayoutId);
void SetObjectEventLoadFlag(u8 var);
u16 GetLocationMusic(struct WarpData *warp);
diff --git a/include/script_menu.h b/include/script_menu.h
index 086ad147f..a690ef8b8 100644
--- a/include/script_menu.h
+++ b/include/script_menu.h
@@ -8,7 +8,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8
bool8 ScriptMenu_YesNo(u8 left, u8 top);
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount);
bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y);
-bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
+bool8 (*ScriptMenu_HidePokemonPic(void))(void);
int ConvertPixelWidthToTileWidth(int width);
u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height);
void ClearToTransparentAndRemoveWindow(u8 windowId);
diff --git a/include/tv.h b/include/tv.h
index 30cd13326..31c8fcc50 100644
--- a/include/tv.h
+++ b/include/tv.h
@@ -19,7 +19,7 @@ void HideBattleTowerReporter(void);
void ReceiveTvShowsData(void *src, u32 size, u8 masterIdx);
void TryPutSpotTheCutiesOnAir(struct Pokemon *pokemon, u8 ribbonMonDataIdx);
u32 GetPlayerIDAsU32(void);
-bool8 GetPriceReduction(u8 newsKind);
+bool8 IsPokeNewsActive(u8 newsKind);
void SanitizeTVShowLocationsForRuby(TVShow *shows);
size_t CountDigits(int value);
u8 GetRibbonCount(struct Pokemon *pokemon);
diff --git a/src/battle_arena.c b/src/battle_arena.c
index 8a993f770..f744a3b2b 100644
--- a/src/battle_arena.c
+++ b/src/battle_arena.c
@@ -798,7 +798,7 @@ static void InitArenaChallenge(void)
if (!isCurrent)
gSaveBlock2Ptr->frontier.arenaWinStreaks[lvlMode] = 0;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
gTrainerBattleOpponent_A = 0;
}
diff --git a/src/battle_dome.c b/src/battle_dome.c
index 1b067924f..293662985 100644
--- a/src/battle_dome.c
+++ b/src/battle_dome.c
@@ -2099,7 +2099,7 @@ static void InitDomeChallenge(void)
if (!(gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]))
gSaveBlock2Ptr->frontier.domeWinStreaks[battleMode][lvlMode] = 0;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
gTrainerBattleOpponent_A = 0;
}
diff --git a/src/battle_factory.c b/src/battle_factory.c
index 8f1001e9c..23fa664f3 100644
--- a/src/battle_factory.c
+++ b/src/battle_factory.c
@@ -217,7 +217,7 @@ static void InitFactoryChallenge(void)
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
gFrontierTempParty[i] = 0xFFFF;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
gTrainerBattleOpponent_A = 0;
}
diff --git a/src/battle_palace.c b/src/battle_palace.c
index c4e48a4b2..0fa65200a 100644
--- a/src/battle_palace.c
+++ b/src/battle_palace.c
@@ -93,7 +93,7 @@ static void InitPalaceChallenge(void)
if (!(gSaveBlock2Ptr->frontier.winStreakActiveFlags & sWinStreakFlags[battleMode][lvlMode]))
gSaveBlock2Ptr->frontier.palaceWinStreaks[battleMode][lvlMode] = 0;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
gTrainerBattleOpponent_A = 0;
}
diff --git a/src/battle_pyramid.c b/src/battle_pyramid.c
index 48155c833..b10690ce4 100644
--- a/src/battle_pyramid.c
+++ b/src/battle_pyramid.c
@@ -34,7 +34,6 @@
#include "constants/frontier_util.h"
#include "constants/items.h"
#include "constants/layouts.h"
-#include "constants/maps.h"
#include "constants/metatile_labels.h"
#include "constants/moves.h"
#include "constants/trainers.h"
diff --git a/src/battle_setup.c b/src/battle_setup.c
index a9d4eeddf..f928cf3f9 100644
--- a/src/battle_setup.c
+++ b/src/battle_setup.c
@@ -43,7 +43,6 @@
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/map_types.h"
-#include "constants/maps.h"
#include "constants/trainers.h"
#include "constants/trainer_hill.h"
#include "constants/weather.h"
@@ -687,7 +686,7 @@ u8 BattleSetup_GetTerrainId(void)
}
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE113) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE113))
return BATTLE_TERRAIN_SAND;
- if (GetSav1Weather() == WEATHER_SANDSTORM)
+ if (GetSavedWeather() == WEATHER_SANDSTORM)
return BATTLE_TERRAIN_SAND;
return BATTLE_TERRAIN_PLAIN;
@@ -700,7 +699,7 @@ static u8 GetBattleTransitionTypeByMap(void)
PlayerGetDestCoords(&x, &y);
tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
- if (Overworld_GetFlashLevel())
+ if (GetFlashLevel())
return TRANSITION_TYPE_FLASH;
if (!MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehavior))
{
diff --git a/src/battle_tent.c b/src/battle_tent.c
index 26b2e8bb1..53c91c871 100644
--- a/src/battle_tent.c
+++ b/src/battle_tent.c
@@ -114,7 +114,7 @@ static void InitVerdanturfTentChallenge(void)
gSaveBlock2Ptr->frontier.challengeStatus = 0;
gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0;
gSaveBlock2Ptr->frontier.challengePaused = FALSE;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
}
static void GetVerdanturfTentPrize(void)
@@ -176,7 +176,7 @@ static void InitFallarborTentChallenge(void)
gSaveBlock2Ptr->frontier.challengeStatus = 0;
gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0;
gSaveBlock2Ptr->frontier.challengePaused = FALSE;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
}
static void GetFallarborTentPrize(void)
@@ -231,7 +231,7 @@ static void InitSlateportTentChallenge(void)
gSaveBlock2Ptr->frontier.challengeStatus = 0;
gSaveBlock2Ptr->frontier.curChallengeBattleNum = 0;
gSaveBlock2Ptr->frontier.challengePaused = FALSE;
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
}
static void GetSlateportTentPrize(void)
diff --git a/src/battle_tower.c b/src/battle_tower.c
index d9bd18bf7..accdca3b4 100644
--- a/src/battle_tower.c
+++ b/src/battle_tower.c
@@ -918,7 +918,7 @@ static void InitTowerChallenge(void)
gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode] = 0;
ValidateBattleTowerRecordChecksums();
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
gTrainerBattleOpponent_A = 0;
}
diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c
index 61fab39e2..26caa830d 100644
--- a/src/braille_puzzles.c
+++ b/src/braille_puzzles.c
@@ -6,7 +6,6 @@
#include "sound.h"
#include "task.h"
#include "constants/field_effects.h"
-#include "constants/maps.h"
#include "constants/songs.h"
#include "constants/metatile_labels.h"
#include "fieldmap.h"
diff --git a/src/cable_club.c b/src/cable_club.c
index 1f943b03a..4ee2797f4 100644
--- a/src/cable_club.c
+++ b/src/cable_club.c
@@ -1031,7 +1031,7 @@ void CleanupLinkRoomState(void)
LoadPlayerParty();
SavePlayerBag();
}
- SetWarpDestinationToDynamicWarp(0x7F);
+ SetWarpDestinationToDynamicWarp(WARP_ID_DYNAMIC);
}
void ExitLinkRoom(void)
diff --git a/src/contest_util.c b/src/contest_util.c
index 6fd74a68a..7533d4349 100644
--- a/src/contest_util.c
+++ b/src/contest_util.c
@@ -2256,7 +2256,7 @@ void Task_LinkContest_FinalizeConnection(u8 taskId)
StringGetEnd10(gContestMons[i].nickname);
DestroyTask(taskId);
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
ScriptContext2_Disable();
EnableBothScriptContexts();
}
diff --git a/src/data/lilycove_lady.h b/src/data/lilycove_lady.h
index 1f1caa35f..dd0885ff8 100644
--- a/src/data/lilycove_lady.h
+++ b/src/data/lilycove_lady.h
@@ -5,11 +5,11 @@
static const u16 sContestLadyMonGfxId[] =
{
- OBJ_EVENT_GFX_ZIGZAGOON_1,
- OBJ_EVENT_GFX_SKITTY,
- OBJ_EVENT_GFX_POOCHYENA,
- OBJ_EVENT_GFX_KECLEON,
- OBJ_EVENT_GFX_PIKACHU
+ [CONTEST_CATEGORY_COOL] = OBJ_EVENT_GFX_ZIGZAGOON_1,
+ [CONTEST_CATEGORY_BEAUTY] = OBJ_EVENT_GFX_SKITTY,
+ [CONTEST_CATEGORY_CUTE] = OBJ_EVENT_GFX_POOCHYENA,
+ [CONTEST_CATEGORY_SMART] = OBJ_EVENT_GFX_KECLEON,
+ [CONTEST_CATEGORY_TOUGH] = OBJ_EVENT_GFX_PIKACHU
};
static const u16 sLilycoveLadyGfxId[] =
@@ -434,36 +434,36 @@ static const u16 sFavorLadyPrizes[] =
static const u8 *const sContestLadyMonNames[] =
{
- gText_ContestLady_Handsome,
- gText_ContestLady_Vinny,
- gText_ContestLady_Moreme,
- gText_ContestLady_Ironhard,
- gText_ContestLady_Muscle
+ [CONTEST_CATEGORY_COOL] = gText_ContestLady_Handsome,
+ [CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Vinny,
+ [CONTEST_CATEGORY_CUTE] = gText_ContestLady_Moreme,
+ [CONTEST_CATEGORY_SMART] = gText_ContestLady_Ironhard,
+ [CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Muscle
};
static const u8 *const sContestLadyCategoryNames[] =
{
- gText_ContestLady_Coolness,
- gText_ContestLady_Beauty,
- gText_ContestLady_Cuteness,
- gText_ContestLady_Smartness,
- gText_ContestLady_Toughness
+ [CONTEST_CATEGORY_COOL] = gText_ContestLady_Coolness,
+ [CONTEST_CATEGORY_BEAUTY] = gText_ContestLady_Beauty,
+ [CONTEST_CATEGORY_CUTE] = gText_ContestLady_Cuteness,
+ [CONTEST_CATEGORY_SMART] = gText_ContestLady_Smartness,
+ [CONTEST_CATEGORY_TOUGH] = gText_ContestLady_Toughness
};
static const u8 *const sContestNames[] =
{
- gText_CoolnessContest,
- gText_BeautyContest,
- gText_CutenessContest,
- gText_SmartnessContest,
- gText_ToughnessContest
+ [CONTEST_CATEGORY_COOL] = gText_CoolnessContest,
+ [CONTEST_CATEGORY_BEAUTY] = gText_BeautyContest,
+ [CONTEST_CATEGORY_CUTE] = gText_CutenessContest,
+ [CONTEST_CATEGORY_SMART] = gText_SmartnessContest,
+ [CONTEST_CATEGORY_TOUGH] = gText_ToughnessContest
};
static const u16 sContestLadyMonSpecies[] =
{
- SPECIES_ZIGZAGOON,
- SPECIES_SKITTY,
- SPECIES_POOCHYENA,
- SPECIES_KECLEON,
- SPECIES_PIKACHU
+ [CONTEST_CATEGORY_COOL] = SPECIES_ZIGZAGOON,
+ [CONTEST_CATEGORY_BEAUTY] = SPECIES_SKITTY,
+ [CONTEST_CATEGORY_CUTE] = SPECIES_POOCHYENA,
+ [CONTEST_CATEGORY_SMART] = SPECIES_KECLEON,
+ [CONTEST_CATEGORY_TOUGH] = SPECIES_PIKACHU
};
diff --git a/src/decoration.c b/src/decoration.c
index bb2dea7f9..9aa4bdf4d 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -1175,7 +1175,7 @@ static void SetInitialPositions(u8 taskId)
static void WarpToInitialPosition(u8 taskId)
{
DrawWholeMapView();
- SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, gTasks[taskId].tInitialX, gTasks[taskId].tInitialY);
+ SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, gTasks[taskId].tInitialX, gTasks[taskId].tInitialY);
WarpIntoMap();
}
diff --git a/src/event_object_movement.c b/src/event_object_movement.c
index 107ee47ab..b9a8fe3a7 100644
--- a/src/event_object_movement.c
+++ b/src/event_object_movement.c
@@ -26,7 +26,6 @@
#include "constants/event_objects.h"
#include "constants/field_effects.h"
#include "constants/items.h"
-#include "constants/maps.h"
#include "constants/mauville_old_man.h"
#include "constants/trainer_types.h"
#include "constants/union_room.h"
@@ -1141,7 +1140,7 @@ static const u8 sPlayerDirectionToCopyDirection[][4] = {
static void ClearObjectEvent(struct ObjectEvent *objectEvent)
{
*objectEvent = (struct ObjectEvent){};
- objectEvent->localId = 0xFF;
+ objectEvent->localId = OBJ_EVENT_ID_PLAYER;
objectEvent->mapNum = MAP_NUM(UNDEFINED);
objectEvent->mapGroup = MAP_GROUP(UNDEFINED);
objectEvent->movementActionId = MOVEMENT_ACTION_NONE;
@@ -1916,7 +1915,7 @@ void AllowObjectAtPosTriggerGroundEffects(s16 x, s16 y)
}
}
-void SetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
+void SetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
{
u8 objectEventId;
struct ObjectEvent *objectEvent;
@@ -1931,7 +1930,7 @@ void SetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority)
}
}
-void ResetObjectPriority(u8 localId, u8 mapNum, u8 mapGroup)
+void ResetObjectSubpriority(u8 localId, u8 mapNum, u8 mapGroup)
{
u8 objectEventId;
struct ObjectEvent *objectEvent;
diff --git a/src/faraway_island.c b/src/faraway_island.c
index 3927d9ad5..9ddb66de5 100755
--- a/src/faraway_island.c
+++ b/src/faraway_island.c
@@ -7,7 +7,6 @@
#include "sprite.h"
#include "constants/event_objects.h"
#include "constants/field_effects.h"
-#include "constants/maps.h"
#include "constants/metatile_behaviors.h"
static u8 GetValidMewMoveDirection(u8);
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index 6d338c06d..8d6b564d2 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -32,7 +32,6 @@
#include "constants/event_objects.h"
#include "constants/field_poison.h"
#include "constants/map_types.h"
-#include "constants/maps.h"
#include "constants/songs.h"
#include "constants/trainer_hill.h"
@@ -691,7 +690,7 @@ static bool8 TryArrowWarp(struct MapPosition *position, u16 metatileBehavior, u8
{
s8 warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position);
- if (IsArrowWarpMetatileBehavior(metatileBehavior, direction) == TRUE && warpEventId != -1)
+ if (IsArrowWarpMetatileBehavior(metatileBehavior, direction) == TRUE && warpEventId != WARP_ID_NONE)
{
StoreInitialPlayerAvatarState();
SetupWarp(&gMapHeader, warpEventId, position);
@@ -705,7 +704,7 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB
{
s8 warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position);
- if (warpEventId != -1 && IsWarpMetatileBehavior(metatileBehavior) == TRUE)
+ if (warpEventId != WARP_ID_NONE && IsWarpMetatileBehavior(metatileBehavior) == TRUE)
{
StoreInitialPlayerAvatarState();
SetupWarp(&gMapHeader, warpEventId, position);
@@ -847,7 +846,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8
if (MetatileBehavior_IsWarpDoor(metatileBehavior) == TRUE)
{
warpEventId = GetWarpEventAtMapPosition(&gMapHeader, position);
- if (warpEventId != -1 && IsWarpMetatileBehavior(metatileBehavior) == TRUE)
+ if (warpEventId != WARP_ID_NONE && IsWarpMetatileBehavior(metatileBehavior) == TRUE)
{
StoreInitialPlayerAvatarState();
SetupWarp(&gMapHeader, warpEventId, position);
@@ -873,7 +872,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e
return i;
}
}
- return -1;
+ return WARP_ID_NONE;
}
static u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent)
diff --git a/src/field_door.c b/src/field_door.c
index f53e83d7a..988ea615d 100644
--- a/src/field_door.c
+++ b/src/field_door.c
@@ -5,7 +5,6 @@
#include "fieldmap.h"
#include "metatile_behavior.h"
#include "task.h"
-#include "constants/maps.h"
#include "constants/songs.h"
#include "constants/metatile_labels.h"
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 9e54823a6..6cf468b3e 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -26,7 +26,6 @@
#include "constants/event_object_movement.h"
#include "constants/field_effects.h"
#include "constants/items.h"
-#include "constants/maps.h"
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/trainer_types.h"
diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c
index 0cf5e4145..9155903af 100644
--- a/src/field_screen_effect.c
+++ b/src/field_screen_effect.c
@@ -35,7 +35,6 @@
#include "trainer_hill.h"
#include "fldeff.h"
-// This file's functions.
static void Task_ExitNonAnimDoor(u8);
static void Task_ExitNonDoor(u8);
static void Task_DoContestHallWarp(u8);
@@ -50,9 +49,9 @@ static void Task_EnableScriptAfterMusicFade(u8 taskId);
// data[0] is used universally by tasks in this file as a state for switches
#define tState data[0]
-// const
-static const u16 sFlashLevelPixelRadii[] = { 200, 72, 64, 56, 48, 40, 32, 24, 0 };
-const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelPixelRadii) - 1;
+// Smaller flash level -> larger flash radius
+static const u16 sFlashLevelToRadius[] = { 200, 72, 64, 56, 48, 40, 32, 24, 0 };
+const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelToRadius) - 1;
const struct ScanlineEffectParams sFlashEffectParams =
{
@@ -971,14 +970,14 @@ static u8 StartUpdateOrbFlashEffect(s32 centerX, s32 centerY, s32 initialFlashRa
#undef tFlashRadiusDelta
#undef tClearScanlineEffect
-// A higher flashLevel value is a smaller flash radius (more darkness). 0 is full brightness
-void AnimateFlash(u8 flashLevel)
+// A higher flash level is a smaller flash radius (more darkness). 0 is full brightness
+void AnimateFlash(u8 newFlashLevel)
{
- u8 curFlashLevel = Overworld_GetFlashLevel();
+ u8 curFlashLevel = GetFlashLevel();
bool8 fullBrightness = FALSE;
- if (!flashLevel)
+ if (newFlashLevel == 0)
fullBrightness = TRUE;
- StartUpdateFlashLevelEffect(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelPixelRadii[curFlashLevel], sFlashLevelPixelRadii[flashLevel], fullBrightness, 1);
+ StartUpdateFlashLevelEffect(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelToRadius[curFlashLevel], sFlashLevelToRadius[newFlashLevel], fullBrightness, 1);
StartWaitForFlashUpdate();
ScriptContext2_Enable();
}
@@ -987,7 +986,7 @@ void WriteFlashScanlineEffectBuffer(u8 flashLevel)
{
if (flashLevel)
{
- SetFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelPixelRadii[flashLevel]);
+ SetFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelToRadius[flashLevel]);
CpuFastSet(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 480);
}
}
diff --git a/src/field_special_scene.c b/src/field_special_scene.c
index 39e5d6698..b7c93e510 100644
--- a/src/field_special_scene.c
+++ b/src/field_special_scene.c
@@ -349,7 +349,7 @@ void LookThroughPorthole(void)
FlagSet(FLAG_SYS_CRUISE_MODE);
FlagSet(FLAG_DONT_TRANSITION_MUSIC);
FlagSet(FLAG_HIDE_MAP_NAME_POPUP);
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
TrySetPortholeWarpDestination();
DoPortholeWarp();
}
diff --git a/src/field_specials.c b/src/field_specials.c
index ef569ca00..96eb949e5 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -55,7 +55,6 @@
#include "constants/items.h"
#include "constants/heal_locations.h"
#include "constants/map_types.h"
-#include "constants/maps.h"
#include "constants/mystery_gift.h"
#include "constants/script_menu.h"
#include "constants/slot_machine.h"
@@ -960,13 +959,9 @@ u8 GetBattleOutcome(void)
void CableCarWarp(void)
{
if (gSpecialVar_0x8004 != 0)
- {
- SetWarpDestination(MAP_GROUP(ROUTE112_CABLE_CAR_STATION), MAP_NUM(ROUTE112_CABLE_CAR_STATION), -1, 6, 4);
- }
+ SetWarpDestination(MAP_GROUP(ROUTE112_CABLE_CAR_STATION), MAP_NUM(ROUTE112_CABLE_CAR_STATION), WARP_ID_NONE, 6, 4);
else
- {
- SetWarpDestination(MAP_GROUP(MT_CHIMNEY_CABLE_CAR_STATION), MAP_NUM(MT_CHIMNEY_CABLE_CAR_STATION), -1, 6, 4);
- }
+ SetWarpDestination(MAP_GROUP(MT_CHIMNEY_CABLE_CAR_STATION), MAP_NUM(MT_CHIMNEY_CABLE_CAR_STATION), WARP_ID_NONE, 6, 4);
}
void SetHiddenItemFlag(void)
@@ -1335,15 +1330,40 @@ void BufferEReaderTrainerName(void)
u16 GetSlotMachineId(void)
{
- static const u8 sSlotMachineRandomSeeds[] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6};
- static const u8 sSlotMachineIds[] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5};
- static const u8 sSlotMachineServiceDayIds[] = {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5};
+ static const u8 sSlotMachineRandomSeeds[SLOT_MACHINE_COUNT] = {12, 2, 4, 5, 1, 8, 7, 11, 3, 10, 9, 6};
+ static const u8 sSlotMachineIds[SLOT_MACHINE_COUNT] = {
+ SLOT_MACHINE_UNLUCKIEST,
+ SLOT_MACHINE_UNLUCKIER,
+ SLOT_MACHINE_UNLUCKIER,
+ SLOT_MACHINE_UNLUCKY,
+ SLOT_MACHINE_UNLUCKY,
+ SLOT_MACHINE_UNLUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKIER,
+ SLOT_MACHINE_LUCKIER,
+ SLOT_MACHINE_LUCKIEST
+ };
+ static const u8 sSlotMachineServiceDayIds[SLOT_MACHINE_COUNT] = {
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKY,
+ SLOT_MACHINE_LUCKIER,
+ SLOT_MACHINE_LUCKIER,
+ SLOT_MACHINE_LUCKIER,
+ SLOT_MACHINE_LUCKIER,
+ SLOT_MACHINE_LUCKIEST,
+ SLOT_MACHINE_LUCKIEST
+ };
u32 rnd = gSaveBlock1Ptr->dewfordTrends[0].trendiness + gSaveBlock1Ptr->dewfordTrends[0].rand + sSlotMachineRandomSeeds[gSpecialVar_0x8004];
- if (GetPriceReduction(POKENEWS_GAME_CORNER))
- {
+ if (IsPokeNewsActive(POKENEWS_GAME_CORNER))
return sSlotMachineServiceDayIds[rnd % SLOT_MACHINE_COUNT];
- }
+
return sSlotMachineIds[rnd % SLOT_MACHINE_COUNT];
}
@@ -1550,17 +1570,13 @@ bool8 FoundBlackGlasses(void)
void SetRoute119Weather(void)
{
if (IsMapTypeOutdoors(GetLastUsedWarpMapType()) != TRUE)
- {
- SetSav1Weather(WEATHER_ROUTE119_CYCLE);
- }
+ SetSavedWeather(WEATHER_ROUTE119_CYCLE);
}
void SetRoute123Weather(void)
{
if (IsMapTypeOutdoors(GetLastUsedWarpMapType()) != TRUE)
- {
- SetSav1Weather(WEATHER_ROUTE123_CYCLE);
- }
+ SetSavedWeather(WEATHER_ROUTE123_CYCLE);
}
u8 GetLeadMonIndex(void)
@@ -3029,6 +3045,8 @@ void CloseFrontierExchangeCornerItemIconWindow(void)
RemoveWindow(sFrontierExchangeCorner_ItemIconWindowId);
}
+#define TAG_ITEM_ICON 5500
+
static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
{
#include "data/battle_frontier/battle_frontier_exchange_corner.h"
@@ -3046,9 +3064,9 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
}
else
{
- FreeSpriteTilesByTag(5500);
- FreeSpritePaletteByTag(5500);
- sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, 5500, 5500);
+ FreeSpriteTilesByTag(TAG_ITEM_ICON);
+ FreeSpritePaletteByTag(TAG_ITEM_ICON);
+ sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON);
}
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
@@ -3059,9 +3077,9 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
}
else
{
- FreeSpriteTilesByTag(5500);
- FreeSpritePaletteByTag(5500);
- sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, 5500, 5500);
+ FreeSpriteTilesByTag(TAG_ITEM_ICON);
+ FreeSpritePaletteByTag(TAG_ITEM_ICON);
+ sScrollableMultichoice_ItemSpriteId = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, TAG_ITEM_ICON, TAG_ITEM_ICON);
}
break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
@@ -3078,9 +3096,9 @@ static void FillFrontierExchangeCornerWindowAndItemIcon(u16 menu, u16 selection)
static void ShowFrontierExchangeCornerItemIcon(u16 item)
{
- FreeSpriteTilesByTag(5500);
- FreeSpritePaletteByTag(5500);
- sScrollableMultichoice_ItemSpriteId = AddItemIconSprite(5500, 5500, item);
+ FreeSpriteTilesByTag(TAG_ITEM_ICON);
+ FreeSpritePaletteByTag(TAG_ITEM_ICON);
+ sScrollableMultichoice_ItemSpriteId = AddItemIconSprite(TAG_ITEM_ICON, TAG_ITEM_ICON, item);
if (sScrollableMultichoice_ItemSpriteId != MAX_SPRITES)
{
@@ -3416,7 +3434,7 @@ static void ChangeDeoxysRockLevel(u8 rockLevel)
gFieldEffectArguments[5] = 5;
FieldEffectStart(FLDEFF_MOVE_DEOXYS_ROCK);
- Overworld_SetObjEventTemplateCoords(1, sDeoxysRockCoords[rockLevel][0], sDeoxysRockCoords[rockLevel][1]);
+ SetObjEventTemplateCoords(LOCALID_BIRTH_ISLAND_EXTERIOR_ROCK, sDeoxysRockCoords[rockLevel][0], sDeoxysRockCoords[rockLevel][1]);
}
static void WaitForDeoxysRockMovement(u8 taskId)
diff --git a/src/field_tasks.c b/src/field_tasks.c
index 187270f7a..760d85369 100644
--- a/src/field_tasks.c
+++ b/src/field_tasks.c
@@ -21,20 +21,40 @@
#include "constants/songs.h"
#include "constants/metatile_labels.h"
+/* This file handles some persistent tasks that run in the overworld.
+ * - Task_RunTimeBasedEvents: Periodically updates local time and RTC events. Also triggers ambient cries.
+ * - Task_MuddySlope: Handles the metatile animation when the player steps on muddy slopes.
+ * - Task_RunPerStepCallback: Calls one of the functions in sPerStepCallbacks, listed below...
+ * . DummyPerStepCallback: Default, does nothing
+ * . AshGrassPerStepCallback: Removes the ash from ash-covered grass that the player steps on.
+ * . FortreeBridgePerStepCallback: Depresses Fortree log bridges that the player steps on.
+ * . PacifidlogBridgePerStepCallback: Submerges Pacifidlog log bridges that the player steps on.
+ * . SootopolisGymIcePerStepCallback: Cracks/breaks ice in Sootopolis Gym that the player steps on.
+ * . EndTruckSequence: Sets the moving truck boxes to their final position when the truck sequence ends.
+ * . SecretBasePerStepCallback: Records the decorations in a friend's secret base that the player steps on.
+ * . CrackedFloorPerStepCallback: Breaks cracked floors that the player steps on.
+ *
+ * NOTE: "PerStep" is perhaps misleading. One function in sPerStepCallbacks is called
+ * every frame while in the overworld by Task_RunPerStepCallback regardless of
+ * whether or not steps are being taken. However, nearly all of the functions in
+ * the table check if the player has moved from their previous position before
+ * doing anything else.
+ */
+
struct PacifidlogMetatileOffsets
{
s8 x;
s8 y;
- u16 tileId;
+ u16 metatileId;
};
-static void DummyPerStepCallback(u8 taskId);
-static void AshGrassPerStepCallback(u8 taskId);
-static void FortreeBridgePerStepCallback(u8 taskId);
-static void PacifidlogBridgePerStepCallback(u8 taskId);
-static void SootopolisGymIcePerStepCallback(u8 taskId);
-static void CrackedFloorPerStepCallback(u8 taskId);
-static void Task_MuddySlope(u8 taskId);
+static void DummyPerStepCallback(u8);
+static void AshGrassPerStepCallback(u8);
+static void FortreeBridgePerStepCallback(u8);
+static void PacifidlogBridgePerStepCallback(u8);
+static void SootopolisGymIcePerStepCallback(u8);
+static void CrackedFloorPerStepCallback(u8);
+static void Task_MuddySlope(u8);
static const TaskFunc sPerStepCallbacks[] =
{
@@ -48,29 +68,35 @@ static const TaskFunc sPerStepCallbacks[] =
[STEP_CB_CRACKED_FLOOR] = CrackedFloorPerStepCallback
};
-// they are in pairs but declared as 1D array
+// Each array has 4 pairs of data, each pair representing two metatiles of a log and their relative position.
+// The 4 pairs are for:
+// 0: If the player is standing on the top of a vertical log
+// 1: If the player is standing on the bottom of a vertical log
+// 2: If the player is standing on the left of a horizontal log
+// 3: If the player is standing on the right of a horizontal log
+// i.e. the element with an offset of 0,0 is the one the player is standing on.
static const struct PacifidlogMetatileOffsets sHalfSubmergedBridgeMetatileOffsets[] =
{
- { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0}, {0, 1, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1},
- { 0, -1, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical0}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Vertical1},
- { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0}, {1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1},
- {-1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal0}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_Horizontal1}
+ { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop}, {0, 1, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom},
+ { 0, -1, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalTop}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_VerticalBottom},
+ { 0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft}, {1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight},
+ {-1, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalLeft}, {0, 0, METATILE_Pacifidlog_HalfSubmergedLogs_HorizontalRight}
};
static const struct PacifidlogMetatileOffsets sFullySubmergedBridgeMetatileOffsets[] =
{
- { 0, 0, METATILE_Pacifidlog_SubmergedLogs_Vertical0}, {0, 1, METATILE_Pacifidlog_SubmergedLogs_Vertical1},
- { 0, -1, METATILE_Pacifidlog_SubmergedLogs_Vertical0}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_Vertical1},
- { 0, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal0}, {1, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal1},
- {-1, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal0}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_Horizontal1}
+ { 0, 0, METATILE_Pacifidlog_SubmergedLogs_VerticalTop}, {0, 1, METATILE_Pacifidlog_SubmergedLogs_VerticalBottom},
+ { 0, -1, METATILE_Pacifidlog_SubmergedLogs_VerticalTop}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_VerticalBottom},
+ { 0, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft}, {1, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalRight},
+ {-1, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalLeft}, {0, 0, METATILE_Pacifidlog_SubmergedLogs_HorizontalRight}
};
static const struct PacifidlogMetatileOffsets sFloatingBridgeMetatileOffsets[] =
{
- { 0, 0, METATILE_Pacifidlog_FloatingLogs_Vertical0}, {0, 1, METATILE_Pacifidlog_FloatingLogs_Vertical1},
- { 0, -1, METATILE_Pacifidlog_FloatingLogs_Vertical0}, {0, 0, METATILE_Pacifidlog_FloatingLogs_Vertical1},
- { 0, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal0}, {1, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal1},
- {-1, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal0}, {0, 0, METATILE_Pacifidlog_FloatingLogs_Horizontal1}
+ { 0, 0, METATILE_Pacifidlog_FloatingLogs_VerticalTop}, {0, 1, METATILE_Pacifidlog_FloatingLogs_VerticalBottom},
+ { 0, -1, METATILE_Pacifidlog_FloatingLogs_VerticalTop}, {0, 0, METATILE_Pacifidlog_FloatingLogs_VerticalBottom},
+ { 0, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalLeft}, {1, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalRight},
+ {-1, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalLeft}, {0, 0, METATILE_Pacifidlog_FloatingLogs_HorizontalRight}
};
// Each element corresponds to a y coordinate row in the sootopolis gym 1F map.
@@ -104,16 +130,11 @@ static const u16 sSootopolisGymIceRowVars[] =
0
};
-static const u16 sMuddySlopeMetatiles[] = {
- METATILE_General_MuddySlope_Frame0,
- METATILE_General_MuddySlope_Frame3,
- METATILE_General_MuddySlope_Frame2,
- METATILE_General_MuddySlope_Frame1
-};
+#define tCallbackId data[0]
static void Task_RunPerStepCallback(u8 taskId)
{
- int idx = gTasks[taskId].data[0];
+ int idx = gTasks[taskId].tCallbackId;
sPerStepCallbacks[idx](taskId);
}
@@ -121,23 +142,23 @@ static void Task_RunPerStepCallback(u8 taskId)
#define tAmbientCryState data[1]
#define tAmbientCryDelay data[2]
+#define TIME_UPDATE_INTERVAL (1 << 12)
+
static void RunTimeBasedEvents(s16 *data)
{
switch (tState)
{
- case 0:
- if (gMain.vblankCounter1 & 0x1000)
- {
- DoTimeBasedEvents();
- tState++;
- }
- break;
- case 1:
- if (!(gMain.vblankCounter1 & 0x1000))
- {
- tState--;
- }
- break;
+ case 0:
+ if (gMain.vblankCounter1 & TIME_UPDATE_INTERVAL)
+ {
+ DoTimeBasedEvents();
+ tState++;
+ }
+ break;
+ case 1:
+ if (!(gMain.vblankCounter1 & TIME_UPDATE_INTERVAL))
+ tState--;
+ break;
}
}
@@ -153,22 +174,20 @@ static void Task_RunTimeBasedEvents(u8 taskId)
}
#undef tState
-#undef tAmbientCryState
-#undef tAmbientCryDelay
void SetUpFieldTasks(void)
{
if (!FuncIsActiveTask(Task_RunPerStepCallback))
{
- u8 taskId = CreateTask(Task_RunPerStepCallback, 0x50);
- gTasks[taskId].data[0] = 0;
+ u8 taskId = CreateTask(Task_RunPerStepCallback, 80);
+ gTasks[taskId].tCallbackId = STEP_CB_DUMMY;
}
if (!FuncIsActiveTask(Task_MuddySlope))
- CreateTask(Task_MuddySlope, 0x50);
+ CreateTask(Task_MuddySlope, 80);
if (!FuncIsActiveTask(Task_RunTimeBasedEvents))
- CreateTask(Task_RunTimeBasedEvents, 0x50);
+ CreateTask(Task_RunTimeBasedEvents, 80);
}
void ActivatePerStepCallback(u8 callbackId)
@@ -179,17 +198,13 @@ void ActivatePerStepCallback(u8 callbackId)
s32 i;
s16 *data = gTasks[taskId].data;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < NUM_TASK_DATA; i++)
data[i] = 0;
if (callbackId >= ARRAY_COUNT(sPerStepCallbacks))
- {
- data[0] = 0;
- }
+ tCallbackId = STEP_CB_DUMMY;
else
- {
- data[0] = callbackId;
- }
+ tCallbackId = callbackId;
}
}
@@ -200,18 +215,20 @@ void ResetFieldTasksArgs(void)
taskId = FindTaskIdByFunc(Task_RunPerStepCallback);
if (taskId != TASK_NONE)
- {
data = gTasks[taskId].data;
- }
+
taskId = FindTaskIdByFunc(Task_RunTimeBasedEvents);
if (taskId != TASK_NONE)
{
data = gTasks[taskId].data;
- data[1] = 0;
- data[2] = 0;
+ tAmbientCryState = 0;
+ tAmbientCryDelay = 0;
}
}
+#undef tAmbientCryState
+#undef tAmbientCryDelay
+
static void DummyPerStepCallback(u8 taskId)
{
@@ -219,282 +236,377 @@ static void DummyPerStepCallback(u8 taskId)
static const struct PacifidlogMetatileOffsets *GetPacifidlogBridgeMetatileOffsets(const struct PacifidlogMetatileOffsets *offsets, u16 metatileBehavior)
{
- if (MetatileBehavior_IsPacifidlogVerticalLog1(metatileBehavior))
+ if (MetatileBehavior_IsPacifidlogVerticalLogTop(metatileBehavior))
return &offsets[0 * 2];
- else if (MetatileBehavior_IsPacifidlogVerticalLog2(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogVerticalLogBottom(metatileBehavior))
return &offsets[1 * 2];
- else if (MetatileBehavior_IsPacifidlogHorizontalLog1(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(metatileBehavior))
return &offsets[2 * 2];
- else if (MetatileBehavior_IsPacifidlogHorizontalLog2(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(metatileBehavior))
return &offsets[3 * 2];
else
return NULL;
}
-static void SetPacifidlogBridgeMetatiles(const struct PacifidlogMetatileOffsets *offsets, s16 x, s16 y, bool32 redrawMap)
+static void TrySetPacifidlogBridgeMetatiles(const struct PacifidlogMetatileOffsets *offsets, s16 x, s16 y, bool32 redrawMap)
{
offsets = GetPacifidlogBridgeMetatileOffsets(offsets, MapGridGetMetatileBehaviorAt(x, y));
+
+ // If offsets is NULL, position is not a log (don't set it)
if (offsets)
{
- MapGridSetMetatileIdAt(x + offsets[0].x, y + offsets[0].y, offsets[0].tileId);
+ // Set both metatiles of the log
+ MapGridSetMetatileIdAt(x + offsets[0].x, y + offsets[0].y, offsets[0].metatileId);
if (redrawMap)
CurrentMapDrawMetatileAt(x + offsets[0].x, y + offsets[0].y);
- MapGridSetMetatileIdAt(x + offsets[1].x, y + offsets[1].y, offsets[1].tileId);
+ MapGridSetMetatileIdAt(x + offsets[1].x, y + offsets[1].y, offsets[1].metatileId);
if (redrawMap)
CurrentMapDrawMetatileAt(x + offsets[1].x, y + offsets[1].y);
}
}
-static void UpdateHalfSubmergedBridgeMetatiles(s16 x, s16 y, bool32 redrawMap)
+static void TrySetLogBridgeHalfSubmerged(s16 x, s16 y, bool32 redrawMap)
{
- SetPacifidlogBridgeMetatiles(sHalfSubmergedBridgeMetatileOffsets, x, y, redrawMap);
+ TrySetPacifidlogBridgeMetatiles(sHalfSubmergedBridgeMetatileOffsets, x, y, redrawMap);
}
-static void UpdateFullySubmergedBridgeMetatiles(s16 x, s16 y, bool32 redrawMap)
+static void TrySetLogBridgeFullySubmerged(s16 x, s16 y, bool32 redrawMap)
{
- SetPacifidlogBridgeMetatiles(sFullySubmergedBridgeMetatileOffsets, x, y, redrawMap);
+ TrySetPacifidlogBridgeMetatiles(sFullySubmergedBridgeMetatileOffsets, x, y, redrawMap);
}
-static void UpdateFloatingBridgeMetatiles(s16 x, s16 y, bool32 redrawMap)
+static void TrySetLogBridgeFloating(s16 x, s16 y, bool32 redrawMap)
{
- SetPacifidlogBridgeMetatiles(sFloatingBridgeMetatileOffsets, x, y, redrawMap);
+ TrySetPacifidlogBridgeMetatiles(sFloatingBridgeMetatileOffsets, x, y, redrawMap);
}
-static bool32 StandingOnNewPacifidlogBridge(s16 x1, s16 y1, s16 x2, s16 y2)
+// Returns FALSE if player has moved from one end of a log to the other (log should remain submerged).
+// Otherwise it returns TRUE.
+static bool32 ShouldRaisePacifidlogLogs(s16 newX, s16 newY, s16 oldX, s16 oldY)
{
- u16 metatileBehavior = MapGridGetMetatileBehaviorAt(x2, y2);
+ u16 oldBehavior = MapGridGetMetatileBehaviorAt(oldX, oldY);
- if (MetatileBehavior_IsPacifidlogVerticalLog1(metatileBehavior))
+ if (MetatileBehavior_IsPacifidlogVerticalLogTop(oldBehavior))
{
- if (y1 > y2)
+ // Still on same one if moved from top to bottom
+ if (newY > oldY)
return FALSE;
}
- else if (MetatileBehavior_IsPacifidlogVerticalLog2(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogVerticalLogBottom(oldBehavior))
{
- if (y1 < y2)
+ // Still on same one if moved from bottom to top
+ if (newY < oldY)
return FALSE;
}
- else if (MetatileBehavior_IsPacifidlogHorizontalLog1(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(oldBehavior))
{
- if (x1 > x2)
+ // Still on same one if moved from left to right
+ if (newX > oldX)
return FALSE;
}
- else if (MetatileBehavior_IsPacifidlogHorizontalLog2(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(oldBehavior))
{
- if (x1 < x2)
+ // Still on same one if moved from right to left
+ if (newX < oldX)
return FALSE;
}
+
+ // Player is either on a different log or no log at all
return TRUE;
}
-static bool32 StandingOnSamePacifidlogBridge(s16 x1, s16 y1, s16 x2, s16 y2)
+// Returns FALSE if player has moved from one end of a log to the other (log should remain submerged).
+// Otherwise it returns TRUE.
+// This is the effectively the same as ShouldRaisePacifidlogLogs, as it swaps both the conditions and which position's behavior to check.
+// In effect the previous function asks "was the player's previous position not the other end of a log they're standing on?"
+// while this function asks "is the player's current position not the other end of a log they were previously standing on?"
+// and with the same positions both questions always have the same answer.
+static bool32 ShouldSinkPacifidlogLogs(s16 newX, s16 newY, s16 oldX, s16 oldY)
{
- u16 metatileBehavior = MapGridGetMetatileBehaviorAt(x1, y1);
+ u16 newBehavior = MapGridGetMetatileBehaviorAt(newX, newY);
- if (MetatileBehavior_IsPacifidlogVerticalLog1(metatileBehavior))
+ if (MetatileBehavior_IsPacifidlogVerticalLogTop(newBehavior))
{
- if (y1 < y2)
+ // Still on same one if moved from bottom to top
+ if (newY < oldY)
return FALSE;
}
- else if (MetatileBehavior_IsPacifidlogVerticalLog2(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogVerticalLogBottom(newBehavior))
{
- if (y1 > y2)
+ // Still on same one if moved from top to bottom
+ if (newY > oldY)
return FALSE;
}
- else if (MetatileBehavior_IsPacifidlogHorizontalLog1(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogHorizontalLogLeft(newBehavior))
{
- if (x1 < x2)
+ // Still on same one if moved from right to left
+ if (newX < oldX)
return FALSE;
}
- else if (MetatileBehavior_IsPacifidlogHorizontalLog2(metatileBehavior))
+ else if (MetatileBehavior_IsPacifidlogHorizontalLogRight(newBehavior))
{
- if (x1 > x2)
+ // Still on same one if moved from left to right
+ if (newX > oldX)
return FALSE;
}
return TRUE;
}
+#define tState data[1]
+#define tPrevX data[2]
+#define tPrevY data[3]
+#define tToRaiseX data[4]
+#define tToRaiseY data[5]
+#define tDelay data[6]
+
static void PacifidlogBridgePerStepCallback(u8 taskId)
{
s16 *data;
s16 x, y;
data = gTasks[taskId].data;
PlayerGetDestCoords(&x, &y);
- switch (data[1])
+ switch (tState)
{
- case 0:
- data[2] = x;
- data[3] = y;
- UpdateFullySubmergedBridgeMetatiles(x, y, TRUE);
- data[1] = 1;
- break;
- case 1:
- if (x != data[2] || y != data[3])
- {
- if (StandingOnNewPacifidlogBridge(x, y, data[2], data[3]))
- {
- UpdateHalfSubmergedBridgeMetatiles(data[2], data[3], TRUE);
- UpdateFloatingBridgeMetatiles(data[2], data[3], FALSE);
- data[4] = data[2];
- data[5] = data[3];
- data[1] = 2;
- data[6] = 8;
- }
- else
- {
- data[4] = -1;
- data[5] = -1;
- }
+ case 0:
+ tPrevX = x;
+ tPrevY = y;
+
+ // If player is already standing on a log when the callback
+ // is set then immediately set it to submerged
+ TrySetLogBridgeFullySubmerged(x, y, TRUE);
+ tState = 1;
+ break;
+ case 1:
+ // Skip if player hasn't moved
+ if (x == tPrevX && y == tPrevY)
+ return;
+
+ if (ShouldRaisePacifidlogLogs(x, y, tPrevX, tPrevY))
+ {
+ // Player's previous position is not the other end of a log
+ // they're standing on, try and set it half-submerged (rising to surface).
+ // The floating metatile is queued up by setting it but not drawing it,
+ // but this is pointless as state 2 will handle it in full anyway.
+ TrySetLogBridgeHalfSubmerged(tPrevX, tPrevY, TRUE);
+ TrySetLogBridgeFloating(tPrevX, tPrevY, FALSE);
+ tToRaiseX = tPrevX;
+ tToRaiseY = tPrevY;
+ tState = 2;
+ tDelay = 8;
+ }
+ else
+ {
+ // Player has moved but is still on the same log bridge section.
+ // Keep it submerged.
+ tToRaiseX = -1;
+ tToRaiseY = -1;
+ }
- if (StandingOnSamePacifidlogBridge(x, y, data[2], data[3]))
- {
- UpdateHalfSubmergedBridgeMetatiles(x, y, TRUE);
- data[1] = 2;
- data[6] = 8;
- }
+ if (ShouldSinkPacifidlogLogs(x, y, tPrevX, tPrevY))
+ {
+ // Player's current position is not the other end of a log
+ // they were previously standing on, try and set it half-submerged (sinking)
+ TrySetLogBridgeHalfSubmerged(x, y, TRUE);
+ tState = 2;
+ tDelay = 8;
+ }
- data[2] = x;
- data[3] = y;
- if (MetatileBehavior_IsPacifidlogLog(MapGridGetMetatileBehaviorAt(x, y)))
- PlaySE(SE_PUDDLE);
- }
- break;
- case 2:
- if ((--data[6]) == 0)
- {
- UpdateFullySubmergedBridgeMetatiles(x, y, TRUE);
- if (data[4] != -1 && data[5] != -1)
- UpdateFloatingBridgeMetatiles(data[4], data[5], TRUE);
+ tPrevX = x;
+ tPrevY = y;
- data[1] = 1;
- }
- break;
+ // If player's new position is a log play the puddle SE
+ if (MetatileBehavior_IsPacifidlogLog(MapGridGetMetatileBehaviorAt(x, y)))
+ PlaySE(SE_PUDDLE);
+ break;
+ case 2:
+ if (--tDelay == 0)
+ {
+ // If player's current position is a log submerge it fully.
+ TrySetLogBridgeFullySubmerged(x, y, TRUE);
+
+ // Player's previous position is not the other end of a log
+ // they're standing on, try to raise their previous position.
+ if (tToRaiseX != -1 && tToRaiseY != -1)
+ TrySetLogBridgeFloating(tToRaiseX, tToRaiseY, TRUE);
+
+ tState = 1;
+ }
+ break;
}
}
-static void SetLoweredForetreeBridgeMetatile(s16 x, s16 y)
+#undef tState
+#undef tPrevX
+#undef tPrevY
+#undef tToRaiseX
+#undef tToRaiseY
+#undef tDelay
+
+static void TryLowerFortreeBridge(s16 x, s16 y)
{
u8 z = PlayerGetZCoord();
if (!(z & 1))
{
switch (MapGridGetMetatileIdAt(x, y))
{
- case METATILE_Fortree_BridgeOverGrass_Raised:
- MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Lowered);
- break;
- case METATILE_Fortree_BridgeOverTrees_Raised:
- MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Lowered);
- break;
+ case METATILE_Fortree_BridgeOverGrass_Raised:
+ MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Lowered);
+ break;
+ case METATILE_Fortree_BridgeOverTrees_Raised:
+ MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Lowered);
+ break;
}
}
}
-static void SetNormalFortreeBridgeMetatile(s16 x, s16 y)
+static void TryRaiseFortreeBridge(s16 x, s16 y)
{
u8 z = PlayerGetZCoord();
if (!(z & 1))
{
switch (MapGridGetMetatileIdAt(x, y))
{
- case METATILE_Fortree_BridgeOverGrass_Lowered:
- MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Raised);
- break;
- case METATILE_Fortree_BridgeOverTrees_Lowered:
- MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Raised);
- break;
+ case METATILE_Fortree_BridgeOverGrass_Lowered:
+ MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverGrass_Raised);
+ break;
+ case METATILE_Fortree_BridgeOverTrees_Lowered:
+ MapGridSetMetatileIdAt(x, y, METATILE_Fortree_BridgeOverTrees_Raised);
+ break;
}
}
}
+#define tState data[1]
+#define tPrevX data[2]
+#define tPrevY data[3]
+#define tOldBridgeX data[4]
+#define tOldBridgeY data[5]
+#define tBounceTime data[6]
+
static void FortreeBridgePerStepCallback(u8 taskId)
{
bool8 isFortreeBridgeCur;
bool8 isFortreeBridgePrev;
- u8 z, flag;
- s16 x, y, x2, y2;
+ u8 z, onBridgeElevation;
+ s16 x, y, prevX, prevY;
s16 *data = gTasks[taskId].data;
PlayerGetDestCoords(&x, &y);
- switch (data[1])
+ switch (tState)
{
- default:
- break;
- case 0:
- data[2] = x;
- data[3] = y;
- if (MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y)))
- {
- SetLoweredForetreeBridgeMetatile(x, y);
- CurrentMapDrawMetatileAt(x, y);
- }
- data[1] = 1;
+ default:
+ break;
+ case 0:
+ tPrevX = x;
+ tPrevY = y;
+
+ // If player is already on bridge when callback is set then lower it immediately.
+ if (MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y)))
+ {
+ TryLowerFortreeBridge(x, y);
+ CurrentMapDrawMetatileAt(x, y);
+ }
+ tState = 1;
+ break;
+ case 1:
+ prevX = tPrevX;
+ prevY = tPrevY;
+
+ // Skip if player hasn't moved
+ if (x == prevX && y == prevY)
break;
- case 1:
- x2 = data[2];
- y2 = data[3];
- if (x == x2 && y == y2)
- break;
-
- isFortreeBridgeCur = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y));
- isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x2, y2));
- z = PlayerGetZCoord();
- flag = 0;
- if ((u8)(z & 1) == 0)
- flag = 1;
-
- if (flag && (isFortreeBridgeCur == 1 || isFortreeBridgePrev == 1))
- PlaySE(SE_BRIDGE_WALK);
-
- if (isFortreeBridgePrev)
- {
- SetNormalFortreeBridgeMetatile(x2, y2);
- CurrentMapDrawMetatileAt(x2, y2);
- SetLoweredForetreeBridgeMetatile(x, y);
- CurrentMapDrawMetatileAt(x, y);
- }
- data[4] = x2;
- data[5] = y2;
- data[2] = x;
- data[3] = y;
- if (!isFortreeBridgePrev)
- break;
+ isFortreeBridgeCur = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(x, y));
+ isFortreeBridgePrev = MetatileBehavior_IsFortreeBridge(MapGridGetMetatileBehaviorAt(prevX, prevY));
+
+ // Make sure player isn't below bridge
+ z = PlayerGetZCoord();
+ onBridgeElevation = FALSE;
+ if ((u8)(z & 1) == 0)
+ onBridgeElevation = TRUE;
+
+ if (onBridgeElevation && (isFortreeBridgeCur == TRUE || isFortreeBridgePrev == TRUE))
+ PlaySE(SE_BRIDGE_WALK);
+
+ // Because this doesn't check for isFortreeBridgeCur, bridge sections aren't
+ // lowered when first stepping onto them from anything other than another bridge.
+ #ifdef BUGFIX
+ if (isFortreeBridgePrev || isFortreeBridgeCur)
+ #else
+ if (isFortreeBridgePrev)
+ #endif
+ {
+ // Raise old bridge
+ TryRaiseFortreeBridge(prevX, prevY);
+ CurrentMapDrawMetatileAt(prevX, prevY);
+
+ // Lower new bridge
+ TryLowerFortreeBridge(x, y);
+ CurrentMapDrawMetatileAt(x, y);
+ }
+
+ // These should really be set below the !isFortreeBridgePrev conditional,
+ // but it doesn't matter because it's not read until case 2 anyway.
+ tOldBridgeX = prevX;
+ tOldBridgeY = prevY;
+
+ tPrevX = x;
+ tPrevY = y;
+ if (!isFortreeBridgePrev)
+ break;
- data[6] = 16;
- data[1] = 2;
- // fallthrough
+ tBounceTime = 16;
+ tState = 2;
+ // fallthrough
+ case 2:
+ tBounceTime--;
+ prevX = tOldBridgeX;
+ prevY = tOldBridgeY;
+ switch (tBounceTime % 7)
+ {
+ case 0:
+ CurrentMapDrawMetatileAt(prevX, prevY);
+ case 1:
case 2:
- data[6]--;
- x2 = data[4];
- y2 = data[5];
- switch (data[6] % 7)
- {
- case 0:
- CurrentMapDrawMetatileAt(x2, y2);
- case 1:
- case 2:
- case 3:
- break;
- case 4:
- SetLoweredForetreeBridgeMetatile(x2, y2);
- CurrentMapDrawMetatileAt(x2, y2);
- SetNormalFortreeBridgeMetatile(x2, y2);
- case 5:
- case 6:
- case 7:
- break;
- }
- if (data[6] == 0)
- {
- data[1] = 1;
- }
+ case 3:
break;
+ case 4:
+ // Bounce bridge section that player has stepped off of
+ TryLowerFortreeBridge(prevX, prevY);
+ CurrentMapDrawMetatileAt(prevX, prevY);
+ TryRaiseFortreeBridge(prevX, prevY);
+ case 5:
+ case 6:
+ case 7: // Not possible with % 7
+ break;
+ }
+ if (tBounceTime == 0)
+ tState = 1;
+ break;
}
}
+#undef tState
+#undef tPrevX
+#undef tPrevY
+#undef tOldBridgeX
+#undef tOldBridgeY
+#undef tBounceTime
+
+// Boundaries of the ice puzzle in Sootopolis Gym
+#define ICE_PUZZLE_L 3
+#define ICE_PUZZLE_R 13
+#define ICE_PUZZLE_T 6
+#define ICE_PUZZLE_B 19
+
+#define ICE_PUZZLE_WIDTH (ICE_PUZZLE_R - ICE_PUZZLE_L + 1)
+#define ICE_PUZZLE_HEIGHT (ICE_PUZZLE_B - ICE_PUZZLE_T + 1)
+
static bool32 CoordInIcePuzzleRegion(s16 x, s16 y)
{
- if ((u16)(x - 3) < 11 && (u16)(y - 6) < 14 && sSootopolisGymIceRowVars[y])
+ if ((u16)(x - ICE_PUZZLE_L) < ICE_PUZZLE_WIDTH
+ && (u16)(y - ICE_PUZZLE_T) < ICE_PUZZLE_HEIGHT
+ && sSootopolisGymIceRowVars[y])
return TRUE;
else
return FALSE;
@@ -503,17 +615,17 @@ static bool32 CoordInIcePuzzleRegion(s16 x, s16 y)
static void MarkIcePuzzleCoordVisited(s16 x, s16 y)
{
if (CoordInIcePuzzleRegion(x, y))
- *GetVarPointer(sSootopolisGymIceRowVars[y]) |= (1 << (x - 3));
+ *GetVarPointer(sSootopolisGymIceRowVars[y]) |= (1 << (x - ICE_PUZZLE_L));
}
static bool32 IsIcePuzzleCoordVisited(s16 x, s16 y)
{
- u32 var;
+ u16 var;
if (!CoordInIcePuzzleRegion(x, y))
return FALSE;
- var = VarGet(sSootopolisGymIceRowVars[y]) << 16;
- if ((0x10000 << (x - 3)) & var) // TODO: fix that if
+ var = VarGet(sSootopolisGymIceRowVars[y]);
+ if (var &= (1 << (x - ICE_PUZZLE_L)))
return TRUE;
else
return FALSE;
@@ -534,116 +646,155 @@ void SetSootopolisGymCrackedIceMetatiles(void)
}
}
+#define tState data[1]
+#define tPrevX data[2]
+#define tPrevY data[3]
+#define tIceX data[4]
+#define tIceY data[5]
+#define tDelay data[6]
+
static void SootopolisGymIcePerStepCallback(u8 taskId)
{
s16 x, y;
u16 tileBehavior;
u16 *iceStepCount;
s16 *data = gTasks[taskId].data;
- switch (data[1])
+ switch (tState)
{
- case 0:
- PlayerGetDestCoords(&x, &y);
- data[2] = x;
- data[3] = y;
- data[1] = 1;
- break;
- case 1:
- PlayerGetDestCoords(&x, &y);
- if (x != data[2] || y != data[3])
- {
- data[2] = x;
- data[3] = y;
- tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
- iceStepCount = GetVarPointer(VAR_ICE_STEP_COUNT);
- if (MetatileBehavior_IsThinIce(tileBehavior) == TRUE)
- {
- (*iceStepCount)++;
- data[6] = 4;
- data[1] = 2;
- data[4] = x;
- data[5] = y;
- }
- else if (MetatileBehavior_IsCrackedIce(tileBehavior) == TRUE)
- {
- *iceStepCount = 0;
- data[6] = 4;
- data[1] = 3;
- data[4] = x;
- data[5] = y;
- }
- }
- break;
- case 2:
- if (data[6] != 0)
- {
- data[6]--;
- }
- else
- {
- x = data[4];
- y = data[5];
- PlaySE(SE_ICE_CRACK);
- MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Cracked);
- CurrentMapDrawMetatileAt(x, y);
- MarkIcePuzzleCoordVisited(x - MAP_OFFSET, y - MAP_OFFSET);
- data[1] = 1;
- }
- break;
- case 3:
- if (data[6] != 0)
- {
- data[6]--;
- }
- else
- {
- x = data[4];
- y = data[5];
- PlaySE(SE_ICE_BREAK);
- MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Broken);
- CurrentMapDrawMetatileAt(x, y);
- data[1] = 1;
- }
- break;
+ case 0:
+ PlayerGetDestCoords(&x, &y);
+ tPrevX = x;
+ tPrevY = y;
+ tState = 1;
+ break;
+ case 1:
+ PlayerGetDestCoords(&x, &y);
+ // End if player hasn't moved
+ if (x == tPrevX && y == tPrevY)
+ return;
+
+ tPrevX = x;
+ tPrevY = y;
+ tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
+ iceStepCount = GetVarPointer(VAR_ICE_STEP_COUNT);
+ if (MetatileBehavior_IsThinIce(tileBehavior) == TRUE)
+ {
+ // Thin ice, set it to cracked ice
+ (*iceStepCount)++;
+ tDelay = 4;
+ tState = 2;
+ tIceX = x;
+ tIceY = y;
+ }
+ else if (MetatileBehavior_IsCrackedIce(tileBehavior) == TRUE)
+ {
+ // Cracked ice, set it to broken ice
+ *iceStepCount = 0;
+ tDelay = 4;
+ tState = 3;
+ tIceX = x;
+ tIceY = y;
+ }
+ break;
+ case 2:
+ if (tDelay != 0)
+ {
+ tDelay--;
+ }
+ else
+ {
+ // Crack ice
+ x = tIceX;
+ y = tIceY;
+ PlaySE(SE_ICE_CRACK);
+ MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Cracked);
+ CurrentMapDrawMetatileAt(x, y);
+ MarkIcePuzzleCoordVisited(x - MAP_OFFSET, y - MAP_OFFSET);
+ tState = 1;
+ }
+ break;
+ case 3:
+ if (tDelay != 0)
+ {
+ tDelay--;
+ }
+ else
+ {
+ // Break ice
+ x = tIceX;
+ y = tIceY;
+ PlaySE(SE_ICE_BREAK);
+ MapGridSetMetatileIdAt(x, y, METATILE_SootopolisGym_Ice_Broken);
+ CurrentMapDrawMetatileAt(x, y);
+ tState = 1;
+ }
+ break;
}
}
+#undef tState
+#undef tPrevX
+#undef tPrevY
+#undef tIceX
+#undef tIceY
+#undef tDelay
+
+#define tPrevX data[1]
+#define tPrevY data[2]
+
static void AshGrassPerStepCallback(u8 taskId)
{
s16 x, y;
u16 *ashGatherCount;
s16 *data = gTasks[taskId].data;
PlayerGetDestCoords(&x, &y);
- if (x != data[1] || y != data[2])
+
+ // End if player hasn't moved
+ if (x == tPrevX && y == tPrevY)
+ return;
+
+ tPrevX = x;
+ tPrevY = y;
+ if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y)))
{
- data[1] = x;
- data[2] = y;
- if (MetatileBehavior_IsAshGrass(MapGridGetMetatileBehaviorAt(x, y)))
- {
- if (MapGridGetMetatileIdAt(x, y) == METATILE_Fallarbor_AshGrass)
- StartAshFieldEffect(x, y, METATILE_Fallarbor_NormalGrass, 4);
- else
- StartAshFieldEffect(x, y, METATILE_Lavaridge_NormalGrass, 4);
+ // Remove ash from grass
+ if (MapGridGetMetatileIdAt(x, y) == METATILE_Fallarbor_AshGrass)
+ StartAshFieldEffect(x, y, METATILE_Fallarbor_NormalGrass, 4);
+ else
+ StartAshFieldEffect(x, y, METATILE_Lavaridge_NormalGrass, 4);
- if (CheckBagHasItem(ITEM_SOOT_SACK, 1))
- {
- ashGatherCount = GetVarPointer(VAR_ASH_GATHER_COUNT);
- if (*ashGatherCount < 9999)
- (*ashGatherCount)++;
- }
+ // Try to gather ash
+ if (CheckBagHasItem(ITEM_SOOT_SACK, 1))
+ {
+ ashGatherCount = GetVarPointer(VAR_ASH_GATHER_COUNT);
+ if (*ashGatherCount < 9999)
+ (*ashGatherCount)++;
}
}
}
+#undef tPrevX
+#undef tPrevY
+
// This function uses the constants for gTileset_Cave's metatile labels, but other tilesets with
// the CrackedFloorPerStepCallback callback use the same metatile numbers for the cracked floor
// and hole metatiles, such as gTileset_MirageTower.
static void SetCrackedFloorHoleMetatile(s16 x, s16 y)
{
- MapGridSetMetatileIdAt(x, y, MapGridGetMetatileIdAt(x, y) == METATILE_Cave_CrackedFloor ? METATILE_Cave_CrackedFloor_Hole : METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole);
+ u16 metatileId = MapGridGetMetatileIdAt(x, y) == METATILE_Cave_CrackedFloor ? METATILE_Cave_CrackedFloor_Hole : METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole;
+ MapGridSetMetatileIdAt(x, y, metatileId);
CurrentMapDrawMetatileAt(x, y);
}
+#define tPrevX data[2]
+#define tPrevY data[3]
+#define tFloor1Delay data[4]
+#define tFloor1X data[5]
+#define tFloor1Y data[6]
+#define tFloor2Delay data[7]
+#define tFloor2X data[8]
+#define tFloor2Y data[9]
+
static void CrackedFloorPerStepCallback(u8 taskId)
{
s16 x, y;
@@ -651,113 +802,153 @@ static void CrackedFloorPerStepCallback(u8 taskId)
s16 *data = gTasks[taskId].data;
PlayerGetDestCoords(&x, &y);
behavior = MapGridGetMetatileBehaviorAt(x, y);
- if (data[4] != 0 && (--data[4]) == 0)
- SetCrackedFloorHoleMetatile(data[5], data[6]);
- if (data[7] != 0 && (--data[7]) == 0)
- SetCrackedFloorHoleMetatile(data[8], data[9]);
+ // Update up to 2 previous cracked floor spaces
+ if (tFloor1Delay != 0 && (--tFloor1Delay) == 0)
+ SetCrackedFloorHoleMetatile(tFloor1X, tFloor1Y);
+ if (tFloor2Delay != 0 && (--tFloor2Delay) == 0)
+ SetCrackedFloorHoleMetatile(tFloor2X, tFloor2Y);
if (MetatileBehavior_IsCrackedFloorHole(behavior))
VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty
- if ((x != data[2] || y != data[3]))
+ // End if player hasn't moved
+ if (x == tPrevX && y == tPrevY)
+ return;
+
+ tPrevX = x;
+ tPrevY = y;
+ if (MetatileBehavior_IsCrackedFloor(behavior))
{
- data[2] = x;
- data[3] = y;
- if (MetatileBehavior_IsCrackedFloor(behavior))
- {
- if (GetPlayerSpeed() != 4)
- VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty
+ if (GetPlayerSpeed() != BIKE_SPEED_FASTEST)
+ VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty
- if (data[4] == 0)
- {
- data[4] = 3;
- data[5] = x;
- data[6] = y;
- }
- else if (data[7] == 0)
- {
- data[7] = 3;
- data[8] = x;
- data[9] = y;
- }
+ if (tFloor1Delay == 0)
+ {
+ tFloor1Delay = 3;
+ tFloor1X = x;
+ tFloor1Y = y;
+ }
+ else if (tFloor2Delay == 0)
+ {
+ tFloor2Delay = 3;
+ tFloor2X = x;
+ tFloor2Y = y;
}
}
}
+#undef tPrevX
+#undef tPrevY
+#undef tFloor1Delay
+#undef tFloor1X
+#undef tFloor1Y
+#undef tFloor2Delay
+#undef tFloor2X
+#undef tFloor2Y
+
+#define tMapId data[0]
+#define tState data[1]
+#define tPrevX data[2]
+#define tPrevY data[3]
+// data[4] - data[15] are data about up to 4 individual animating muddy slope metatiles
+// They're divided into groups of 3, i.e data[4]-[6] track one metatile, data[7]-[9] another, and so on.
+// For each data triplet, the 1sst is the animation time, and the 2nd/3rd are the x/y coordinates.
+#define SLOPE_DATA_START 4
+#define SLOPE_DATA_END (3 * SLOPE_DATA_SIZE + SLOPE_DATA_START) // 13, which is the last slope data start point
+enum {
+ SLOPE_TIME,
+ SLOPE_X,
+ SLOPE_Y,
+ SLOPE_DATA_SIZE
+};
+#define tSlopeAnimTime(i) data[(i) * SLOPE_DATA_SIZE + SLOPE_DATA_START + SLOPE_TIME]
+
+static const u16 sMuddySlopeMetatiles[] = {
+ METATILE_General_MuddySlope_Frame0,
+ METATILE_General_MuddySlope_Frame3,
+ METATILE_General_MuddySlope_Frame2,
+ METATILE_General_MuddySlope_Frame1
+};
+
+#define SLOPE_ANIM_TIME 32
+#define SLOPE_ANIM_STEP_TIME (SLOPE_ANIM_TIME / (int)ARRAY_COUNT(sMuddySlopeMetatiles))
+
static void SetMuddySlopeMetatile(s16 *data, s16 x, s16 y)
{
- u16 tile;
- if ((--data[0]) == 0)
- tile = METATILE_General_MuddySlope_Frame0;
+ u16 metatileId;
+ if ((--data[SLOPE_TIME]) == 0)
+ metatileId = METATILE_General_MuddySlope_Frame0;
else
- tile = sMuddySlopeMetatiles[data[0] / 8];
+ metatileId = sMuddySlopeMetatiles[data[SLOPE_TIME] / SLOPE_ANIM_STEP_TIME];
- MapGridSetMetatileIdAt(x, y, tile);
+ MapGridSetMetatileIdAt(x, y, metatileId);
CurrentMapDrawMetatileAt(x, y);
MapGridSetMetatileIdAt(x, y, METATILE_General_MuddySlope_Frame0);
}
static void Task_MuddySlope(u8 taskId)
{
- s16 x, y, x2, y2;
+ s16 x, y, cameraOffsetX, cameraOffsetY;
int i;
u16 mapId;
s16 *data = gTasks[taskId].data;
PlayerGetDestCoords(&x, &y);
mapId = (gSaveBlock1Ptr->location.mapGroup << 8) | gSaveBlock1Ptr->location.mapNum;
- switch (data[1])
+ switch (tState)
{
- case 0:
- data[0] = mapId;
- data[2] = x;
- data[3] = y;
- data[1] = 1;
- data[4] = 0;
- data[7] = 0;
- data[10] = 0;
- data[13] = 0;
+ case 0:
+ tMapId = mapId;
+ tPrevX = x;
+ tPrevY = y;
+ tState = 1;
+ tSlopeAnimTime(0) = 0;
+ tSlopeAnimTime(1) = 0;
+ tSlopeAnimTime(2) = 0;
+ tSlopeAnimTime(3) = 0;
+ break;
+ case 1:
+ // Skip if player hasn't moved
+ if (tPrevX == x && tPrevY == y)
break;
- case 1:
- if (data[2] != x || data[3] != y)
+
+ tPrevX = x;
+ tPrevY = y;
+ if (MetatileBehavior_IsMuddySlope(MapGridGetMetatileBehaviorAt(x, y)))
+ {
+ for (i = SLOPE_DATA_START; i <= SLOPE_DATA_END; i += SLOPE_DATA_SIZE)
{
- data[2] = x;
- data[3] = y;
- if (MetatileBehavior_IsMuddySlope(MapGridGetMetatileBehaviorAt(x, y)))
+ if (data[i] == 0)
{
- for (i = 4; i < 14; i += 3)
- {
- if (data[i] == 0)
- {
- data[i] = 32;
- data[i + 1] = x;
- data[i + 2] = y;
- break;
- }
- }
+ data[i + SLOPE_TIME] = SLOPE_ANIM_TIME;
+ data[i + SLOPE_X] = x;
+ data[i + SLOPE_Y] = y;
+ break;
}
}
- break;
+ }
+ break;
}
- if (gCamera.active && mapId != data[0])
+
+ if (gCamera.active && mapId != tMapId)
{
- data[0] = mapId;
- x2 = gCamera.x;
- y2 = gCamera.y;
+ tMapId = mapId;
+ cameraOffsetX = gCamera.x;
+ cameraOffsetY = gCamera.y;
}
else
{
- x2 = 0;
- y2 = 0;
+ cameraOffsetX = 0;
+ cameraOffsetY = 0;
}
- for (i = 4; i < 14; i += 3)
+ for (i = SLOPE_DATA_START; i <= SLOPE_DATA_END; i += SLOPE_DATA_SIZE)
{
- if (data[i])
+ if (data[i + SLOPE_TIME])
{
- data[i + 1] -= x2;
- data[i + 2] -= y2;
- SetMuddySlopeMetatile(&data[i], data[i + 1], data[i + 2]);
+ data[i + SLOPE_X] -= cameraOffsetX;
+ data[i + SLOPE_Y] -= cameraOffsetY;
+ SetMuddySlopeMetatile(&data[i + SLOPE_TIME], data[i + SLOPE_X], data[i + SLOPE_Y]);
}
}
}
diff --git a/src/field_weather_effect.c b/src/field_weather_effect.c
index 5720363c2..2b87557c2 100644
--- a/src/field_weather_effect.c
+++ b/src/field_weather_effect.c
@@ -2487,19 +2487,19 @@ static void CreateAbnormalWeatherTask(void)
static u8 TranslateWeatherNum(u8);
static void UpdateRainCounter(u8, u8);
-void SetSav1Weather(u32 weather)
+void SetSavedWeather(u32 weather)
{
u8 oldWeather = gSaveBlock1Ptr->weather;
gSaveBlock1Ptr->weather = TranslateWeatherNum(weather);
UpdateRainCounter(gSaveBlock1Ptr->weather, oldWeather);
}
-u8 GetSav1Weather(void)
+u8 GetSavedWeather(void)
{
return gSaveBlock1Ptr->weather;
}
-void SetSav1WeatherFromCurrMapHeader(void)
+void SetSavedWeatherFromCurrMapHeader(void)
{
u8 oldWeather = gSaveBlock1Ptr->weather;
gSaveBlock1Ptr->weather = TranslateWeatherNum(gMapHeader.weather);
@@ -2508,19 +2508,19 @@ void SetSav1WeatherFromCurrMapHeader(void)
void SetWeather(u32 weather)
{
- SetSav1Weather(weather);
- SetNextWeather(GetSav1Weather());
+ SetSavedWeather(weather);
+ SetNextWeather(GetSavedWeather());
}
void SetWeather_Unused(u32 weather)
{
- SetSav1Weather(weather);
- SetCurrentAndNextWeather(GetSav1Weather());
+ SetSavedWeather(weather);
+ SetCurrentAndNextWeather(GetSavedWeather());
}
void DoCurrentWeather(void)
{
- u8 weather = GetSav1Weather();
+ u8 weather = GetSavedWeather();
if (weather == WEATHER_ABNORMAL)
{
@@ -2539,7 +2539,7 @@ void DoCurrentWeather(void)
void ResumePausedWeather(void)
{
- u8 weather = GetSav1Weather();
+ u8 weather = GetSavedWeather();
if (weather == WEATHER_ABNORMAL)
{
diff --git a/src/frontier_pass.c b/src/frontier_pass.c
index 8ce1e14dc..07dd8f228 100644
--- a/src/frontier_pass.c
+++ b/src/frontier_pass.c
@@ -26,7 +26,6 @@
#include "overworld.h"
#include "math_util.h"
#include "constants/battle_frontier.h"
-#include "constants/maps.h"
#include "constants/rgb.h"
#include "constants/region_map_sections.h"
#include "constants/songs.h"
diff --git a/src/heal_location.c b/src/heal_location.c
index 5eda24d67..ab8dc5265 100644
--- a/src/heal_location.c
+++ b/src/heal_location.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "heal_location.h"
-#include "constants/maps.h"
#include "constants/heal_locations.h"
#include "data/heal_locations.h"
diff --git a/src/link.c b/src/link.c
index 01cc06e7c..1084d4a6d 100644
--- a/src/link.c
+++ b/src/link.c
@@ -292,10 +292,9 @@ static void LinkTestScreen(void)
gLinkType = LINKTYPE_TRADE;
OpenLink();
SeedRng(gMain.vblankCounter2);
- for (i = 0; i < MAX_LINK_PLAYERS; i++)
- {
+ for (i = 0; i < TRAINER_ID_LENGTH; i++)
gSaveBlock2Ptr->playerTrainerId[i] = Random() % 256;
- }
+
InitLinkTestBG(0, 2, 4, 0, 0);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG0_ON | DISPCNT_BG2_ON | DISPCNT_OBJ_ON);
CreateTask(Task_DestroySelf, 0);
diff --git a/src/mail_data.c b/src/mail_data.c
index 683bd854e..ca50a687e 100644
--- a/src/mail_data.c
+++ b/src/mail_data.c
@@ -157,7 +157,7 @@ void ClearMailItemId(u8 mailId)
gSaveBlock1Ptr->mail[mailId].itemId = ITEM_NONE;
}
-u8 TakeMailFromMon2(struct Pokemon *mon)
+u8 TakeMailFromMonAndSave(struct Pokemon *mon)
{
u8 i;
u8 newHeldItem[2];
@@ -179,6 +179,7 @@ u8 TakeMailFromMon2(struct Pokemon *mon)
}
}
+ // No space to save mail
return MAIL_NONE;
}
diff --git a/src/match_call.c b/src/match_call.c
index 85df5822d..de7f13416 100644
--- a/src/match_call.c
+++ b/src/match_call.c
@@ -29,7 +29,6 @@
#include "constants/abilities.h"
#include "constants/battle_frontier.h"
#include "constants/event_objects.h"
-#include "constants/maps.h"
#include "constants/region_map_sections.h"
#include "constants/songs.h"
#include "constants/trainers.h"
diff --git a/src/menu_helpers.c b/src/menu_helpers.c
index 5bc197010..d5cf83bd2 100644
--- a/src/menu_helpers.c
+++ b/src/menu_helpers.c
@@ -16,7 +16,6 @@
#include "decompress.h"
#include "constants/songs.h"
#include "constants/items.h"
-#include "constants/maps.h"
#define TAG_SWAP_LINE 109
diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c
index ad5eb42cc..6b58e3f05 100644
--- a/src/metatile_behavior.c
+++ b/src/metatile_behavior.c
@@ -126,10 +126,10 @@ static const u8 sTileBitAttributes[] =
[MB_BRIDGE_OVER_POND_LOW] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
[MB_BRIDGE_OVER_POND_MED] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
[MB_BRIDGE_OVER_POND_HIGH] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
- [MB_PACIFIDLOG_VERTICAL_LOG_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
- [MB_PACIFIDLOG_VERTICAL_LOG_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
- [MB_PACIFIDLOG_HORIZONTAL_LOG_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
- [MB_PACIFIDLOG_HORIZONTAL_LOG_2] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
+ [MB_PACIFIDLOG_VERTICAL_LOG_TOP] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
+ [MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
+ [MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
+ [MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
[MB_FORTREE_BRIDGE] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
[MB_UNUSED_79] = TILE_ATTRIBUTES(FALSE, FALSE, FALSE),
[MB_BRIDGE_OVER_POND_MED_EDGE_1] = TILE_ATTRIBUTES(TRUE, FALSE, FALSE),
@@ -1131,33 +1131,33 @@ bool8 MetatileBehavior_IsFortreeBridge(u8 metatileBehavior)
return FALSE;
}
-bool8 MetatileBehavior_IsPacifidlogVerticalLog1(u8 metatileBehavior)
+bool8 MetatileBehavior_IsPacifidlogVerticalLogTop(u8 metatileBehavior)
{
- if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_1)
+ if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_TOP)
return TRUE;
else
return FALSE;
}
-bool8 MetatileBehavior_IsPacifidlogVerticalLog2(u8 metatileBehavior)
+bool8 MetatileBehavior_IsPacifidlogVerticalLogBottom(u8 metatileBehavior)
{
- if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_2)
+ if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM)
return TRUE;
else
return FALSE;
}
-bool8 MetatileBehavior_IsPacifidlogHorizontalLog1(u8 metatileBehavior)
+bool8 MetatileBehavior_IsPacifidlogHorizontalLogLeft(u8 metatileBehavior)
{
- if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_1)
+ if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT)
return TRUE;
else
return FALSE;
}
-bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8 metatileBehavior)
+bool8 MetatileBehavior_IsPacifidlogHorizontalLogRight(u8 metatileBehavior)
{
- if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_2)
+ if (metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT)
return TRUE;
else
return FALSE;
@@ -1165,10 +1165,10 @@ bool8 MetatileBehavior_IsPacifidlogHorizontalLog2(u8 metatileBehavior)
bool8 MetatileBehavior_IsPacifidlogLog(u8 metatileBehavior)
{
- if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_1
- || metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_2
- || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_1
- || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_2)
+ if (metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_TOP
+ || metatileBehavior == MB_PACIFIDLOG_VERTICAL_LOG_BOTTOM
+ || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_LEFT
+ || metatileBehavior == MB_PACIFIDLOG_HORIZONTAL_LOG_RIGHT)
return TRUE;
else
return FALSE;
diff --git a/src/mirage_tower.c b/src/mirage_tower.c
index 9473b0f82..730026298 100644
--- a/src/mirage_tower.c
+++ b/src/mirage_tower.c
@@ -15,7 +15,6 @@
#include "task.h"
#include "window.h"
#include "constants/event_objects.h"
-#include "constants/maps.h"
#include "constants/rgb.h"
#include "constants/songs.h"
#include "constants/metatile_labels.h"
diff --git a/src/new_game.c b/src/new_game.c
index 4bd3d3704..077b86775 100644
--- a/src/new_game.c
+++ b/src/new_game.c
@@ -29,7 +29,6 @@
#include "pokedex.h"
#include "apprentice.h"
#include "frontier_util.h"
-#include "constants/maps.h"
#include "pokedex.h"
#include "save.h"
#include "link_rfu.h"
@@ -126,7 +125,7 @@ static void ClearFrontierRecord(void)
static void WarpToTruck(void)
{
- SetWarpDestination(MAP_GROUP(INSIDE_OF_TRUCK), MAP_NUM(INSIDE_OF_TRUCK), -1, -1, -1);
+ SetWarpDestination(MAP_GROUP(INSIDE_OF_TRUCK), MAP_NUM(INSIDE_OF_TRUCK), WARP_ID_NONE, -1, -1);
WarpIntoMap();
}
diff --git a/src/overworld.c b/src/overworld.c
index 518771875..f6c4c0f3d 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -62,7 +62,6 @@
#include "constants/abilities.h"
#include "constants/layouts.h"
#include "constants/map_types.h"
-#include "constants/maps.h"
#include "constants/region_map_sections.h"
#include "constants/songs.h"
#include "constants/trainer_hill.h"
@@ -175,7 +174,6 @@ static u8 GetAdjustedInitialTransitionFlags(struct InitialPlayerAvatarState *, u
static u8 GetAdjustedInitialDirection(struct InitialPlayerAvatarState *, u8, u16, u8);
static u16 GetCenterScreenMetatileBehavior(void);
-// IWRAM bss vars
static void *sUnusedOverworldCallback;
static u8 sPlayerLinkStates[MAX_LINK_PLAYERS];
// This callback is called with a player's key code. It then returns an
@@ -185,7 +183,6 @@ static u16 (*sPlayerKeyInterceptCallback)(u32);
static bool8 sReceivingFromLink;
static u8 sRfuKeepAliveTimer;
-// IWRAM common
u16 *gBGTilemapBuffers1;
u16 *gBGTilemapBuffers2;
u16 *gBGTilemapBuffers3;
@@ -195,7 +192,6 @@ bool8 (*gFieldCallback2)(void);
u8 gLocalLinkPlayerId; // This is our player id in a multiplayer mode.
u8 gFieldLinkPlayerCount;
-// EWRAM vars
EWRAM_DATA static u8 sObjectEventLoadFlag = 0;
EWRAM_DATA struct WarpData gLastUsedWarp = {0};
EWRAM_DATA static struct WarpData sWarpDestination = {0}; // new warp position
@@ -207,12 +203,11 @@ EWRAM_DATA static u16 sAmbientCrySpecies = 0;
EWRAM_DATA static bool8 sIsAmbientCryWaterMon = FALSE;
EWRAM_DATA struct LinkPlayerObjectEvent gLinkPlayerObjectEvents[4] = {0};
-// const rom data
static const struct WarpData sDummyWarpData =
{
- .mapGroup = -1,
- .mapNum = -1,
- .warpId = -1,
+ .mapGroup = MAP_GROUP(UNDEFINED),
+ .mapNum = MAP_NUM(UNDEFINED),
+ .warpId = WARP_ID_NONE,
.x = -1,
.y = -1,
};
@@ -495,7 +490,7 @@ void LoadSaveblockObjEventScripts(void)
savObjTemplates[i].script = mapHeaderObjTemplates[i].script;
}
-void Overworld_SetObjEventTemplateCoords(u8 localId, s16 x, s16 y)
+void SetObjEventTemplateCoords(u8 localId, s16 x, s16 y)
{
s32 i;
struct ObjectEventTemplate *savObjTemplates = gSaveBlock1Ptr->objectEventTemplates;
@@ -512,7 +507,7 @@ void Overworld_SetObjEventTemplateCoords(u8 localId, s16 x, s16 y)
}
}
-void Overworld_SetObjEventTemplateMovementType(u8 localId, u8 movementType)
+void SetObjEventTemplateMovementType(u8 localId, u8 movementType)
{
s32 i;
@@ -570,11 +565,11 @@ static void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId
static bool32 IsDummyWarp(struct WarpData *warp)
{
- if (warp->mapGroup != -1)
+ if (warp->mapGroup != (s8)MAP_GROUP(UNDEFINED))
return FALSE;
- else if (warp->mapNum != -1)
+ else if (warp->mapNum != (s8)MAP_NUM(UNDEFINED))
return FALSE;
- else if (warp->warpId != -1)
+ else if (warp->warpId != WARP_ID_NONE)
return FALSE;
else if (warp->x != -1)
return FALSE;
@@ -612,16 +607,20 @@ static void SetPlayerCoordsFromWarp(void)
{
if (gSaveBlock1Ptr->location.warpId >= 0 && gSaveBlock1Ptr->location.warpId < gMapHeader.events->warpCount)
{
+ // warpId is a valid warp for this map, use the coords of that warp.
gSaveBlock1Ptr->pos.x = gMapHeader.events->warps[gSaveBlock1Ptr->location.warpId].x;
gSaveBlock1Ptr->pos.y = gMapHeader.events->warps[gSaveBlock1Ptr->location.warpId].y;
}
else if (gSaveBlock1Ptr->location.x >= 0 && gSaveBlock1Ptr->location.y >= 0)
{
+ // Invalid warpId given. The given coords are valid, use those instead.
+ // WARP_ID_NONE is used to reach this intentionally.
gSaveBlock1Ptr->pos.x = gSaveBlock1Ptr->location.x;
gSaveBlock1Ptr->pos.y = gSaveBlock1Ptr->location.y;
}
else
{
+ // Invalid warpId and coords given. Put player in center of map.
gSaveBlock1Ptr->pos.x = gMapHeader.mapLayout->width / 2;
gSaveBlock1Ptr->pos.y = gMapHeader.mapLayout->height / 2;
}
@@ -663,7 +662,7 @@ void SetWarpDestinationToHealLocation(u8 healLocationId)
{
const struct HealLocation *warp = GetHealLocation(healLocationId);
if (warp)
- SetWarpDestination(warp->group, warp->map, -1, warp->x, warp->y);
+ SetWarpDestination(warp->group, warp->map, WARP_ID_NONE, warp->x, warp->y);
}
void SetWarpDestinationToLastHealLocation(void)
@@ -675,7 +674,7 @@ void SetLastHealLocationWarp(u8 healLocationId)
{
const struct HealLocation *healLocation = GetHealLocation(healLocationId);
if (healLocation)
- SetWarpData(&gSaveBlock1Ptr->lastHealLocation, healLocation->group, healLocation->map, -1, healLocation->x, healLocation->y);
+ SetWarpData(&gSaveBlock1Ptr->lastHealLocation, healLocation->group, healLocation->map, WARP_ID_NONE, healLocation->x, healLocation->y);
}
void UpdateEscapeWarp(s16 x, s16 y)
@@ -683,7 +682,7 @@ void UpdateEscapeWarp(s16 x, s16 y)
u8 currMapType = GetCurrentMapType();
u8 destMapType = GetMapTypeByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum);
if (IsMapTypeOutdoors(currMapType) && IsMapTypeOutdoors(destMapType) != TRUE)
- SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET + 1);
+ SetEscapeWarp(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, x - MAP_OFFSET, y - MAP_OFFSET + 1);
}
void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y)
@@ -716,7 +715,7 @@ void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y)
if (IsDummyWarp(&sFixedHoleWarp) == TRUE)
sWarpDestination = gLastUsedWarp;
else
- SetWarpDestination(sFixedHoleWarp.mapGroup, sFixedHoleWarp.mapNum, -1, x, y);
+ SetWarpDestination(sFixedHoleWarp.mapGroup, sFixedHoleWarp.mapNum, WARP_ID_NONE, x, y);
}
static void SetWarpDestinationToContinueGameWarp(void)
@@ -733,7 +732,7 @@ void SetContinueGameWarpToHealLocation(u8 healLocationId)
{
const struct HealLocation *warp = GetHealLocation(healLocationId);
if (warp)
- SetWarpData(&gSaveBlock1Ptr->continueGameWarp, warp->group, warp->map, -1, warp->x, warp->y);
+ SetWarpData(&gSaveBlock1Ptr->continueGameWarp, warp->group, warp->map, WARP_ID_NONE, warp->x, warp->y);
}
void SetContinueGameWarpToDynamicWarp(int unused)
@@ -763,7 +762,7 @@ static bool8 SetDiveWarp(u8 dir, u16 x, u16 y)
if (connection != NULL)
{
- SetWarpDestination(connection->mapGroup, connection->mapNum, -1, x, y);
+ SetWarpDestination(connection->mapGroup, connection->mapNum, WARP_ID_NONE, x, y);
}
else
{
@@ -789,7 +788,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum)
{
s32 paletteIndex;
- SetWarpDestination(mapGroup, mapNum, -1, -1, -1);
+ SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, -1, -1);
// Dont transition map music between BF Outside West/East
if (gMapHeader.regionMapSectionId != MAPSEC_BATTLE_FRONTIER)
@@ -804,7 +803,7 @@ void LoadMapFromCameraTransition(u8 mapGroup, u8 mapNum)
RestartWildEncounterImmunitySteps();
TryUpdateRandomTrainerRematches(mapGroup, mapNum);
DoTimeBasedEvents();
- SetSav1WeatherFromCurrMapHeader();
+ SetSavedWeatherFromCurrMapHeader();
ChooseAmbientCrySpecies();
SetDefaultFlashLevel();
Overworld_ClearSavedMusic();
@@ -855,7 +854,7 @@ static void LoadMapFromWarp(bool32 a1)
TryUpdateRandomTrainerRematches(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum);
if (a1 != TRUE)
DoTimeBasedEvents();
- SetSav1WeatherFromCurrMapHeader();
+ SetSavedWeatherFromCurrMapHeader();
ChooseAmbientCrySpecies();
if (isOutdoors)
FlagClear(FLAG_SYS_USE_FLASH);
@@ -968,6 +967,10 @@ bool32 Overworld_IsBikingAllowed(void)
return TRUE;
}
+// Flash level of 0 is fully bright
+// Flash level of 1 is the largest flash radius
+// Flash level of 7 is the smallest flash radius
+// Flash level of 8 is fully black
void SetDefaultFlashLevel(void)
{
if (!gMapHeader.cave)
@@ -978,14 +981,14 @@ void SetDefaultFlashLevel(void)
gSaveBlock1Ptr->flashLevel = gMaxFlashLevel - 1;
}
-void Overworld_SetFlashLevel(s32 flashLevel)
+void SetFlashLevel(s32 flashLevel)
{
if (flashLevel < 0 || flashLevel > gMaxFlashLevel)
flashLevel = 0;
gSaveBlock1Ptr->flashLevel = flashLevel;
}
-u8 Overworld_GetFlashLevel(void)
+u8 GetFlashLevel(void)
{
return gSaveBlock1Ptr->flashLevel;
}
@@ -1100,7 +1103,7 @@ u16 GetCurrLocationDefaultMusic(void)
// Play the desert music only when the sandstorm is active on Route 111.
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE111)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE111)
- && GetSav1Weather() == WEATHER_SANDSTORM)
+ && GetSavedWeather() == WEATHER_SANDSTORM)
return MUS_ROUTE111;
music = GetLocationMusic(&gSaveBlock1Ptr->location);
@@ -1790,7 +1793,7 @@ static void InitCurrentFlashLevelScanlineEffect(void)
WriteBattlePyramidViewScanlineEffectBuffer();
ScanlineEffect_SetParams(sFlashEffectParams);
}
- else if ((flashLevel = Overworld_GetFlashLevel()))
+ else if ((flashLevel = GetFlashLevel()))
{
WriteFlashScanlineEffectBuffer(flashLevel);
ScanlineEffect_SetParams(sFlashEffectParams);
@@ -3147,17 +3150,17 @@ static u8 FlipVerticalAndClearForced(u8 newFacing, u8 oldFacing)
return oldFacing;
}
-static u8 LinkPlayerDetectCollision(u8 selfObjEventId, u8 a2, s16 x, s16 y)
+static bool8 LinkPlayerDetectCollision(u8 selfObjEventId, u8 direction, s16 x, s16 y)
{
u8 i;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < OBJECT_EVENTS_COUNT; i++)
{
if (i != selfObjEventId)
{
if ((gObjectEvents[i].currentCoords.x == x && gObjectEvents[i].currentCoords.y == y)
|| (gObjectEvents[i].previousCoords.x == x && gObjectEvents[i].previousCoords.y == y))
{
- return 1;
+ return TRUE;
}
}
}
diff --git a/src/party_menu.c b/src/party_menu.c
index 43f522034..d654afa33 100755
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -69,7 +69,6 @@
#include "constants/field_effects.h"
#include "constants/item_effects.h"
#include "constants/items.h"
-#include "constants/maps.h"
#include "constants/moves.h"
#include "constants/party_menu.h"
#include "constants/rgb.h"
@@ -3343,7 +3342,7 @@ static void Task_HandleSendMailToPCYesNoInput(u8 taskId)
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0: // Yes, send to PC
- if (TakeMailFromMon2(&gPlayerParty[gPartyMenu.slotId]) != 0xFF)
+ if (TakeMailFromMonAndSave(&gPlayerParty[gPartyMenu.slotId]) != MAIL_NONE)
{
DisplayPartyMenuMessage(gText_MailSentToPC, FALSE);
gTasks[taskId].func = Task_UpdateHeldItemSprite;
@@ -6133,7 +6132,7 @@ static void BufferMonSelection(void)
{
gSpecialVar_0x8004 = GetCursorSelectionMonId();
if (gSpecialVar_0x8004 >= PARTY_SIZE)
- gSpecialVar_0x8004 = 0xFF;
+ gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
gFieldCallback2 = CB2_FadeFromPartyMenu;
SetMainCallback2(CB2_ReturnToField);
}
@@ -6176,7 +6175,7 @@ static void CB2_ChooseContestMon(void)
{
gContestMonPartyIndex = GetCursorSelectionMonId();
if (gContestMonPartyIndex >= PARTY_SIZE)
- gContestMonPartyIndex = 0xFF;
+ gContestMonPartyIndex = PARTY_NOTHING_CHOSEN;
gSpecialVar_0x8004 = gContestMonPartyIndex;
gFieldCallback2 = CB2_FadeFromPartyMenu;
SetMainCallback2(CB2_ReturnToField);
@@ -6221,7 +6220,7 @@ static void CB2_ChooseMonForMoveRelearner(void)
{
gSpecialVar_0x8004 = GetCursorSelectionMonId();
if (gSpecialVar_0x8004 >= PARTY_SIZE)
- gSpecialVar_0x8004 = 0xFF;
+ gSpecialVar_0x8004 = PARTY_NOTHING_CHOSEN;
else
gSpecialVar_0x8005 = GetNumberOfRelearnableMoves(&gPlayerParty[gSpecialVar_0x8004]);
gFieldCallback2 = CB2_FadeFromPartyMenu;
diff --git a/src/pokeball.c b/src/pokeball.c
index 501d86ca3..cb68d6883 100644
--- a/src/pokeball.c
+++ b/src/pokeball.c
@@ -1138,7 +1138,7 @@ static void SpriteCB_TradePokeball(struct Sprite *sprite)
sprite->callback = SpriteCB_TradePokeballSendOff;
#ifdef BUGFIX
// FIX: If this is used on a sprite that has previously had an affine animation, it will not
- // play the shrink anim properly due to being paused. Works together with the fix to `sub_817F77C`.
+ // play the shrink anim properly due to being paused. Works together with the fix to ResetSpriteAfterAnim.
gSprites[monSpriteId].affineAnimPaused = FALSE;
#endif // BUGFIX
StartSpriteAffineAnim(&gSprites[monSpriteId], BATTLER_AFFINE_RETURN);
diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c
index e2973dcab..141041f4f 100755
--- a/src/pokedex_area_screen.c
+++ b/src/pokedex_area_screen.c
@@ -16,7 +16,6 @@
#include "trig.h"
#include "pokedex_area_region_map.h"
#include "wild_encounter.h"
-#include "constants/maps.h"
#include "constants/region_map_sections.h"
#include "constants/rgb.h"
#include "constants/songs.h"
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index f18dc68d1..727cc5538 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -37,7 +37,6 @@
#include "walda_phrase.h"
#include "window.h"
#include "constants/items.h"
-#include "constants/maps.h"
#include "constants/moves.h"
#include "constants/rgb.h"
#include "constants/songs.h"
diff --git a/src/region_map.c b/src/region_map.c
index 759a26e84..0dc902674 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -7,7 +7,6 @@
#include "palette.h"
#include "party_menu.h"
#include "trig.h"
-#include "constants/maps.h"
#include "overworld.h"
#include "event_data.h"
#include "secret_base.h"
@@ -290,56 +289,56 @@ static const u32 sFlyTargetIcons_Gfx[] = INCBIN_U32("graphics/pokenav/region_map
static const u8 sMapHealLocations[][3] =
{
- {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F},
- {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), HEAL_LOCATION_OLDALE_TOWN},
- {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), HEAL_LOCATION_DEWFORD_TOWN},
- {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), HEAL_LOCATION_LAVARIDGE_TOWN},
- {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), HEAL_LOCATION_FALLARBOR_TOWN},
- {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), HEAL_LOCATION_VERDANTURF_TOWN},
- {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), HEAL_LOCATION_PACIFIDLOG_TOWN},
- {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), HEAL_LOCATION_PETALBURG_CITY},
- {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), HEAL_LOCATION_SLATEPORT_CITY},
- {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), HEAL_LOCATION_MAUVILLE_CITY},
- {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), HEAL_LOCATION_RUSTBORO_CITY},
- {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), HEAL_LOCATION_FORTREE_CITY},
- {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), HEAL_LOCATION_LILYCOVE_CITY},
- {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), HEAL_LOCATION_MOSSDEEP_CITY},
- {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), HEAL_LOCATION_SOOTOPOLIS_CITY},
- {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY},
- {MAP_GROUP(ROUTE101), MAP_NUM(ROUTE101), 0},
- {MAP_GROUP(ROUTE102), MAP_NUM(ROUTE102), 0},
- {MAP_GROUP(ROUTE103), MAP_NUM(ROUTE103), 0},
- {MAP_GROUP(ROUTE104), MAP_NUM(ROUTE104), 0},
- {MAP_GROUP(ROUTE105), MAP_NUM(ROUTE105), 0},
- {MAP_GROUP(ROUTE106), MAP_NUM(ROUTE106), 0},
- {MAP_GROUP(ROUTE107), MAP_NUM(ROUTE107), 0},
- {MAP_GROUP(ROUTE108), MAP_NUM(ROUTE108), 0},
- {MAP_GROUP(ROUTE109), MAP_NUM(ROUTE109), 0},
- {MAP_GROUP(ROUTE110), MAP_NUM(ROUTE110), 0},
- {MAP_GROUP(ROUTE111), MAP_NUM(ROUTE111), 0},
- {MAP_GROUP(ROUTE112), MAP_NUM(ROUTE112), 0},
- {MAP_GROUP(ROUTE113), MAP_NUM(ROUTE113), 0},
- {MAP_GROUP(ROUTE114), MAP_NUM(ROUTE114), 0},
- {MAP_GROUP(ROUTE115), MAP_NUM(ROUTE115), 0},
- {MAP_GROUP(ROUTE116), MAP_NUM(ROUTE116), 0},
- {MAP_GROUP(ROUTE117), MAP_NUM(ROUTE117), 0},
- {MAP_GROUP(ROUTE118), MAP_NUM(ROUTE118), 0},
- {MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119), 0},
- {MAP_GROUP(ROUTE120), MAP_NUM(ROUTE120), 0},
- {MAP_GROUP(ROUTE121), MAP_NUM(ROUTE121), 0},
- {MAP_GROUP(ROUTE122), MAP_NUM(ROUTE122), 0},
- {MAP_GROUP(ROUTE123), MAP_NUM(ROUTE123), 0},
- {MAP_GROUP(ROUTE124), MAP_NUM(ROUTE124), 0},
- {MAP_GROUP(ROUTE125), MAP_NUM(ROUTE125), 0},
- {MAP_GROUP(ROUTE126), MAP_NUM(ROUTE126), 0},
- {MAP_GROUP(ROUTE127), MAP_NUM(ROUTE127), 0},
- {MAP_GROUP(ROUTE128), MAP_NUM(ROUTE128), 0},
- {MAP_GROUP(ROUTE129), MAP_NUM(ROUTE129), 0},
- {MAP_GROUP(ROUTE130), MAP_NUM(ROUTE130), 0},
- {MAP_GROUP(ROUTE131), MAP_NUM(ROUTE131), 0},
- {MAP_GROUP(ROUTE132), MAP_NUM(ROUTE132), 0},
- {MAP_GROUP(ROUTE133), MAP_NUM(ROUTE133), 0},
- {MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0}
+ [MAPSEC_LITTLEROOT_TOWN] = {MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F},
+ [MAPSEC_OLDALE_TOWN] = {MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), HEAL_LOCATION_OLDALE_TOWN},
+ [MAPSEC_DEWFORD_TOWN] = {MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), HEAL_LOCATION_DEWFORD_TOWN},
+ [MAPSEC_LAVARIDGE_TOWN] = {MAP_GROUP(LAVARIDGE_TOWN), MAP_NUM(LAVARIDGE_TOWN), HEAL_LOCATION_LAVARIDGE_TOWN},
+ [MAPSEC_FALLARBOR_TOWN] = {MAP_GROUP(FALLARBOR_TOWN), MAP_NUM(FALLARBOR_TOWN), HEAL_LOCATION_FALLARBOR_TOWN},
+ [MAPSEC_VERDANTURF_TOWN] = {MAP_GROUP(VERDANTURF_TOWN), MAP_NUM(VERDANTURF_TOWN), HEAL_LOCATION_VERDANTURF_TOWN},
+ [MAPSEC_PACIFIDLOG_TOWN] = {MAP_GROUP(PACIFIDLOG_TOWN), MAP_NUM(PACIFIDLOG_TOWN), HEAL_LOCATION_PACIFIDLOG_TOWN},
+ [MAPSEC_PETALBURG_CITY] = {MAP_GROUP(PETALBURG_CITY), MAP_NUM(PETALBURG_CITY), HEAL_LOCATION_PETALBURG_CITY},
+ [MAPSEC_SLATEPORT_CITY] = {MAP_GROUP(SLATEPORT_CITY), MAP_NUM(SLATEPORT_CITY), HEAL_LOCATION_SLATEPORT_CITY},
+ [MAPSEC_MAUVILLE_CITY] = {MAP_GROUP(MAUVILLE_CITY), MAP_NUM(MAUVILLE_CITY), HEAL_LOCATION_MAUVILLE_CITY},
+ [MAPSEC_RUSTBORO_CITY] = {MAP_GROUP(RUSTBORO_CITY), MAP_NUM(RUSTBORO_CITY), HEAL_LOCATION_RUSTBORO_CITY},
+ [MAPSEC_FORTREE_CITY] = {MAP_GROUP(FORTREE_CITY), MAP_NUM(FORTREE_CITY), HEAL_LOCATION_FORTREE_CITY},
+ [MAPSEC_LILYCOVE_CITY] = {MAP_GROUP(LILYCOVE_CITY), MAP_NUM(LILYCOVE_CITY), HEAL_LOCATION_LILYCOVE_CITY},
+ [MAPSEC_MOSSDEEP_CITY] = {MAP_GROUP(MOSSDEEP_CITY), MAP_NUM(MOSSDEEP_CITY), HEAL_LOCATION_MOSSDEEP_CITY},
+ [MAPSEC_SOOTOPOLIS_CITY] = {MAP_GROUP(SOOTOPOLIS_CITY), MAP_NUM(SOOTOPOLIS_CITY), HEAL_LOCATION_SOOTOPOLIS_CITY},
+ [MAPSEC_EVER_GRANDE_CITY] = {MAP_GROUP(EVER_GRANDE_CITY), MAP_NUM(EVER_GRANDE_CITY), HEAL_LOCATION_EVER_GRANDE_CITY},
+ [MAPSEC_ROUTE_101] = {MAP_GROUP(ROUTE101), MAP_NUM(ROUTE101), 0},
+ [MAPSEC_ROUTE_102] = {MAP_GROUP(ROUTE102), MAP_NUM(ROUTE102), 0},
+ [MAPSEC_ROUTE_103] = {MAP_GROUP(ROUTE103), MAP_NUM(ROUTE103), 0},
+ [MAPSEC_ROUTE_104] = {MAP_GROUP(ROUTE104), MAP_NUM(ROUTE104), 0},
+ [MAPSEC_ROUTE_105] = {MAP_GROUP(ROUTE105), MAP_NUM(ROUTE105), 0},
+ [MAPSEC_ROUTE_106] = {MAP_GROUP(ROUTE106), MAP_NUM(ROUTE106), 0},
+ [MAPSEC_ROUTE_107] = {MAP_GROUP(ROUTE107), MAP_NUM(ROUTE107), 0},
+ [MAPSEC_ROUTE_108] = {MAP_GROUP(ROUTE108), MAP_NUM(ROUTE108), 0},
+ [MAPSEC_ROUTE_109] = {MAP_GROUP(ROUTE109), MAP_NUM(ROUTE109), 0},
+ [MAPSEC_ROUTE_110] = {MAP_GROUP(ROUTE110), MAP_NUM(ROUTE110), 0},
+ [MAPSEC_ROUTE_111] = {MAP_GROUP(ROUTE111), MAP_NUM(ROUTE111), 0},
+ [MAPSEC_ROUTE_112] = {MAP_GROUP(ROUTE112), MAP_NUM(ROUTE112), 0},
+ [MAPSEC_ROUTE_113] = {MAP_GROUP(ROUTE113), MAP_NUM(ROUTE113), 0},
+ [MAPSEC_ROUTE_114] = {MAP_GROUP(ROUTE114), MAP_NUM(ROUTE114), 0},
+ [MAPSEC_ROUTE_115] = {MAP_GROUP(ROUTE115), MAP_NUM(ROUTE115), 0},
+ [MAPSEC_ROUTE_116] = {MAP_GROUP(ROUTE116), MAP_NUM(ROUTE116), 0},
+ [MAPSEC_ROUTE_117] = {MAP_GROUP(ROUTE117), MAP_NUM(ROUTE117), 0},
+ [MAPSEC_ROUTE_118] = {MAP_GROUP(ROUTE118), MAP_NUM(ROUTE118), 0},
+ [MAPSEC_ROUTE_119] = {MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119), 0},
+ [MAPSEC_ROUTE_120] = {MAP_GROUP(ROUTE120), MAP_NUM(ROUTE120), 0},
+ [MAPSEC_ROUTE_121] = {MAP_GROUP(ROUTE121), MAP_NUM(ROUTE121), 0},
+ [MAPSEC_ROUTE_122] = {MAP_GROUP(ROUTE122), MAP_NUM(ROUTE122), 0},
+ [MAPSEC_ROUTE_123] = {MAP_GROUP(ROUTE123), MAP_NUM(ROUTE123), 0},
+ [MAPSEC_ROUTE_124] = {MAP_GROUP(ROUTE124), MAP_NUM(ROUTE124), 0},
+ [MAPSEC_ROUTE_125] = {MAP_GROUP(ROUTE125), MAP_NUM(ROUTE125), 0},
+ [MAPSEC_ROUTE_126] = {MAP_GROUP(ROUTE126), MAP_NUM(ROUTE126), 0},
+ [MAPSEC_ROUTE_127] = {MAP_GROUP(ROUTE127), MAP_NUM(ROUTE127), 0},
+ [MAPSEC_ROUTE_128] = {MAP_GROUP(ROUTE128), MAP_NUM(ROUTE128), 0},
+ [MAPSEC_ROUTE_129] = {MAP_GROUP(ROUTE129), MAP_NUM(ROUTE129), 0},
+ [MAPSEC_ROUTE_130] = {MAP_GROUP(ROUTE130), MAP_NUM(ROUTE130), 0},
+ [MAPSEC_ROUTE_131] = {MAP_GROUP(ROUTE131), MAP_NUM(ROUTE131), 0},
+ [MAPSEC_ROUTE_132] = {MAP_GROUP(ROUTE132), MAP_NUM(ROUTE132), 0},
+ [MAPSEC_ROUTE_133] = {MAP_GROUP(ROUTE133), MAP_NUM(ROUTE133), 0},
+ [MAPSEC_ROUTE_134] = {MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0}
};
static const u8 *const sEverGrandeCityNames[] =
@@ -2013,7 +2012,7 @@ static void CB_ExitFlyMap(void)
if (sMapHealLocations[sFlyMap->regionMap.mapSecId][2] != 0)
SetWarpDestinationToHealLocation(sMapHealLocations[sFlyMap->regionMap.mapSecId][2]);
else
- SetWarpDestinationToMapWarp(sMapHealLocations[sFlyMap->regionMap.mapSecId][0], sMapHealLocations[sFlyMap->regionMap.mapSecId][1], -1);
+ SetWarpDestinationToMapWarp(sMapHealLocations[sFlyMap->regionMap.mapSecId][0], sMapHealLocations[sFlyMap->regionMap.mapSecId][1], WARP_ID_NONE);
break;
}
ReturnToFieldFromFlyMapSelect();
diff --git a/src/roamer.c b/src/roamer.c
index b8d100967..4811ac3b2 100644
--- a/src/roamer.c
+++ b/src/roamer.c
@@ -3,7 +3,6 @@
#include "pokemon.h"
#include "random.h"
#include "roamer.h"
-#include "constants/maps.h"
// Despite having a variable to track it, the roamer is
// hard-coded to only ever be in map group 0
diff --git a/src/rotating_gate.c b/src/rotating_gate.c
index ea2eec126..23fbb3e1d 100644
--- a/src/rotating_gate.c
+++ b/src/rotating_gate.c
@@ -5,7 +5,6 @@
#include "fieldmap.h"
#include "sound.h"
#include "sprite.h"
-#include "constants/maps.h"
#include "constants/songs.h"
#define ROTATING_GATE_TILE_TAG 0x1300
diff --git a/src/save_location.c b/src/save_location.c
index b201ca1c0..74d2f2c44 100644
--- a/src/save_location.c
+++ b/src/save_location.c
@@ -1,6 +1,5 @@
#include "global.h"
#include "save_location.h"
-#include "constants/maps.h"
#define LIST_END 0xFFFF
diff --git a/src/scrcmd.c b/src/scrcmd.c
index 6007fb493..5b7c95e8e 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -49,7 +49,6 @@
#include "tv.h"
#include "window.h"
#include "constants/event_objects.h"
-#include "constants/maps.h"
typedef u16 (*SpecialFunc)(void);
typedef void (*NativeFunc)(void);
@@ -58,11 +57,11 @@ EWRAM_DATA const u8 *gRamScriptRetAddr = NULL;
static EWRAM_DATA u32 sAddressOffset = 0; // For relative addressing in vgoto etc., used by saved scripts (e.g. Mystery Event)
static EWRAM_DATA u16 sPauseCounter = 0;
static EWRAM_DATA u16 sMovingNpcId = 0;
-static EWRAM_DATA u16 sMovingNpcMapBank = 0;
-static EWRAM_DATA u16 sMovingNpcMapId = 0;
+static EWRAM_DATA u16 sMovingNpcMapGroup = 0;
+static EWRAM_DATA u16 sMovingNpcMapNum = 0;
static EWRAM_DATA u16 sFieldEffectScriptId = 0;
-static u8 gBrailleWindowId;
+static u8 sBrailleWindowId;
extern const SpecialFunc gSpecials[];
extern const u8 *gStdScripts[];
@@ -610,11 +609,9 @@ bool8 ScrCmd_animateflash(struct ScriptContext *ctx)
return TRUE;
}
-bool8 ScrCmd_setflashradius(struct ScriptContext *ctx)
+bool8 ScrCmd_setflashlevel(struct ScriptContext *ctx)
{
- u16 flashLevel = VarGet(ScriptReadHalfword(ctx));
-
- Overworld_SetFlashLevel(flashLevel);
+ SetFlashLevel(VarGet(ScriptReadHalfword(ctx)));
return FALSE;
}
@@ -668,9 +665,7 @@ bool8 ScrCmd_fadescreenswapbuffers(struct ScriptContext *ctx)
static bool8 RunPauseTimer(void)
{
- sPauseCounter--;
-
- if (sPauseCounter == 0)
+ if (--sPauseCounter == 0)
return TRUE;
else
return FALSE;
@@ -711,13 +706,13 @@ bool8 ScrCmd_setweather(struct ScriptContext *ctx)
{
u16 weather = VarGet(ScriptReadHalfword(ctx));
- SetSav1Weather(weather);
+ SetSavedWeather(weather);
return FALSE;
}
bool8 ScrCmd_resetweather(struct ScriptContext *ctx)
{
- SetSav1WeatherFromCurrMapHeader();
+ SetSavedWeatherFromCurrMapHeader();
return FALSE;
}
@@ -794,7 +789,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
if (mapGroup == MAP_GROUP(UNDEFINED) && mapNum == MAP_NUM(UNDEFINED))
SetWarpDestinationToFixedHoleWarp(x - MAP_OFFSET, y - MAP_OFFSET);
else
- SetWarpDestination(mapGroup, mapNum, -1, x - MAP_OFFSET, y - MAP_OFFSET);
+ SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, x - MAP_OFFSET, y - MAP_OFFSET);
DoFallWarp();
ResetInitialPlayerAvatarState();
return TRUE;
@@ -945,9 +940,9 @@ bool8 ScrCmd_waitfanfare(struct ScriptContext *ctx)
bool8 ScrCmd_playbgm(struct ScriptContext *ctx)
{
u16 songId = ScriptReadHalfword(ctx);
- bool8 val = ScriptReadByte(ctx);
+ bool8 save = ScriptReadByte(ctx);
- if (val == TRUE)
+ if (save == TRUE)
Overworld_SetSavedMusic(songId);
PlayNewMapMusic(songId);
return FALSE;
@@ -1018,7 +1013,7 @@ bool8 ScrCmd_applymovement_at(struct ScriptContext *ctx)
static bool8 WaitForMovementFinish(void)
{
- return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapId, sMovingNpcMapBank);
+ return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapNum, sMovingNpcMapGroup);
}
bool8 ScrCmd_waitmovement(struct ScriptContext *ctx)
@@ -1027,8 +1022,8 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx)
if (localId != 0)
sMovingNpcId = localId;
- sMovingNpcMapBank = gSaveBlock1Ptr->location.mapGroup;
- sMovingNpcMapId = gSaveBlock1Ptr->location.mapNum;
+ sMovingNpcMapGroup = gSaveBlock1Ptr->location.mapGroup;
+ sMovingNpcMapNum = gSaveBlock1Ptr->location.mapNum;
SetupNativeScript(ctx, WaitForMovementFinish);
return TRUE;
}
@@ -1036,15 +1031,15 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx)
bool8 ScrCmd_waitmovement_at(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
- u8 mapBank;
- u8 mapId;
+ u8 mapGroup;
+ u8 mapNum;
if (localId != 0)
sMovingNpcId = localId;
- mapBank = ScriptReadByte(ctx);
- mapId = ScriptReadByte(ctx);
- sMovingNpcMapBank = mapBank;
- sMovingNpcMapId = mapId;
+ mapGroup = ScriptReadByte(ctx);
+ mapNum = ScriptReadByte(ctx);
+ sMovingNpcMapGroup = mapGroup;
+ sMovingNpcMapNum = mapNum;
SetupNativeScript(ctx, WaitForMovementFinish);
return TRUE;
}
@@ -1101,7 +1096,7 @@ bool8 ScrCmd_setobjectxyperm(struct ScriptContext *ctx)
u16 x = VarGet(ScriptReadHalfword(ctx));
u16 y = VarGet(ScriptReadHalfword(ctx));
- Overworld_SetObjEventTemplateCoords(localId, x, y);
+ SetObjEventTemplateCoords(localId, x, y);
return FALSE;
}
@@ -1133,24 +1128,24 @@ bool8 ScrCmd_hideobject_at(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_setobjectpriority(struct ScriptContext *ctx)
+bool8 ScrCmd_setobjectsubpriority(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx);
u8 priority = ScriptReadByte(ctx);
- SetObjectPriority(localId, mapNum, mapGroup, priority + 83);
+ SetObjectSubpriority(localId, mapNum, mapGroup, priority + 83);
return FALSE;
}
-bool8 ScrCmd_resetobjectpriority(struct ScriptContext *ctx)
+bool8 ScrCmd_resetobjectsubpriority(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
u8 mapNum = ScriptReadByte(ctx);
- ResetObjectPriority(localId, mapNum, mapGroup);
+ ResetObjectSubpriority(localId, mapNum, mapGroup);
return FALSE;
}
@@ -1178,7 +1173,7 @@ bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx)
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 movementType = ScriptReadByte(ctx);
- Overworld_SetObjEventTemplateMovementType(localId, movementType);
+ SetObjEventTemplateMovementType(localId, movementType);
return FALSE;
}
@@ -1311,7 +1306,7 @@ bool8 ScrCmd_messageinstant(struct ScriptContext *ctx)
msg = (const u8 *)ctx->data[0];
LoadMessageBoxAndBorderGfx();
DrawDialogueFrame(0, 1);
- AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, 0);
+ AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, NULL);
return FALSE;
}
@@ -1463,7 +1458,9 @@ bool8 ScrCmd_showmonpic(struct ScriptContext *ctx)
bool8 ScrCmd_hidemonpic(struct ScriptContext *ctx)
{
- bool8 (*func)(void) = ScriptMenu_GetPicboxWaitFunc();
+ // The hide function returns a pointer to a function
+ // that returns true once the pic is hidden
+ bool8 (*func)(void) = ScriptMenu_HidePokemonPic();
if (func == NULL)
return FALSE;
@@ -1528,13 +1525,13 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
yText = (yText - yWindow - 1) * 8;
winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1);
- gBrailleWindowId = AddWindow(&winTemplate);
- LoadUserWindowBorderGfx(gBrailleWindowId, 0x214, 0xE0);
- DrawStdWindowFrame(gBrailleWindowId, 0);
- PutWindowTilemap(gBrailleWindowId);
- FillWindowPixelBuffer(gBrailleWindowId, PIXEL_FILL(1));
- AddTextPrinterParameterized(gBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL);
- CopyWindowToVram(gBrailleWindowId, COPYWIN_FULL);
+ sBrailleWindowId = AddWindow(&winTemplate);
+ LoadUserWindowBorderGfx(sBrailleWindowId, 0x214, 0xE0);
+ DrawStdWindowFrame(sBrailleWindowId, 0);
+ PutWindowTilemap(sBrailleWindowId);
+ FillWindowPixelBuffer(sBrailleWindowId, PIXEL_FILL(1));
+ AddTextPrinterParameterized(sBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL);
+ CopyWindowToVram(sBrailleWindowId, COPYWIN_FULL);
return FALSE;
}
@@ -1638,12 +1635,12 @@ bool8 ScrCmd_bufferstdstring(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_buffercontesttype(struct ScriptContext *ctx)
+bool8 ScrCmd_buffercontestname(struct ScriptContext *ctx)
{
u8 stringVarIndex = ScriptReadByte(ctx);
- u16 index = VarGet(ScriptReadHalfword(ctx));
+ u16 category = VarGet(ScriptReadHalfword(ctx));
- BufferContestName(sScriptStringVars[stringVarIndex], index);
+ BufferContestName(sScriptStringVars[stringVarIndex], category);
return FALSE;
}
@@ -1933,17 +1930,17 @@ bool8 ScrCmd_setberrytree(struct ScriptContext *ctx)
u8 growthStage = ScriptReadByte(ctx);
if (berry == 0)
- PlantBerryTree(treeId, 0, growthStage, FALSE);
+ PlantBerryTree(treeId, berry, growthStage, FALSE);
else
PlantBerryTree(treeId, berry, growthStage, FALSE);
return FALSE;
}
-bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx)
+bool8 ScrCmd_getpokenewsactive(struct ScriptContext *ctx)
{
u16 newsKind = VarGet(ScriptReadHalfword(ctx));
- gSpecialVar_Result = GetPriceReduction(newsKind);
+ gSpecialVar_Result = IsPokeNewsActive(newsKind);
return FALSE;
}
@@ -1985,7 +1982,7 @@ bool8 ScrCmd_dofieldeffect(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_setfieldeffectarg(struct ScriptContext *ctx)
+bool8 ScrCmd_setfieldeffectargument(struct ScriptContext *ctx)
{
u8 argNum = ScriptReadByte(ctx);
@@ -2230,9 +2227,7 @@ bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx)
return FALSE;
}
-// TODO: Should be renamed. Name implies general usage, but its specifically for Wonder Card
-// See GetSavedRamScriptIfValid, which is NULL if ValidateSavedWonderCard returns FALSE
-bool8 ScrCmd_gotoram(struct ScriptContext *ctx)
+bool8 ScrCmd_gotowondercardscript(struct ScriptContext *ctx)
{
const u8* script = GetSavedRamScriptIfValid();
@@ -2244,7 +2239,7 @@ bool8 ScrCmd_gotoram(struct ScriptContext *ctx)
return FALSE;
}
-// Unused
+// This warp is only used by the Union Room.
// For the warp used by the Aqua Hideout, see DoTeleportTileWarp
bool8 ScrCmd_warpspinenter(struct ScriptContext *ctx)
{
@@ -2273,8 +2268,8 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx)
static void CloseBrailleWindow(void)
{
- ClearStdWindowAndFrame(gBrailleWindowId, 1);
- RemoveWindow(gBrailleWindowId);
+ ClearStdWindowAndFrame(sBrailleWindowId, 1);
+ RemoveWindow(sBrailleWindowId);
}
bool8 ScrCmd_buffertrainerclassname(struct ScriptContext *ctx)
diff --git a/src/script.c b/src/script.c
index b10e0db49..4728e739c 100644
--- a/src/script.c
+++ b/src/script.c
@@ -3,7 +3,7 @@
#include "event_data.h"
#include "mystery_gift.h"
#include "util.h"
-#include "constants/maps.h"
+#include "constants/event_objects.h"
#include "constants/map_scripts.h"
#define RAM_SCRIPT_MAGIC 51
@@ -399,6 +399,8 @@ const u8 *GetRamScript(u8 objectId, const u8 *script)
}
}
+#define NO_OBJECT OBJ_EVENT_ID_PLAYER
+
bool32 ValidateSavedRamScript(void)
{
struct RamScriptData *scriptData = &gSaveBlock1Ptr->ramScript.data;
@@ -408,7 +410,7 @@ bool32 ValidateSavedRamScript(void)
return FALSE;
if (scriptData->mapNum != MAP_NUM(UNDEFINED))
return FALSE;
- if (scriptData->objectId != 0xFF)
+ if (scriptData->objectId != NO_OBJECT)
return FALSE;
if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum)
return FALSE;
@@ -426,7 +428,7 @@ u8 *GetSavedRamScriptIfValid(void)
return NULL;
if (scriptData->mapNum != MAP_NUM(UNDEFINED))
return NULL;
- if (scriptData->objectId != 0xFF)
+ if (scriptData->objectId != NO_OBJECT)
return NULL;
if (CalculateRamScriptChecksum() != gSaveBlock1Ptr->ramScript.checksum)
{
@@ -443,5 +445,5 @@ void InitRamScript_NoObjectEvent(u8 *script, u16 scriptSize)
{
if (scriptSize > sizeof(gSaveBlock1Ptr->ramScript.data.script))
scriptSize = sizeof(gSaveBlock1Ptr->ramScript.data.script);
- InitRamScript(script, scriptSize, MAP_GROUP(UNDEFINED), MAP_NUM(UNDEFINED), 0xFF);
+ InitRamScript(script, scriptSize, MAP_GROUP(UNDEFINED), MAP_NUM(UNDEFINED), NO_OBJECT);
}
diff --git a/src/script_menu.c b/src/script_menu.c
index ae0fe91e6..1680758f2 100644
--- a/src/script_menu.c
+++ b/src/script_menu.c
@@ -563,6 +563,7 @@ static void Task_PokemonPicWindow(u8 taskId)
task->tState++;
break;
case 1:
+ // Wait until state is advanced by ScriptMenu_HidePokemonPic
break;
case 2:
FreeResourcesAndDestroySprite(&gSprites[task->tMonSpriteId], task->tMonSpriteId);
@@ -600,7 +601,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y)
}
}
-bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void)
+bool8 (*ScriptMenu_HidePokemonPic(void))(void)
{
u8 taskId = FindTaskIdByFunc(Task_PokemonPicWindow);
diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c
index 07e86656e..ae7aa92dc 100755
--- a/src/script_pokemon_util.c
+++ b/src/script_pokemon_util.c
@@ -150,7 +150,12 @@ void CreateScriptedWildMon(u16 species, u8 level, u16 item)
void ScriptSetMonMoveSlot(u8 monIndex, u16 move, u8 slot)
{
+// Allows monIndex to go out of bounds of gPlayerParty. Doesn't occur in vanilla
+#ifdef BUGFIX
+ if (monIndex >= PARTY_SIZE)
+#else
if (monIndex > PARTY_SIZE)
+#endif
monIndex = gPlayerPartyCount - 1;
SetMonMoveSlot(&gPlayerParty[monIndex], move, slot);
diff --git a/src/secret_base.c b/src/secret_base.c
index 72560ee23..8fc97141f 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -39,7 +39,6 @@
#include "constants/event_objects.h"
#include "constants/field_specials.h"
#include "constants/items.h"
-#include "constants/maps.h"
#include "constants/map_types.h"
#include "constants/metatile_behaviors.h"
#include "constants/metatile_labels.h"
@@ -446,7 +445,7 @@ void EnterSecretBase(void)
{
CreateTask(Task_EnterSecretBase, 0);
FadeScreen(FADE_TO_BLACK, 0);
- SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
+ SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE);
}
bool8 SecretBaseMapPopupEnabled(void)
@@ -490,7 +489,7 @@ static void Task_EnterNewlyCreatedSecretBase(u8 taskId)
SetWarpDestination(
gSaveBlock1Ptr->location.mapGroup,
gSaveBlock1Ptr->location.mapNum,
- -1,
+ WARP_ID_NONE,
GET_BASE_COMPUTER_X(secretBaseGroup),
GET_BASE_COMPUTER_Y(secretBaseGroup));
WarpIntoMap();
@@ -700,7 +699,7 @@ static void Task_WarpOutOfSecretBase(u8 taskId)
gTasks[taskId].data[0] = 2;
break;
case 2:
- SetWarpDestinationToDynamicWarp(0x7e);
+ SetWarpDestinationToDynamicWarp(WARP_ID_SECRET_BASE);
WarpIntoMap();
gFieldCallback = FieldCB_DefaultWarpExit;
SetMainCallback2(CB2_LoadMap);
@@ -1215,108 +1214,107 @@ void SecretBasePerStepCallback(u8 taskId)
tState = 1;
break;
case 1:
+ // End if player hasn't moved
PlayerGetDestCoords(&x, &y);
- if (x != tPlayerX || y != tPlayerY)
+ if (x == tPlayerX && y == tPlayerY)
+ return;
+
+ tPlayerX = x;
+ tPlayerY = y;
+ VarSet(VAR_SECRET_BASE_STEP_COUNTER, VarGet(VAR_SECRET_BASE_STEP_COUNTER) + 1);
+ behavior = MapGridGetMetatileBehaviorAt(x, y);
+ tileId = MapGridGetMetatileIdAt(x, y);
+ if (tileId == METATILE_SecretBase_SolidBoard_Top || tileId == METATILE_SecretBase_SolidBoard_Bottom)
{
- tPlayerX = x;
- tPlayerY = y;
- VarSet(VAR_SECRET_BASE_STEP_COUNTER, VarGet(VAR_SECRET_BASE_STEP_COUNTER) + 1);
- behavior = MapGridGetMetatileBehaviorAt(x, y);
- tileId = MapGridGetMetatileIdAt(x, y);
- if (tileId == METATILE_SecretBase_SolidBoard_Top || tileId == METATILE_SecretBase_SolidBoard_Bottom)
- {
- if (sInFriendSecretBase == TRUE)
- {
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SOLID_BOARD);
- }
- }
- else if (tileId == METATILE_SecretBase_SmallChair
- || tileId == METATILE_SecretBase_PokemonChair
- || tileId == METATILE_SecretBase_HeavyChair
- || tileId == METATILE_SecretBase_PrettyChair
- || tileId == METATILE_SecretBase_ComfortChair
- || tileId == METATILE_SecretBase_RaggedChair
- || tileId == METATILE_SecretBase_BrickChair
- || tileId == METATILE_SecretBase_CampChair
- || tileId == METATILE_SecretBase_HardChair)
- {
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_CHAIR);
- }
- else if (tileId == METATILE_SecretBase_RedTent_DoorTop
- || tileId == METATILE_SecretBase_RedTent_Door
- || tileId == METATILE_SecretBase_BlueTent_DoorTop
- || tileId == METATILE_SecretBase_BlueTent_Door)
- {
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_TENT);
- }
- else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight)
- || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_CornerLeft))
- {
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_STAND);
- }
- else if (behavior == MB_IMPASSABLE_WEST_AND_EAST && tileId == METATILE_SecretBase_Slide_StairLanding)
- {
- if (sInFriendSecretBase == TRUE)
- {
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_USED_SLIDE);
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_DECLINED_SLIDE);
- }
- }
- else if (behavior == MB_SLIDE_SOUTH && tileId == METATILE_SecretBase_Slide_SlideTop)
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SOLID_BOARD);
+ }
+ else if (tileId == METATILE_SecretBase_SmallChair
+ || tileId == METATILE_SecretBase_PokemonChair
+ || tileId == METATILE_SecretBase_HeavyChair
+ || tileId == METATILE_SecretBase_PrettyChair
+ || tileId == METATILE_SecretBase_ComfortChair
+ || tileId == METATILE_SecretBase_RaggedChair
+ || tileId == METATILE_SecretBase_BrickChair
+ || tileId == METATILE_SecretBase_CampChair
+ || tileId == METATILE_SecretBase_HardChair)
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_CHAIR);
+ }
+ else if (tileId == METATILE_SecretBase_RedTent_DoorTop
+ || tileId == METATILE_SecretBase_RedTent_Door
+ || tileId == METATILE_SecretBase_BlueTent_DoorTop
+ || tileId == METATILE_SecretBase_BlueTent_Door)
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_TENT);
+ }
+ else if ((behavior == MB_IMPASSABLE_NORTHEAST && tileId == METATILE_SecretBase_Stand_CornerRight)
+ || (behavior == MB_IMPASSABLE_NORTHWEST && MapGridGetMetatileIdAt(x, y) == METATILE_SecretBase_Stand_CornerLeft))
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_STAND);
+ }
+ else if (behavior == MB_IMPASSABLE_WEST_AND_EAST && tileId == METATILE_SecretBase_Slide_StairLanding)
+ {
+ if (sInFriendSecretBase == TRUE)
{
- if (sInFriendSecretBase == TRUE)
- {
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SLIDE);
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_DECLINED_SLIDE);
- }
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_USED_SLIDE);
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_DECLINED_SLIDE);
}
- else if (MetatileBehavior_IsSecretBaseGlitterMat(behavior) == TRUE)
+ }
+ else if (behavior == MB_SLIDE_SOUTH && tileId == METATILE_SecretBase_Slide_SlideTop)
+ {
+ if (sInFriendSecretBase == TRUE)
{
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_GLITTER_MAT);
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SLIDE);
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) ^ SECRET_BASE_DECLINED_SLIDE);
}
- else if (MetatileBehavior_IsSecretBaseBalloon(behavior) == TRUE)
+ }
+ else if (MetatileBehavior_IsSecretBaseGlitterMat(behavior) == TRUE)
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_GLITTER_MAT);
+ }
+ else if (MetatileBehavior_IsSecretBaseBalloon(behavior) == TRUE)
+ {
+ PopSecretBaseBalloon(MapGridGetMetatileIdAt(x, y), x, y);
+ if (sInFriendSecretBase == TRUE)
{
- PopSecretBaseBalloon(MapGridGetMetatileIdAt(x, y), x, y);
- if (sInFriendSecretBase == TRUE)
+ switch ((int)MapGridGetMetatileIdAt(x, y))
{
- switch ((int)MapGridGetMetatileIdAt(x, y))
- {
- case METATILE_SecretBase_RedBalloon:
- case METATILE_SecretBase_BlueBalloon:
- case METATILE_SecretBase_YellowBalloon:
- VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_BALLOON);
- break;
- case METATILE_SecretBase_MudBall:
- VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_MUD_BALL);
- break;
- }
+ case METATILE_SecretBase_RedBalloon:
+ case METATILE_SecretBase_BlueBalloon:
+ case METATILE_SecretBase_YellowBalloon:
+ VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_BALLOON);
+ break;
+ case METATILE_SecretBase_MudBall:
+ VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_MUD_BALL);
+ break;
}
}
- else if (MetatileBehavior_IsSecretBaseBreakableDoor(behavior) == TRUE)
- {
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_BREAKABLE_DOOR);
+ }
+ else if (MetatileBehavior_IsSecretBaseBreakableDoor(behavior) == TRUE)
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_BREAKABLE_DOOR);
- ShatterSecretBaseBreakableDoor(x, y);
- }
- else if (MetatileBehavior_IsSecretBaseSoundMat(behavior) == TRUE){
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_NOTE_MAT);
- }
- else if (MetatileBehavior_IsSecretBaseJumpMat(behavior) == TRUE)
- {
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_JUMP_MAT);
- }
- else if (MetatileBehavior_IsSecretBaseSpinMat(behavior) == TRUE)
- {
- if (sInFriendSecretBase == TRUE)
- VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SPIN_MAT);
- }
+ ShatterSecretBaseBreakableDoor(x, y);
+ }
+ else if (MetatileBehavior_IsSecretBaseSoundMat(behavior) == TRUE){
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_LOW_TV_FLAGS, VarGet(VAR_SECRET_BASE_LOW_TV_FLAGS) | SECRET_BASE_USED_NOTE_MAT);
+ }
+ else if (MetatileBehavior_IsSecretBaseJumpMat(behavior) == TRUE)
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_JUMP_MAT);
+ }
+ else if (MetatileBehavior_IsSecretBaseSpinMat(behavior) == TRUE)
+ {
+ if (sInFriendSecretBase == TRUE)
+ VarSet(VAR_SECRET_BASE_HIGH_TV_FLAGS, VarGet(VAR_SECRET_BASE_HIGH_TV_FLAGS) | SECRET_BASE_USED_SPIN_MAT);
}
break;
case 2:
diff --git a/src/shop.c b/src/shop.c
index fa4a73bbb..f6fb2b9a0 100755
--- a/src/shop.c
+++ b/src/shop.c
@@ -562,7 +562,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 itemId, u8 y)
{
ConvertIntToDecimalStringN(
gStringVar1,
- ItemId_GetPrice(itemId) >> GetPriceReduction(POKENEWS_SLATEPORT),
+ ItemId_GetPrice(itemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT),
STR_CONV_MODE_LEFT_ALIGN,
5);
}
@@ -934,7 +934,7 @@ static void Task_BuyMenu(u8 taskId)
if (sMartInfo.martType == MART_TYPE_NORMAL)
{
- sShopData->totalCost = (ItemId_GetPrice(itemId) >> GetPriceReduction(POKENEWS_SLATEPORT));
+ sShopData->totalCost = (ItemId_GetPrice(itemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT));
}
else
{
@@ -1014,7 +1014,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
if (AdjustQuantityAccordingToDPadInput(&tItemCount, sShopData->maxQuantity) == TRUE)
{
- sShopData->totalCost = (ItemId_GetPrice(tItemId) >> GetPriceReduction(POKENEWS_SLATEPORT)) * tItemCount;
+ sShopData->totalCost = (ItemId_GetPrice(tItemId) >> IsPokeNewsActive(POKENEWS_SLATEPORT)) * tItemCount;
BuyMenuPrintItemQuantityAndPrice(taskId);
}
else
diff --git a/src/slot_machine.c b/src/slot_machine.c
index 1c21f230d..6cbcd76fd 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -557,10 +557,10 @@ static struct SpriteFrameImage *sImageTables_DigitalDisplay[NUM_DIG_DISPLAY_SPRI
// Const rom data.
static const struct DigitalDisplaySprite *const sDigitalDisplayScenes[];
static const u16 sUnkPalette[];
-static const u8 sLuckyRoundProbabilities[][3];
+static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET];
static const u8 sBiasTags[];
-static const u16 sLuckyFlagSettings_Top3[];
-static const u16 sLuckyFlagSettings_NotTop3[];
+static const u16 sLuckyFlagSettings_Top3[3];
+static const u16 sLuckyFlagSettings_NotTop3[5];
static const s16 sDigitalDisplay_SpriteCoords[][2];
static const SpriteCallback sDigitalDisplay_SpriteCallbacks[];
static const struct SpriteTemplate *const sSpriteTemplates_DigitalDisplay[NUM_DIG_DISPLAY_SPRITES];
@@ -582,8 +582,8 @@ static const struct SpriteSheet sSlotMachineSpriteSheets[22];
static const struct SpritePalette sSlotMachineSpritePalettes[];
static const u16 *const sDigitalDisplay_Pal;
static const s16 sInitialReelPositions[NUM_REELS][2];
-static const u8 sLuckyFlagProbabilities_Top3[][6];
-static const u8 sLuckyFlagProbabilities_NotTop3[][6];
+static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS];
+static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS];
static const u8 sReeltimeProbabilities_UnluckyGame[][17];
static const u8 sReelTimeProbabilities_LuckyGame[][17];
static const u8 sSymToMatch[];
@@ -1651,22 +1651,18 @@ static void DrawLuckyFlags(void)
if (IsThisRoundLucky())
{
attempts = AttemptsAtLuckyFlags_Top3();
- if (attempts != 3) // if you found a lucky number
+ if (attempts != ARRAY_COUNT(sLuckyFlagSettings_Top3)) // if you found a lucky number
{
// attempts == 1: reelTime flag set
sSlotMachine->luckyFlags |= sLuckyFlagSettings_Top3[attempts];
if (attempts != 1)
- {
return;
- }
}
}
// if it's not a lucky round or you got reel time, roll for the lower lucky flags
attempts = AttemptsAtLuckyFlags_NotTop3();
- if (attempts != 5) // if you found a lucky number
- {
+ if (attempts != ARRAY_COUNT(sLuckyFlagSettings_NotTop3)) // if you found a lucky number
sSlotMachine->luckyFlags |= sLuckyFlagSettings_NotTop3[attempts];
- }
}
}
}
@@ -1704,7 +1700,7 @@ static u8 AttemptsAtLuckyFlags_Top3(void)
{
s16 count;
- for (count = 0; count < 3; count++)
+ for (count = 0; count < (int)ARRAY_COUNT(sLuckyFlagSettings_Top3); count++)
{
s16 rval = Random() & 0xff;
s16 value = sLuckyFlagProbabilities_Top3[count][sSlotMachine->machineId];
@@ -1718,7 +1714,7 @@ static u8 AttemptsAtLuckyFlags_NotTop3(void)
{
s16 count;
- for (count = 0; count < 5; count++)
+ for (count = 0; count < (int)ARRAY_COUNT(sLuckyFlagSettings_NotTop3); count++)
{
s16 rval = Random() & 0xff; // random byte
s16 value = sLuckyFlagProbabilities_NotTop3[count][sSlotMachine->machineId];
@@ -4807,27 +4803,83 @@ static const s16 sInitialReelPositions[NUM_REELS][2] = {
[RIGHT_REEL] = {0, 2}
};
-static const u8 sLuckyRoundProbabilities[][3] = {
- {1, 1, 12},
- {1, 1, 14},
- {2, 2, 14},
- {2, 2, 14},
- {2, 3, 16},
- {3, 3, 16}
+static const u8 sLuckyRoundProbabilities[NUM_SLOT_MACHINE_IDS][MAX_BET] = {
+ [SLOT_MACHINE_UNLUCKIEST] = {1, 1, 12},
+ [SLOT_MACHINE_UNLUCKIER] = {1, 1, 14},
+ [SLOT_MACHINE_UNLUCKY] = {2, 2, 14},
+ [SLOT_MACHINE_LUCKY] = {2, 2, 14},
+ [SLOT_MACHINE_LUCKIER] = {2, 3, 16},
+ [SLOT_MACHINE_LUCKIEST] = {3, 3, 16}
};
-static const u8 sLuckyFlagProbabilities_Top3[][6] = {
- {25, 25, 30, 40, 40, 50},
- {25, 25, 30, 30, 35, 35},
- {25, 25, 30, 25, 25, 30}
-};
-
-static const u8 sLuckyFlagProbabilities_NotTop3[][6] = {
- {20, 25, 25, 20, 25, 25},
- {12, 15, 15, 18, 19, 22},
- {25, 25, 25, 30, 30, 40},
- {25, 25, 20, 20, 15, 15},
- {40, 40, 35, 35, 40, 40}
+static const u8 sLuckyFlagProbabilities_Top3[][NUM_SLOT_MACHINE_IDS] = {
+ { // Probabilities for LUCKY_BIAS_777
+ [SLOT_MACHINE_UNLUCKIEST] = 25,
+ [SLOT_MACHINE_UNLUCKIER] = 25,
+ [SLOT_MACHINE_UNLUCKY] = 30,
+ [SLOT_MACHINE_LUCKY] = 40,
+ [SLOT_MACHINE_LUCKIER] = 40,
+ [SLOT_MACHINE_LUCKIEST] = 50
+ },
+ { // Probabilities for LUCKY_BIAS_REELTIME
+ [SLOT_MACHINE_UNLUCKIEST] = 25,
+ [SLOT_MACHINE_UNLUCKIER] = 25,
+ [SLOT_MACHINE_UNLUCKY] = 30,
+ [SLOT_MACHINE_LUCKY] = 30,
+ [SLOT_MACHINE_LUCKIER] = 35,
+ [SLOT_MACHINE_LUCKIEST] = 35
+ },
+ { // Probabilities for LUCKY_BIAS_MIXED_777
+ [SLOT_MACHINE_UNLUCKIEST] = 25,
+ [SLOT_MACHINE_UNLUCKIER] = 25,
+ [SLOT_MACHINE_UNLUCKY] = 30,
+ [SLOT_MACHINE_LUCKY] = 25,
+ [SLOT_MACHINE_LUCKIER] = 25,
+ [SLOT_MACHINE_LUCKIEST] = 30
+ }
+};
+
+static const u8 sLuckyFlagProbabilities_NotTop3[][NUM_SLOT_MACHINE_IDS] = {
+ { // Probabilities for LUCKY_BIAS_POWER
+ [SLOT_MACHINE_UNLUCKIEST] = 20,
+ [SLOT_MACHINE_UNLUCKIER] = 25,
+ [SLOT_MACHINE_UNLUCKY] = 25,
+ [SLOT_MACHINE_LUCKY] = 20,
+ [SLOT_MACHINE_LUCKIER] = 25,
+ [SLOT_MACHINE_LUCKIEST] = 25
+ },
+ { // Probabilities for LUCKY_BIAS_AZURILL
+ [SLOT_MACHINE_UNLUCKIEST] = 12,
+ [SLOT_MACHINE_UNLUCKIER] = 15,
+ [SLOT_MACHINE_UNLUCKY] = 15,
+ [SLOT_MACHINE_LUCKY] = 18,
+ [SLOT_MACHINE_LUCKIER] = 19,
+ [SLOT_MACHINE_LUCKIEST] = 22
+ },
+ { // Probabilities for LUCKY_BIAS_LOTAD
+ [SLOT_MACHINE_UNLUCKIEST] = 25,
+ [SLOT_MACHINE_UNLUCKIER] = 25,
+ [SLOT_MACHINE_UNLUCKY] = 25,
+ [SLOT_MACHINE_LUCKY] = 30,
+ [SLOT_MACHINE_LUCKIER] = 30,
+ [SLOT_MACHINE_LUCKIEST] = 40
+ },
+ { // Probabilities for LUCKY_BIAS_CHERRY
+ [SLOT_MACHINE_UNLUCKIEST] = 25,
+ [SLOT_MACHINE_UNLUCKIER] = 25,
+ [SLOT_MACHINE_UNLUCKY] = 20,
+ [SLOT_MACHINE_LUCKY] = 20,
+ [SLOT_MACHINE_LUCKIER] = 15,
+ [SLOT_MACHINE_LUCKIEST] = 15
+ },
+ { // Probabilities for LUCKY_BIAS_REPLAY
+ [SLOT_MACHINE_UNLUCKIEST] = 40,
+ [SLOT_MACHINE_UNLUCKIER] = 40,
+ [SLOT_MACHINE_UNLUCKY] = 35,
+ [SLOT_MACHINE_LUCKY] = 35,
+ [SLOT_MACHINE_LUCKIER] = 40,
+ [SLOT_MACHINE_LUCKIEST] = 40
+ }
};
static const u8 sReeltimeProbabilities_UnluckyGame[][17] = {
@@ -5708,7 +5760,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Insert =
static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Stop =
{
- .tileTag = 18,
+ .tileTag = GFXTAG_STOP,
.paletteTag = PALTAG_DIG_DISPLAY,
.oam = &sOam_8x8,
.anims = sAnims_SingleFrame,
@@ -5741,7 +5793,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Lose =
static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Bonus =
{
- .tileTag = 19,
+ .tileTag = GFXTAG_BONUS,
.paletteTag = PALTAG_DIG_DISPLAY,
.oam = &sOam_8x8,
.anims = sAnims_SingleFrame,
@@ -5752,7 +5804,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Bonus =
static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Big =
{
- .tileTag = 20,
+ .tileTag = GFXTAG_BIG,
.paletteTag = PALTAG_DIG_DISPLAY,
.oam = &sOam_8x8,
.anims = sAnims_SingleFrame,
@@ -5763,7 +5815,7 @@ static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Big =
static const struct SpriteTemplate sSpriteTemplate_DigitalDisplay_Reg =
{
- .tileTag = 21,
+ .tileTag = GFXTAG_REG,
.paletteTag = PALTAG_DIG_DISPLAY,
.oam = &sOam_8x8,
.anims = sAnims_SingleFrame,
diff --git a/src/trainer_hill.c b/src/trainer_hill.c
index 2c34f196e..04312a2dd 100644
--- a/src/trainer_hill.c
+++ b/src/trainer_hill.c
@@ -28,7 +28,6 @@
#include "constants/items.h"
#include "constants/layouts.h"
#include "constants/moves.h"
-#include "constants/maps.h"
#include "constants/trainers.h"
#include "constants/easy_chat.h"
#include "constants/trainer_hill.h"
diff --git a/src/tv.c b/src/tv.c
index 310163e94..de1657813 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -36,11 +36,11 @@
#include "data.h"
#include "constants/battle_frontier.h"
#include "constants/contest.h"
+#include "constants/decorations.h"
#include "constants/event_objects.h"
#include "constants/items.h"
#include "constants/layouts.h"
#include "constants/lilycove_lady.h"
-#include "constants/maps.h"
#include "constants/metatile_behaviors.h"
#include "constants/metatile_labels.h"
#include "constants/moves.h"
@@ -140,13 +140,13 @@ static void TryPutRandomPokeNewsOnAir(void);
static void SortPurchasesByQuantity(void);
static void UpdateMassOutbreakTimeLeft(u16);
static void TryEndMassOutbreak(u16);
-static void UpdatePokeNewsTimeLeft(u16);
+static void UpdatePokeNewsCountdown(u16);
static void ResolveWorldOfMastersShow(u16);
static void ResolveNumberOneShow(u16);
static void TryPutFishingAdviceOnAir(void);
static u8 MonDataIdxToRibbon(u8);
static void TryPutNumberOneOnAir(u8);
-static bool8 IsPriceDiscounted(u8);
+static bool8 ShouldApplyPokeNewsEffect(u8);
static void TryPutWorldOfMastersOnAir(void);
static void InterviewBefore_FanClubLetter(void);
static void InterviewBefore_RecentHappenings(void);
@@ -228,24 +228,24 @@ static const struct {
}
};
-static const u16 sGoldSymbolFlags[] = {
- FLAG_SYS_TOWER_GOLD,
- FLAG_SYS_DOME_GOLD,
- FLAG_SYS_PALACE_GOLD,
- FLAG_SYS_ARENA_GOLD,
- FLAG_SYS_FACTORY_GOLD,
- FLAG_SYS_PIKE_GOLD,
- FLAG_SYS_PYRAMID_GOLD
+static const u16 sGoldSymbolFlags[NUM_FRONTIER_FACILITIES] = {
+ [FRONTIER_FACILITY_TOWER] = FLAG_SYS_TOWER_GOLD,
+ [FRONTIER_FACILITY_DOME] = FLAG_SYS_DOME_GOLD,
+ [FRONTIER_FACILITY_PALACE] = FLAG_SYS_PALACE_GOLD,
+ [FRONTIER_FACILITY_ARENA] = FLAG_SYS_ARENA_GOLD,
+ [FRONTIER_FACILITY_FACTORY] = FLAG_SYS_FACTORY_GOLD,
+ [FRONTIER_FACILITY_PIKE] = FLAG_SYS_PIKE_GOLD,
+ [FRONTIER_FACILITY_PYRAMID] = FLAG_SYS_PYRAMID_GOLD
};
-static const u16 sSilverSymbolFlags[] = {
- FLAG_SYS_TOWER_SILVER,
- FLAG_SYS_DOME_SILVER,
- FLAG_SYS_PALACE_SILVER,
- FLAG_SYS_ARENA_SILVER,
- FLAG_SYS_FACTORY_SILVER,
- FLAG_SYS_PIKE_SILVER,
- FLAG_SYS_PYRAMID_SILVER
+static const u16 sSilverSymbolFlags[NUM_FRONTIER_FACILITIES] = {
+ [FRONTIER_FACILITY_TOWER] = FLAG_SYS_TOWER_SILVER,
+ [FRONTIER_FACILITY_DOME] = FLAG_SYS_DOME_SILVER,
+ [FRONTIER_FACILITY_PALACE] = FLAG_SYS_PALACE_SILVER,
+ [FRONTIER_FACILITY_ARENA] = FLAG_SYS_ARENA_SILVER,
+ [FRONTIER_FACILITY_FACTORY] = FLAG_SYS_FACTORY_SILVER,
+ [FRONTIER_FACILITY_PIKE] = FLAG_SYS_PIKE_SILVER,
+ [FRONTIER_FACILITY_PYRAMID] = FLAG_SYS_PYRAMID_SILVER
};
static const u16 sNumberOneVarsAndThresholds[][2] = {
@@ -258,28 +258,28 @@ static const u16 sNumberOneVarsAndThresholds[][2] = {
{VAR_DAILY_BP, 30}
};
-static const u8 *const sPokeNewsTextGroup_Upcoming[] = {
- NULL,
- gPokeNewsTextSlateport_Upcoming,
- gPokeNewsTextGameCorner_Upcoming,
- gPokeNewsTextLilycove_Upcoming,
- gPokeNewsTextBlendMaster_Upcoming
+static const u8 *const sPokeNewsTextGroup_Upcoming[NUM_POKENEWS_TYPES + 1] = {
+ [POKENEWS_NONE] = NULL,
+ [POKENEWS_SLATEPORT] = gPokeNewsTextSlateport_Upcoming,
+ [POKENEWS_GAME_CORNER] = gPokeNewsTextGameCorner_Upcoming,
+ [POKENEWS_LILYCOVE] = gPokeNewsTextLilycove_Upcoming,
+ [POKENEWS_BLENDMASTER] = gPokeNewsTextBlendMaster_Upcoming
};
-static const u8 *const sPokeNewsTextGroup_Ongoing[] = {
- NULL,
- gPokeNewsTextSlateport_Ongoing,
- gPokeNewsTextGameCorner_Ongoing,
- gPokeNewsTextLilycove_Ongoing,
- gPokeNewsTextBlendMaster_Ongoing
+static const u8 *const sPokeNewsTextGroup_Ongoing[NUM_POKENEWS_TYPES + 1] = {
+ [POKENEWS_NONE] = NULL,
+ [POKENEWS_SLATEPORT] = gPokeNewsTextSlateport_Ongoing,
+ [POKENEWS_GAME_CORNER] = gPokeNewsTextGameCorner_Ongoing,
+ [POKENEWS_LILYCOVE] = gPokeNewsTextLilycove_Ongoing,
+ [POKENEWS_BLENDMASTER] = gPokeNewsTextBlendMaster_Ongoing
};
-static const u8 *const sPokeNewsTextGroup_Ending[] = {
- NULL,
- gPokeNewsTextSlateport_Ending,
- gPokeNewsTextGameCorner_Ending,
- gPokeNewsTextLilycove_Ending,
- gPokeNewsTextBlendMaster_Ending
+static const u8 *const sPokeNewsTextGroup_Ending[NUM_POKENEWS_TYPES + 1] = {
+ [POKENEWS_NONE] = NULL,
+ [POKENEWS_SLATEPORT] = gPokeNewsTextSlateport_Ending,
+ [POKENEWS_GAME_CORNER] = gPokeNewsTextGameCorner_Ending,
+ [POKENEWS_LILYCOVE] = gPokeNewsTextLilycove_Ending,
+ [POKENEWS_BLENDMASTER] = gPokeNewsTextBlendMaster_Ending
};
u8 *const gTVStringVarPtrs[] = {
@@ -1526,7 +1526,7 @@ void TryPutSmartShopperOnAir(void)
show->smartshopperShow.itemIds[i] = gMartPurchaseHistory[i].itemId;
show->smartshopperShow.itemAmounts[i] = gMartPurchaseHistory[i].quantity;
}
- show->smartshopperShow.priceReduced = GetPriceReduction(POKENEWS_SLATEPORT);
+ show->smartshopperShow.priceReduced = IsPokeNewsActive(POKENEWS_SLATEPORT);
StringCopy(show->smartshopperShow.playerName, gSaveBlock2Ptr->playerName);
StorePlayerIdInRecordMixShow(show);
show->smartshopperShow.language = gGameLanguage;
@@ -1569,13 +1569,13 @@ void StartMassOutbreak(void)
gSaveBlock1Ptr->outbreakLocationMapNum = show->massOutbreak.locationMapNum;
gSaveBlock1Ptr->outbreakLocationMapGroup = show->massOutbreak.locationMapGroup;
gSaveBlock1Ptr->outbreakPokemonLevel = show->massOutbreak.level;
- gSaveBlock1Ptr->outbreakUnk1 = show->massOutbreak.var02;
- gSaveBlock1Ptr->outbreakUnk2 = show->massOutbreak.var0E;
+ gSaveBlock1Ptr->outbreakUnused1 = show->massOutbreak.unused1;
+ gSaveBlock1Ptr->outbreakUnused2 = show->massOutbreak.unused2;
gSaveBlock1Ptr->outbreakPokemonMoves[0] = show->massOutbreak.moves[0];
gSaveBlock1Ptr->outbreakPokemonMoves[1] = show->massOutbreak.moves[1];
gSaveBlock1Ptr->outbreakPokemonMoves[2] = show->massOutbreak.moves[2];
gSaveBlock1Ptr->outbreakPokemonMoves[3] = show->massOutbreak.moves[3];
- gSaveBlock1Ptr->outbreakUnk4 = show->massOutbreak.var03;
+ gSaveBlock1Ptr->outbreakUnused3 = show->massOutbreak.unused3;
gSaveBlock1Ptr->outbreakPokemonProbability = show->massOutbreak.probability;
gSaveBlock1Ptr->outbreakDaysLeft = 2;
}
@@ -1668,19 +1668,19 @@ static void TryStartRandomMassOutbreak(void)
show->massOutbreak.kind = TVSHOW_MASS_OUTBREAK;
show->massOutbreak.active = TRUE;
show->massOutbreak.level = sPokeOutbreakSpeciesList[outbreakIdx].level;
- show->massOutbreak.var02 = 0;
- show->massOutbreak.var03 = 0;
+ show->massOutbreak.unused1 = 0;
+ show->massOutbreak.unused3 = 0;
show->massOutbreak.species = sPokeOutbreakSpeciesList[outbreakIdx].species;
- show->massOutbreak.var0E = 0;
+ show->massOutbreak.unused2 = 0;
show->massOutbreak.moves[0] = sPokeOutbreakSpeciesList[outbreakIdx].moves[0];
show->massOutbreak.moves[1] = sPokeOutbreakSpeciesList[outbreakIdx].moves[1];
show->massOutbreak.moves[2] = sPokeOutbreakSpeciesList[outbreakIdx].moves[2];
show->massOutbreak.moves[3] = sPokeOutbreakSpeciesList[outbreakIdx].moves[3];
show->massOutbreak.locationMapNum = sPokeOutbreakSpeciesList[outbreakIdx].location;
show->massOutbreak.locationMapGroup = 0;
- show->massOutbreak.var12 = 0;
+ show->massOutbreak.unused4 = 0;
show->massOutbreak.probability = 50;
- show->massOutbreak.var15 = 0;
+ show->massOutbreak.unused5 = 0;
show->massOutbreak.daysLeft = 1;
StorePlayerIdInNormalShow(show);
show->massOutbreak.language = gGameLanguage;
@@ -1695,13 +1695,13 @@ void EndMassOutbreak(void)
gSaveBlock1Ptr->outbreakLocationMapNum = 0;
gSaveBlock1Ptr->outbreakLocationMapGroup = 0;
gSaveBlock1Ptr->outbreakPokemonLevel = 0;
- gSaveBlock1Ptr->outbreakUnk1 = 0;
- gSaveBlock1Ptr->outbreakUnk2 = 0;
+ gSaveBlock1Ptr->outbreakUnused1 = 0;
+ gSaveBlock1Ptr->outbreakUnused2 = 0;
gSaveBlock1Ptr->outbreakPokemonMoves[0] = MOVE_NONE;
gSaveBlock1Ptr->outbreakPokemonMoves[1] = MOVE_NONE;
gSaveBlock1Ptr->outbreakPokemonMoves[2] = MOVE_NONE;
gSaveBlock1Ptr->outbreakPokemonMoves[3] = MOVE_NONE;
- gSaveBlock1Ptr->outbreakUnk4 = 0;
+ gSaveBlock1Ptr->outbreakUnused3 = 0;
gSaveBlock1Ptr->outbreakPokemonProbability = 0;
gSaveBlock1Ptr->outbreakDaysLeft = 0;
}
@@ -1710,7 +1710,7 @@ void UpdateTVShowsPerDay(u16 days)
{
UpdateMassOutbreakTimeLeft(days);
TryEndMassOutbreak(days);
- UpdatePokeNewsTimeLeft(days);
+ UpdatePokeNewsCountdown(days);
ResolveWorldOfMastersShow(days);
ResolveNumberOneShow(days);
}
@@ -1798,9 +1798,7 @@ void SetPokemonAnglerSpecies(u16 species)
// Either way the temporary version of the show in the last slot is deleted.
static void ResolveWorldOfMastersShow(u16 days)
{
- TVShow *show;
-
- show = &gSaveBlock1Ptr->tvShows[LAST_TVSHOW_IDX];
+ TVShow *show = &gSaveBlock1Ptr->tvShows[LAST_TVSHOW_IDX];
if (show->worldOfMasters.kind == TVSHOW_WORLD_OF_MASTERS)
{
if (show->worldOfMasters.numPokeCaught >= 20)
@@ -1864,7 +1862,7 @@ void TryPutTodaysRivalTrainerOnAir(void)
show->rivalTrainer.mapLayoutId = gMapHeader.mapLayoutId;
show->rivalTrainer.nSilverSymbols = 0;
show->rivalTrainer.nGoldSymbols = 0;
- for (i = 0; i < 7; i++)
+ for (i = 0; i < NUM_FRONTIER_FACILITIES; i++)
{
if (FlagGet(sSilverSymbolFlags[i]) == TRUE)
show->rivalTrainer.nSilverSymbols++;
@@ -1990,33 +1988,39 @@ static void SecretBaseVisit_CalculateDecorationData(TVShow *show)
u8 decoration;
for (i = 0; i < DECOR_MAX_SECRET_BASE; i++)
- sTV_DecorationsBuffer[i] = 0;
+ sTV_DecorationsBuffer[i] = DECOR_NONE;
+ // Count (and save) the unique decorations in the base
for (i = 0, n = 0; i < DECOR_MAX_SECRET_BASE; i++)
{
decoration = gSaveBlock1Ptr->secretBases[0].decorations[i];
- if (decoration)
+ if (decoration != DECOR_NONE)
{
+ // Search for an empty spot to save decoration
for (j = 0; j < DECOR_MAX_SECRET_BASE; j++)
{
- if (sTV_DecorationsBuffer[j] == 0)
+ if (sTV_DecorationsBuffer[j] == DECOR_NONE)
{
+ // Save and count new unique decoration
sTV_DecorationsBuffer[j] = decoration;
n++;
break;
}
+
+ // Decoration has already been saved, skip and move on to the next base decoration
if (sTV_DecorationsBuffer[j] == decoration)
break;
}
}
}
- if (n > 4)
- show->secretBaseVisit.nDecorations = 4;
+ // Cap the number of unique decorations to the number the TV show will talk about
+ if (n > ARRAY_COUNT(show->secretBaseVisit.decorations))
+ show->secretBaseVisit.numDecorations = ARRAY_COUNT(show->secretBaseVisit.decorations);
else
- show->secretBaseVisit.nDecorations = n;
+ show->secretBaseVisit.numDecorations = n;
- switch (show->secretBaseVisit.nDecorations)
+ switch (show->secretBaseVisit.numDecorations)
{
case 0:
break;
@@ -2024,16 +2028,16 @@ static void SecretBaseVisit_CalculateDecorationData(TVShow *show)
show->secretBaseVisit.decorations[0] = sTV_DecorationsBuffer[0];
break;
default:
+ // More than 1 decoration, randomize the full list
for (k = 0; k < n * n; k++)
{
decoration = Random() % n;
j = Random() % n;
- i = sTV_DecorationsBuffer[decoration];
- sTV_DecorationsBuffer[decoration] = sTV_DecorationsBuffer[j];
- sTV_DecorationsBuffer[j] = i;
+ SWAP(sTV_DecorationsBuffer[decoration], sTV_DecorationsBuffer[j], i);
}
- for (i = 0; i < show->secretBaseVisit.nDecorations; i++)
+ // Pick the first decorations in the randomized list to talk about on the show
+ for (i = 0; i < show->secretBaseVisit.numDecorations; i++)
show->secretBaseVisit.decorations[i] = sTV_DecorationsBuffer[i];
break;
}
@@ -2044,50 +2048,55 @@ static void SecretBaseVisit_CalculatePartyData(TVShow *show)
u8 i;
u16 move;
u16 j;
- u8 nMoves;
- u8 nPokemon;
+ u8 numMoves;
+ u8 numPokemon;
u16 sum;
- for (i = 0, nPokemon = 0; i < PARTY_SIZE; i++)
+ for (i = 0, numPokemon = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
{
- sTV_SecretBaseVisitMonsTemp[nPokemon].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
- sTV_SecretBaseVisitMonsTemp[nPokemon].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES);
- nMoves = 0;
+ sTV_SecretBaseVisitMonsTemp[numPokemon].level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);
+ sTV_SecretBaseVisitMonsTemp[numPokemon].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES);
+
+ // Check all the Pokémon's moves, then randomly select one to save
+ numMoves = 0;
move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE1);
if (move != MOVE_NONE)
{
- sTV_SecretBaseVisitMovesTemp[nMoves] = move;
- nMoves++;
+ sTV_SecretBaseVisitMovesTemp[numMoves] = move;
+ numMoves++;
}
move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE2);
if (move != MOVE_NONE)
{
- sTV_SecretBaseVisitMovesTemp[nMoves] = move;
- nMoves++;
+ sTV_SecretBaseVisitMovesTemp[numMoves] = move;
+ numMoves++;
}
move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE3);
if (move != MOVE_NONE)
{
- sTV_SecretBaseVisitMovesTemp[nMoves] = move;
- nMoves++;
+ sTV_SecretBaseVisitMovesTemp[numMoves] = move;
+ numMoves++;
}
move = GetMonData(&gPlayerParty[i], MON_DATA_MOVE4);
if (move != MOVE_NONE)
{
- sTV_SecretBaseVisitMovesTemp[nMoves] = move;
- nMoves++;
+ sTV_SecretBaseVisitMovesTemp[numMoves] = move;
+ numMoves++;
}
- sTV_SecretBaseVisitMonsTemp[nPokemon].move = sTV_SecretBaseVisitMovesTemp[Random() % nMoves];
- nPokemon++;
+ sTV_SecretBaseVisitMonsTemp[numPokemon].move = sTV_SecretBaseVisitMovesTemp[Random() % numMoves];
+ numPokemon++;
}
}
- for (i = 0, sum = 0; i < nPokemon; i++)
+
+ for (i = 0, sum = 0; i < numPokemon; i++)
sum += sTV_SecretBaseVisitMonsTemp[i].level;
- show->secretBaseVisit.avgLevel = sum / nPokemon;
- j = Random() % nPokemon;
+ // Using the data calculated above, save the data to talk about on the show
+ // (average level, and one randomly selected species / move)
+ show->secretBaseVisit.avgLevel = sum / numPokemon;
+ j = Random() % numPokemon;
show->secretBaseVisit.species = sTV_SecretBaseVisitMonsTemp[j].species;
show->secretBaseVisit.move = sTV_SecretBaseVisitMonsTemp[j].move;
}
@@ -2225,7 +2234,7 @@ void TryPutBattleSeminarOnAir(u16 foeSpecies, u16 species, u8 moveIdx, const u16
}
}
-void TryPutSafariFanClubOnAir(u8 nMonsCaught, u8 nPkblkUsed)
+void TryPutSafariFanClubOnAir(u8 monsCaught, u8 pokeblocksUsed)
{
TVShow *show;
@@ -2236,8 +2245,8 @@ void TryPutSafariFanClubOnAir(u8 nMonsCaught, u8 nPkblkUsed)
show->safariFanClub.kind = TVSHOW_SAFARI_FAN_CLUB;
show->safariFanClub.active = FALSE; // NOTE: Show is not active until passed via Record Mix.
StringCopy(show->safariFanClub.playerName, gSaveBlock2Ptr->playerName);
- show->safariFanClub.nMonsCaught = nMonsCaught;
- show->safariFanClub.nPkblkUsed = nPkblkUsed;
+ show->safariFanClub.monsCaught = monsCaught;
+ show->safariFanClub.pokeblocksUsed = pokeblocksUsed;
StorePlayerIdInRecordMixShow(show);
show->safariFanClub.language = gGameLanguage;
}
@@ -2537,12 +2546,12 @@ static void TryPutRandomPokeNewsOnAir(void)
sCurTVShowSlot = GetFirstEmptyPokeNewsSlot(gSaveBlock1Ptr->pokeNews);
if (sCurTVShowSlot != -1 && rbernoulli(1, 100) != TRUE)
{
- u8 newsKind = (Random() % NUM_POKENEWS_TYPES) + POKENEWS_SLATEPORT;
+ u8 newsKind = (Random() % NUM_POKENEWS_TYPES) + 1; // +1 to skip over POKENEWS_NONE
if (IsAddingPokeNewsDisallowed(newsKind) != TRUE)
{
gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].kind = newsKind;
- gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].days = 4;
- gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].state = 1;
+ gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].dayCountdown = POKENEWS_COUNTDOWN;
+ gSaveBlock1Ptr->pokeNews[sCurTVShowSlot].state = POKENEWS_STATE_UPCOMING;
}
}
}
@@ -2571,8 +2580,8 @@ static void ClearPokeNews(void)
static void ClearPokeNewsBySlot(u8 i)
{
gSaveBlock1Ptr->pokeNews[i].kind = POKENEWS_NONE;
- gSaveBlock1Ptr->pokeNews[i].state = FALSE;
- gSaveBlock1Ptr->pokeNews[i].days = 0;
+ gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE;
+ gSaveBlock1Ptr->pokeNews[i].dayCountdown = 0;
}
static void CompactPokeNews(void)
@@ -2604,8 +2613,8 @@ static u8 FindAnyPokeNewsOnTheAir(void)
for (i = 0; i < POKE_NEWS_COUNT; i++)
{
if (gSaveBlock1Ptr->pokeNews[i].kind != POKENEWS_NONE
- && gSaveBlock1Ptr->pokeNews[i].state == 1
- && gSaveBlock1Ptr->pokeNews[i].days < 3)
+ && gSaveBlock1Ptr->pokeNews[i].state == POKENEWS_STATE_UPCOMING
+ && gSaveBlock1Ptr->pokeNews[i].dayCountdown < POKENEWS_COUNTDOWN - 1)
return i;
}
return 0xFF;
@@ -2613,19 +2622,17 @@ static u8 FindAnyPokeNewsOnTheAir(void)
void DoPokeNews(void)
{
- u8 i;
- u16 n;
-
- i = FindAnyPokeNewsOnTheAir();
+ u8 i = FindAnyPokeNewsOnTheAir();
if (i == 0xFF)
{
gSpecialVar_Result = FALSE;
}
else
{
- if (gSaveBlock1Ptr->pokeNews[i].days == 0)
+ if (gSaveBlock1Ptr->pokeNews[i].dayCountdown == 0)
{
- gSaveBlock1Ptr->pokeNews[i].state = 2;
+ // News event is occurring, make comment depending on how much time is left
+ gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_ACTIVE;
if (gLocalTime.hours < 20)
ShowFieldMessage(sPokeNewsTextGroup_Ongoing[gSaveBlock1Ptr->pokeNews[i].kind]);
else
@@ -2633,16 +2640,20 @@ void DoPokeNews(void)
}
else
{
- n = gSaveBlock1Ptr->pokeNews[i].days;
- ConvertIntToDecimalStringN(gStringVar1, n, STR_CONV_MODE_LEFT_ALIGN, 1);
- gSaveBlock1Ptr->pokeNews[i].state = 0;
+ // News event is upcoming, make comment about countdown to event
+ u16 dayCountdown = gSaveBlock1Ptr->pokeNews[i].dayCountdown;
+ ConvertIntToDecimalStringN(gStringVar1, dayCountdown, STR_CONV_MODE_LEFT_ALIGN, 1);
+
+ // Mark as inactive so the countdown TV airing doesn't repeat
+ // Will be flagged as "upcoming" again by UpdatePokeNewsCountdown
+ gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE;
ShowFieldMessage(sPokeNewsTextGroup_Upcoming[gSaveBlock1Ptr->pokeNews[i].kind]);
}
gSpecialVar_Result = TRUE;
}
}
-bool8 GetPriceReduction(u8 newsKind)
+bool8 IsPokeNewsActive(u8 newsKind)
{
u8 i;
@@ -2653,7 +2664,7 @@ bool8 GetPriceReduction(u8 newsKind)
{
if (gSaveBlock1Ptr->pokeNews[i].kind == newsKind)
{
- if (gSaveBlock1Ptr->pokeNews[i].state == 2 && IsPriceDiscounted(newsKind))
+ if (gSaveBlock1Ptr->pokeNews[i].state == POKENEWS_STATE_ACTIVE && ShouldApplyPokeNewsEffect(newsKind))
return TRUE;
return FALSE;
@@ -2662,16 +2673,23 @@ bool8 GetPriceReduction(u8 newsKind)
return FALSE;
}
-static bool8 IsPriceDiscounted(u8 newsKind)
+// Returns TRUE if the effects of the given PokeNews should be applied.
+// For POKENEWS_SLATEPORT / POKENEWS_LILYCOVE, only apply the effect if
+// the player is talking to the Energy Guru / at the Dept Store Rooftop.
+// For any other type of PokeNews this is always TRUE.
+static bool8 ShouldApplyPokeNewsEffect(u8 newsKind)
{
switch (newsKind)
{
case POKENEWS_SLATEPORT:
- if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SLATEPORT_CITY) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(SLATEPORT_CITY) && gSpecialVar_LastTalked == 25)
+ if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(SLATEPORT_CITY)
+ && gSaveBlock1Ptr->location.mapNum == MAP_NUM(SLATEPORT_CITY)
+ && gSpecialVar_LastTalked == LOCALID_SLATEPORT_ENERGY_GURU)
return TRUE;
return FALSE;
case POKENEWS_LILYCOVE:
- if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP))
+ if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP)
+ && gSaveBlock1Ptr->location.mapNum == MAP_NUM(LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP))
return TRUE;
return FALSE;
}
@@ -2693,7 +2711,7 @@ static bool8 IsAddingPokeNewsDisallowed(u8 newsKind)
return FALSE;
}
-static void UpdatePokeNewsTimeLeft(u16 days)
+static void UpdatePokeNewsCountdown(u16 days)
{
u8 i;
@@ -2701,16 +2719,18 @@ static void UpdatePokeNewsTimeLeft(u16 days)
{
if (gSaveBlock1Ptr->pokeNews[i].kind != POKENEWS_NONE)
{
- if (gSaveBlock1Ptr->pokeNews[i].days < days)
+ if (gSaveBlock1Ptr->pokeNews[i].dayCountdown < days)
{
+ // News event has elapsed, clear it from list
ClearPokeNewsBySlot(i);
}
else
{
- if (gSaveBlock1Ptr->pokeNews[i].state == 0 && FlagGet(FLAG_SYS_GAME_CLEAR) == TRUE)
- gSaveBlock1Ptr->pokeNews[i].state = 1;
+ // Progress countdown to news event
+ if (gSaveBlock1Ptr->pokeNews[i].state == POKENEWS_STATE_INACTIVE && FlagGet(FLAG_SYS_GAME_CLEAR) == TRUE)
+ gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_UPCOMING;
- gSaveBlock1Ptr->pokeNews[i].days -= days;
+ gSaveBlock1Ptr->pokeNews[i].dayCountdown -= days;
}
}
}
@@ -2760,9 +2780,7 @@ void CopyContestCategoryToStringVar(u8 varIdx, u8 category)
void SetContestCategoryStringVarForInterview(void)
{
- TVShow *show;
-
- show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
+ TVShow *show = &gSaveBlock1Ptr->tvShows[gSpecialVar_0x8004];
CopyContestCategoryToStringVar(1, show->bravoTrainer.contestCategory);
}
@@ -2789,9 +2807,7 @@ size_t CountDigits(int value)
static void SmartShopper_BufferPurchaseTotal(u8 varIdx, TVShow *show)
{
u8 i;
- int price;
-
- price = 0;
+ int price = 0;
for (i = 0; i < SMARTSHOPPER_NUM_ITEMS; i++)
{
if (show->smartshopperShow.itemIds[i] != ITEM_NONE)
@@ -2832,21 +2848,19 @@ static bool8 IsRecordMixShowAlreadySpawned(u8 kind, bool8 delete)
static void SortPurchasesByQuantity(void)
{
u8 i, j;
- u16 tmpId;
- u16 tmpQn;
-
+
for (i = 0; i < SMARTSHOPPER_NUM_ITEMS - 1; i++)
{
for (j = i + 1; j < SMARTSHOPPER_NUM_ITEMS; j++)
{
if (gMartPurchaseHistory[i].quantity < gMartPurchaseHistory[j].quantity)
{
- tmpId = gMartPurchaseHistory[i].itemId;
- tmpQn = gMartPurchaseHistory[i].quantity;
+ u16 tempItemId = gMartPurchaseHistory[i].itemId;
+ u16 tempQuantity = gMartPurchaseHistory[i].quantity;
gMartPurchaseHistory[i].itemId = gMartPurchaseHistory[j].itemId;
gMartPurchaseHistory[i].quantity = gMartPurchaseHistory[j].quantity;
- gMartPurchaseHistory[j].itemId = tmpId;
- gMartPurchaseHistory[j].quantity = tmpQn;
+ gMartPurchaseHistory[j].itemId = tempItemId;
+ gMartPurchaseHistory[j].quantity = tempQuantity;
}
}
}
@@ -2923,7 +2937,8 @@ static void InterviewBefore_FanClubLetter(void)
if (!gSpecialVar_Result)
{
StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]);
- InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words, 6);
+ InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words,
+ ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubLetter.words));
}
}
@@ -2932,7 +2947,8 @@ static void InterviewBefore_RecentHappenings(void)
TryReplaceOldTVShowOfKind(TVSHOW_RECENT_HAPPENINGS);
if (!gSpecialVar_Result)
{
- InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words, 6);
+ InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words,
+ ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].recentHappenings.words));
}
}
@@ -2944,7 +2960,8 @@ static void InterviewBefore_PkmnFanClubOpinions(void)
StringCopy(gStringVar1, gSpeciesNames[GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_SPECIES, NULL)]);
GetMonData(&gPlayerParty[GetLeadMonIndex()], MON_DATA_NICKNAME, gStringVar2);
StringGetEnd10(gStringVar2);
- InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words, 2);
+ InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words,
+ ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanclubOpinions.words));
}
}
@@ -2962,7 +2979,8 @@ static void InterviewBefore_BravoTrainerPkmnProfile(void)
{
TryReplaceOldTVShowOfKind(TVSHOW_BRAVO_TRAINER_POKEMON_PROFILE);
if (!gSpecialVar_Result)
- InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words, 2);
+ InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words,
+ ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainer.words));
}
static void InterviewBefore_ContestLiveUpdates(void)
@@ -2979,14 +2997,16 @@ static void InterviewBefore_BravoTrainerBTProfile(void)
{
TryReplaceOldTVShowOfKind(TVSHOW_BRAVO_TRAINER_BATTLE_TOWER_PROFILE);
if (!gSpecialVar_Result)
- InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words, 1);
+ InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words,
+ ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].bravoTrainerTower.words));
}
static void InterviewBefore_FanClubSpecial(void)
{
TryReplaceOldTVShowOfKind(TVSHOW_FAN_CLUB_SPECIAL);
if (!gSpecialVar_Result)
- InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words, 1);
+ InitializeEasyChatWordArray(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words,
+ ARRAY_COUNT(gSaveBlock1Ptr->tvShows[sCurTVShowSlot].fanClubSpecial.words));
}
static bool8 IsPartyMonNicknamedOrNotEnglish(u8 monIdx)
@@ -3058,23 +3078,19 @@ static void CompactTVShowArray(TVShow *shows)
}
}
-static u16 GetRandomDifferentSpeciesAndNameSeenByPlayer(u8 varIdx, u16 passedSpecies)
+static u16 GetRandomDifferentSpeciesAndNameSeenByPlayer(u8 varIdx, u16 excludedSpecies)
{
- u16 species;
-
- species = GetRandomDifferentSpeciesSeenByPlayer(passedSpecies);
+ u16 species = GetRandomDifferentSpeciesSeenByPlayer(excludedSpecies);
StringCopy(gTVStringVarPtrs[varIdx], gSpeciesNames[species]);
return species;
}
-static u16 GetRandomDifferentSpeciesSeenByPlayer(u16 passedSpecies)
+static u16 GetRandomDifferentSpeciesSeenByPlayer(u16 excludedSpecies)
{
- u16 species;
- u16 initSpecies;
+ u16 species = Random() % (NUM_SPECIES - 1) + 1;
+ u16 initSpecies = species;
- species = (Random() % (NUM_SPECIES - 1)) + 1;
- initSpecies = species;
- while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_SEEN) != TRUE || species == passedSpecies)
+ while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_SEEN) != TRUE || species == excludedSpecies)
{
if (species == SPECIES_NONE + 1)
species = NUM_SPECIES - 1;
@@ -3083,7 +3099,8 @@ static u16 GetRandomDifferentSpeciesSeenByPlayer(u16 passedSpecies)
if (species == initSpecies)
{
- species = passedSpecies;
+ // Looped back to initial species (only Pokémon seen), must choose excluded species
+ species = excludedSpecies;
return species;
}
};
@@ -3798,7 +3815,7 @@ void DeactivateAllNormalTVShows(void)
}
}
-// Ensures a minimum of 5 empty mixed show slots
+// Ensures a minimum of 5 empty record mixed show slots
static void DeleteExcessMixedShows(void)
{
s8 i;
@@ -3897,8 +3914,8 @@ static bool8 TryMixPokeNewsShow(PokeNews *dest, PokeNews *src, s8 slot)
return FALSE;
}
dest[slot].kind = src->kind;
- dest[slot].state = 1;
- dest[slot].days = src->days;
+ dest[slot].state = POKENEWS_STATE_UPCOMING;
+ dest[slot].dayCountdown = src->dayCountdown;
return TRUE;
}
@@ -3929,7 +3946,7 @@ static void ClearPokeNewsIfGameNotComplete(void)
if (FlagGet(FLAG_SYS_GAME_CLEAR) != TRUE)
{
for (i = 0; i < POKE_NEWS_COUNT; i++)
- gSaveBlock1Ptr->pokeNews[i].state = 0;
+ gSaveBlock1Ptr->pokeNews[i].state = POKENEWS_STATE_INACTIVE;
}
}
@@ -5907,21 +5924,21 @@ static void DoTVShowSecretBaseVisit(void)
{
case 0:
TVShowConvertInternationalString(gStringVar1, show->secretBaseVisit.playerName, show->secretBaseVisit.language);
- if (show->secretBaseVisit.nDecorations == 0)
+ if (show->secretBaseVisit.numDecorations == 0)
sTVShowState = 2;
else
sTVShowState = 1;
break;
case 1:
StringCopy(gStringVar2, gDecorations[show->secretBaseVisit.decorations[0]].name);
- if (show->secretBaseVisit.nDecorations == 1)
+ if (show->secretBaseVisit.numDecorations == 1)
sTVShowState = 4;
else
sTVShowState = 3;
break;
case 3:
StringCopy(gStringVar2, gDecorations[show->secretBaseVisit.decorations[1]].name);
- switch (show->secretBaseVisit.nDecorations)
+ switch (show->secretBaseVisit.numDecorations)
{
case 2:
sTVShowState = 7;
@@ -5985,21 +6002,13 @@ static void DoTVShowPokemonLotteryWinnerFlashReport(void)
state = sTVShowState;
TVShowConvertInternationalString(gStringVar1, show->lottoWinner.playerName, show->lottoWinner.language);
if (show->lottoWinner.whichPrize == 0)
- {
StringCopy(gStringVar2, gText_Jackpot);
- }
else if (show->lottoWinner.whichPrize == 1)
- {
StringCopy(gStringVar2, gText_First);
- }
else if (show->lottoWinner.whichPrize == 2)
- {
StringCopy(gStringVar2, gText_Second);
- }
else
- {
StringCopy(gStringVar2, gText_Third);
- }
StringCopy(gStringVar3, ItemId_GetName(show->lottoWinner.item));
TVShowDone();
ShowFieldMessage(sTVPokemonLotteryWinnerFlashReportTextGroup[state]);
@@ -6712,23 +6721,23 @@ static void DoTVShowSafariFanClub(void)
switch (state)
{
case 0:
- if (show->safariFanClub.nMonsCaught == 0)
+ if (show->safariFanClub.monsCaught == 0)
sTVShowState = 6;
- else if (show->safariFanClub.nMonsCaught < 4)
+ else if (show->safariFanClub.monsCaught < 4)
sTVShowState = 5;
else
sTVShowState = 1;
break;
case 1:
TVShowConvertInternationalString(gStringVar1, show->safariFanClub.playerName, show->safariFanClub.language);
- ConvertIntToDecimalString(1, show->safariFanClub.nMonsCaught);
- if (show->safariFanClub.nPkblkUsed == 0)
+ ConvertIntToDecimalString(1, show->safariFanClub.monsCaught);
+ if (show->safariFanClub.pokeblocksUsed == 0)
sTVShowState = 3;
else
sTVShowState = 2;
break;
case 2:
- ConvertIntToDecimalString(1, show->safariFanClub.nPkblkUsed);
+ ConvertIntToDecimalString(1, show->safariFanClub.pokeblocksUsed);
sTVShowState = 4;
break;
case 3:
@@ -6740,21 +6749,21 @@ static void DoTVShowSafariFanClub(void)
break;
case 5:
TVShowConvertInternationalString(gStringVar1, show->safariFanClub.playerName, show->safariFanClub.language);
- ConvertIntToDecimalString(1, show->safariFanClub.nMonsCaught);
- if (show->safariFanClub.nPkblkUsed == 0)
+ ConvertIntToDecimalString(1, show->safariFanClub.monsCaught);
+ if (show->safariFanClub.pokeblocksUsed == 0)
sTVShowState = 8;
else
sTVShowState = 7;
break;
case 6:
TVShowConvertInternationalString(gStringVar1, show->safariFanClub.playerName, show->safariFanClub.language);
- if (show->safariFanClub.nPkblkUsed == 0)
+ if (show->safariFanClub.pokeblocksUsed == 0)
sTVShowState = 8;
else
sTVShowState = 7;
break;
case 7:
- ConvertIntToDecimalString(1, show->safariFanClub.nPkblkUsed);
+ ConvertIntToDecimalString(1, show->safariFanClub.pokeblocksUsed);
sTVShowState = 9;
break;
case 8:
diff --git a/src/union_room.c b/src/union_room.c
index 1400a0b1d..c624a9784 100644
--- a/src/union_room.c
+++ b/src/union_room.c
@@ -49,7 +49,6 @@
#include "constants/battle_frontier.h"
#include "constants/cable_club.h"
#include "constants/game_stat.h"
-#include "constants/maps.h"
#include "constants/party_menu.h"
#include "constants/rgb.h"
#include "constants/songs.h"
@@ -1593,8 +1592,8 @@ void StartUnionRoomBattle(u16 battleFlags)
static void WarpForWirelessMinigame(u16 linkService, u16 x, u16 y)
{
VarSet(VAR_CABLE_CLUB_STATE, linkService);
- SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x, y);
- SetDynamicWarpWithCoords(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1, x, y);
+ SetWarpDestination(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, x, y);
+ SetDynamicWarpWithCoords(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, WARP_ID_NONE, x, y);
WarpIntoMap();
}
@@ -1605,7 +1604,7 @@ static void WarpForCableClubActivity(s8 mapGroup, s8 mapNum, s32 x, s32 y, u16 l
gFieldLinkPlayerCount = GetLinkPlayerCount();
gLocalLinkPlayerId = GetMultiplayerId();
SetCableClubWarp();
- SetWarpDestination(mapGroup, mapNum, -1, x, y);
+ SetWarpDestination(mapGroup, mapNum, WARP_ID_NONE, x, y);
WarpIntoMap();
}
diff --git a/src/wild_encounter.c b/src/wild_encounter.c
index 65d8c86d0..5960692a2 100644
--- a/src/wild_encounter.c
+++ b/src/wild_encounter.c
@@ -20,7 +20,6 @@
#include "constants/game_stat.h"
#include "constants/items.h"
#include "constants/layouts.h"
-#include "constants/maps.h"
#include "constants/weather.h"
extern const u8 EventScript_RepelWoreOff[];