shithub: pokecrystal

Download patch

ref: 5a3822fe863a7365735c1f5d1c007d98d7736f1b
parent: d0541164589a5fd2f628bf8629f878430b31c5f7
author: Remy Oukaour <[email protected]>
date: Fri Jan 12 19:47:38 EST 2018

Introduce callback, hiddenitem, conditional_event, and cmdqueue macros for map scripts

--- a/docs/map_scripts.md
+++ b/docs/map_scripts.md
@@ -16,7 +16,7 @@
 
 ## `.MapCallbacks: db` *N*
 
-- **`dbw` *type*, *script***
+- **`callback` *type*, *script***
 
 Callback types:
 
@@ -30,13 +30,23 @@
 
 - **`MAPCALLBACK_CMDQUEUE`**
 
-  **`dbw CMDQUEUE_STONETABLE,` *table_pointer***
-  
-  **`stonetable` *warp_id*, *person*, *script***
-  
-  **`db -1 ; end`**
+<!-- need pre tags here; can't use inline bold/italic formatting in Markdown code blocks -->
+<pre>
+	callback MAPCALLBACK_CMDQUEUE, .Boulders
 
+.Boulders:
+	writecmdqueue .BoulderCmdQueue
+	return
 
+.BoulderCmdQueue:
+	cmdqueue CMDQUEUE_STONETABLE, .BoulderTable
+
+.BoulderTable:
+	stonetable <i>warp_id</i>, <i>person</i>, <i>script</i>
+	db -1 ; end
+</pre>
+
+
 ## Event scripts
 
 [Event commands](event_commands.md)
@@ -54,8 +64,10 @@
 
 ## `MapName_MapEventHeader:`
 
+```asm
 	; filler
 	db 0, 0
+```
 
 
 ## `.Warps: db` *N*
@@ -80,11 +92,11 @@
 
 - **`BGEVENT_IFSET/IFNOTSET`**
 
-  **`dw` *event_flag*, *script***
+  **`conditional_event` *event_flag*, *script***
 
 - **`BGEVENT_ITEM`**
 
-  **`dwb` *event_flag*, *item_id***
+  **`hiddenitem` *event_flag*, *item_id***
 
 - **`BGEVENT_COPY`**
 
--- a/macros/scripts/maps.asm
+++ b/macros/scripts/maps.asm
@@ -9,6 +9,12 @@
 	dw \1, 0
 ENDM
 
+callback: MACRO
+;\1: type: a MAPCALLBACK_* constant
+;\2: script pointer
+	dbw \1, \2
+ENDM
+
 warp_def: MACRO
 ;\1: x: left to right, starts at 0
 ;\2: y: top to bottom, starts at 0
@@ -23,9 +29,10 @@
 ;\2: y: top to bottom, starts at 0
 ;\3: scene id: controlled by setscene/setmapscene
 ;\4: script pointer
-	db \3, \2, \1, $0
+	db \3, \2, \1
+	db 0 ; filler
 	dw \4
-	db $0, $0
+	db 0, 0 ; filler
 ENDM
 
 bg_event: MACRO
@@ -91,6 +98,12 @@
 endc
 ENDM
 
+hiddenitem: MACRO
+;\1: flag: an EVENT_* constant
+;\2: item: from constants/item_constants.asm
+	dwb \1, \2
+ENDM
+
 elevfloor: MACRO
 ;\1: floor: a FLOOR_* constant
 ;\2: warp destination: starts at 1
@@ -99,10 +112,22 @@
 	map \3
 ENDM
 
+conditional_event: MACRO
+;\1: flag: an EVENT_* constant
+;\2: script pointer
+	dw \1, \2
+ENDM
+
+cmdqueue: MACRO
+;\1: type: a CMDQUEUE_* constant
+;\2: data pointer
+	dbw \1, \2
+	dw 0 ; filler
+ENDM
+
 stonetable: MACRO
 ;\1: warp id
 ;\2: object_event id
 ;\3: script pointer
-	db \1, \2
-	dw \3
+	dbbw \1, \2, \3
 ENDM
--- a/maps/AzaleaTown.asm
+++ b/maps/AzaleaTown.asm
@@ -21,7 +21,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .Flypoint
+	callback MAPCALLBACK_NEWMAP, .Flypoint
 
 .DummyScene0:
 	end
@@ -211,7 +211,7 @@
 	fruittree FRUITTREE_AZALEA_TOWN
 
 AzaleaTownHiddenFullHeal:
-	dwb EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL, FULL_HEAL
 
 AzaleaTownRivalBattleApproachMovement1:
 	step LEFT
--- a/maps/BattleTowerOutside.asm
+++ b/maps/BattleTowerOutside.asm
@@ -10,8 +10,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_TILES, .Callback1
-	dbw MAPCALLBACK_OBJECTS, .Callback2
+	callback MAPCALLBACK_TILES, .Callback1
+	callback MAPCALLBACK_OBJECTS, .Callback2
 
 .Callback1:
 	return
--- a/maps/BlackthornCity.asm
+++ b/maps/BlackthornCity.asm
@@ -15,8 +15,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
-	dbw MAPCALLBACK_OBJECTS, .Santos
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_OBJECTS, .Santos
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_BLACKTHORN
--- a/maps/BlackthornGym1F.asm
+++ b/maps/BlackthornGym1F.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .Boulders
+	callback MAPCALLBACK_TILES, .Boulders
 
 .Boulders:
 	checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_1
--- a/maps/BlackthornGym2F.asm
+++ b/maps/BlackthornGym2F.asm
@@ -14,7 +14,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_CMDQUEUE, .Boulders
+	callback MAPCALLBACK_CMDQUEUE, .Boulders
 
 .Boulders:
 	writecmdqueue .BoulderCmdQueue
@@ -21,8 +21,7 @@
 	return
 
 .BoulderCmdQueue:
-	dbw CMDQUEUE_STONETABLE, .BoulderTable ; check if any stones are sitting on a warp
-	dw 0 ; filler
+	cmdqueue CMDQUEUE_STONETABLE, .BoulderTable ; check if any stones are sitting on a warp
 
 .BoulderTable:
 	stonetable 5, BLACKTHORNGYM2F_BOULDER1, .Disappear4
--- a/maps/BrunosRoom.asm
+++ b/maps/BrunosRoom.asm
@@ -9,7 +9,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .BrunosRoomDoors
+	callback MAPCALLBACK_TILES, .BrunosRoomDoors
 
 .LockDoor:
 	priorityjump .BrunosDoorLocksBehindYou
--- a/maps/BurnedTower1F.asm
+++ b/maps/BurnedTower1F.asm
@@ -14,7 +14,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .HoleAndLadder
+	callback MAPCALLBACK_TILES, .HoleAndLadder
 
 .EusineScene:
 	priorityjump .MeetEusine
