shithub: pokecrystal

Download patch

ref: dd369f3199f6790bfff142754a8f0507a17e3276
parent: 11dc805de0118e8276936ad12a0222e88adbe336
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Wed Jul 22 16:24:53 EDT 2020

Move EngineFlags and SpecialsPointers into data/engine/

--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -1,4 +1,4 @@
-; EngineFlags indexes (see data/engine_flags.asm)
+; EngineFlags indexes (see data/events/engine_flags.asm)
 	const_def
 ; wPokegearFlags
 	const ENGINE_RADIO_CARD
--- a/data/engine_flags.asm
+++ /dev/null
@@ -1,199 +1,0 @@
-engine_flag: MACRO
-; location, bit
-; (all locations are in WRAM bank 1)
-	dwb \1 + (\2 / 8), 1 << (\2 % 8)
-ENDM
-
-EngineFlags:
-; entries correspond to ENGINE_* constants
-
-	; pokegear
-	engine_flag wPokegearFlags, POKEGEAR_RADIO_CARD_F
-	engine_flag wPokegearFlags, POKEGEAR_MAP_CARD_F
-	engine_flag wPokegearFlags, POKEGEAR_PHONE_CARD_F
-	engine_flag wPokegearFlags, POKEGEAR_EXPN_CARD_F
-	engine_flag wPokegearFlags, POKEGEAR_OBTAINED_F
-
-	; day-care
-	engine_flag wDayCareMan, DAYCAREMAN_HAS_EGG_F
-	engine_flag wDayCareMan, DAYCAREMAN_HAS_MON_F
-	engine_flag wDayCareLady, DAYCARELADY_HAS_MON_F
-
-	engine_flag wMomSavingMoney, MOM_SAVING_SOME_MONEY_F
-	engine_flag wMomSavingMoney, MOM_ACTIVE_F
-
-	engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
-
-	engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
-	engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
-	engine_flag wStatusFlags, STATUSFLAGS_CAUGHT_POKERUS_F
-	engine_flag wStatusFlags, STATUSFLAGS_ROCKET_SIGNAL_F
-	engine_flag wStatusFlags, STATUSFLAGS_HALL_OF_FAME_F
-	engine_flag wStatusFlags, STATUSFLAGS_MAIN_MENU_MOBILE_CHOICES_F
-
-	engine_flag wStatusFlags2, STATUSFLAGS2_BUG_CONTEST_TIMER_F
-	engine_flag wStatusFlags2, STATUSFLAGS2_SAFARI_GAME_F
-	engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F
-	engine_flag wStatusFlags2, STATUSFLAGS2_BIKE_SHOP_CALL_F
-	engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_5_F
-	engine_flag wStatusFlags2, STATUSFLAGS2_REACHED_GOLDENROD_F
-	engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F
-
-	engine_flag wBikeFlags, BIKEFLAGS_STRENGTH_ACTIVE_F
-	engine_flag wBikeFlags, BIKEFLAGS_ALWAYS_ON_BIKE_F
-	engine_flag wBikeFlags, BIKEFLAGS_DOWNHILL_F
-
-	engine_flag wJohtoBadges, ZEPHYRBADGE
-	engine_flag wJohtoBadges, HIVEBADGE
-	engine_flag wJohtoBadges, PLAINBADGE
-	engine_flag wJohtoBadges, FOGBADGE
-	engine_flag wJohtoBadges, MINERALBADGE
-	engine_flag wJohtoBadges, STORMBADGE
-	engine_flag wJohtoBadges, GLACIERBADGE
-	engine_flag wJohtoBadges, RISINGBADGE
-
-	engine_flag wKantoBadges, BOULDERBADGE
-	engine_flag wKantoBadges, CASCADEBADGE
-	engine_flag wKantoBadges, THUNDERBADGE
-	engine_flag wKantoBadges, RAINBOWBADGE
-	engine_flag wKantoBadges, SOULBADGE
-	engine_flag wKantoBadges, MARSHBADGE
-	engine_flag wKantoBadges, VOLCANOBADGE
-	engine_flag wKantoBadges, EARTHBADGE
-
-	; unown sets (see data/wild/unlocked_unowns.asm)
-	engine_flag wUnlockedUnowns, 0 ; A-K
-	engine_flag wUnlockedUnowns, 1 ; L-R
-	engine_flag wUnlockedUnowns, 2 ; S-W
-	engine_flag wUnlockedUnowns, 3 ; X-Z
-	engine_flag wUnlockedUnowns, 4 ; unused
-	engine_flag wUnlockedUnowns, 5 ; unused
-	engine_flag wUnlockedUnowns, 6 ; unused
-	engine_flag wUnlockedUnowns, 7 ; unused
-
-	; fly
-	engine_flag wVisitedSpawns, SPAWN_HOME
-	engine_flag wVisitedSpawns, SPAWN_DEBUG
-	engine_flag wVisitedSpawns, SPAWN_PALLET
-	engine_flag wVisitedSpawns, SPAWN_VIRIDIAN
-	engine_flag wVisitedSpawns, SPAWN_PEWTER
-	engine_flag wVisitedSpawns, SPAWN_CERULEAN
-	engine_flag wVisitedSpawns, SPAWN_ROCK_TUNNEL
-	engine_flag wVisitedSpawns, SPAWN_VERMILION
-	engine_flag wVisitedSpawns, SPAWN_LAVENDER
-	engine_flag wVisitedSpawns, SPAWN_SAFFRON
-	engine_flag wVisitedSpawns, SPAWN_CELADON
-	engine_flag wVisitedSpawns, SPAWN_FUCHSIA
-	engine_flag wVisitedSpawns, SPAWN_CINNABAR
-	engine_flag wVisitedSpawns, SPAWN_INDIGO
-	engine_flag wVisitedSpawns, SPAWN_NEW_BARK
-	engine_flag wVisitedSpawns, SPAWN_CHERRYGROVE
-	engine_flag wVisitedSpawns, SPAWN_VIOLET
-	engine_flag wVisitedSpawns, SPAWN_AZALEA
-	engine_flag wVisitedSpawns, SPAWN_CIANWOOD
-	engine_flag wVisitedSpawns, SPAWN_GOLDENROD
-	engine_flag wVisitedSpawns, SPAWN_OLIVINE
-	engine_flag wVisitedSpawns, SPAWN_ECRUTEAK
-	engine_flag wVisitedSpawns, SPAWN_MAHOGANY
-	engine_flag wVisitedSpawns, SPAWN_LAKE_OF_RAGE
-	engine_flag wVisitedSpawns, SPAWN_BLACKTHORN
-	engine_flag wVisitedSpawns, SPAWN_MT_SILVER
-	engine_flag wVisitedSpawns, NUM_SPAWNS ; unused
-
-	engine_flag wLuckyNumberShowFlag, LUCKYNUMBERSHOW_GAME_OVER_F
-
-	engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_3_F
-
-	engine_flag wDailyFlags1, DAILYFLAGS1_KURT_MAKING_BALLS_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_BUG_CONTEST_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_FISH_SWARM_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_TIME_CAPSULE_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_ALL_FRUIT_TREES_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_GOT_SHUCKIE_TODAY_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F
-	engine_flag wDailyFlags1, DAILYFLAGS1_TRAINER_HOUSE_F
-
-	engine_flag wDailyFlags2, DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_UNION_CAVE_LAPRAS_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_DAISYS_GROOMING_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_MOVE_TUTOR_F
-	engine_flag wDailyFlags2, DAILYFLAGS2_BUENAS_PASSWORD_F
-
-	engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F
-	engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F
-
-	engine_flag wGameTimerPause, GAMETIMERPAUSE_MOBILE_7_F
-
-	engine_flag wPlayerGender, PLAYERGENDER_FEMALE_F
-
-	engine_flag wCelebiEvent, CELEBIEVENT_FOREST_IS_RESTLESS_F
-
-	; rematches
-	engine_flag wDailyRematchFlags,  0 ; jack
-	engine_flag wDailyRematchFlags,  1 ; huey
-	engine_flag wDailyRematchFlags,  2 ; gaven
-	engine_flag wDailyRematchFlags,  3 ; beth
-	engine_flag wDailyRematchFlags,  4 ; jose
-	engine_flag wDailyRematchFlags,  5 ; reena
-	engine_flag wDailyRematchFlags,  6 ; joey
-	engine_flag wDailyRematchFlags,  7 ; wade
-	engine_flag wDailyRematchFlags,  8 ; ralph
-	engine_flag wDailyRematchFlags,  9 ; liz
-	engine_flag wDailyRematchFlags, 10 ; anthony
-	engine_flag wDailyRematchFlags, 11 ; todd
-	engine_flag wDailyRematchFlags, 12 ; gina
-	engine_flag wDailyRematchFlags, 13 ; arnie
-	engine_flag wDailyRematchFlags, 14 ; alan
-	engine_flag wDailyRematchFlags, 15 ; dana
-	engine_flag wDailyRematchFlags, 16 ; chad
-	engine_flag wDailyRematchFlags, 17 ; tully
-	engine_flag wDailyRematchFlags, 18 ; brent
-	engine_flag wDailyRematchFlags, 19 ; tiffany
-	engine_flag wDailyRematchFlags, 20 ; vance
-	engine_flag wDailyRematchFlags, 21 ; wilton
-	engine_flag wDailyRematchFlags, 22 ; parry
-	engine_flag wDailyRematchFlags, 23 ; erin
-
-	engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
-	engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
-	engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see EVENT_WADE_HAS_*** in constants/event_flags.asm)
-	engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone
-	engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone
-	engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
-	engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget
-	engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
-	engine_flag wDailyPhoneItemFlags, 8 ; tiffany has pink bow
-	engine_flag wDailyPhoneItemFlags, 9 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
-
-	engine_flag wDailyPhoneTimeOfDayFlags,  0 ; jack
-	engine_flag wDailyPhoneTimeOfDayFlags,  1 ; huey
-	engine_flag wDailyPhoneTimeOfDayFlags,  2 ; gaven
-	engine_flag wDailyPhoneTimeOfDayFlags,  3 ; beth
-	engine_flag wDailyPhoneTimeOfDayFlags,  4 ; jose
-	engine_flag wDailyPhoneTimeOfDayFlags,  5 ; reena
-	engine_flag wDailyPhoneTimeOfDayFlags,  6 ; joey
-	engine_flag wDailyPhoneTimeOfDayFlags,  7 ; wade
-	engine_flag wDailyPhoneTimeOfDayFlags,  8 ; ralph
-	engine_flag wDailyPhoneTimeOfDayFlags,  9 ; liz
-	engine_flag wDailyPhoneTimeOfDayFlags, 10 ; anthony
-	engine_flag wDailyPhoneTimeOfDayFlags, 11 ; todd
-	engine_flag wDailyPhoneTimeOfDayFlags, 12 ; gina
-	engine_flag wDailyPhoneTimeOfDayFlags, 13 ; arnie
-	engine_flag wDailyPhoneTimeOfDayFlags, 14 ; alan
-	engine_flag wDailyPhoneTimeOfDayFlags, 15 ; dana
-	engine_flag wDailyPhoneTimeOfDayFlags, 16 ; chad
-	engine_flag wDailyPhoneTimeOfDayFlags, 17 ; tully
-	engine_flag wDailyPhoneTimeOfDayFlags, 18 ; brent
-	engine_flag wDailyPhoneTimeOfDayFlags, 19 ; tiffany
-	engine_flag wDailyPhoneTimeOfDayFlags, 20 ; vance
-	engine_flag wDailyPhoneTimeOfDayFlags, 21 ; wilton
-	engine_flag wDailyPhoneTimeOfDayFlags, 22 ; parry
-	engine_flag wDailyPhoneTimeOfDayFlags, 23 ; erin
-
-	engine_flag wPlayerSpriteSetupFlags, PLAYERSPRITESETUP_FEMALE_TO_MALE_F
-
-	engine_flag wSwarmFlags, SWARMFLAGS_DUNSPARCE_SWARM_F
-	engine_flag wSwarmFlags, SWARMFLAGS_YANMA_SWARM_F
--- /dev/null
+++ b/data/events/engine_flags.asm
@@ -1,0 +1,199 @@
+engine_flag: MACRO
+; location, bit
+; (all locations are in WRAM bank 1)
+	dwb \1 + (\2 / 8), 1 << (\2 % 8)
+ENDM
+
+EngineFlags:
+; entries correspond to ENGINE_* constants
+
+	; pokegear
+	engine_flag wPokegearFlags, POKEGEAR_RADIO_CARD_F
+	engine_flag wPokegearFlags, POKEGEAR_MAP_CARD_F
+	engine_flag wPokegearFlags, POKEGEAR_PHONE_CARD_F
+	engine_flag wPokegearFlags, POKEGEAR_EXPN_CARD_F
+	engine_flag wPokegearFlags, POKEGEAR_OBTAINED_F
+
+	; day-care
+	engine_flag wDayCareMan, DAYCAREMAN_HAS_EGG_F
+	engine_flag wDayCareMan, DAYCAREMAN_HAS_MON_F
+	engine_flag wDayCareLady, DAYCARELADY_HAS_MON_F
+
+	engine_flag wMomSavingMoney, MOM_SAVING_SOME_MONEY_F
+	engine_flag wMomSavingMoney, MOM_ACTIVE_F
+
+	engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer
+
+	engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F
+	engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F
+	engine_flag wStatusFlags, STATUSFLAGS_CAUGHT_POKERUS_F
+	engine_flag wStatusFlags, STATUSFLAGS_ROCKET_SIGNAL_F
+	engine_flag wStatusFlags, STATUSFLAGS_HALL_OF_FAME_F
+	engine_flag wStatusFlags, STATUSFLAGS_MAIN_MENU_MOBILE_CHOICES_F
+
+	engine_flag wStatusFlags2, STATUSFLAGS2_BUG_CONTEST_TIMER_F
+	engine_flag wStatusFlags2, STATUSFLAGS2_SAFARI_GAME_F
+	engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F
+	engine_flag wStatusFlags2, STATUSFLAGS2_BIKE_SHOP_CALL_F
+	engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_5_F
+	engine_flag wStatusFlags2, STATUSFLAGS2_REACHED_GOLDENROD_F
+	engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F
+
+	engine_flag wBikeFlags, BIKEFLAGS_STRENGTH_ACTIVE_F
+	engine_flag wBikeFlags, BIKEFLAGS_ALWAYS_ON_BIKE_F
+	engine_flag wBikeFlags, BIKEFLAGS_DOWNHILL_F
+
+	engine_flag wJohtoBadges, ZEPHYRBADGE
+	engine_flag wJohtoBadges, HIVEBADGE
+	engine_flag wJohtoBadges, PLAINBADGE
+	engine_flag wJohtoBadges, FOGBADGE
+	engine_flag wJohtoBadges, MINERALBADGE
+	engine_flag wJohtoBadges, STORMBADGE
+	engine_flag wJohtoBadges, GLACIERBADGE
+	engine_flag wJohtoBadges, RISINGBADGE
+
+	engine_flag wKantoBadges, BOULDERBADGE
+	engine_flag wKantoBadges, CASCADEBADGE
+	engine_flag wKantoBadges, THUNDERBADGE
+	engine_flag wKantoBadges, RAINBOWBADGE
+	engine_flag wKantoBadges, SOULBADGE
+	engine_flag wKantoBadges, MARSHBADGE
+	engine_flag wKantoBadges, VOLCANOBADGE
+	engine_flag wKantoBadges, EARTHBADGE
+
+	; unown sets (see data/wild/unlocked_unowns.asm)
+	engine_flag wUnlockedUnowns, 0 ; A-K
+	engine_flag wUnlockedUnowns, 1 ; L-R
+	engine_flag wUnlockedUnowns, 2 ; S-W
+	engine_flag wUnlockedUnowns, 3 ; X-Z
+	engine_flag wUnlockedUnowns, 4 ; unused
+	engine_flag wUnlockedUnowns, 5 ; unused
+	engine_flag wUnlockedUnowns, 6 ; unused
+	engine_flag wUnlockedUnowns, 7 ; unused
+
+	; fly
+	engine_flag wVisitedSpawns, SPAWN_HOME
+	engine_flag wVisitedSpawns, SPAWN_DEBUG
+	engine_flag wVisitedSpawns, SPAWN_PALLET
+	engine_flag wVisitedSpawns, SPAWN_VIRIDIAN
+	engine_flag wVisitedSpawns, SPAWN_PEWTER
+	engine_flag wVisitedSpawns, SPAWN_CERULEAN
+	engine_flag wVisitedSpawns, SPAWN_ROCK_TUNNEL
+	engine_flag wVisitedSpawns, SPAWN_VERMILION
+	engine_flag wVisitedSpawns, SPAWN_LAVENDER
+	engine_flag wVisitedSpawns, SPAWN_SAFFRON
+	engine_flag wVisitedSpawns, SPAWN_CELADON
+	engine_flag wVisitedSpawns, SPAWN_FUCHSIA
+	engine_flag wVisitedSpawns, SPAWN_CINNABAR
+	engine_flag wVisitedSpawns, SPAWN_INDIGO
+	engine_flag wVisitedSpawns, SPAWN_NEW_BARK
+	engine_flag wVisitedSpawns, SPAWN_CHERRYGROVE
+	engine_flag wVisitedSpawns, SPAWN_VIOLET
+	engine_flag wVisitedSpawns, SPAWN_AZALEA
+	engine_flag wVisitedSpawns, SPAWN_CIANWOOD
+	engine_flag wVisitedSpawns, SPAWN_GOLDENROD
+	engine_flag wVisitedSpawns, SPAWN_OLIVINE
+	engine_flag wVisitedSpawns, SPAWN_ECRUTEAK
+	engine_flag wVisitedSpawns, SPAWN_MAHOGANY
+	engine_flag wVisitedSpawns, SPAWN_LAKE_OF_RAGE
+	engine_flag wVisitedSpawns, SPAWN_BLACKTHORN
+	engine_flag wVisitedSpawns, SPAWN_MT_SILVER
+	engine_flag wVisitedSpawns, NUM_SPAWNS ; unused
+
+	engine_flag wLuckyNumberShowFlag, LUCKYNUMBERSHOW_GAME_OVER_F
+
+	engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_3_F
+
+	engine_flag wDailyFlags1, DAILYFLAGS1_KURT_MAKING_BALLS_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_BUG_CONTEST_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_FISH_SWARM_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_TIME_CAPSULE_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_ALL_FRUIT_TREES_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_GOT_SHUCKIE_TODAY_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F
+	engine_flag wDailyFlags1, DAILYFLAGS1_TRAINER_HOUSE_F
+
+	engine_flag wDailyFlags2, DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_UNION_CAVE_LAPRAS_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_DAISYS_GROOMING_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_MOVE_TUTOR_F
+	engine_flag wDailyFlags2, DAILYFLAGS2_BUENAS_PASSWORD_F
+
+	engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F
+	engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F
+
+	engine_flag wGameTimerPause, GAMETIMERPAUSE_MOBILE_7_F
+
+	engine_flag wPlayerGender, PLAYERGENDER_FEMALE_F
+
+	engine_flag wCelebiEvent, CELEBIEVENT_FOREST_IS_RESTLESS_F
+
+	; rematches
+	engine_flag wDailyRematchFlags,  0 ; jack
+	engine_flag wDailyRematchFlags,  1 ; huey
+	engine_flag wDailyRematchFlags,  2 ; gaven
+	engine_flag wDailyRematchFlags,  3 ; beth
+	engine_flag wDailyRematchFlags,  4 ; jose
+	engine_flag wDailyRematchFlags,  5 ; reena
+	engine_flag wDailyRematchFlags,  6 ; joey
+	engine_flag wDailyRematchFlags,  7 ; wade
+	engine_flag wDailyRematchFlags,  8 ; ralph
+	engine_flag wDailyRematchFlags,  9 ; liz
+	engine_flag wDailyRematchFlags, 10 ; anthony
+	engine_flag wDailyRematchFlags, 11 ; todd
+	engine_flag wDailyRematchFlags, 12 ; gina
+	engine_flag wDailyRematchFlags, 13 ; arnie
+	engine_flag wDailyRematchFlags, 14 ; alan
+	engine_flag wDailyRematchFlags, 15 ; dana
+	engine_flag wDailyRematchFlags, 16 ; chad
+	engine_flag wDailyRematchFlags, 17 ; tully
+	engine_flag wDailyRematchFlags, 18 ; brent
+	engine_flag wDailyRematchFlags, 19 ; tiffany
+	engine_flag wDailyRematchFlags, 20 ; vance
+	engine_flag wDailyRematchFlags, 21 ; wilton
+	engine_flag wDailyRematchFlags, 22 ; parry
+	engine_flag wDailyRematchFlags, 23 ; erin
+
+	engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
+	engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
+	engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see EVENT_WADE_HAS_*** in constants/event_flags.asm)
+	engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone
+	engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone
+	engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
+	engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget
+	engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
+	engine_flag wDailyPhoneItemFlags, 8 ; tiffany has pink bow
+	engine_flag wDailyPhoneItemFlags, 9 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm)
+
+	engine_flag wDailyPhoneTimeOfDayFlags,  0 ; jack
+	engine_flag wDailyPhoneTimeOfDayFlags,  1 ; huey
+	engine_flag wDailyPhoneTimeOfDayFlags,  2 ; gaven
+	engine_flag wDailyPhoneTimeOfDayFlags,  3 ; beth
+	engine_flag wDailyPhoneTimeOfDayFlags,  4 ; jose
+	engine_flag wDailyPhoneTimeOfDayFlags,  5 ; reena
+	engine_flag wDailyPhoneTimeOfDayFlags,  6 ; joey
+	engine_flag wDailyPhoneTimeOfDayFlags,  7 ; wade
+	engine_flag wDailyPhoneTimeOfDayFlags,  8 ; ralph
+	engine_flag wDailyPhoneTimeOfDayFlags,  9 ; liz
+	engine_flag wDailyPhoneTimeOfDayFlags, 10 ; anthony
+	engine_flag wDailyPhoneTimeOfDayFlags, 11 ; todd
+	engine_flag wDailyPhoneTimeOfDayFlags, 12 ; gina
+	engine_flag wDailyPhoneTimeOfDayFlags, 13 ; arnie
+	engine_flag wDailyPhoneTimeOfDayFlags, 14 ; alan
+	engine_flag wDailyPhoneTimeOfDayFlags, 15 ; dana
+	engine_flag wDailyPhoneTimeOfDayFlags, 16 ; chad
+	engine_flag wDailyPhoneTimeOfDayFlags, 17 ; tully
+	engine_flag wDailyPhoneTimeOfDayFlags, 18 ; brent
+	engine_flag wDailyPhoneTimeOfDayFlags, 19 ; tiffany
+	engine_flag wDailyPhoneTimeOfDayFlags, 20 ; vance
+	engine_flag wDailyPhoneTimeOfDayFlags, 21 ; wilton
+	engine_flag wDailyPhoneTimeOfDayFlags, 22 ; parry
+	engine_flag wDailyPhoneTimeOfDayFlags, 23 ; erin
+
+	engine_flag wPlayerSpriteSetupFlags, PLAYERSPRITESETUP_FEMALE_TO_MALE_F
+
+	engine_flag wSwarmFlags, SWARMFLAGS_DUNSPARCE_SWARM_F
+	engine_flag wSwarmFlags, SWARMFLAGS_YANMA_SWARM_F
--- /dev/null
+++ b/data/events/special_pointers.asm
@@ -1,0 +1,184 @@
+; Special routines can be used with the "special" map script command.
+; They often use wScriptVar for arguments and return values.
+
+add_special: MACRO
+\1Special::
+	dba \1
+ENDM
+
+SpecialsPointers::
+	add_special WarpToSpawnPoint
+
+; Communications
+	add_special SetBitsForLinkTradeRequest
+	add_special WaitForLinkedFriend
+	add_special CheckLinkTimeout
+	add_special TryQuickSave
+	add_special CheckBothSelectedSameRoom
+	add_special FailedLinkToPast
+	add_special CloseLink
+	add_special WaitForOtherPlayerToExit
+	add_special SetBitsForBattleRequest
+	add_special SetBitsForTimeCapsuleRequest
+	add_special CheckTimeCapsuleCompatibility
+	add_special EnterTimeCapsule
+	add_special TradeCenter
+	add_special Colosseum
+	add_special TimeCapsule
+	add_special CableClubCheckWhichChris
+	add_special CheckMysteryGift
+	add_special GetMysteryGiftItem
+	add_special UnlockMysteryGift
+
+; Map events
+	add_special BugContestJudging
+	add_special CheckPartyFullAfterContest
+	add_special ContestDropOffMons
+	add_special ContestReturnMons
+	add_special GiveParkBalls
+	add_special CheckMagikarpLength
+	add_special MagikarpHouseSign
+	add_special HealParty ; this is both a special and a predef
+	add_special PokemonCenterPC
+	add_special PlayersHousePC
+	add_special DayCareMan
+	add_special DayCareLady
+	add_special DayCareManOutside
+	add_special MoveDeletion
+	add_special BankOfMom
+	add_special MagnetTrain
+	add_special NameRival
+	add_special SetDayOfWeek
+	add_special OverworldTownMap
+	add_special UnownPrinter
+	add_special MapRadio
+	add_special UnownPuzzle
+	add_special SlotMachine
+	add_special CardFlip
+	add_special DummyNonfunctionalGameCornerGame
+	add_special ClearBGPalettesBufferScreen
+	add_special FadeOutPalettes
+	add_special BattleTowerFade
+	add_special FadeBlackQuickly
+	add_special FadeInPalettes
+	add_special FadeInQuickly
+	add_special ReloadSpritesNoPalettes ; bank 0
+	add_special ClearBGPalettes ; bank 0
+	add_special UpdateTimePals ; bank 0
+	add_special ClearTilemap ; bank 0
+	add_special UpdateSprites ; bank 0
+	add_special UpdatePlayerSprite ; bank 0
+	add_special GameCornerPrizeMonCheckDex
+	add_special UnusedSetSeenMon
+	add_special WaitSFX ; bank 0
+	add_special PlayMapMusic ; bank 0
+	add_special RestartMapMusic ; bank 0
+	add_special HealMachineAnim
+	add_special SurfStartStep
+	add_special FindPartyMonAboveLevel
+	add_special FindPartyMonAtLeastThatHappy
+	add_special FindPartyMonThatSpecies
+	add_special FindPartyMonThatSpeciesYourTrainerID
+	add_special UnusedCheckUnusedTwoDayTimer
+	add_special DayCareMon1
+	add_special DayCareMon2
+	add_special SelectRandomBugContestContestants
+	add_special ActivateFishingSwarm
+	add_special ToggleMaptileDecorations
+	add_special ToggleDecorationsVisibility
+	add_special GiveShuckle
+	add_special ReturnShuckle
+	add_special BillsGrandfather
+	add_special CheckPokerus
+	add_special DisplayCoinCaseBalance
+	add_special DisplayMoneyAndCoinBalance
+	add_special PlaceMoneyTopRight
+	add_special CheckForLuckyNumberWinners
+	add_special CheckLuckyNumberShowFlag
+	add_special ResetLuckyNumberShowFlag
+	add_special PrintTodaysLuckyNumber
+	add_special SelectApricornForKurt
+	add_special NameRater
+	add_special DisplayLinkRecord
+	add_special GetFirstPokemonHappiness
+	add_special CheckFirstMonIsEgg
+	add_special RandomUnseenWildMon
+	add_special RandomPhoneWildMon
+	add_special RandomPhoneMon
+	add_special LoadUsedSpritesGFX
+	add_special PlaySlowCry
+	add_special SnorlaxAwake
+	add_special OlderHaircutBrother
+	add_special YoungerHaircutBrother
+	add_special DaisysGrooming
+	add_special PlayCurMonCry
+	add_special ProfOaksPCBoot
+	add_special GameboyCheck
+	add_special TrainerHouse
+	add_special PhotoStudio
+	add_special InitRoamMons
+	add_special FadeOutMusic
+	add_special Diploma
+	add_special PrintDiploma
+
+; Crystal only
+	add_special Function11ac3e
+	add_special Function11b444
+	add_special Function11b5e8
+	add_special Function11b7e5
+	add_special Function11b879
+	add_special Function11b920
+	add_special Function11b93b
+	add_special BattleTowerRoomMenu
+	add_special Function1700ba
+	add_special Function170114
+	add_special BattleTowerBattle
+	add_special Function1704e1
+	add_special DummySpecial_17021d
+	add_special LoadOpponentTrainerAndPokemonWithOTSprite
+	add_special Function11ba38
+	add_special CheckForBattleTowerRules
+	add_special GiveOddEgg
+	add_special Reset ; bank 0
+	add_special Function1011f1
+	add_special Function101220
+	add_special Function101225
+	add_special Function101231
+	add_special MoveTutor
+	add_special OmanyteChamber
+	add_special Function11c1ab
+	add_special BattleTowerAction
+	add_special DisplayUnownWords
+	add_special Menu_ChallengeExplanationCancel
+	add_special Function17d2b6
+	add_special Function17d2ce
+	add_special BattleTowerMobileError
+	add_special AskMobileOrCable
+	add_special HoOhChamber
+	add_special Function102142
+	add_special CelebiShrineEvent
+	add_special CheckCaughtCelebi
+	add_special PokeSeer
+	add_special BuenasPassword
+	add_special BuenaPrize
+	add_special GiveDratini
+	add_special SampleKenjiBreakCountdown
+	add_special BeastsCheck
+	add_special MonCheck
+	add_special SetPlayerPalette
+	add_special DummySpecial_170bd2
+	add_special Mobile_SelectThreeMons
+	add_special Function1037eb
+	add_special Function10383c
+	add_special StubbedTrainerRankings_Healings
+	add_special RefreshSprites
+	add_special Function1037c2
+	add_special Mobile_DummyReturnFalse
+	add_special Function103780
+	add_special Function10387b
+	add_special AskRememberPassword
+	add_special LoadMapPalettes
+	add_special UnusedFindItemInPCOrBag
+	add_special InitialSetDSTFlag
+	add_special InitialClearDSTFlag
+	add_special DummySpecial_c224
--- a/data/special_pointers.asm
+++ /dev/null
@@ -1,184 +1,0 @@
-; Special routines can be used with the "special" map script command.
-; They often use wScriptVar for arguments and return values.
-
-add_special: MACRO
-\1Special::
-	dba \1
-ENDM
-
-SpecialsPointers::
-	add_special WarpToSpawnPoint
-
-; Communications
-	add_special SetBitsForLinkTradeRequest
-	add_special WaitForLinkedFriend
-	add_special CheckLinkTimeout
-	add_special TryQuickSave
-	add_special CheckBothSelectedSameRoom
-	add_special FailedLinkToPast
-	add_special CloseLink
-	add_special WaitForOtherPlayerToExit
-	add_special SetBitsForBattleRequest
-	add_special SetBitsForTimeCapsuleRequest
-	add_special CheckTimeCapsuleCompatibility
-	add_special EnterTimeCapsule
-	add_special TradeCenter
-	add_special Colosseum
-	add_special TimeCapsule
-	add_special CableClubCheckWhichChris
-	add_special CheckMysteryGift
-	add_special GetMysteryGiftItem
-	add_special UnlockMysteryGift
-
-; Map events
-	add_special BugContestJudging
-	add_special CheckPartyFullAfterContest
-	add_special ContestDropOffMons
-	add_special ContestReturnMons
-	add_special GiveParkBalls
-	add_special CheckMagikarpLength
-	add_special MagikarpHouseSign
-	add_special HealParty ; this is both a special and a predef
-	add_special PokemonCenterPC
-	add_special PlayersHousePC
-	add_special DayCareMan
-	add_special DayCareLady
-	add_special DayCareManOutside
-	add_special MoveDeletion
-	add_special BankOfMom
-	add_special MagnetTrain
-	add_special NameRival
-	add_special SetDayOfWeek
-	add_special OverworldTownMap
-	add_special UnownPrinter
-	add_special MapRadio
-	add_special UnownPuzzle
-	add_special SlotMachine
-	add_special CardFlip
-	add_special DummyNonfunctionalGameCornerGame
-	add_special ClearBGPalettesBufferScreen
-	add_special FadeOutPalettes
-	add_special BattleTowerFade
-	add_special FadeBlackQuickly
-	add_special FadeInPalettes
-	add_special FadeInQuickly
-	add_special ReloadSpritesNoPalettes ; bank 0
-	add_special ClearBGPalettes ; bank 0
-	add_special UpdateTimePals ; bank 0
-	add_special ClearTilemap ; bank 0
-	add_special UpdateSprites ; bank 0
-	add_special UpdatePlayerSprite ; bank 0
-	add_special GameCornerPrizeMonCheckDex
-	add_special UnusedSetSeenMon
-	add_special WaitSFX ; bank 0
-	add_special PlayMapMusic ; bank 0
-	add_special RestartMapMusic ; bank 0
-	add_special HealMachineAnim
-	add_special SurfStartStep
-	add_special FindPartyMonAboveLevel
-	add_special FindPartyMonAtLeastThatHappy
-	add_special FindPartyMonThatSpecies
-	add_special FindPartyMonThatSpeciesYourTrainerID
-	add_special UnusedCheckUnusedTwoDayTimer
-	add_special DayCareMon1
-	add_special DayCareMon2
-	add_special SelectRandomBugContestContestants
-	add_special ActivateFishingSwarm
-	add_special ToggleMaptileDecorations
-	add_special ToggleDecorationsVisibility
-	add_special GiveShuckle
-	add_special ReturnShuckle
-	add_special BillsGrandfather
-	add_special CheckPokerus
-	add_special DisplayCoinCaseBalance
-	add_special DisplayMoneyAndCoinBalance
-	add_special PlaceMoneyTopRight
-	add_special CheckForLuckyNumberWinners
-	add_special CheckLuckyNumberShowFlag
-	add_special ResetLuckyNumberShowFlag
-	add_special PrintTodaysLuckyNumber
-	add_special SelectApricornForKurt
-	add_special NameRater
-	add_special DisplayLinkRecord
-	add_special GetFirstPokemonHappiness
-	add_special CheckFirstMonIsEgg
-	add_special RandomUnseenWildMon
-	add_special RandomPhoneWildMon
-	add_special RandomPhoneMon
-	add_special LoadUsedSpritesGFX
-	add_special PlaySlowCry
-	add_special SnorlaxAwake
-	add_special OlderHaircutBrother
-	add_special YoungerHaircutBrother
-	add_special DaisysGrooming
-	add_special PlayCurMonCry
-	add_special ProfOaksPCBoot
-	add_special GameboyCheck
-	add_special TrainerHouse
-	add_special PhotoStudio
-	add_special InitRoamMons
-	add_special FadeOutMusic
-	add_special Diploma
-	add_special PrintDiploma
-
-; Crystal only
-	add_special Function11ac3e
-	add_special Function11b444
-	add_special Function11b5e8
-	add_special Function11b7e5
-	add_special Function11b879
-	add_special Function11b920
-	add_special Function11b93b
-	add_special BattleTowerRoomMenu
-	add_special Function1700ba
-	add_special Function170114
-	add_special BattleTowerBattle
-	add_special Function1704e1
-	add_special DummySpecial_17021d
-	add_special LoadOpponentTrainerAndPokemonWithOTSprite
-	add_special Function11ba38
-	add_special CheckForBattleTowerRules
-	add_special GiveOddEgg
-	add_special Reset ; bank 0
-	add_special Function1011f1
-	add_special Function101220
-	add_special Function101225
-	add_special Function101231
-	add_special MoveTutor
-	add_special OmanyteChamber
-	add_special Function11c1ab
-	add_special BattleTowerAction
-	add_special DisplayUnownWords
-	add_special Menu_ChallengeExplanationCancel
-	add_special Function17d2b6
-	add_special Function17d2ce
-	add_special BattleTowerMobileError
-	add_special AskMobileOrCable
-	add_special HoOhChamber
-	add_special Function102142
-	add_special CelebiShrineEvent
-	add_special CheckCaughtCelebi
-	add_special PokeSeer
-	add_special BuenasPassword
-	add_special BuenaPrize
-	add_special GiveDratini
-	add_special SampleKenjiBreakCountdown
-	add_special BeastsCheck
-	add_special MonCheck
-	add_special SetPlayerPalette
-	add_special DummySpecial_170bd2
-	add_special Mobile_SelectThreeMons
-	add_special Function1037eb
-	add_special Function10383c
-	add_special StubbedTrainerRankings_Healings
-	add_special RefreshSprites
-	add_special Function1037c2
-	add_special Mobile_DummyReturnFalse
-	add_special Function103780
-	add_special Function10387b
-	add_special AskRememberPassword
-	add_special LoadMapPalettes
-	add_special UnusedFindItemInPCOrBag
-	add_special InitialSetDSTFlag
-	add_special InitialClearDSTFlag
-	add_special DummySpecial_c224
--- a/engine/events/engine_flags.asm
+++ b/engine/events/engine_flags.asm
@@ -80,4 +80,4 @@
 	ld [de], a
 	ret
 
-INCLUDE "data/engine_flags.asm"
+INCLUDE "data/events/engine_flags.asm"
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -13,7 +13,7 @@
 	rst FarCall
 	ret
 
-INCLUDE "data/special_pointers.asm"
+INCLUDE "data/events/special_pointers.asm"
 
 DummySpecial_c224:
 	ret