@@ -131,10 +131,10 @@
 	jumpstd smashrock
 
 BurnedTower1FHiddenEther:
-	dwb EVENT_BURNED_TOWER_1F_HIDDEN_ETHER, ETHER
+	hiddenitem EVENT_BURNED_TOWER_1F_HIDDEN_ETHER, ETHER
 
 BurnedTower1FHiddenUltraBall:
-	dwb EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
+	hiddenitem EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
 
 BurnedTower1FHPUp:
 	itemball HP_UP
--- a/maps/BurnedTowerB1F.asm
+++ b/maps/BurnedTowerB1F.asm
@@ -17,7 +17,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .LadderCallback
+	callback MAPCALLBACK_TILES, .LadderCallback
 
 .DummyScene0:
 	end
--- a/maps/CeladonCity.asm
+++ b/maps/CeladonCity.asm
@@ -15,7 +15,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_CELADON
@@ -75,7 +75,7 @@
 	jumpstd pokecentersign
 
 CeladonCityHiddenPpUp:
-	dwb EVENT_CELADON_CITY_HIDDEN_PP_UP, PP_UP
+	hiddenitem EVENT_CELADON_CITY_HIDDEN_PP_UP, PP_UP
 
 CeladonCityFisherText:
 	text "This POLIWRATH is"
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -8,7 +8,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .Callback
+	callback MAPCALLBACK_TILES, .Callback
 
 .Callback:
 	changeblock 12, 0, $03
--- a/maps/CeruleanCity.asm
+++ b/maps/CeruleanCity.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_CERULEAN
@@ -147,7 +147,7 @@
 	jumpstd martsign
 
 CeruleanCityHiddenBerserkGene:
-	dwb EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY, BERSERK_GENE
+	hiddenitem EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY, BERSERK_GENE
 
 CeruleanCityCooltrainerMText1:
 	text "KANTO's POWER"
--- a/maps/CeruleanGym.asm
+++ b/maps/CeruleanGym.asm
@@ -135,7 +135,7 @@
 	end
 
 CeruleanGymHiddenMachinePart:
-	dwb EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM, MACHINE_PART
+	hiddenitem EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM, MACHINE_PART
 
 CeruleanGymStatue1:
 	checkevent EVENT_TRAINERS_IN_CERULEAN_GYM
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .DummyScene0:
 	end
--- a/maps/CianwoodCity.asm
+++ b/maps/CianwoodCity.asm
@@ -20,7 +20,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPointAndSuicune
+	callback MAPCALLBACK_NEWMAP, .FlyPointAndSuicune
 
 .DummyScene0:
 	end
@@ -145,10 +145,10 @@
 	jumpstd smashrock
 
 CianwoodCityHiddenRevive:
-	dwb EVENT_CIANWOOD_CITY_HIDDEN_REVIVE, REVIVE
+	hiddenitem EVENT_CIANWOOD_CITY_HIDDEN_REVIVE, REVIVE
 
 CianwoodCityHiddenMaxEther:
-	dwb EVENT_CIANWOOD_CITY_HIDDEN_MAX_ETHER, MAX_ETHER
+	hiddenitem EVENT_CIANWOOD_CITY_HIDDEN_MAX_ETHER, MAX_ETHER
 
 MovementData_0x1a00da:
 	set_sliding
--- a/maps/CinnabarIsland.asm
+++ b/maps/CinnabarIsland.asm
@@ -7,7 +7,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_CINNABAR
@@ -35,7 +35,7 @@
 	jumpstd pokecentersign
 
 CinnabarIslandHiddenRareCandy:
-	dwb EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY, RARE_CANDY
+	hiddenitem EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY, RARE_CANDY
 
 CinnabarIslandBlueTeleport:
 	teleport_from
--- a/maps/Colosseum.asm
+++ b/maps/Colosseum.asm
@@ -11,8 +11,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_OBJECTS, .SetWhichChris
-	dbw MAPCALLBACK_NEWMAP, .PreparePokecenter2F
+	callback MAPCALLBACK_OBJECTS, .SetWhichChris
+	callback MAPCALLBACK_NEWMAP, .PreparePokecenter2F
 
 .InitializeColosseum:
 	priorityjump .InitializeAndPreparePokecenter2F
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Callback
+	callback MAPCALLBACK_OBJECTS, .Callback
 
 .Callback:
 	checkflag ENGINE_PLAYER_IS_FEMALE
--- a/maps/DarkCaveVioletEntrance.asm
+++ b/maps/DarkCaveVioletEntrance.asm
@@ -31,7 +31,7 @@
 	jumpstd smashrock
 
 DarkCaveVioletEntranceHiddenElixer:
-	dwb EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER, ELIXER
+	hiddenitem EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER, ELIXER
 
 DarkCaveVioletEntrance_MapEventHeader:
 	; filler
--- a/maps/DayCare.asm
+++ b/maps/DayCare.asm
@@ -8,7 +8,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
+	callback MAPCALLBACK_OBJECTS, .EggCheckCallback
 
 .EggCheckCallback:
 	checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
--- a/maps/DiglettsCave.asm
+++ b/maps/DiglettsCave.asm
@@ -12,7 +12,7 @@
 	jumptextfaceplayer DiglettsCavePokefanMText
 
 DiglettsCaveHiddenMaxRevive:
-	dwb EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE, MAX_REVIVE
+	hiddenitem EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE, MAX_REVIVE
 
 DiglettsCavePokefanMText:
 	text "A bunch of DIGLETT"
--- a/maps/DragonsDenB1F.asm
+++ b/maps/DragonsDenB1F.asm
@@ -17,7 +17,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .CheckSilver
+	callback MAPCALLBACK_NEWMAP, .CheckSilver
 
 .DummyScene0:
 	end
@@ -183,13 +183,13 @@
 	itemball MAX_ELIXER
 
 DragonsDenB1FHiddenRevive:
-	dwb EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE, REVIVE
+	hiddenitem EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE, REVIVE
 
 DragonsDenB1FHiddenMaxPotion:
-	dwb EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION, MAX_POTION
 
 DragonsDenB1FHiddenMaxElixer:
-	dwb EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER, MAX_ELIXER
+	hiddenitem EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER, MAX_ELIXER
 
 MovementDragonsDen_ClairWalksToYou:
 	slow_step RIGHT
--- a/maps/EcruteakCity.asm
+++ b/maps/EcruteakCity.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_ECRUTEAK
@@ -88,7 +88,7 @@
 	jumpstd martsign
 
 EcruteakCityHiddenHyperPotion:
-	dwb EVENT_ECRUTEAK_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
+	hiddenitem EVENT_ECRUTEAK_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
 
 UnusedMissingDaughterText:
 ; This text is neither used nor referenced in the final game.
--- a/maps/EcruteakHouse.asm
+++ b/maps/EcruteakHouse.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .InitializeSages
+	callback MAPCALLBACK_OBJECTS, .InitializeSages
 
 .DummyScene0:
 	end
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -18,7 +18,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .MoveElmCallback
+	callback MAPCALLBACK_OBJECTS, .MoveElmCallback
 
 .MeetElm:
 	priorityjump .WalkUpToElm
--- a/maps/FuchsiaCity.asm
+++ b/maps/FuchsiaCity.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_FUCHSIA
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -21,8 +21,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .FlyPointAndFloria
-	dbw MAPCALLBACK_OBJECTS, .MoveTutor
+	callback MAPCALLBACK_NEWMAP, .FlyPointAndFloria
+	callback MAPCALLBACK_OBJECTS, .MoveTutor
 
 .FlyPointAndFloria:
 	setflag ENGINE_FLYPOINT_GOLDENROD
--- a/maps/GoldenrodDeptStore5F.asm
+++ b/maps/GoldenrodDeptStore5F.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .CheckIfSunday
+	callback MAPCALLBACK_OBJECTS, .CheckIfSunday
 
 .CheckIfSunday:
 	checkcode VAR_WEEKDAY
--- a/maps/GoldenrodDeptStoreB1F.asm
+++ b/maps/GoldenrodDeptStoreB1F.asm
@@ -14,8 +14,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_TILES, UnknownScript_0x7d781
-	dbw MAPCALLBACK_NEWMAP, UnknownScript_0x7d7ac
+	callback MAPCALLBACK_TILES, UnknownScript_0x7d781
+	callback MAPCALLBACK_NEWMAP, UnknownScript_0x7d7ac
 
 UnknownScript_0x7d781:
 	checkevent EVENT_RECEIVED_CARD_KEY
--- a/maps/GoldenrodDeptStoreRoof.asm
+++ b/maps/GoldenrodDeptStoreRoof.asm
@@ -14,8 +14,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_TILES, .CheckSaleChangeBlock
-	dbw MAPCALLBACK_OBJECTS, .CheckSaleChangeClerk
+	callback MAPCALLBACK_TILES, .CheckSaleChangeBlock
+	callback MAPCALLBACK_OBJECTS, .CheckSaleChangeClerk
 
 .CheckSaleChangeBlock:
 	checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -18,7 +18,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Callback
+	callback MAPCALLBACK_OBJECTS, .Callback
 
 .Callback:
 	checkevent EVENT_BEAT_ELITE_FOUR
--- a/maps/GoldenrodUnderground.asm
+++ b/maps/GoldenrodUnderground.asm
@@ -15,9 +15,9 @@
 
 .MapCallbacks:
 	db 3
-	dbw MAPCALLBACK_NEWMAP, .ResetSwitches
-	dbw MAPCALLBACK_TILES, .CheckBasementKey
-	dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek
+	callback MAPCALLBACK_NEWMAP, .ResetSwitches
+	callback MAPCALLBACK_TILES, .CheckBasementKey
+	callback MAPCALLBACK_OBJECTS, .CheckDayOfWeek
 
 .ResetSwitches:
 	clearevent EVENT_SWITCH_1
@@ -409,13 +409,13 @@
 	jumptext UnknownText_0x7c91a
 
 GoldenrodUndergroundHiddenParlyzHeal:
-	dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
+	hiddenitem EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
 
 GoldenrodUndergroundHiddenSuperPotion:
-	dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
+	hiddenitem EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
 
 GoldenrodUndergroundHiddenAntidote:
-	dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
+	hiddenitem EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
 
 SupernerdEricSeenText:
 	text "I got booted out"
--- a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
+++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm
@@ -51,7 +51,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .UpdateDoorPositions
+	callback MAPCALLBACK_TILES, .UpdateDoorPositions
 
 .DummyScene0:
 	end
@@ -630,10 +630,10 @@
 	itemball FULL_HEAL
 
 GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion:
-	dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
 
 GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive:
-	dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
+	hiddenitem EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
 
 UndergroundSilverApproachMovement1:
 	step DOWN
--- a/maps/GoldenrodUndergroundWarehouse.asm
+++ b/maps/GoldenrodUndergroundWarehouse.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .ResetSwitches
+	callback MAPCALLBACK_NEWMAP, .ResetSwitches
 
 .ResetSwitches:
 	clearevent EVENT_SWITCH_1
--- a/maps/IcePathB1F.asm
+++ b/maps/IcePathB1F.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_CMDQUEUE, .SetUpStoneTable
+	callback MAPCALLBACK_CMDQUEUE, .SetUpStoneTable
 
 .SetUpStoneTable:
 	writecmdqueue .CommandQueue
@@ -18,8 +18,7 @@
 	return
 
 .CommandQueue:
-	dbw CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp
-	dw 0 ; filler
+	cmdqueue CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp
 
 .StoneTable:
 	stonetable 3, ICEPATHB1F_BOULDER1, .Boulder1
@@ -69,7 +68,7 @@
 	itemball IRON
 
 IcePathB1FHiddenMaxPotion:
-	dwb EVENT_ICE_PATH_B1F_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_ICE_PATH_B1F_HIDDEN_MAX_POTION, MAX_POTION
 
 IcePathBoulderFellThroughText:
 	text "The boulder fell"
--- a/maps/IcePathB2FBlackthornSide.asm
+++ b/maps/IcePathB2FBlackthornSide.asm
@@ -12,7 +12,7 @@
 	itemball TM_REST
 
 IcePathB2FBlackthornSideHiddenIceHeal:
-	dwb EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL, ICE_HEAL
+	hiddenitem EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL, ICE_HEAL
 
 IcePathB2FBlackthornSide_MapEventHeader:
 	; filler
--- a/maps/IcePathB2FMahoganySide.asm
+++ b/maps/IcePathB2FMahoganySide.asm
@@ -23,7 +23,7 @@
 	itemball MAX_POTION
 
 IcePathB2FMahoganySideHiddenCarbos:
-	dwb EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS, CARBOS
+	hiddenitem EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS, CARBOS
 
 UnknownText_0x7e5ad:
 	text "It's immovably"
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -17,7 +17,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .FarfetchdCallback
+	callback MAPCALLBACK_OBJECTS, .FarfetchdCallback
 
 .FarfetchdCallback:
 	checkevent EVENT_GOT_HM01_CUT
@@ -414,13 +414,13 @@
 	itemball ETHER
 
 IlexForestHiddenEther:
-	dwb EVENT_ILEX_FOREST_HIDDEN_ETHER, ETHER
+	hiddenitem EVENT_ILEX_FOREST_HIDDEN_ETHER, ETHER
 
 IlexForestHiddenSuperPotion:
-	dwb EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION, SUPER_POTION
+	hiddenitem EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION, SUPER_POTION
 
 IlexForestHiddenFullHeal:
-	dwb EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL, FULL_HEAL
 
 IlexForestBoulder:
 ; unused
--- a/maps/IndigoPlateauPokecenter1F.asm
+++ b/maps/IndigoPlateauPokecenter1F.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .PrepareElite4
+	callback MAPCALLBACK_NEWMAP, .PrepareElite4
 
 .DummyScene:
 	end
--- a/maps/KarensRoom.asm
+++ b/maps/KarensRoom.asm
@@ -9,7 +9,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .KarensRoomDoors
+	callback MAPCALLBACK_TILES, .KarensRoomDoors
 
 .LockDoor:
 	priorityjump .KarensDoorLocksBehindYou
--- a/maps/KogasRoom.asm
+++ b/maps/KogasRoom.asm
@@ -9,7 +9,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .KogasRoomDoors
+	callback MAPCALLBACK_TILES, .KogasRoomDoors
 
 .LockDoor:
 	priorityjump .KogasDoorLocksBehindYou
--- a/maps/KrissHouse2F.asm
+++ b/maps/KrissHouse2F.asm
@@ -10,9 +10,10 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .InitializeRoom
-	dbw MAPCALLBACK_TILES, .SetSpawn
+	callback MAPCALLBACK_NEWMAP, .InitializeRoom
+	callback MAPCALLBACK_TILES, .SetSpawn
 
+; unused
 .Null:
 	end
 
@@ -20,11 +21,11 @@
 	special ToggleDecorationsVisibility
 	setevent EVENT_IN_YOUR_ROOM
 	checkevent EVENT_INITIALIZED_EVENTS
-	iftrue .SkipInizialization
+	iftrue .SkipInitialization
 	jumpstd initializeevents
 	return
 
-.SkipInizialization:
+.SkipInitialization:
 	return
 
 .SetSpawn:
@@ -46,7 +47,7 @@
 	describedecoration DECODESC_CONSOLE
 
 KrissHousePoster:
-	dw EVENT_KRISS_ROOM_POSTER, .Script
+	conditional_event EVENT_KRISS_ROOM_POSTER, .Script
 
 .Script:
 	describedecoration DECODESC_POSTER
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .KurtCallback
+	callback MAPCALLBACK_OBJECTS, .KurtCallback
 
 .KurtCallback:
 	checkevent EVENT_CLEARED_SLOWPOKE_WELL
--- a/maps/LakeOfRage.asm
+++ b/maps/LakeOfRage.asm
@@ -20,8 +20,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
-	dbw MAPCALLBACK_OBJECTS, .Wesley
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_OBJECTS, .Wesley
 
 .DummyScene0:
 	end
@@ -232,13 +232,13 @@
 	itemball TM_DETECT
 
 LakeOfRageHiddenFullRestore:
-	dwb EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 LakeOfRageHiddenRareCandy:
-	dwb EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
+	hiddenitem EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
 
 LakeOfRageHiddenMaxPotion:
-	dwb EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
 
 MovementData_0x70155:
 	teleport_from
--- a/maps/LancesRoom.asm
+++ b/maps/LancesRoom.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .LancesRoomDoors
+	callback MAPCALLBACK_TILES, .LancesRoomDoors
 
 .LockDoor:
 	priorityjump .LancesDoorLocksBehindYou
--- a/maps/LavenderTown.asm
+++ b/maps/LavenderTown.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_LAVENDER
--- a/maps/MahoganyMart1F.asm
+++ b/maps/MahoganyMart1F.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .MahoganyMart1FStaircase
+	callback MAPCALLBACK_TILES, .MahoganyMart1FStaircase
 
 .DummyScene0:
 	end
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .DummyScene0:
 	end
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -10,8 +10,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .DisappearMoonStone
-	dbw MAPCALLBACK_OBJECTS, .DisappearRock
+	callback MAPCALLBACK_NEWMAP, .DisappearMoonStone
+	callback MAPCALLBACK_OBJECTS, .DisappearRock
 
 .DummyScene:
 	end
@@ -75,7 +75,7 @@
 	end
 
 MountMoonSquareHiddenMoonStone:
-	dwb EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE, MOON_STONE
+	hiddenitem EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE, MOON_STONE
 
 DontLitterSign:
 	jumptext DontLitterSignText
--- a/maps/MountMortar1FInside.asm
+++ b/maps/MountMortar1FInside.asm
@@ -64,7 +64,7 @@
 	itemball ULTRA_BALL
 
 MountMortar1FInsideHiddenMaxRepel:
-	dwb EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL, MAX_REPEL
+	hiddenitem EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL, MAX_REPEL
 
 PokemaniacMillerSeenText:
 	text "I'm not losing"
--- a/maps/MountMortar1FOutside.asm
+++ b/maps/MountMortar1FOutside.asm
@@ -16,7 +16,7 @@
 	itemball REVIVE
 
 MountMortar1FOutsideHiddenHyperPotion:
-	dwb EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION, HYPER_POTION
+	hiddenitem EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION, HYPER_POTION
 
 MountMortar1FOutside_MapEventHeader:
 	; filler
--- a/maps/MountMortar2FInside.asm
+++ b/maps/MountMortar2FInside.asm
@@ -44,7 +44,7 @@
 	itemball ESCAPE_ROPE
 
 MountMortar2FInsideHiddenFullRestore:
-	dwb EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 SupernerdHughSeenText:
 	text "Yo! MARKUS!"
--- a/maps/MountMortarB1F.asm
+++ b/maps/MountMortarB1F.asm
@@ -72,7 +72,7 @@
 	itemball PP_UP
 
 MountMortarB1FHiddenMaxRevive:
-	dwb EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE, MAX_REVIVE
+	hiddenitem EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE, MAX_REVIVE
 
 UnknownText_0x7e24d:
 	text "Hey!"
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -305,7 +305,7 @@
 	itemball TM_DIG
 
 NationalParkHiddenFullHeal:
-	dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
 
 NationalParkLassText:
 	text "Look! Check out my"
--- a/maps/NationalParkBugContest.asm
+++ b/maps/NationalParkBugContest.asm
@@ -115,7 +115,7 @@
 	itemball TM_DIG
 
 NationalParkBugContestHiddenFullHeal:
-	dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
 
 UnknownText_0x5c94c:
 	text "DON: I'm going to"
--- a/maps/NewBarkTown.asm
+++ b/maps/NewBarkTown.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .DummyScene0:
 	end
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .DummyScene0:
 	end
--- a/maps/OlivineLighthouse5F.asm
+++ b/maps/OlivineLighthouse5F.asm
@@ -44,7 +44,7 @@
 	itemball TM_SWAGGER
 
 OlivineLighthouse5FHiddenHyperPotion:
-	dwb EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION, HYPER_POTION
+	hiddenitem EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION, HYPER_POTION
 
 SailorErnestSeenText:
 	text "I wanted to battle"
--- a/maps/OlivinePort.asm
+++ b/maps/OlivinePort.asm
@@ -234,7 +234,7 @@
 	end
 
 OlivinePortHiddenProtein:
-	dwb EVENT_OLIVINE_PORT_HIDDEN_PROTEIN, PROTEIN
+	hiddenitem EVENT_OLIVINE_PORT_HIDDEN_PROTEIN, PROTEIN
 
 MovementData_0x74a30:
 	step DOWN
--- a/maps/PalletTown.asm
+++ b/maps/PalletTown.asm
@@ -8,7 +8,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_PALLET
--- a/maps/PewterCity.asm
+++ b/maps/PewterCity.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_PEWTER
--- a/maps/RadioTower3F.asm
+++ b/maps/RadioTower3F.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .CardKeyShutterCallback
+	callback MAPCALLBACK_TILES, .CardKeyShutterCallback
 
 .CardKeyShutterCallback:
 	checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
--- a/maps/RockTunnel1F.asm
+++ b/maps/RockTunnel1F.asm
@@ -16,10 +16,10 @@
 	itemball TM_STEEL_WING
 
 RockTunnel1FHiddenXAccuracy:
-	dwb EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY, X_ACCURACY
+	hiddenitem EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY, X_ACCURACY
 
 RockTunnel1FHiddenXDefend:
-	dwb EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND, X_DEFEND
+	hiddenitem EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND, X_DEFEND
 
 RockTunnel1F_MapEventHeader:
 	; filler
--- a/maps/RockTunnelB1F.asm
+++ b/maps/RockTunnelB1F.asm
@@ -20,7 +20,7 @@
 	itemball REVIVE
 
 RockTunnelB1FHiddenMaxPotion:
-	dwb EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION, MAX_POTION
 
 RockTunnelB1F_MapEventHeader:
 	; filler
--- a/maps/Route11.asm
+++ b/maps/Route11.asm
@@ -63,7 +63,7 @@
 	fruittree FRUITTREE_ROUTE_11
 
 Route11HiddenRevive:
-	dwb EVENT_ROUTE_11_HIDDEN_REVIVE, REVIVE
+	hiddenitem EVENT_ROUTE_11_HIDDEN_REVIVE, REVIVE
 
 YoungsterOwenSeenText:
 	text "There's no cheat-"
--- a/maps/Route12.asm
+++ b/maps/Route12.asm
@@ -70,7 +70,7 @@
 	itemball NUGGET
 
 Route12HiddenElixer:
-	dwb EVENT_ROUTE_12_HIDDEN_ELIXER, ELIXER
+	hiddenitem EVENT_ROUTE_12_HIDDEN_ELIXER, ELIXER
 
 FisherMartinSeenText:
 	text "Patience is the"
--- a/maps/Route13.asm
+++ b/maps/Route13.asm
@@ -77,7 +77,7 @@
 	jumptext Route13DirectionsSignText
 
 Route13HiddenCalcium:
-	dwb EVENT_ROUTE_13_HIDDEN_CALCIUM, CALCIUM
+	hiddenitem EVENT_ROUTE_13_HIDDEN_CALCIUM, CALCIUM
 
 PokefanmAlexSeenText:
 	text "Bow down before my"
--- a/maps/Route16.asm
+++ b/maps/Route16.asm
@@ -4,7 +4,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .AlwaysOnBike
+	callback MAPCALLBACK_NEWMAP, .AlwaysOnBike
 
 .AlwaysOnBike:
 	checkcode VAR_YCOORD
--- a/maps/Route17.asm
+++ b/maps/Route17.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .AlwaysOnBike
+	callback MAPCALLBACK_NEWMAP, .AlwaysOnBike
 
 .AlwaysOnBike:
 	setflag ENGINE_ALWAYS_ON_BIKE
@@ -62,10 +62,10 @@
 	end
 
 Route17HiddenMaxEther:
-	dwb EVENT_ROUTE_17_HIDDEN_MAX_ETHER, MAX_ETHER
+	hiddenitem EVENT_ROUTE_17_HIDDEN_MAX_ETHER, MAX_ETHER
 
 Route17HiddenMaxElixer:
-	dwb EVENT_ROUTE_17_HIDDEN_MAX_ELIXER, MAX_ELIXER
+	hiddenitem EVENT_ROUTE_17_HIDDEN_MAX_ELIXER, MAX_ELIXER
 
 BikerRileySeenText:
 	text "Hey, you! You're"
--- a/maps/Route19.asm
+++ b/maps/Route19.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .ClearRocks
+	callback MAPCALLBACK_TILES, .ClearRocks
 
 .ClearRocks:
 	checkevent EVENT_CINNABAR_ROCKS_CLEARED
--- a/maps/Route2.asm
+++ b/maps/Route2.asm
@@ -70,16 +70,16 @@
 	fruittree FRUITTREE_ROUTE_2
 
 Route2HiddenMaxEther:
-	dwb EVENT_ROUTE_2_HIDDEN_MAX_ETHER, MAX_ETHER
+	hiddenitem EVENT_ROUTE_2_HIDDEN_MAX_ETHER, MAX_ETHER
 
 Route2HiddenFullHeal:
-	dwb EVENT_ROUTE_2_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_ROUTE_2_HIDDEN_FULL_HEAL, FULL_HEAL
 
 Route2HiddenFullRestore:
-	dwb EVENT_ROUTE_2_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_ROUTE_2_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 Route2HiddenRevive:
-	dwb EVENT_ROUTE_2_HIDDEN_REVIVE, REVIVE
+	hiddenitem EVENT_ROUTE_2_HIDDEN_REVIVE, REVIVE
 
 BugCatcherRobSeenText:
 	text "My bug #MON are"
--- a/maps/Route20.asm
+++ b/maps/Route20.asm
@@ -9,7 +9,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .ClearRocks
+	callback MAPCALLBACK_NEWMAP, .ClearRocks
 
 .ClearRocks:
 	setevent EVENT_CINNABAR_ROCKS_CLEARED
--- a/maps/Route23.asm
+++ b/maps/Route23.asm
@@ -4,7 +4,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_INDIGO_PLATEAU
--- a/maps/Route25.asm
+++ b/maps/Route25.asm
@@ -191,7 +191,7 @@
 	itemball PROTEIN
 
 Route25HiddenPotion:
-	dwb EVENT_ROUTE_25_HIDDEN_POTION, POTION
+	hiddenitem EVENT_ROUTE_25_HIDDEN_POTION, POTION
 
 MovementData_0x19efe8:
 	big_step DOWN
--- a/maps/Route28.asm
+++ b/maps/Route28.asm
@@ -9,7 +9,7 @@
 	jumptext Route28SignText
 
 Route28HiddenRareCandy:
-	dwb EVENT_ROUTE_28_HIDDEN_RARE_CANDY, RARE_CANDY
+	hiddenitem EVENT_ROUTE_28_HIDDEN_RARE_CANDY, RARE_CANDY
 
 Route28SignText:
 	text "ROUTE 28"
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -16,7 +16,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Tuscany
+	callback MAPCALLBACK_OBJECTS, .Tuscany
 
 .DummyScene0:
 	end
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -248,7 +248,7 @@
 	fruittree FRUITTREE_ROUTE_30_2
 
 Route30HiddenPotion:
-	dwb EVENT_ROUTE_30_HIDDEN_POTION, POTION
+	hiddenitem EVENT_ROUTE_30_HIDDEN_POTION, POTION
 
 Route30_JoeysRattataAttacksMovement:
 	fix_facing
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .CheckMomCall
+	callback MAPCALLBACK_NEWMAP, .CheckMomCall
 
 .CheckMomCall:
 	checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -23,7 +23,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Frieda
+	callback MAPCALLBACK_OBJECTS, .Frieda
 
 .DummyScene0:
 	end
@@ -506,10 +506,10 @@
 	jumpstd pokecentersign
 
 Route32HiddenGreatBall:
-	dwb EVENT_ROUTE_32_HIDDEN_GREAT_BALL, GREAT_BALL
+	hiddenitem EVENT_ROUTE_32_HIDDEN_GREAT_BALL, GREAT_BALL
 
 Route32HiddenSuperPotion:
-	dwb EVENT_ROUTE_32_HIDDEN_SUPER_POTION, SUPER_POTION
+	hiddenitem EVENT_ROUTE_32_HIDDEN_SUPER_POTION, SUPER_POTION
 
 Movement_Route32CooltrainerMPushesYouBackToViolet:
 	step UP
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -19,7 +19,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .EggCheckCallback
+	callback MAPCALLBACK_OBJECTS, .EggCheckCallback
 
 .EggCheckCallback:
 	checkflag ENGINE_DAY_CARE_MAN_HAS_EGG
@@ -488,10 +488,10 @@
 	itemball NUGGET
 
 Route34HiddenRareCandy:
-	dwb EVENT_ROUTE_34_HIDDEN_RARE_CANDY, RARE_CANDY
+	hiddenitem EVENT_ROUTE_34_HIDDEN_RARE_CANDY, RARE_CANDY
 
 Route34HiddenSuperPotion:
-	dwb EVENT_ROUTE_34_HIDDEN_SUPER_POTION, SUPER_POTION
+	hiddenitem EVENT_ROUTE_34_HIDDEN_SUPER_POTION, SUPER_POTION
 
 Route34MovementData_DayCareManWalksBackInside:
 	slow_step LEFT
--- a/maps/Route34IlexForestGate.asm
+++ b/maps/Route34IlexForestGate.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .IsForestRestless
+	callback MAPCALLBACK_OBJECTS, .IsForestRestless
 
 .IsForestRestless:
 	checkevent EVENT_FOREST_IS_RESTLESS
--- a/maps/Route35NationalParkGate.asm
+++ b/maps/Route35NationalParkGate.asm
@@ -12,8 +12,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
-	dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
+	callback MAPCALLBACK_NEWMAP, .CheckIfContestRunning
+	callback MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
 
 .DummyScene0:
 	end
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -17,7 +17,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .ArthurCallback
+	callback MAPCALLBACK_OBJECTS, .ArthurCallback
 
 .DummyScene0:
 	end
--- a/maps/Route36NationalParkGate.asm
+++ b/maps/Route36NationalParkGate.asm
@@ -21,8 +21,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning
-	dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
+	callback MAPCALLBACK_NEWMAP, .CheckIfContestRunning
+	callback MAPCALLBACK_OBJECTS, .CheckIfContestAvailable
 
 .DummyScene0:
 	end
--- a/maps/Route37.asm
+++ b/maps/Route37.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Sunny
+	callback MAPCALLBACK_OBJECTS, .Sunny
 
 .Sunny:
 	checkcode VAR_WEEKDAY
@@ -114,7 +114,7 @@
 	fruittree FRUITTREE_ROUTE_37_3
 
 Route37HiddenEther:
-	dwb EVENT_ROUTE_37_HIDDEN_ETHER, ETHER
+	hiddenitem EVENT_ROUTE_37_HIDDEN_ETHER, ETHER
 
 TwinsAnnandanne1SeenText:
 	text "ANN: ANNE and I"
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -180,7 +180,7 @@
 	fruittree FRUITTREE_ROUTE_39
 
 Route39HiddenNugget:
-	dwb EVENT_ROUTE_39_HIDDEN_NUGGET, NUGGET
+	hiddenitem EVENT_ROUTE_39_HIDDEN_NUGGET, NUGGET
 
 Route39MiltankText:
 	text "MILTANK: Mooo!"
--- a/maps/Route4.asm
+++ b/maps/Route4.asm
@@ -51,7 +51,7 @@
 	itemball HP_UP
 
 Route4HiddenUltraBall:
-	dwb EVENT_ROUTE_4_HIDDEN_ULTRA_BALL, ULTRA_BALL
+	hiddenitem EVENT_ROUTE_4_HIDDEN_ULTRA_BALL, ULTRA_BALL
 
 BirdKeeperHankSeenText:
 	text "I'm raising my"
--- a/maps/Route40.asm
+++ b/maps/Route40.asm
@@ -18,7 +18,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .MonicaCallback
+	callback MAPCALLBACK_OBJECTS, .MonicaCallback
 
 .MonicaCallback:
 	clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
@@ -135,7 +135,7 @@
 	jumpstd smashrock
 
 Route40HiddenHyperPotion:
-	dwb EVENT_ROUTE_40_HIDDEN_HYPER_POTION, HYPER_POTION
+	hiddenitem EVENT_ROUTE_40_HIDDEN_HYPER_POTION, HYPER_POTION
 
 MovementData_0x1a621c:
 	step RIGHT
--- a/maps/Route40BattleTowerGate.asm
+++ b/maps/Route40BattleTowerGate.asm
@@ -8,7 +8,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .ShowSailor
+	callback MAPCALLBACK_OBJECTS, .ShowSailor
 
 .ShowSailor:
 	clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
--- a/maps/Route41.asm
+++ b/maps/Route41.asm
@@ -132,7 +132,7 @@
 	jumpstd smashrock
 
 Route41HiddenMaxEther:
-	dwb EVENT_ROUTE_41_HIDDEN_MAX_ETHER, MAX_ETHER
+	hiddenitem EVENT_ROUTE_41_HIDDEN_MAX_ETHER, MAX_ETHER
 
 SwimmermCharlieSeenText:
 	text "The water's warm"
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -212,7 +212,7 @@
 	fruittree FRUITTREE_ROUTE_42_3
 
 Route42HiddenMaxPotion:
-	dwb EVENT_ROUTE_42_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_ROUTE_42_HIDDEN_MAX_POTION, MAX_POTION
 
 MovementData_0x1a9356:
 	set_sliding
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -14,7 +14,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .CheckIfRockets
+	callback MAPCALLBACK_NEWMAP, .CheckIfRockets
 
 .CheckIfRockets:
 	checkevent EVENT_CLEARED_ROCKET_HIDEOUT
--- a/maps/Route43Gate.asm
+++ b/maps/Route43Gate.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .CheckIfRockets
+	callback MAPCALLBACK_NEWMAP, .CheckIfRockets
 
 .RocketShakedown:
 	priorityjump .RocketTakeover
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -318,7 +318,7 @@
 	itemball MAX_REPEL
 
 Route44HiddenElixer:
-	dwb EVENT_ROUTE_44_HIDDEN_ELIXER, ELIXER
+	hiddenitem EVENT_ROUTE_44_HIDDEN_ELIXER, ELIXER
 
 FisherWilton1SeenText:
 	text "Aack! You made me"
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -312,7 +312,7 @@
 	itemball MAX_POTION
 
 Route45HiddenPpUp:
-	dwb EVENT_ROUTE_45_HIDDEN_PP_UP, PP_UP
+	hiddenitem EVENT_ROUTE_45_HIDDEN_PP_UP, PP_UP
 
 HikerErikSeenText:
 	text "Be prepared for"
--- a/maps/Route9.asm
+++ b/maps/Route9.asm
@@ -83,7 +83,7 @@
 	jumptext Route9SignText
 
 Route9HiddenEther:
-	dwb EVENT_ROUTE_9_HIDDEN_ETHER, ETHER
+	hiddenitem EVENT_ROUTE_9_HIDDEN_ETHER, ETHER
 
 CamperDeanSeenText:
 	text "I came to explore"
--- a/maps/RuinsOfAlphAerodactylChamber.asm
+++ b/maps/RuinsOfAlphAerodactylChamber.asm
@@ -6,7 +6,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .HiddenDoors
+	callback MAPCALLBACK_TILES, .HiddenDoors
 
 .CheckWall:
 	checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER
--- a/maps/RuinsOfAlphHoOhChamber.asm
+++ b/maps/RuinsOfAlphHoOhChamber.asm
@@ -6,7 +6,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .HiddenDoors
+	callback MAPCALLBACK_TILES, .HiddenDoors
 
 .CheckWall:
 	special SpecialHoOhChamber
--- a/maps/RuinsOfAlphKabutoChamber.asm
+++ b/maps/RuinsOfAlphKabutoChamber.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .HiddenDoors
+	callback MAPCALLBACK_TILES, .HiddenDoors
 
 .CheckWall:
 	checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
--- a/maps/RuinsOfAlphOmanyteChamber.asm
+++ b/maps/RuinsOfAlphOmanyteChamber.asm
@@ -6,7 +6,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .HiddenDoors
+	callback MAPCALLBACK_TILES, .HiddenDoors
 
 .CheckWall:
 	special SpecialOmanyteChamber
--- a/maps/RuinsOfAlphOutside.asm
+++ b/maps/RuinsOfAlphOutside.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .ScientistCallback
+	callback MAPCALLBACK_OBJECTS, .ScientistCallback
 
 .DummyScene0:
 	end
--- a/maps/RuinsOfAlphResearchCenter.asm
+++ b/maps/RuinsOfAlphResearchCenter.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .ScientistCallback
+	callback MAPCALLBACK_OBJECTS, .ScientistCallback
 
 .DummyScene0:
 	end
--- a/maps/SaffronCity.asm
+++ b/maps/SaffronCity.asm
@@ -14,7 +14,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_SAFFRON
--- a/maps/SilverCaveOutside.asm
+++ b/maps/SilverCaveOutside.asm
@@ -4,7 +4,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_SILVER_CAVE
@@ -17,7 +17,7 @@
 	jumptext MtSilverSignText
 
 SilverCaveOutsideHiddenFullRestore:
-	dwb EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 MtSilverSignText:
 	text "MT.SILVER"
--- a/maps/SilverCaveRoom1.asm
+++ b/maps/SilverCaveRoom1.asm
@@ -24,10 +24,10 @@
 	itemball ULTRA_BALL
 
 SilverCaveRoom1HiddenDireHit:
-	dwb EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT, DIRE_HIT
+	hiddenitem EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT, DIRE_HIT
 
 SilverCaveRoom1HiddenUltraBall:
-	dwb EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL, ULTRA_BALL
+	hiddenitem EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL, ULTRA_BALL
 
 SilverCaveRoom1_MapEventHeader:
 	; filler
--- a/maps/SilverCaveRoom2.asm
+++ b/maps/SilverCaveRoom2.asm
@@ -20,7 +20,7 @@
 	itemball PP_UP
 
 SilverCaveRoom2HiddenMaxPotion:
-	dwb EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION, MAX_POTION
 
 SilverCaveRoom2_MapEventHeader:
 	; filler
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -13,7 +13,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .HideSecurityGrunt
+	callback MAPCALLBACK_OBJECTS, .HideSecurityGrunt
 
 .DummyScene:
 	end
@@ -540,7 +540,7 @@
 	itemball GUARD_SPEC
 
 TeamRocketBaseB1FHiddenRevive:
-	dwb EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE, REVIVE
+	hiddenitem EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE, REVIVE
 
 SecurityCameraMovement1:
 	big_step RIGHT
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -24,7 +24,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .TransmitterDoorCallback
+	callback MAPCALLBACK_TILES, .TransmitterDoorCallback
 
 .DummyScene0:
 	end
@@ -315,7 +315,7 @@
 	end
 
 TeamRocketBaseB2FLockedDoor:
-	dw EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER, .Script
+	conditional_event EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER, .Script
 
 .Script:
 	opentext
@@ -356,7 +356,7 @@
 	itemball TM_THIEF
 
 TeamRocketBaseB2FHiddenFullHeal:
-	dwb EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL, FULL_HEAL
 
 MovementData_0x6d212:
 	step RIGHT
--- a/maps/TeamRocketBaseB3F.asm
+++ b/maps/TeamRocketBaseB3F.asm
@@ -24,7 +24,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .CheckGiovanniDoor
+	callback MAPCALLBACK_TILES, .CheckGiovanniDoor
 
 .LanceGetsPassword:
 	priorityjump LanceGetPasswordScript
@@ -174,7 +174,7 @@
 	end
 
 TeamRocketBaseB3FLockedDoor:
-	dw EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE, .Script
+	conditional_event EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE, .Script
 
 .Script:
 	opentext
--- a/maps/TimeCapsule.asm
+++ b/maps/TimeCapsule.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .SetWhichChris
+	callback MAPCALLBACK_OBJECTS, .SetWhichChris
 
 .InitializeTimeCapsule:
 	priorityjump .InitializeAndPreparePokecenter2F
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -18,8 +18,8 @@
 
 .MapCallbacks:
 	db 2
-	dbw MAPCALLBACK_OBJECTS, .NPCsCallback
-	dbw MAPCALLBACK_TILES, .StairsCallback
+	callback MAPCALLBACK_OBJECTS, .NPCsCallback
+	callback MAPCALLBACK_TILES, .StairsCallback
 
 .FaceSuicune:
 	priorityjump .SuicuneBattle
--- a/maps/TinTower4F.asm
+++ b/maps/TinTower4F.asm
@@ -20,7 +20,7 @@
 	itemball ESCAPE_ROPE
 
 TinTower4FHiddenMaxPotion:
-	dwb EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION, MAX_POTION
 
 TinTower4F_MapEventHeader:
 	; filler
--- a/maps/TinTower5F.asm
+++ b/maps/TinTower5F.asm
@@ -12,10 +12,10 @@
 	itemball RARE_CANDY
 
 TinTower5FHiddenFullRestore:
-	dwb EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 TinTower5FHiddenCarbos:
-	dwb EVENT_TIN_TOWER_5F_HIDDEN_CARBOS, CARBOS
+	hiddenitem EVENT_TIN_TOWER_5F_HIDDEN_CARBOS, CARBOS
 
 TinTower5F_MapEventHeader:
 	; filler
--- a/maps/TinTowerRoof.asm
+++ b/maps/TinTowerRoof.asm
@@ -7,7 +7,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .HoOh
+	callback MAPCALLBACK_OBJECTS, .HoOh
 
 .HoOh:
 	checkevent EVENT_FOUGHT_HO_OH
--- a/maps/TradeCenter.asm
+++ b/maps/TradeCenter.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .SetWhichChris
+	callback MAPCALLBACK_OBJECTS, .SetWhichChris
 
 .InitializeTradeCenter:
 	priorityjump .InitializeAndPreparePokecenter2F
--- a/maps/UndergroundPath.asm
+++ b/maps/UndergroundPath.asm
@@ -6,10 +6,10 @@
 	db 0
 
 UndergroundPathHiddenFullRestore:
-	dwb EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 UndergroundPathHiddenXSpecial:
-	dwb EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
+	hiddenitem EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
 
 UndergroundPath_MapEventHeader:
 	; filler
--- a/maps/UnionCaveB2F.asm
+++ b/maps/UnionCaveB2F.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Lapras
+	callback MAPCALLBACK_OBJECTS, .Lapras
 
 .Lapras:
 	checkflag ENGINE_UNION_CAVE_LAPRAS
--- a/maps/VermilionCity.asm
+++ b/maps/VermilionCity.asm
@@ -12,7 +12,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_VERMILION
@@ -123,7 +123,7 @@
 	jumpstd martsign
 
 VermilionCityHiddenFullHeal:
-	dwb EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL, FULL_HEAL
 
 VermilionCityTeacherText:
 	text "VERMILION PORT is"
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -11,7 +11,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .DummyScene0:
 	end
@@ -195,7 +195,7 @@
 	end
 
 VermilionPortHiddenIron:
-	dwb EVENT_VERMILION_PORT_HIDDEN_IRON, IRON
+	hiddenitem EVENT_VERMILION_PORT_HIDDEN_IRON, IRON
 
 MovementData_0x74ef1:
 	step DOWN
--- a/maps/VictoryRoad.asm
+++ b/maps/VictoryRoad.asm
@@ -112,10 +112,10 @@
 	itemball HP_UP
 
 VictoryRoadHiddenMaxPotion:
-	dwb EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION, MAX_POTION
+	hiddenitem EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION, MAX_POTION
 
 VictoryRoadHiddenFullHeal:
-	dwb EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL, FULL_HEAL
+	hiddenitem EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL, FULL_HEAL
 
 MovementData_0x74539:
 	step LEFT
--- a/maps/VioletCity.asm
+++ b/maps/VioletCity.asm
@@ -14,7 +14,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_VIOLET
@@ -98,7 +98,7 @@
 	fruittree FRUITTREE_VIOLET_CITY
 
 VioletCityHiddenHyperPotion:
-	dwb EVENT_VIOLET_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
+	hiddenitem EVENT_VIOLET_CITY_HIDDEN_HYPER_POTION, HYPER_POTION
 
 VioletCityFollowEarl_MovementData:
 	big_step DOWN
--- a/maps/ViridianCity.asm
+++ b/maps/ViridianCity.asm
@@ -10,7 +10,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_NEWMAP, .FlyPoint
+	callback MAPCALLBACK_NEWMAP, .FlyPoint
 
 .FlyPoint:
 	setflag ENGINE_FLYPOINT_VIRIDIAN
--- a/maps/WhirlIslandB1F.asm
+++ b/maps/WhirlIslandB1F.asm
@@ -32,13 +32,13 @@
 	jumpstd strengthboulder
 
 WhirlIslandB1FHiddenRareCandy:
-	dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY, RARE_CANDY
+	hiddenitem EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY, RARE_CANDY
 
 WhirlIslandB1FHiddenUltraBall:
-	dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
+	hiddenitem EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
 
 WhirlIslandB1FHiddenFullRestore:
-	dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE, FULL_RESTORE
+	hiddenitem EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE, FULL_RESTORE
 
 WhirlIslandB1F_MapEventHeader:
 	; filler
--- a/maps/WhirlIslandLugiaChamber.asm
+++ b/maps/WhirlIslandLugiaChamber.asm
@@ -7,7 +7,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .Lugia
+	callback MAPCALLBACK_OBJECTS, .Lugia
 
 .Lugia:
 	checkevent EVENT_FOUGHT_LUGIA
--- a/maps/WillsRoom.asm
+++ b/maps/WillsRoom.asm
@@ -9,7 +9,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_TILES, .WillsRoomDoors
+	callback MAPCALLBACK_TILES, .WillsRoomDoors
 
 .LockDoor:
 	priorityjump .WillsDoorLocksBehindYou
--- a/maps/WiseTriosRoom.asm
+++ b/maps/WiseTriosRoom.asm
@@ -14,7 +14,7 @@
 
 .MapCallbacks:
 	db 1
-	dbw MAPCALLBACK_OBJECTS, .WiseTrioCallback
+	callback MAPCALLBACK_OBJECTS, .WiseTrioCallback
 
 .DummyScene0:
 	end