ref: bef792f2d21ccac0127aeffd9e0838aba81f44b6
parent: 94129b6b451fc7770ea75ffbdcbaab4967f513bd
author: PikalaxALT <PikalaxALT@gmail.com>
date: Sun Jul 19 23:51:52 EDT 2015
More label updates, moved predefs to new file Also named most of the engine and event flag constants.
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -469,13 +469,13 @@
cp $2
jr z, .asm_3c341
call BattleRandom
- cp $80
+ cp 1 + (50 percent)
jp c, .asm_3c3f1
jp Function3c3f3
.asm_3c341
call BattleRandom
- cp $80
+ cp 1 + (50 percent)
jp c, Function3c3f3
jp .asm_3c3f1
@@ -555,13 +555,13 @@
cp $2
jr z, .asm_3c3e9
call BattleRandom
- cp $80
+ cp 1 + (50 percent)
jp c, .asm_3c3f1
jp Function3c3f3
.asm_3c3e9
call BattleRandom
- cp $80
+ cp 1 + (50 percent)
jp c, Function3c3f3
.asm_3c3f1
scf
@@ -798,7 +798,7 @@
call BattleRandom
ld b, a
- cp $80
+ cp 1 + (50 percent)
jr nc, .Stay
push bc
@@ -810,7 +810,7 @@
jr c, .Flee
ld a, b
- cp $1a
+ cp 1 + (10 percent)
jr nc, .Stay
ld a, [TempEnemyMonSpecies]
@@ -1607,7 +1607,7 @@
and a
ret nz
call BattleRandom
- cp $19
+ cp 10 percent
ret nc
xor a
ld [BattleMonStatus], a
@@ -1628,7 +1628,7 @@
and a
ret nz
call BattleRandom
- cp $19
+ cp 10 percent
ret nc
xor a
ld [EnemyMonStatus], a
@@ -2882,7 +2882,7 @@
call ClearSprites
call WhiteBGMap
call Function3eda6
- call Function1c07
+ call ExitMenu
call Function309d
call WaitBGMap
call ClearSGB
@@ -3685,7 +3685,7 @@
Function3d7a0: ; 3d7a0
xor a
ld [hBGMapMode], a
- call Function1c07
+ call ExitMenu
call ClearSprites
hlcoord 1, 0
lb bc, 4, 10
@@ -5211,7 +5211,7 @@
call Function3ed9f
call Function3f43d
call Function3f47c
- call Function1c07
+ call ExitMenu
call WaitBGMap
call Function3ee27
call Function309d
@@ -5248,7 +5248,7 @@
call Function3f47c
ld a, $1
ld [wcfa9], a
- call Function1c07
+ call ExitMenu
call Function3df2c
call WaitBGMap
call Function309d
@@ -5272,7 +5272,7 @@
BattleMenu_PKMN: ; 3e28d
call Function1d6e
Function3e290:
- call Function1c07
+ call ExitMenu
call Function1d6e
call WhiteBGMap
Function3e299:
@@ -6255,13 +6255,13 @@
; 25% chance of getting an item
call BattleRandom
- cp a, $c0
+ cp a, 1 + (75 percent)
ld a, NO_ITEM
jr c, .UpdateItem
; From there, an 8% chance for Item2
call BattleRandom
- cp a, $14 ; 8% of 25% = 2% Item2
+ cp a, 8 percent ; 8% of 25% = 2% Item2
ld a, [BaseItems]
jr nc, .UpdateItem
ld a, [BaseItems+1]
@@ -8990,7 +8990,7 @@
ret nz
.asm_3f9ca
- callab Function2a30d
+ callab UpdateRoamMons
ret
; 3f9d1
--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -16,13 +16,13 @@
const ENGINE_POKERUS
const ENGINE_ROCKET_SIGNAL_ON_CH20
const ENGINE_CREDITS_SKIP
- const ENGINE_BUG_CONTEST_ON
+ const ENGINE_BUG_CONTEST_ON ; 10
const ENGINE_BUG_CONTEST_TIMER
const ENGINE_12
const ENGINE_ROCKETS_IN_RADIO_TOWER
const ENGINE_BIKE_SHOP_CALL_ENABLED
const ENGINE_GIVE_POKERUS
- const ENGINE_16
+ const ENGINE_FLORIA
const ENGINE_ROCKETS_IN_MAHOGANY
const ENGINE_STRENGTH_ACTIVE
const ENGINE_ALWAYS_ON_BIKE
@@ -32,7 +32,7 @@
const ENGINE_PLAINBADGE
const ENGINE_FOGBADGE
const ENGINE_MINERALBADGE
- const ENGINE_STORMBADGE
+ const ENGINE_STORMBADGE ; 20
const ENGINE_GLACIERBADGE
const ENGINE_RISINGBADGE
const ENGINE_BOULDERBADGE
@@ -48,7 +48,7 @@
const ENGINE_UNLOCKED_UNOWNS_3
const ENGINE_UNLOCKED_UNOWNS_4
const ENGINE_UNLOCKED_UNOWNS_5
- const ENGINE_UNLOCKED_UNOWNS_6
+ const ENGINE_UNLOCKED_UNOWNS_6 ; 30
const ENGINE_UNLOCKED_UNOWNS_7
const ENGINE_UNLOCKED_UNOWNS_8
const ENGINE_FLYPOINT_KRISS_HOUSE
@@ -64,7 +64,7 @@
const ENGINE_FLYPOINT_CELADON
const ENGINE_FLYPOINT_FUCHSIA
const ENGINE_FLYPOINT_CINNABAR
- const ENGINE_FLYPOINT_INDIGO_PLATEAU
+ const ENGINE_FLYPOINT_INDIGO_PLATEAU ; 40
const ENGINE_FLYPOINT_NEW_BARK
const ENGINE_FLYPOINT_CHERRYGROVE
const ENGINE_FLYPOINT_VIOLET
@@ -80,7 +80,7 @@
const ENGINE_FLYPOINT_UNUSED
const ENGINE_LUCKY_NUMBER_SHOW
const ENGINE_4F
- const ENGINE_KURT_MAKING_BALLS
+ const ENGINE_KURT_MAKING_BALLS ; 50
const ENGINE_DAILY_BUG_CONTEST
const ENGINE_SPECIAL_WILDDATA
const ENGINE_TIME_CAPSULE
@@ -95,8 +95,8 @@
const ENGINE_TEA_IN_BLUES_HOUSE
const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT
const ENGINE_DAILY_MOVE_TUTOR
- const ENGINE_5F
- const ENGINE_60
+ const ENGINE_BUENAS_PASSWORD
+ const ENGINE_BUENAS_PASSWORD_2 ; 60
const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
const ENGINE_62
const ENGINE_PLAYER_IS_FEMALE
@@ -112,7 +112,7 @@
const ENGINE_RALPH
const ENGINE_LIZ
const ENGINE_ANTHONY
- const ENGINE_TODD
+ const ENGINE_TODD ; 70
const ENGINE_GINA
const ENGINE_ARNIE
const ENGINE_ALAN
@@ -128,37 +128,37 @@
const ENGINE_BEVERLY_HAS_NUGGET
const ENGINE_JOSE_HAS_STAR_PIECE
const ENGINE_WADE_HAS_ITEM
- const ENGINE_GINA_HAS_LEAF_STONE
+ const ENGINE_GINA_HAS_LEAF_STONE ; 80
const ENGINE_ALAN_HAS_FIRE_STONE
- const ENGINE_LIZ_HAS_THUNDERSTONE
+ const ENGINE_DANA_HAS_THUNDERSTONE
const ENGINE_DEREK_HAS_NUGGET
const ENGINE_TULLY_HAS_WATER_STONE
const ENGINE_TIFFANY_HAS_PINK_BOW
const ENGINE_WILTON_HAS_ITEM
- const ENGINE_87
- const ENGINE_88
- const ENGINE_89
- const ENGINE_8A
- const ENGINE_8B
- const ENGINE_8C
- const ENGINE_8D
- const ENGINE_8E
- const ENGINE_8F
- const ENGINE_90
- const ENGINE_91
- const ENGINE_92
- const ENGINE_93
- const ENGINE_94
- const ENGINE_95
- const ENGINE_96
- const ENGINE_97
- const ENGINE_98
- const ENGINE_99
- const ENGINE_9A
- const ENGINE_9B
- const ENGINE_9C
- const ENGINE_9D
- const ENGINE_9E
+ const ENGINE_JACK_MONDAY_MORNING
+ const ENGINE_HUEY_WEDNESDAY_NIGHT
+ const ENGINE_GAVEN_THURSDAY_MORNING
+ const ENGINE_BETH_FRIDAY_AFTERNOON
+ const ENGINE_JOSE_SATURDAY_NIGHT
+ const ENGINE_REENA_SUNDAY_MORNING
+ const ENGINE_JOEY_MONDAY_AFTERNOON
+ const ENGINE_WADE_TUESDAY_NIGHT
+ const ENGINE_RALPH_WEDNESDAY_MORNING
+ const ENGINE_LIZ_THURSDAY_AFTERNOON ; 90
+ const ENGINE_ANTHONY_FRIDAY_NIGHT
+ const ENGINE_TODD_SATURDAY_MORNING
+ const ENGINE_GINA_SUNDAY_AFTERNOON
+ const ENGINE_ARNIE_TUESDAY_MORNING
+ const ENGINE_ALAN_WEDNESDAY_AFTERNOON
+ const ENGINE_DANA_THURSDAY_NIGHT
+ const ENGINE_CHAD_FRIDAY_MORNING
+ const ENGINE_TULLY_SUNDAY_NIGHT
+ const ENGINE_BRENT_MONDAY_MORNING
+ const ENGINE_TIFFANY_TUESDAY_AFTERNOON
+ const ENGINE_VANCE_WEDNESDAY_NIGHT
+ const ENGINE_WILTON_THRUSDAY_MORNING
+ const ENGINE_PARRY_FRIDAY_AFTERNOON
+ const ENGINE_ERIN_SATURDAY_NIGHT
const ENGINE_KRIS_IN_CABLE_CLUB
- const ENGINE_DUNSPARCE_SWARM
+ const ENGINE_DUNSPARCE_SWARM ; a0
const ENGINE_YANMA_SWARM
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -1,14 +1,16 @@
const_def
- const EVENT_000
- const EVENT_001
- const EVENT_002
- const EVENT_003
- const EVENT_004
- const EVENT_005
- const EVENT_006
- const EVENT_007
+; These first eight flags are reset upon reloading the map.
+ const EVENT_GAVE_KURT_APRICORNS ; 000
+ const EVENT_RECEIVED_BALLS_FROM_KURT
+ const EVENT_DRAGON_SHRINE_QUESTION_2
+ const EVENT_DRAGON_SHRINE_QUESTION_3
+ const EVENT_DRAGON_SHRINE_QUESTION_4
+ const EVENT_DRAGON_SHRINE_QUESTION_5
+ const EVENT_JUST_RECEIVED_DRATINI
+ const EVENT_IN_YOUR_ROOM
+; Johto story events
const EVENT_GOT_TM31_MUD_SLAP
const EVENT_GOT_TM49_FURY_CUTTER
const EVENT_GOT_TM01_DYNAMICPUNCH
@@ -49,23 +51,23 @@
const EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE
const EVENT_MADE_UNOWN_APPEAR_IN_RUINS
const EVENT_FAST_SHIP_DESTINATION_OLIVINE
- const EVENT_030
- const EVENT_031
- const EVENT_032
- const EVENT_033
- const EVENT_034
- const EVENT_035
+ const EVENT_FAST_SHIP_FIRST_TIME
+ const EVENT_FAST_SHIP_HAS_ARRIVED
+ const EVENT_FAST_SHIP_FOUND_GIRL
+ const EVENT_FAST_SHIP_LAZY_SAILOR
+ const EVENT_FAST_SHIP_INFORMED_ABOUT_LAZY_SAILOR
+ const EVENT_KURT_GAVE_YOU_LURE_BALL
const EVENT_INITIALIZED_EVENTS
const EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS
- const EVENT_038
- const EVENT_039
- const EVENT_03A
+ const EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
+ const EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
+ const EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
const EVENT_03B
const EVENT_03C
const EVENT_HEALED_MOOMOO
const EVENT_GOT_TM13_SNORE_FROM_MOOMOO_FARM
const EVENT_TALKED_TO_FARMER_ABOUT_MOOMOO
- const EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
+ const EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST ; 040
const EVENT_DUDE_TALKED_TO_YOU
const EVENT_LEARNED_TO_CATCH_POKEMON
const EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
@@ -75,13 +77,13 @@
const EVENT_GOT_SUNNY_DAY_FROM_RADIO_TOWER
const EVENT_GOT_PINK_BOW_FROM_MARY
const EVENT_USED_BASEMENT_KEY
- const EVENT_04A
+ const EVENT_RECEIVED_CARD_KEY
const EVENT_GOT_TM08_ROCK_SMASH
- const EVENT_04C
+ const EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE
const EVENT_GOT_MYSTIC_WATER_IN_CHERRYGROVE
const EVENT_GOT_TM05_ROAR
const EVENT_GOT_EEVEE
- const EVENT_GOT_KENYA
+ const EVENT_GOT_KENYA ; 050
const EVENT_GAVE_KENYA
const EVENT_GOT_HP_UP_FROM_RANDY
const EVENT_GOT_TM50_NIGHTMARE
@@ -97,7 +99,7 @@
const EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32
const EVENT_GOT_CHARCOAL_IN_CHARCOAL_KILN
const EVENT_GOT_TM02_HEADBUTT
- const EVENT_DECIDED_TO_HELP_LANCE
+ const EVENT_DECIDED_TO_HELP_LANCE ; 060
const EVENT_GOT_TYROGUE_FROM_KIYO
const EVENT_MET_FRIEDA_OF_FRIDAY
const EVENT_GOT_POISON_BARB_FROM_FRIEDA
@@ -112,7 +114,7 @@
const EVENT_MET_SANTOS_OF_SATURDAY
const EVENT_GOT_SPELL_TAG_FROM_SANTOS
const EVENT_MET_MONICA_OF_MONDAY
- const EVENT_GOT_SHARP_BEAK_FROM_MONICA
+ const EVENT_GOT_SHARP_BEAK_FROM_MONICA ; 070
const EVENT_GOT_SOFT_SAND_FROM_KATE
const EVENT_GOT_METAL_COAT_FROM_GRANDPA_ON_SS_AQUA
const EVENT_GOT_BLACKGLASSES_IN_DARK_CAVE
@@ -119,7 +121,7 @@
const EVENT_GOT_KINGS_ROCK_IN_SLOWPOKE_WELL
const EVENT_GOT_TM47_STEEL_WING
const EVENT_GOT_TM37_SANDSTORM
- const EVENT_076
+ const EVENT_FIRST_TIME_BANKING_WITH_MOM
const EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE
const EVENT_GOT_CLEAR_BELL
const EVENT_GOT_SILVER_WING
@@ -126,11 +128,11 @@
const EVENT_GOT_TM12_SWEET_SCENT
const EVENT_RELEASED_THE_BEASTS
const EVENT_GOT_MASTER_BALL_FROM_ELM
+; Johto Signpost Items
const EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION
const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE
const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS
-; Signpost items
- const EVENT_BURNED_TOWER_1F_HIDDEN_ETHER
+ const EVENT_BURNED_TOWER_1F_HIDDEN_ETHER ; 080
const EVENT_081
const EVENT_082
const EVENT_083
@@ -187,8 +189,9 @@
const EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY
const EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION
const EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE
+; Crystal-exclusive events in Johto
const EVENT_MET_FLORIA
- const EVENT_0BA
+ const EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP
const EVENT_BUGGING_KURT_TOO_MUCH
const EVENT_TALKED_TO_RUINS_COWARD
const EVENT_GOT_DRATINI
@@ -202,6 +205,7 @@
const EVENT_0C5
const EVENT_0C6
const EVENT_0C7
+; Kanto story events
const EVENT_GOT_NUGGET_FROM_GUY
const EVENT_RETURNED_MACHINE_PART
const EVENT_MET_MANAGER_AT_POWER_PLANT
@@ -230,6 +234,7 @@
const EVENT_TALKED_TO_OAK_IN_KANTO
const EVENT_GOT_HP_UP_FROM_VERMILION_GUY
const EVENT_GOT_TM29_PSYCHIC
+; Kanto Signpost Items
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL
@@ -258,11 +263,12 @@
const EVENT_CELADON_CITY_HIDDEN_PP_UP
const EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY
const EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL
- const EVENT_100
- const EVENT_101
- const EVENT_102
- const EVENT_103
- const EVENT_104
+ const EVENT_GINA_GAVE_LEAF_STONE
+ const EVENT_ALAN_GAVE_FIRE_STONE
+ const EVENT_DANA_GAVE_THUNDERSTONE
+ const EVENT_TULLY_GAVE_WATER_STONE
+ const EVENT_TIFFANY_GAVE_PINK_BOW
+; ???
const EVENT_105
const EVENT_106
const EVENT_107
@@ -602,13 +608,15 @@
const EVENT_255
const EVENT_256
const EVENT_257
- const EVENT_258
- const EVENT_259
- const EVENT_25A
- const EVENT_25B
- const EVENT_25C
- const EVENT_25D
- const EVENT_25E
+; Kurt events
+ const EVENT_GAVE_KURT_RED_APRICORN
+ const EVENT_GAVE_KURT_BLU_APRICORN
+ const EVENT_GAVE_KURT_YLW_APRICORN
+ const EVENT_GAVE_KURT_GRN_APRICORN
+ const EVENT_GAVE_KURT_WHT_APRICORN
+ const EVENT_GAVE_KURT_BLK_APRICORN
+ const EVENT_GAVE_KURT_PNK_APRICORN
+; Phone events
const EVENT_JACK_ASKED_FOR_PHONE_NUMBER
const EVENT_260
const EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER
@@ -620,7 +628,7 @@
const EVENT_GOT_CARBOS_FROM_VANCE
const EVENT_GOT_IRON_FROM_PARRY
const EVENT_GOT_CALCIUM_FROM_ERIN
- const EVENT_26A
+ const EVENT_KENJI_ON_BREAK
const EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER
const EVENT_26C
const EVENT_BETH_ASKED_FOR_PHONE_NUMBER
@@ -674,10 +682,12 @@
const EVENT_ERIN_ASKED_FOR_PHONE_NUMBER
const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD
const EVENT_29F
- const EVENT_2A0 ; 2a0
- const EVENT_2A1
- const EVENT_2A2
- const EVENT_2A3
+; Ruins Of Alph puzzles
+ const EVENT_SOLVED_HO_OH_PUZZLE ; 2a0
+ const EVENT_SOLVED_KABUTO_PUZZLE
+ const EVENT_SOLVED_OMANYTE_PUZZLE
+ const EVENT_SOLVED_AERODACTYL_PUZZLE
+; Decorations
const EVENT_DECO_BED_1
const EVENT_DECO_BED_2
const EVENT_DECO_BED_3
@@ -724,7 +734,8 @@
const EVENT_DECO_BIG_SNORLAX_DOLL
const EVENT_DECO_BIG_ONIX_DOLL ; 2d0
const EVENT_DECO_BIG_LAPRAS_DOLL
- const EVENT_2D2
+; More Johto events
+ const EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
const EVENT_SWITCH_1
const EVENT_SWITCH_2
const EVENT_SWITCH_3
@@ -807,6 +818,7 @@
const EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA
const EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA
const EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA
+; More Crystal-specific events
const EVENT_LISTENED_TO_INITIAL_RADIO
const EVENT_WALL_OPENED_IN_HO_OH_CHAMBER
const EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
@@ -835,6 +847,7 @@
const EVENT_GOT_ODD_EGG
const EVENT_33F
const EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
+; ???
const EVENT_341
const EVENT_342
const EVENT_343
@@ -1533,6 +1546,7 @@
const EVENT_BEAT_SAGE_GAKU
const EVENT_BEAT_SAGE_MASA
const EVENT_BEAT_SAGE_KOJI
+; ???
const EVENT_5CC
const EVENT_5CD
const EVENT_5CE
@@ -1725,7 +1739,7 @@
const EVENT_MOUNT_MORTAR_2F_INSIDE_ESCAPE_ROPE
const EVENT_MOUNT_MORTAR_B1F_HYPER_POTION
const EVENT_MOUNT_MORTAR_B1F_CARBOS
- const EVENT_ICE_PATH_1F_HM_WATERFALL
+ const EVENT_GOT_HM07_WATERFALL
const EVENT_ICE_PATH_1F_PP_UP
const EVENT_ICE_PATH_B1F_IRON
const EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_FULL_HEAL
@@ -1835,9 +1849,9 @@
const EVENT_6F2
const EVENT_ILEX_FOREST_APPRENTICE
const EVENT_ILEX_FOREST_CHARCOAL_MASTER
- const EVENT_6F5
- const EVENT_6F6
- const EVENT_6F7
+ const EVENT_CHARCOAL_KILN_FARFETCH_D
+ const EVENT_CHARCOAL_KILN_APPRENTICE
+ const EVENT_CHARCOAL_KILN_BOSS
const EVENT_ROUTE_36_SUDOWOODO
const EVENT_AZALEA_TOWN_SLOWPOKES
const EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
@@ -1943,7 +1957,7 @@
const EVENT_ROUTE_40_MONICA_OF_MONDAY
const EVENT_LANCES_ROOM_OAK_AND_MARY
const EVENT_UNION_CAVE_B2F_LAPRAS ; 760
- const EVENT_761
+ const EVENT_TEAM_ROCKET_DISBANDED
const EVENT_RED_IN_MT_SILVER
const EVENT_GOLDENROD_DEPT_STORE_5F_HAPPINESS_EVENT_LADY
const EVENT_BURNED_TOWER_MORTY
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -1,22 +1,22 @@
; trainer groups
enum_start 1
- trainerclass FALKNER
+ trainerclass FALKNER ; 1
- trainerclass WHITNEY
+ trainerclass WHITNEY ; 2
- trainerclass BUGSY
+ trainerclass BUGSY ; 3
- trainerclass MORTY
+ trainerclass MORTY ; 4
- trainerclass PRYCE
+ trainerclass PRYCE ; 5
- trainerclass JASMINE
+ trainerclass JASMINE ; 6
- trainerclass CHUCK
+ trainerclass CHUCK ; 7
- trainerclass CLAIR
+ trainerclass CLAIR ; 8
- trainerclass RIVAL1
+ trainerclass RIVAL1 ; 9
const RIVAL1_1
const RIVAL1_2
const RIVAL1_3
@@ -33,31 +33,31 @@
const RIVAL1_14
const RIVAL1_15
- trainerclass POKEMON_PROF
+ trainerclass POKEMON_PROF ; a
- trainerclass WILL
+ trainerclass WILL ; b
- trainerclass CAL
+ trainerclass CAL ; c
const CAL1
const CAL2
const CAL3
- trainerclass BRUNO
+ trainerclass BRUNO ; d
- trainerclass KAREN
+ trainerclass KAREN ; e
- trainerclass KOGA
+ trainerclass KOGA ; f
- trainerclass CHAMPION
+ trainerclass CHAMPION ; 10
const LANCE
- trainerclass BROCK
+ trainerclass BROCK ; 11
- trainerclass MISTY
+ trainerclass MISTY ; 12
- trainerclass LT_SURGE
+ trainerclass LT_SURGE ; 13
- trainerclass SCIENTIST
+ trainerclass SCIENTIST ; 14
const ROSS
const MITCH
const JED
@@ -64,9 +64,9 @@
const MARC
const RICH
- trainerclass ERIKA
+ trainerclass ERIKA ; 15
- trainerclass YOUNGSTER
+ trainerclass YOUNGSTER ; 16
const JOEY1
const MIKEY
const ALBERT
@@ -82,7 +82,7 @@
const JOEY4
const JOEY5
- trainerclass SCHOOLBOY
+ trainerclass SCHOOLBOY ; 17
const JACK1
const KIPP
const ALAN1
@@ -108,7 +108,7 @@
const CHAD4
const CHAD5
- trainerclass BIRD_KEEPER
+ trainerclass BIRD_KEEPER ; 18
const ROD
const ABE
const BRYAN
@@ -129,7 +129,7 @@
const VANCE2
const VANCE3
- trainerclass LASS
+ trainerclass LASS ; 19
const CARRIE
const BRIDGET
const ALICE
@@ -148,9 +148,9 @@
const DANA4
const DANA5
- trainerclass JANINE
+ trainerclass JANINE ; 1a
- trainerclass COOLTRAINERM
+ trainerclass COOLTRAINERM ; 1b
const NICK
const AARON
const PAUL
@@ -172,7 +172,7 @@
const ALLEN
const DARIN
- trainerclass COOLTRAINERF
+ trainerclass COOLTRAINERF ; 1c
const GWEN
const LOIS
const FRAN
@@ -195,7 +195,7 @@
const REENA3
const CARA
- trainerclass BEAUTY
+ trainerclass BEAUTY ; 1d
const VICTORIA
const SAMANTHA
const JULIE
@@ -214,7 +214,7 @@
const VALERIE
const OLIVIA
- trainerclass POKEMANIAC
+ trainerclass POKEMANIAC ; 1e
const LARRY
const ANDREW
const CALVIN
@@ -231,9 +231,9 @@
const BRENT4
const MILLER
- trainerclass GRUNTM
+ trainerclass GRUNTM ; 1f
- trainerclass GENTLEMAN
+ trainerclass GENTLEMAN ; 20
const PRESTON
const EDWARD
const GREGORY
@@ -240,18 +240,18 @@
const VIRGIL
const ALFRED
- trainerclass SKIER
+ trainerclass SKIER ; 21
const ROXANNE
const CLARISSA
- trainerclass TEACHER
+ trainerclass TEACHER ; 22
const COLETTE
const HILLARY
const SHIRLEY
- trainerclass SABRINA
+ trainerclass SABRINA ; 23
- trainerclass BUG_CATCHER
+ trainerclass BUG_CATCHER ; 24
const DON
const ROB
const ED
@@ -272,7 +272,7 @@
const ARNIE5
const WAYNE
- trainerclass FISHER
+ trainerclass FISHER ; 25
const JUSTIN
const RALPH1
const ARNOLD
@@ -299,7 +299,7 @@
const RALPH5
const TULLY4
- trainerclass SWIMMERM
+ trainerclass SWIMMERM ; 26
const HAROLD
const SIMON
const RANDALL
@@ -322,7 +322,7 @@
const LEWIS
const PARKER
- trainerclass SWIMMERF
+ trainerclass SWIMMERF ; 27
const ELAINE
const PAULA
const KAYLEE
@@ -343,7 +343,7 @@
const DIANA
const BRIANA
- trainerclass SAILOR
+ trainerclass SAILOR ; 28
const EUGENE
const HUEY1
const TERRELL
@@ -358,7 +358,7 @@
const HUEY3
const HUEY4
- trainerclass SUPER_NERD
+ trainerclass SUPER_NERD ; 29
const STAN
const ERIC
const GREGG
@@ -374,13 +374,13 @@
const HUGH
const MARKUS
- trainerclass RIVAL2
+ trainerclass RIVAL2 ; 2a
- trainerclass GUITARIST
+ trainerclass GUITARIST ; 2b
const CLYDE
const VINCENT
- trainerclass HIKER
+ trainerclass HIKER ; 2c
const ANTHONY1
const RUSSELL
const PHILLIP
@@ -404,7 +404,7 @@
const ANTHONY4
const ANTHONY5
- trainerclass BIKER
+ trainerclass BIKER ; 2d
const BIKER_BENNY
const KAZU
const DWAYNE
@@ -415,14 +415,14 @@
const JOEL
const GLENN
- trainerclass BLAINE
+ trainerclass BLAINE ; 2e
- trainerclass BURGLAR
+ trainerclass BURGLAR ; 2f
const DUNCAN
const EDDIE
const COREY
- trainerclass FIREBREATHER
+ trainerclass FIREBREATHER ; 30
const OTIS
const DICK
const NED
@@ -432,7 +432,7 @@
const RAY
const LYLE
- trainerclass JUGGLER
+ trainerclass JUGGLER ; 31
const IRWIN1
const FRITZ
const HORTON
@@ -440,7 +440,7 @@
const IRWIN3
const IRWIN4
- trainerclass BLACKBELT_T
+ trainerclass BLACKBELT_T ; 32
const KENJI1
const YOSHI
const KENJI2
@@ -451,9 +451,9 @@
const KENJI3
const WAI
- trainerclass EXECUTIVEM
+ trainerclass EXECUTIVEM ; 33
- trainerclass PSYCHIC_T
+ trainerclass PSYCHIC_T ; 34
const NATHAN
const FRANKLIN
const HERMAN
@@ -467,7 +467,7 @@
const JARED
const RODNEY
- trainerclass PICNICKER
+ trainerclass PICNICKER ; 35
const LIZ1
const GINA1
const BROOKE
@@ -495,7 +495,7 @@
const GINA5
const TIFFANY4
- trainerclass CAMPER
+ trainerclass CAMPER ; 36
const ROLAND
const TODD1
const IVAN
@@ -519,9 +519,9 @@
const TODD5
const QUENTIN
- trainerclass EXECUTIVEF
+ trainerclass EXECUTIVEF ; 37
- trainerclass SAGE
+ trainerclass SAGE ; 38
const CHOW
const NICO
const JIN
@@ -535,7 +535,7 @@
const MASA
const KOJI
- trainerclass MEDIUM
+ trainerclass MEDIUM ; 39
const MARTHA
const GRACE
const BETHANY
@@ -544,12 +544,12 @@
const REBECCA
const DORIS
- trainerclass BOARDER
+ trainerclass BOARDER ; 3a
const RONALD
const BRAD
const DOUGLAS
- trainerclass POKEFANM
+ trainerclass POKEFANM ; 3b
const WILLIAM
const DEREK1
const ROBERT
@@ -565,7 +565,7 @@
const REX
const ALLAN
- trainerclass KIMONO_GIRL
+ trainerclass KIMONO_GIRL ; 3c
const NAOKO1
const NAOKO2
const SAYO
@@ -573,7 +573,7 @@
const KUNI
const MIKI
- trainerclass TWINS
+ trainerclass TWINS ; 3d
const AMYANDMAY1
const ANNANDANNE1
const ANNANDANNE2
@@ -585,7 +585,7 @@
const LEAANDPIA1
const LEAANDPIA2
- trainerclass POKEFANF
+ trainerclass POKEFANF ; 3e
const BEVERLY1
const RUTH
const BEVERLY2
@@ -593,17 +593,17 @@
const GEORGIA
const JAIME
- trainerclass RED
+ trainerclass RED ; 3f
- trainerclass BLUE
+ trainerclass BLUE ; 40
- trainerclass OFFICER
+ trainerclass OFFICER ; 41
const KEITH
const DIRK
- trainerclass GRUNTF
+ trainerclass GRUNTF ; 42
- trainerclass MYSTICALMAN
+ trainerclass MYSTICALMAN ; 43
const EUSINE
NUM_TRAINER_CLASSES EQU __enum__
--- a/data/wild/fish.asm
+++ b/data/wild/fish.asm
@@ -12,17 +12,7 @@
call GetFishGroupHeader
ld hl, FishGroupHeaders
- ; encounter chance
- add hl, de
- ; pointer to old rod data
- add hl, de
- add hl, de
- ; pointer to good rod data
- add hl, de
- add hl, de
- ; pointer to super rod data
- add hl, de
- add hl, de
+ add_n_times hl, de, 7
call Fish
@@ -52,8 +42,7 @@
inc hl
ld e, b
ld d, 0
- add hl, de
- add hl, de
+ add_n_times hl, de, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -122,7 +111,7 @@
; Return fishing encounter group header d in de.
push hl
- ld hl, wdc1e
+ ld hl, DailyFlags
bit 2, [hl]
pop hl
jr z, .end
--- a/engine/engine_flags.asm
+++ b/engine/engine_flags.asm
@@ -100,26 +100,26 @@
dwb wdc9d, %00000001 ; lucky number show
dwb StatusFlags2, %00001000
- dwb wdc1e, %00000001 ; kurt making balls ; $50
- dwb wdc1e, %00000010
- dwb wdc1e, %00000100 ; special wilddata?
- dwb wdc1e, %00001000 ; time capsule (24h wait)
- dwb wdc1e, %00010000 ; all fruit trees
- dwb wdc1e, %00100000 ; shuckle given
- dwb wdc1e, %01000000 ; goldenrod underground merchant closed
- dwb wdc1e, %10000000 ; fought in trainer hall today
+ dwb DailyFlags, %00000001 ; kurt making balls ; $50
+ dwb DailyFlags, %00000010
+ dwb DailyFlags, %00000100 ; special wilddata?
+ dwb DailyFlags, %00001000 ; time capsule (24h wait)
+ dwb DailyFlags, %00010000 ; all fruit trees
+ dwb DailyFlags, %00100000 ; shuckle given
+ dwb DailyFlags, %01000000 ; goldenrod underground merchant closed
+ dwb DailyFlags, %10000000 ; fought in trainer hall today
- dwb wdc1f, %00000001 ; mt moon square clefairy ; $58
- dwb wdc1f, %00000010 ; union cave lapras
- dwb wdc1f, %00000100 ; goldenrod underground haircut used
- dwb wdc1f, %00001000 ; goldenrod mall happiness event floor05 person07
- dwb wdc1f, %00010000 ; tea in blues house
- dwb wdc1f, %00100000 ; indigo plateau rival fight
- dwb wdc1f, %01000000
- dwb wdc1f, %10000000
+ dwb WeeklyFlags, %00000001 ; mt moon square clefairy ; $58
+ dwb WeeklyFlags, %00000010 ; union cave lapras
+ dwb WeeklyFlags, %00000100 ; goldenrod underground haircut used
+ dwb WeeklyFlags, %00001000 ; goldenrod mall happiness event floor05 person07
+ dwb WeeklyFlags, %00010000 ; tea in blues house
+ dwb WeeklyFlags, %00100000 ; indigo plateau rival fight
+ dwb WeeklyFlags, %01000000
+ dwb WeeklyFlags, %10000000
- dwb wdc20, %00000001 ; $60
- dwb wdc20, %00000010 ; goldenrod dept store sale is on
+ dwb SwarmFlags, %00000001 ; $60
+ dwb SwarmFlags, %00000010 ; goldenrod dept store sale is on
dwb GameTimerPause, %10000000 ; $62
@@ -194,5 +194,5 @@
dwb wd45b, %00000100 ; female player has been transformed into male
- dwb wdc20, %00000100 ; dunsparce swarm ; $a0
- dwb wdc20, %00001000 ; yanma swarm
+ dwb SwarmFlags, %00000100 ; dunsparce swarm ; $a0
+ dwb SwarmFlags, %00001000 ; yanma swarm
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -275,7 +275,7 @@
ld a, [PlayerState]
cp 1
jr nz, .NoCall
- call Function2d05
+ call GetMapHeaderPhoneServiceNybble
and a
jr nz, .NoCall
ld hl, wdca1 + 1
--- a/engine/fruit_trees.asm
+++ b/engine/fruit_trees.asm
@@ -43,7 +43,7 @@
; 4404c
TryResetFruitTrees: ; 4404c
- ld hl, wdc1e
+ ld hl, DailyFlags
bit 4, [hl]
ret nz
jp ResetFruitTrees
@@ -70,7 +70,7 @@
ld [hli], a
ld [hli], a
ld [hl], a
- ld hl, wdc1e
+ ld hl, DailyFlags
set 4, [hl]
ret
; 44078
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -3051,8 +3051,8 @@
ld [wd04e], a
ld [wd4e2], a
call Function57bc
- callba Function149c6
- call c, Function57d9
+ callba CheckWarpCollision
+ call c, SpawnInFacingDown
call Function57ca
ret
; 57bc
@@ -3080,7 +3080,7 @@
jr Function57db
; 57d9
-Function57d9: ; 57d9
+SpawnInFacingDown: ; 57d9
ld a, 0
; fallthrough
; 57db
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -293,76 +293,76 @@
; 15440
MapSetupCommands: ; 15440
- dbw BANK(EnableLCD), EnableLCD
- dbw BANK(DisableLCD), DisableLCD
- dbw BANK(SoundRestart), SoundRestart
- dbw BANK(PlayMapMusic), PlayMapMusic
- dbw BANK(RestartMapMusic), RestartMapMusic
- dbw BANK(FadeToMapMusic), FadeToMapMusic
- dbw BANK(Function15574), Function15574
- dbw BANK(EnterMapMusic), EnterMapMusic
- dbw BANK(Function15587), Function15587
- dbw BANK(Function3cae), Function3cae
- dbw BANK(Function24cd), Function24cd
- dbw BANK(Function28e3), Function28e3
- dbw BANK(Function289d), Function289d
- dbw BANK(BufferScreen), BufferScreen
- dbw BANK(Function1047cf), Function1047cf
- dbw BANK(LoadTilesetHeader), LoadTilesetHeader
- dbw BANK(Function104750), Function104750
- dbw BANK(Function1047eb), Function1047eb
- dbw BANK(Function29ff8), Function29ff8
- dbw BANK(Function1047f0), Function1047f0
- dbw BANK(Function1045b0), Function1045b0
- dbw BANK(Function1045c4), Function1045c4
- dbw BANK(Function154d7), Function154d7
- dbw BANK(LoadSpawnPoint), LoadSpawnPoint
- dbw BANK(EnterMapConnection), EnterMapConnection
- dbw BANK(Function1046c6), Function1046c6
- dbw BANK(Function2309), Function2309
- dbw BANK(Function2317), Function2317
- dbw BANK(WhiteBGMap), WhiteBGMap
- dbw BANK(Function8c084), Function8c084
- dbw BANK(Function8c079), Function8c079
- dbw BANK(Function10486d), Function10486d
- dbw BANK(Function248a), Function248a
- dbw BANK(Function57d9), Function57d9
- dbw BANK(Function8029), Function8029
- dbw BANK(Function80b8), Function80b8
- dbw BANK(Function154eb), Function154eb
- dbw BANK(Function154f1), Function154f1
- dbw BANK(Function2a30d), Function2a30d
- dbw BANK(Function2a394), Function2a394
- dbw BANK(Function15567), Function15567
- dbw BANK(Function154cf), Function154cf
- dbw BANK(Function154d3), Function154d3
- dbw BANK(Function1556d), Function1556d
- dbw BANK(Function154ca), Function154ca
- dbw BANK(Functionb8000), Functionb8000
+ dbw BANK(EnableLCD), EnableLCD ; 00
+ dbw BANK(DisableLCD), DisableLCD ; 01
+ dbw BANK(SoundRestart), SoundRestart ; 02
+ dbw BANK(PlayMapMusic), PlayMapMusic ; 03
+ dbw BANK(RestartMapMusic), RestartMapMusic ; 04
+ dbw BANK(FadeToMapMusic), FadeToMapMusic ; 05
+ dbw BANK(FadeOutMapAndMusic), FadeOutMapAndMusic ; 06
+ dbw BANK(EnterMapMusic), EnterMapMusic ; 07
+ dbw BANK(ForceMapMusic), ForceMapMusic ; 08
+ dbw BANK(CrankUpTheVolume), CrankUpTheVolume ; 09
+ dbw BANK(LoadBlockData), LoadBlockData ; 0a
+ dbw BANK(LoadNeighboringBlockData), LoadNeighboringBlockData ; 0b
+ dbw BANK(SaveScreen), SaveScreen ; 0c
+ dbw BANK(BufferScreen), BufferScreen ; 0d
+ dbw BANK(LoadGraphics), LoadGraphics ; 0e
+ dbw BANK(LoadTilesetHeader), LoadTilesetHeader ; 0f
+ dbw BANK(LoadMapTimeOfDay), LoadMapTimeOfDay ; 10
+ dbw BANK(LoadMapPalettes), LoadMapPalettes ; 11
+ dbw BANK(LoadWildMonData), LoadWildMonData ; 12
+ dbw BANK(RefreshMapSprites), RefreshMapSprites ; 13
+ dbw BANK(RunCallback_05_03), RunCallback_05_03 ; 14
+ dbw BANK(RunCallback_03), RunCallback_03 ; 15
+ dbw BANK(LoadObjectsRunCallback_02), LoadObjectsRunCallback_02 ; 16
+ dbw BANK(LoadSpawnPoint), LoadSpawnPoint ; 17
+ dbw BANK(EnterMapConnection), EnterMapConnection ; 18
+ dbw BANK(LoadWarpData), LoadWarpData ; 19
+ dbw BANK(LoadMapAttributes), LoadMapAttributes ; 1a
+ dbw BANK(LoadMapAttributes_IgnoreHidden), LoadMapAttributes_IgnoreHidden ; 1b
+ dbw BANK(WhiteBGMap), WhiteBGMap ; 1c
+ dbw BANK(FadeBlackBGMap), FadeBlackBGMap ; 1d
+ dbw BANK(FadeInBGMap), FadeInBGMap ; 1e
+ dbw BANK(GetCoordOfUpperLeftCorner), GetCoordOfUpperLeftCorner ; 1f
+ dbw BANK(RestoreFacingAfterWarp), RestoreFacingAfterWarp ; 20
+ dbw BANK(SpawnInFacingDown), SpawnInFacingDown ; 21
+ dbw BANK(GetSpawnCoord), GetSpawnCoord ; 22
+ dbw BANK(RefreshPlayerCoords), RefreshPlayerCoords ; 23
+ dbw BANK(DelayClearingOldSprites), DelayClearingOldSprites ; 24
+ dbw BANK(DelayLoadingNewSprites), DelayLoadingNewSprites ; 25
+ dbw BANK(UpdateRoamMons), UpdateRoamMons ; 26
+ dbw BANK(RestoreRoamMons), RestoreRoamMons ; 27
+ dbw BANK(FadeOldMapMusic), FadeOldMapMusic ; 28
+ dbw BANK(ActivateMapAnims), ActivateMapAnims ; 29
+ dbw BANK(SuspendMapAnims), SuspendMapAnims ; 2a
+ dbw BANK(RetainOldPalettes), RetainOldPalettes ; 2b
+ dbw BANK(DontScrollText), DontScrollText ; 2c
+ dbw BANK(ReturnFromMapSetupScript), ReturnFromMapSetupScript ; 2d
; 154ca
-Function154ca: ; 154ca
+DontScrollText: ; 154ca
xor a
ld [wc2d7], a
ret
; 154cf
-Function154cf: ; 154cf
+ActivateMapAnims: ; 154cf
ld a, $1
ld [$ffde], a
ret
; 154d3
-Function154d3: ; 154d3
+SuspendMapAnims: ; 154d3
xor a
ld [$ffde], a
ret
; 154d7
-Function154d7: ; 154d7
+LoadObjectsRunCallback_02: ; 154d7
ld a, $2
- call Function263b
+ call RunMapCallback
callba Function2454f
callba Function8177
ret
@@ -372,13 +372,13 @@
ret
; 154eb
-Function154eb: ; 154eb
+DelayClearingOldSprites: ; 154eb
ld hl, wd45b
set 7, [hl]
ret
; 154f1
-Function154f1: ; 154f1
+DelayLoadingNewSprites: ; 154f1
ld hl, wd45b
set 6, [hl]
ret
@@ -386,13 +386,13 @@
Function154f7: ; 154f7
nop
call Function1550c
- jr c, .asm_15508
+ jr c, .ok
call Function1554e
- jr c, .asm_15508
+ jr c, .ok
call Function1551a
- jr c, .asm_15508
+ jr c, .ok
ret
-.asm_15508
+.ok
call Functione4a
ret
@@ -401,7 +401,7 @@
ld hl, BikeFlags
bit 1, [hl]
ret z
- ld a, $1
+ ld a, PLAYER_BIKE
ld [PlayerState], a
scf
ret
@@ -408,64 +408,64 @@
Function1551a: ; 1551a (5:551a)
ld a, [PlayerState]
- cp $0
- jr z, .asm_1554c
- cp $2
- jr z, .asm_1554c
- cp $4
- jr z, .asm_15545
- cp $8
- jr z, .asm_15545
+ cp PLAYER_NORMAL
+ jr z, .nope
+ cp PLAYER_SLIP
+ jr z, .nope
+ cp PLAYER_SURF
+ jr z, .surfing
+ cp PLAYER_SURF_PIKA
+ jr z, .surfing
call GetMapPermission
cp $3
- jr z, .asm_1553e
+ jr z, .checkbiking
cp $5
- jr z, .asm_1553e
+ jr z, .checkbiking
cp $7
- jr z, .asm_1553e
- jr .asm_1554c
-.asm_1553e
+ jr z, .checkbiking
+ jr .nope
+.checkbiking
ld a, [PlayerState]
- cp $1
- jr nz, .asm_1554c
-.asm_15545
- ld a, $0
+ cp PLAYER_BIKE
+ jr nz, .nope
+.surfing
+ ld a, PLAYER_NORMAL
ld [PlayerState], a
scf
ret
-.asm_1554c
+.nope
and a
ret
Function1554e: ; 1554e (5:554e)
call Function1852
- jr nz, .asm_15565
+ jr nz, .ret_nc
ld a, [PlayerState]
- cp $4
- jr z, .asm_15563
- cp $8
- jr z, .asm_15563
- ld a, $4
+ cp PLAYER_SURF
+ jr z, .surfing
+ cp PLAYER_SURF_PIKA
+ jr z, .surfing
+ ld a, PLAYER_SURF
ld [PlayerState], a
-.asm_15563
+.surfing
scf
ret
-.asm_15565
+.ret_nc
and a
ret
; 15567
-Function15567: ; 15567
+FadeOldMapMusic: ; 15567
ld a, 6
call SkipMusic
ret
; 1556d
-Function1556d: ; 1556d
+RetainOldPalettes: ; 1556d
callba _UpdateTimePals
ret
-Function15574: ; 15574
+FadeOutMapAndMusic: ; 15574
ld e, 0
ld a, [MusicFadeIDLo]
ld d, 0
@@ -472,18 +472,18 @@
ld a, [MusicFadeIDHi]
ld a, $4
ld [MusicFade], a
- call Function4b6
+ call FadeToWhite
ret
; 15587
-Function15587: ; 15587
+ForceMapMusic: ; 15587
ld a, [PlayerState]
- cp $1
- jr nz, .asm_15596
+ cp PLAYER_BIKE
+ jr nz, .notbiking
call VolumeOff
ld a, $88
ld [MusicFade], a
-.asm_15596
+.notbiking
call Function3d2f
ret
; 1559a
--- a/engine/more_phone_scripts.asm
+++ b/engine/more_phone_scripts.asm
@@ -1476,7 +1476,7 @@
iftrue UnknownScript_0xa0a1d
checknite
iftrue UnknownScript_0xa0a25
- setevent EVENT_26A
+ setevent EVENT_KENJI_ON_BREAK
farwritetext UnknownText_0x66f11
keeptextopen
jump UnknownScript_0xa0484
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -138,7 +138,7 @@
push de
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
pop hl
ret c
ld a, [wcfa9]
@@ -290,7 +290,7 @@
push de
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
pop hl
ret c
ld a, [wcfa9]
@@ -495,7 +495,7 @@
call Function10889
callba Function24fbf
push af
- call Function1c07
+ call ExitMenu
pop af
jr c, .asm_1039c
call Function10a1d
@@ -503,7 +503,7 @@
call MenuTextBox
call YesNoBox
push af
- call Function1c07
+ call ExitMenu
pop af
jr c, .asm_1039c
ld hl, NumItems
@@ -822,7 +822,7 @@
push de
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
pop hl
ret c
ld a, [wcfa9]
--- a/engine/phone_scripts.asm
+++ b/engine/phone_scripts.asm
@@ -2,6 +2,8 @@
farwritetext UnusedPhoneText
end
+; Mom
+
MomPhoneScript: ; 0xbceaa
checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
iftrue .bcec5
@@ -14,7 +16,7 @@
jump MomPhoneNoPokemonScript
.bcec5 ; 0xbcec5
- checkevent EVENT_007
+ checkevent EVENT_IN_YOUR_ROOM
iftrue MomPhoneHangUpScript
farwritetext MomPhoneGreetingText
keeptextopen
@@ -145,6 +147,8 @@
iftrue MomPhoneSaveMoneyScript
jump MomPhoneWontSaveMoneyScript
+; Bill
+
BillPhoneScript1: ; 0xbcfc5
checkday
iftrue .daygreet
@@ -187,6 +191,8 @@
closetext
end
+; Elm
+
ElmPhoneScript1: ; 0xbd00d
checkcode VAR_POKERUS
if_equal $1, .pokerus
@@ -290,16 +296,17 @@
end
; bd0d0
+; Jack
UnknownScript_0xbd0d0:
- trainertotext SCHOOLBOY, 1, $0
+ trainertotext SCHOOLBOY, JACK1, $0
checkflag ENGINE_JACK
iftrue UnknownScript_0xbd0f3
farscall UnknownScript_0xbde4e
- checkflag ENGINE_87
+ checkflag ENGINE_JACK_MONDAY_MORNING
iftrue UnknownScript_0xbd0ef
checkcode VAR_WEEKDAY
- if_not_equal $1, UnknownScript_0xbd0ef
+ if_not_equal MONDAY, UnknownScript_0xbd0ef
checkmorn
iftrue UnknownScript_0xbd12a
@@ -311,13 +318,13 @@
farjump UnknownScript_0xa0a2d
UnknownScript_0xbd0fa:
- trainertotext SCHOOLBOY, 1, $0
+ trainertotext SCHOOLBOY, JACK1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd13b
checkflag ENGINE_JACK
iftrue UnknownScript_0xbd11e
- checkflag ENGINE_87
+ checkflag ENGINE_JACK_MONDAY_MORNING
iftrue UnknownScript_0xbd11e
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd12d
@@ -328,7 +335,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd12a:
- setflag ENGINE_87
+ setflag ENGINE_JACK_MONDAY_MORNING
UnknownScript_0xbd12d:
displaylocation NATIONAL_PARK, $2
@@ -341,8 +348,10 @@
UnknownScript_0xbd13b:
farjump UnknownScript_0xa0654
+; Beverly
+
UnknownScript_0xbd13f:
- trainertotext POKEFANF, 1, $0
+ trainertotext POKEFANF, BEVERLY1, $0
farscall UnknownScript_0xbe0b6
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue UnknownScript_0xbd151
@@ -353,7 +362,7 @@
farjump UnknownScript_0xa0aa5
UnknownScript_0xbd158:
- trainertotext POKEFANF, 1, $0
+ trainertotext POKEFANF, BEVERLY1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_BEVERLY_HAS_NUGGET
iftrue UnknownScript_0xbd16e
@@ -368,15 +377,17 @@
displaylocation NATIONAL_PARK, $2
farjump UnknownScript_0xa061e
+; Huey
+
UnknownScript_0xbd17c:
- trainertotext SAILOR, 2, $0
+ trainertotext SAILOR, HUEY1, $0
checkflag ENGINE_HUEY
iftrue UnknownScript_0xbd1a2
farscall UnknownScript_0xbde4e
- checkflag ENGINE_88
+ checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
iftrue UnknownScript_0xbd19b
checkcode VAR_WEEKDAY
- if_not_equal $3, UnknownScript_0xbd19b
+ if_not_equal WEDNESDAY, UnknownScript_0xbd19b
checknite
iftrue UnknownScript_0xbd1cd
@@ -389,11 +400,11 @@
farjump UnknownScript_0xa0a32
UnknownScript_0xbd1a9:
- trainertotext SAILOR, 2, $0
+ trainertotext SAILOR, HUEY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_HUEY
iftrue UnknownScript_0xbd1c9
- checkflag ENGINE_88
+ checkflag ENGINE_HUEY_WEDNESDAY_NIGHT
iftrue UnknownScript_0xbd1c9
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbd1d0
@@ -403,7 +414,7 @@
farjump UnknownScript_0xbe622
UnknownScript_0xbd1cd:
- setflag ENGINE_88
+ setflag ENGINE_HUEY_WEDNESDAY_NIGHT
UnknownScript_0xbd1d0:
displaylocation LIGHTHOUSE, $2
@@ -410,15 +421,17 @@
setflag ENGINE_HUEY
farjump UnknownScript_0xa0376
+; Gaven
+
UnknownScript_0xbd1da:
- trainertotext COOLTRAINERM, 10, $0
+ trainertotext COOLTRAINERM, GAVEN3, $0
checkflag ENGINE_GAVEN
iftrue UnknownScript_0xbd1fd
farscall UnknownScript_0xbde4e
- checkflag ENGINE_89
+ checkflag ENGINE_GAVEN_THURSDAY_MORNING
iftrue UnknownScript_0xbd1f9
checkcode VAR_WEEKDAY
- if_not_equal $4, UnknownScript_0xbd1f9
+ if_not_equal THURSDAY, UnknownScript_0xbd1f9
checkmorn
iftrue UnknownScript_0xbd22c
@@ -430,11 +443,11 @@
farjump UnknownScript_0xa0a37
UnknownScript_0xbd204:
- trainertotext COOLTRAINERM, 10, $0
+ trainertotext COOLTRAINERM, GAVEN3, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_GAVEN
iftrue UnknownScript_0xbd220
- checkflag ENGINE_89
+ checkflag ENGINE_GAVEN_THURSDAY_MORNING
iftrue UnknownScript_0xbd220
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd22f
@@ -445,7 +458,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd22c:
- setflag ENGINE_89
+ setflag ENGINE_GAVEN_THURSDAY_MORNING
UnknownScript_0xbd22f:
displaylocation ROUTE_26, $2
@@ -455,15 +468,17 @@
UnknownScript_0xbd239:
farjump UnknownScript_0xa0584
+; Beth
+
UnknownScript_0xbd23d:
- trainertotext COOLTRAINERF, 9, $0
+ trainertotext COOLTRAINERF, BETH1, $0
checkflag ENGINE_BETH
iftrue UnknownScript_0xbd260
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_8A
+ checkflag ENGINE_BETH_FRIDAY_AFTERNOON
iftrue UnknownScript_0xbd25c
checkcode VAR_WEEKDAY
- if_not_equal $5, UnknownScript_0xbd25c
+ if_not_equal FRIDAY, UnknownScript_0xbd25c
checkday
iftrue UnknownScript_0xbd287
@@ -475,11 +490,11 @@
farjump UnknownScript_0xa0a3c
UnknownScript_0xbd267:
- trainertotext COOLTRAINERF, 9, $0
+ trainertotext COOLTRAINERF, BETH1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_BETH
iftrue UnknownScript_0xbd283
- checkflag ENGINE_8A
+ checkflag ENGINE_BETH_FRIDAY_AFTERNOON
iftrue UnknownScript_0xbd283
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd28a
@@ -488,7 +503,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbd287:
- setflag ENGINE_8A
+ setflag ENGINE_BETH_FRIDAY_AFTERNOON
UnknownScript_0xbd28a:
displaylocation ROUTE_26, $2
@@ -495,17 +510,19 @@
setflag ENGINE_BETH
farjump UnknownScript_0xa037e
+; Jose
+
UnknownScript_0xbd294:
- trainertotext BIRD_KEEPER, 14, $0
+ trainertotext BIRD_KEEPER, JOSE2, $0
checkflag ENGINE_JOSE
iftrue UnknownScript_0xbd2bd
farscall UnknownScript_0xbde4e
- checkflag ENGINE_8B
+ checkflag ENGINE_JOSE_SATURDAY_NIGHT
iftrue UnknownScript_0xbd2b9
checkflag ENGINE_JOSE_HAS_STAR_PIECE
iftrue UnknownScript_0xbd2c4
checkcode VAR_WEEKDAY
- if_not_equal $6, UnknownScript_0xbd2b9
+ if_not_equal SATURDAY, UnknownScript_0xbd2b9
checknite
iftrue UnknownScript_0xbd301
@@ -521,11 +538,11 @@
farjump UnknownScript_0xa0a41
UnknownScript_0xbd2cb:
- trainertotext BIRD_KEEPER, 14, $0
+ trainertotext BIRD_KEEPER, JOSE2, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_JOSE
iftrue UnknownScript_0xbd2f5
- checkflag ENGINE_8B
+ checkflag ENGINE_JOSE_SATURDAY_NIGHT
iftrue UnknownScript_0xbd2f5
checkflag ENGINE_JOSE_HAS_STAR_PIECE
iftrue UnknownScript_0xbd2f5
@@ -540,7 +557,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd301:
- setflag ENGINE_8B
+ setflag ENGINE_JOSE_SATURDAY_NIGHT
UnknownScript_0xbd304:
displaylocation ROUTE_27, $2
@@ -555,15 +572,17 @@
displaylocation ROUTE_27, $2
farjump UnknownScript_0xa05e6
+; Reena
+
UnknownScript_0xbd31c:
- trainertotext COOLTRAINERF, 10, $0
+ trainertotext COOLTRAINERF, REENA1, $0
checkflag ENGINE_REENA
iftrue UnknownScript_0xbd33f
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_8C
+ checkflag ENGINE_REENA_SUNDAY_MORNING
iftrue UnknownScript_0xbd33b
checkcode VAR_WEEKDAY
- if_not_equal $0, UnknownScript_0xbd33b
+ if_not_equal SUNDAY, UnknownScript_0xbd33b
checkmorn
iftrue UnknownScript_0xbd366
@@ -575,11 +594,11 @@
farjump UnknownScript_0xa0a46
UnknownScript_0xbd346:
- trainertotext COOLTRAINERF, 10, $0
+ trainertotext COOLTRAINERF, REENA1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_REENA
iftrue UnknownScript_0xbd362
- checkflag ENGINE_8C
+ checkflag ENGINE_REENA_SUNDAY_MORNING
iftrue UnknownScript_0xbd362
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd369
@@ -588,7 +607,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbd366:
- setflag ENGINE_8C
+ setflag ENGINE_REENA_SUNDAY_MORNING
UnknownScript_0xbd369:
displaylocation ROUTE_27, $2
@@ -595,15 +614,17 @@
setflag ENGINE_REENA
farjump UnknownScript_0xa037e
+; Joey
+
UnknownScript_0xbd373:
- trainertotext YOUNGSTER, 1, $0
+ trainertotext YOUNGSTER, JOEY1, $0
checkflag ENGINE_JOEY
iftrue UnknownScript_0xbd399
farscall UnknownScript_0xbde4e
- checkflag ENGINE_8D
+ checkflag ENGINE_JOEY_MONDAY_AFTERNOON
iftrue UnknownScript_0xbd392
checkcode VAR_WEEKDAY
- if_not_equal $1, UnknownScript_0xbd392
+ if_not_equal MONDAY, UnknownScript_0xbd392
checkday
iftrue UnknownScript_0xbd3c4
@@ -616,11 +637,11 @@
farjump UnknownScript_0xa0a4b
UnknownScript_0xbd3a0:
- trainertotext YOUNGSTER, 1, $0
+ trainertotext YOUNGSTER, JOEY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_JOEY
iftrue UnknownScript_0xbd3c0
- checkflag ENGINE_8D
+ checkflag ENGINE_JOEY_MONDAY_AFTERNOON
iftrue UnknownScript_0xbd3c0
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbd3c7
@@ -630,7 +651,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd3c4:
- setflag ENGINE_8D
+ setflag ENGINE_JOEY_MONDAY_AFTERNOON
UnknownScript_0xbd3c7:
displaylocation ROUTE_30, $2
@@ -637,17 +658,19 @@
setflag ENGINE_JOEY
farjump UnknownScript_0xa0376
+; Wade
+
UnknownScript_0xbd3d1:
- trainertotext BUG_CATCHER, 4, $0
+ trainertotext BUG_CATCHER, WADE1, $0
checkflag ENGINE_WADE
iftrue UnknownScript_0xbd41a
farscall UnknownScript_0xbde4e
- checkflag ENGINE_8E
+ checkflag ENGINE_WADE_TUESDAY_NIGHT
iftrue UnknownScript_0xbd3f6
checkflag ENGINE_WADE_HAS_ITEM
iftrue UnknownScript_0xbd421
checkcode VAR_WEEKDAY
- if_not_equal $2, UnknownScript_0xbd3f6
+ if_not_equal TUESDAY, UnknownScript_0xbd3f6
checknite
iftrue UnknownScript_0xbd484
@@ -657,9 +680,9 @@
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbd412
checkcode VAR_WEEKDAY
- if_equal $2, UnknownScript_0xbd416
- if_equal $4, UnknownScript_0xbd416
- if_equal $6, UnknownScript_0xbd416
+ if_equal TUESDAY, UnknownScript_0xbd416
+ if_equal THURSDAY, UnknownScript_0xbd416
+ if_equal SATURDAY, UnknownScript_0xbd416
UnknownScript_0xbd412:
farjump UnknownScript_0xa0938
@@ -676,7 +699,7 @@
farjump UnknownScript_0xa0ab5
UnknownScript_0xbd428:
- trainertotext BUG_CATCHER, 4, $0
+ trainertotext BUG_CATCHER, WADE1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd44c
@@ -683,14 +706,14 @@
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbd44c
checkcode VAR_WEEKDAY
- if_equal $2, UnknownScript_0xbd480
- if_equal $4, UnknownScript_0xbd480
- if_equal $6, UnknownScript_0xbd480
+ if_equal TUESDAY, UnknownScript_0xbd480
+ if_equal THURSDAY, UnknownScript_0xbd480
+ if_equal SATURDAY, UnknownScript_0xbd480
UnknownScript_0xbd44c:
checkflag ENGINE_WADE
iftrue UnknownScript_0xbd474
- checkflag ENGINE_8E
+ checkflag ENGINE_WADE_TUESDAY_NIGHT
iftrue UnknownScript_0xbd474
checkflag ENGINE_WADE_HAS_ITEM
iftrue UnknownScript_0xbd474
@@ -710,7 +733,7 @@
farjump UnknownScript_0xa05a4
UnknownScript_0xbd484:
- setflag ENGINE_8E
+ setflag ENGINE_WADE_TUESDAY_NIGHT
UnknownScript_0xbd487:
displaylocation ROUTE_31, $2
@@ -751,15 +774,17 @@
UnknownScript_0xbd4ce:
farjump UnknownScript_0xa05e6
+; Ralph
+
UnknownScript_0xbd4d2:
- trainertotext FISHER, 2, $0
+ trainertotext FISHER, RALPH1, $0
checkflag ENGINE_RALPH
iftrue UnknownScript_0xbd4fb
farscall UnknownScript_0xbde4e
- checkflag ENGINE_8F
+ checkflag ENGINE_RALPH_WEDNESDAY_MORNING
iftrue UnknownScript_0xbd4f1
checkcode VAR_WEEKDAY
- if_not_equal $3, UnknownScript_0xbd4f1
+ if_not_equal WEDNESDAY, UnknownScript_0xbd4f1
checkmorn
iftrue UnknownScript_0xbd537
@@ -777,13 +802,13 @@
farjump UnknownScript_0xa0af5
UnknownScript_0xbd509:
- trainertotext FISHER, 2, $0
+ trainertotext FISHER, RALPH1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse UnknownScript_0xbd52b
checkflag ENGINE_RALPH
iftrue UnknownScript_0xbd52b
- checkflag ENGINE_8F
+ checkflag ENGINE_RALPH_WEDNESDAY_MORNING
iftrue UnknownScript_0xbd52b
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd53a
@@ -794,7 +819,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd537:
- setflag ENGINE_8F
+ setflag ENGINE_RALPH_WEDNESDAY_MORNING
UnknownScript_0xbd53a:
displaylocation ROUTE_32, $2
@@ -814,15 +839,17 @@
UnknownScript_0xbd55c:
farjump UnknownScript_0xa0000
+; Liz
+
UnknownScript_0xbd560:
- trainertotext PICNICKER, 1, $0
+ trainertotext PICNICKER, LIZ1, $0
checkflag ENGINE_LIZ
iftrue UnknownScript_0xbd586
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_90
+ checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
iftrue UnknownScript_0xbd57f
checkcode VAR_WEEKDAY
- if_not_equal $4, UnknownScript_0xbd57f
+ if_not_equal THURSDAY, UnknownScript_0xbd57f
checkday
iftrue UnknownScript_0xbd5c3
@@ -835,13 +862,13 @@
farjump UnknownScript_0xa0a5a
UnknownScript_0xbd58d:
- trainertotext PICNICKER, 1, $0
+ trainertotext PICNICKER, LIZ1, $0
farscall UnknownScript_0xbde45
if_equal $0, UnknownScript_0xbd5d0
farscall UnknownScript_0xbe41e
checkflag ENGINE_LIZ
iftrue UnknownScript_0xbd5a9
- checkflag ENGINE_90
+ checkflag ENGINE_LIZ_THURSDAY_AFTERNOON
iftrue UnknownScript_0xbd5a9
UnknownScript_0xbd5a9:
@@ -856,7 +883,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbd5c3:
- setflag ENGINE_90
+ setflag ENGINE_LIZ_THURSDAY_AFTERNOON
UnknownScript_0xbd5c6:
displaylocation ROUTE_32, $2
@@ -879,53 +906,55 @@
if_equal $8, UnknownScript_0xbd62a
UnknownScript_0xbd5fa:
- trainerclassname $1b, $1
+ trainerclassname COOLTRAINERM, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd600:
- trainerclassname $1d, $1
+ trainerclassname BEAUTY, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd606:
- trainerclassname $1f, $1
+ trainerclassname GRUNTM, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd60c:
- trainerclassname $22, $1
+ trainerclassname TEACHER, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd612:
- trainerclassname $27, $1
+ trainerclassname SWIMMERF, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd618:
- trainerclassname $3c, $1
+ trainerclassname KIMONO_GIRL, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd61e:
- trainerclassname $21, $1
+ trainerclassname SKIER, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd624:
- trainerclassname $39, $1
+ trainerclassname MEDIUM, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd62a:
- trainerclassname $3b, $1
+ trainerclassname POKEFANM, $1
jump UnknownScript_0xbd630
UnknownScript_0xbd630:
farjump UnknownScript_0xa06da
+; Anthony
+
UnknownScript_0xbd634:
- trainertotext HIKER, 5, $0
+ trainertotext HIKER, ANTHONY2, $0
checkflag ENGINE_ANTHONY
iftrue UnknownScript_0xbd65d
farscall UnknownScript_0xbde4e
- checkflag ENGINE_91
+ checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
iftrue UnknownScript_0xbd653
checkcode VAR_WEEKDAY
- if_not_equal $5, UnknownScript_0xbd653
+ if_not_equal FRIDAY, UnknownScript_0xbd653
checknite
iftrue UnknownScript_0xbd699
@@ -943,13 +972,13 @@
farjump UnknownScript_0xa0afa
UnknownScript_0xbd66b:
- trainertotext HIKER, 5, $0
+ trainertotext HIKER, ANTHONY2, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse UnknownScript_0xbd68d
checkflag ENGINE_ANTHONY
iftrue UnknownScript_0xbd68d
- checkflag ENGINE_91
+ checkflag ENGINE_ANTHONY_FRIDAY_NIGHT
iftrue UnknownScript_0xbd68d
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd69c
@@ -960,7 +989,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd699:
- setflag ENGINE_91
+ setflag ENGINE_ANTHONY_FRIDAY_NIGHT
UnknownScript_0xbd69c:
displaylocation ROUTE_33, $2
@@ -979,15 +1008,17 @@
UnknownScript_0xbd6bd:
farjump UnknownScript_0xa0000
+; Todd
+
UnknownScript_0xbd6c1:
- trainertotext CAMPER, 2, $0
+ trainertotext CAMPER, TODD1, $0
checkflag ENGINE_TODD
iftrue UnknownScript_0xbd6ea
farscall UnknownScript_0xbde4e
- checkflag ENGINE_92
+ checkflag ENGINE_TODD_SATURDAY_MORNING
iftrue UnknownScript_0xbd6e0
checkcode VAR_WEEKDAY
- if_not_equal $6, UnknownScript_0xbd6e0
+ if_not_equal SATURDAY, UnknownScript_0xbd6e0
checkmorn
iftrue UnknownScript_0xbd72b
@@ -1004,11 +1035,11 @@
farjump UnknownScript_0xa0b04
UnknownScript_0xbd6f5:
- trainertotext CAMPER, 2, $0
+ trainertotext CAMPER, TODD1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_TODD
iftrue UnknownScript_0xbd717
- checkflag ENGINE_92
+ checkflag ENGINE_TODD_SATURDAY_MORNING
iftrue UnknownScript_0xbd717
checkflag ENGINE_FLYPOINT_GOLDENROD
iffalse UnknownScript_0xbd71f
@@ -1025,7 +1056,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd72b:
- setflag ENGINE_92
+ setflag ENGINE_TODD_SATURDAY_MORNING
UnknownScript_0xbd72e:
displaylocation ROUTE_34, $2
@@ -1039,17 +1070,19 @@
setflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON
farjump UnknownScript_0xa0644
+; Gina
+
UnknownScript_0xbd743:
- trainertotext PICNICKER, 2, $0
+ trainertotext PICNICKER, GINA1, $0
checkflag ENGINE_GINA
iftrue UnknownScript_0xbd776
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_93
+ checkflag ENGINE_GINA_SUNDAY_AFTERNOON
iftrue UnknownScript_0xbd768
checkflag ENGINE_GINA_HAS_LEAF_STONE
iftrue UnknownScript_0xbd77d
checkcode VAR_WEEKDAY
- if_not_equal $0, UnknownScript_0xbd768
+ if_not_equal SUNDAY, UnknownScript_0xbd768
checkday
iftrue UnknownScript_0xbd7cc
@@ -1070,17 +1103,17 @@
farjump UnknownScript_0xa0abd
UnknownScript_0xbd784:
- trainertotext PICNICKER, 2, $0
+ trainertotext PICNICKER, GINA1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xbd7d9
checkflag ENGINE_GINA
iftrue UnknownScript_0xbd7c8
- checkflag ENGINE_93
+ checkflag ENGINE_GINA_SUNDAY_AFTERNOON
iftrue UnknownScript_0xbd7c8
checkflag ENGINE_GINA_HAS_LEAF_STONE
iftrue UnknownScript_0xbd7c8
- checkevent EVENT_100
+ checkevent EVENT_GINA_GAVE_LEAF_STONE
iftrue UnknownScript_0xbd7b2
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd7dd
@@ -1097,7 +1130,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbd7cc:
- setflag ENGINE_93
+ setflag ENGINE_GINA_SUNDAY_AFTERNOON
UnknownScript_0xbd7cf:
displaylocation ROUTE_34, $2
@@ -1112,8 +1145,10 @@
displaylocation ROUTE_34, $2
farjump UnknownScript_0xa061e
+; Irwin
+
UnknownScript_0xbd7e7:
- trainertotext JUGGLER, 1, $0
+ trainertotext JUGGLER, IRWIN1, $0
farscall UnknownScript_0xbde4e
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xbd7f9
@@ -1123,7 +1158,7 @@
farjump UnknownScript_0xa05be
UnknownScript_0xbd7fd:
- trainertotext JUGGLER, 1, $0
+ trainertotext JUGGLER, IRWIN1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xbd80f
@@ -1132,15 +1167,17 @@
UnknownScript_0xbd80f:
farjump UnknownScript_0xa05be
+; Arnie
+
UnknownScript_0xbd813:
- trainertotext BUG_CATCHER, 8, $0
+ trainertotext BUG_CATCHER, ARNIE1, $0
checkflag ENGINE_ARNIE
iftrue UnknownScript_0xbd83c
farscall UnknownScript_0xbde4e
- checkflag ENGINE_94
+ checkflag ENGINE_ARNIE_TUESDAY_MORNING
iftrue UnknownScript_0xbd832
checkcode VAR_WEEKDAY
- if_not_equal $2, UnknownScript_0xbd832
+ if_not_equal TUESDAY, UnknownScript_0xbd832
checkmorn
iftrue UnknownScript_0xbd87a
@@ -1158,11 +1195,11 @@
farjump UnknownScript_0xa0aff
UnknownScript_0xbd84a:
- trainertotext BUG_CATCHER, 8, $0
+ trainertotext BUG_CATCHER, ARNIE1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_ARNIE
iftrue UnknownScript_0xbd866
- checkflag ENGINE_94
+ checkflag ENGINE_ARNIE_TUESDAY_MORNING
iftrue UnknownScript_0xbd866
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd87d
@@ -1175,7 +1212,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd87a:
- setflag ENGINE_94
+ setflag ENGINE_ARNIE_TUESDAY_MORNING
UnknownScript_0xbd87d:
displaylocation ROUTE_35, $2
@@ -1197,17 +1234,19 @@
UnknownScript_0xbd8a2:
farjump UnknownScript_0xa0000
+; Alan
+
UnknownScript_0xbd8a6:
- trainertotext SCHOOLBOY, 3, $0
+ trainertotext SCHOOLBOY, ALAN1, $0
checkflag ENGINE_ALAN
iftrue UnknownScript_0xbd8cf
farscall UnknownScript_0xbde4e
- checkflag ENGINE_95
+ checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
iftrue UnknownScript_0xbd8cb
checkflag ENGINE_ALAN_HAS_FIRE_STONE
iftrue UnknownScript_0xbd8d6
checkcode VAR_WEEKDAY
- if_not_equal $3, UnknownScript_0xbd8cb
+ if_not_equal WEDNESDAY, UnknownScript_0xbd8cb
checkday
iftrue UnknownScript_0xbd919
@@ -1223,17 +1262,17 @@
farjump UnknownScript_0xa0ac5
UnknownScript_0xbd8dd:
- trainertotext SCHOOLBOY, 3, $0
+ trainertotext SCHOOLBOY, ALAN1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_ALAN
iftrue UnknownScript_0xbd915
- checkflag ENGINE_95
+ checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
iftrue UnknownScript_0xbd915
checkflag ENGINE_ALAN_HAS_FIRE_STONE
iftrue UnknownScript_0xbd915
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbd91c
- checkevent EVENT_101
+ checkevent EVENT_ALAN_GAVE_FIRE_STONE
iftrue UnknownScript_0xbd90d
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd926
@@ -1246,7 +1285,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbd919:
- setflag ENGINE_95
+ setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON
UnknownScript_0xbd91c:
displaylocation ROUTE_36, $2
@@ -1258,17 +1297,19 @@
displaylocation ROUTE_36, $2
farjump UnknownScript_0xa05e6
+; Dana
+
UnknownScript_0xbd930:
- trainertotext LASS, 10, $0
+ trainertotext LASS, DANA1, $0
checkflag ENGINE_DANA
iftrue UnknownScript_0xbd959
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_96
+ checkflag ENGINE_DANA_THURSDAY_NIGHT
iftrue UnknownScript_0xbd955
- checkflag ENGINE_LIZ_HAS_THUNDERSTONE
+ checkflag ENGINE_DANA_HAS_THUNDERSTONE
iftrue UnknownScript_0xbd960
checkcode VAR_WEEKDAY
- if_not_equal $4, UnknownScript_0xbd955
+ if_not_equal THURSDAY, UnknownScript_0xbd955
checknite
iftrue UnknownScript_0xbd9ab
@@ -1284,17 +1325,17 @@
farjump UnknownScript_0xa0acd
UnknownScript_0xbd967:
- trainertotext LASS, 10, $0
+ trainertotext LASS, DANA1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_DANA
iftrue UnknownScript_0xbd99f
- checkflag ENGINE_96
+ checkflag ENGINE_DANA_THURSDAY_NIGHT
iftrue UnknownScript_0xbd99f
- checkflag ENGINE_LIZ_HAS_THUNDERSTONE
+ checkflag ENGINE_DANA_HAS_THUNDERSTONE
iftrue UnknownScript_0xbd99f
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbd9ae
- checkevent EVENT_102
+ checkevent EVENT_DANA_GAVE_THUNDERSTONE
iftrue UnknownScript_0xbd997
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbd9bc
@@ -1309,7 +1350,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbd9ab:
- setflag ENGINE_96
+ setflag ENGINE_DANA_THURSDAY_NIGHT
UnknownScript_0xbd9ae:
displaylocation ROUTE_38, $2
@@ -1320,19 +1361,21 @@
farjump UnknownScript_0xa0592
UnknownScript_0xbd9bc:
- setflag ENGINE_LIZ_HAS_THUNDERSTONE
+ setflag ENGINE_DANA_HAS_THUNDERSTONE
displaylocation ROUTE_38, $2
farjump UnknownScript_0xa061e
+; Chad
+
UnknownScript_0xbd9c6:
- trainertotext SCHOOLBOY, 10, $0
+ trainertotext SCHOOLBOY, CHAD1, $0
checkflag ENGINE_CHAD
iftrue UnknownScript_0xbd9e9
farscall UnknownScript_0xbde4e
- checkflag ENGINE_97
+ checkflag ENGINE_CHAD_FRIDAY_MORNING
iftrue UnknownScript_0xbd9e5
checkcode VAR_WEEKDAY
- if_not_equal $5, UnknownScript_0xbd9e5
+ if_not_equal FRIDAY, UnknownScript_0xbd9e5
checkmorn
iftrue UnknownScript_0xbda20
@@ -1344,13 +1387,13 @@
farjump UnknownScript_0xa0a7d
UnknownScript_0xbd9f0:
- trainertotext SCHOOLBOY, 10, $0
+ trainertotext SCHOOLBOY, CHAD1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbda31
checkflag ENGINE_CHAD
iftrue UnknownScript_0xbda14
- checkflag ENGINE_97
+ checkflag ENGINE_CHAD_FRIDAY_MORNING
iftrue UnknownScript_0xbda14
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbda23
@@ -1361,7 +1404,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbda20:
- setflag ENGINE_97
+ setflag ENGINE_CHAD_FRIDAY_MORNING
UnknownScript_0xbda23:
displaylocation ROUTE_38, $2
@@ -1375,7 +1418,7 @@
farjump UnknownScript_0xa0754
UnknownScript_0xbda35:
- trainertotext POKEFANM, 2, $0
+ trainertotext POKEFANM, DEREK1, $0
farscall UnknownScript_0xbde4e
checkflag ENGINE_DEREK_HAS_NUGGET
iftrue UnknownScript_0xbda67
@@ -1384,9 +1427,9 @@
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbda5f
checkcode VAR_WEEKDAY
- if_equal $2, UnknownScript_0xbda63
- if_equal $4, UnknownScript_0xbda63
- if_equal $6, UnknownScript_0xbda63
+ if_equal TUESDAY, UnknownScript_0xbda63
+ if_equal THURSDAY, UnknownScript_0xbda63
+ if_equal SATURDAY, UnknownScript_0xbda63
UnknownScript_0xbda5f:
farjump UnknownScript_0xa0988
@@ -1399,7 +1442,7 @@
farjump UnknownScript_0xa0ad5
UnknownScript_0xbda6e:
- trainertotext POKEFANM, 2, $0
+ trainertotext POKEFANM, DEREK1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbda92
@@ -1406,9 +1449,9 @@
checkflag ENGINE_DAILY_BUG_CONTEST
iftrue UnknownScript_0xbda92
checkcode VAR_WEEKDAY
- if_equal $2, UnknownScript_0xbda9e
- if_equal $4, UnknownScript_0xbda9e
- if_equal $6, UnknownScript_0xbda9e
+ if_equal TUESDAY, UnknownScript_0xbda9e
+ if_equal THURSDAY, UnknownScript_0xbda9e
+ if_equal SATURDAY, UnknownScript_0xbda9e
UnknownScript_0xbda92:
farscall UnknownScript_0xbde45
@@ -1424,16 +1467,16 @@
farjump UnknownScript_0xa05e6
UnknownScript_0xbdaac:
- trainertotext FISHER, 7, $0
+ trainertotext FISHER, TULLY1, $0
checkflag ENGINE_TULLY
iftrue UnknownScript_0xbdad5
farscall UnknownScript_0xbde4e
- checkflag ENGINE_98
+ checkflag ENGINE_TULLY_SUNDAY_NIGHT
iftrue UnknownScript_0xbdad1
checkflag ENGINE_TULLY_HAS_WATER_STONE
iftrue UnknownScript_0xbdadc
checkcode VAR_WEEKDAY
- if_not_equal $0, UnknownScript_0xbdad1
+ if_not_equal SUNDAY, UnknownScript_0xbdad1
checknite
iftrue UnknownScript_0xbdb1f
@@ -1449,17 +1492,17 @@
farjump UnknownScript_0xa0add
UnknownScript_0xbdae3:
- trainertotext FISHER, 7, $0
+ trainertotext FISHER, TULLY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_TULLY
iftrue UnknownScript_0xbdb1b
- checkflag ENGINE_98
+ checkflag ENGINE_TULLY_SUNDAY_NIGHT
iftrue UnknownScript_0xbdb1b
checkflag ENGINE_TULLY_HAS_WATER_STONE
iftrue UnknownScript_0xbdb1b
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbdb22
- checkevent EVENT_103
+ checkevent EVENT_TULLY_GAVE_WATER_STONE
iftrue UnknownScript_0xbdb13
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbdb2c
@@ -1472,7 +1515,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbdb1f:
- setflag ENGINE_98
+ setflag ENGINE_TULLY_SUNDAY_NIGHT
UnknownScript_0xbdb22:
displaylocation ROUTE_42, $2
@@ -1485,14 +1528,14 @@
farjump UnknownScript_0xa05e6
UnknownScript_0xbdb36:
- trainertotext POKEMANIAC, 6, $0
+ trainertotext POKEMANIAC, BRENT1, $0
checkflag ENGINE_BRENT
iftrue UnknownScript_0xbdb59
farscall UnknownScript_0xbde4e
- checkflag ENGINE_99
+ checkflag ENGINE_BRENT_MONDAY_MORNING
iftrue UnknownScript_0xbdb55
checkcode VAR_WEEKDAY
- if_not_equal $1, UnknownScript_0xbdb55
+ if_not_equal MONDAY, UnknownScript_0xbdb55
checkmorn
iftrue UnknownScript_0xbdb88
@@ -1504,13 +1547,13 @@
farjump UnknownScript_0xa0a87
UnknownScript_0xbdb60:
- trainertotext POKEMANIAC, 6, $0
+ trainertotext POKEMANIAC, BRENT1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbdb95
checkflag ENGINE_BRENT
iftrue UnknownScript_0xbdb84
- checkflag ENGINE_99
+ checkflag ENGINE_BRENT_MONDAY_MORNING
iftrue UnknownScript_0xbdb84
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbdb8b
@@ -1519,7 +1562,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbdb88:
- setflag ENGINE_99
+ setflag ENGINE_BRENT_MONDAY_MORNING
UnknownScript_0xbdb8b:
displaylocation ROUTE_43, $2
@@ -1530,16 +1573,16 @@
farjump UnknownScript_0xa07ce
UnknownScript_0xbdb99:
- trainertotext PICNICKER, 20, $0
+ trainertotext PICNICKER, TIFFANY3, $0
checkflag ENGINE_TIFFANY
iftrue UnknownScript_0xbdbc2
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_9A
+ checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
iftrue UnknownScript_0xbdbbe
checkflag ENGINE_TIFFANY_HAS_PINK_BOW
iftrue UnknownScript_0xbdbc9
checkcode VAR_WEEKDAY
- if_not_equal $2, UnknownScript_0xbdbbe
+ if_not_equal TUESDAY, UnknownScript_0xbdbbe
checkday
iftrue UnknownScript_0xbdc14
@@ -1555,19 +1598,19 @@
farjump UnknownScript_0xa0ae5
UnknownScript_0xbdbd0:
- trainertotext PICNICKER, 20, $0
+ trainertotext PICNICKER, TIFFANY3, $0
farscall UnknownScript_0xbde45
if_equal $0, UnknownScript_0xbdc21
farscall UnknownScript_0xbe41e
checkflag ENGINE_TIFFANY
iftrue UnknownScript_0xbdc10
- checkflag ENGINE_9A
+ checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
iftrue UnknownScript_0xbdc10
checkflag ENGINE_TIFFANY_HAS_PINK_BOW
iftrue UnknownScript_0xbdc10
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbdc17
- checkevent EVENT_104
+ checkevent EVENT_TIFFANY_GAVE_PINK_BOW
iftrue UnknownScript_0xbdc08
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbdc69
@@ -1580,7 +1623,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbdc14:
- setflag ENGINE_9A
+ setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON
UnknownScript_0xbdc17:
displaylocation ROUTE_43, $2
@@ -1628,15 +1671,17 @@
displaylocation ROUTE_43, $2
farjump UnknownScript_0xa061e
+; Vance
+
UnknownScript_0xbdc73:
- trainertotext BIRD_KEEPER, 7, $0
+ trainertotext BIRD_KEEPER, VANCE1, $0
checkflag ENGINE_VANCE
iftrue UnknownScript_0xbdc96
farscall UnknownScript_0xbde4e
- checkflag ENGINE_9B
+ checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
iftrue UnknownScript_0xbdc92
checkcode VAR_WEEKDAY
- if_not_equal $3, UnknownScript_0xbdc92
+ if_not_equal WEDNESDAY, UnknownScript_0xbdc92
checknite
iftrue UnknownScript_0xbdcc1
@@ -1648,11 +1693,11 @@
farjump UnknownScript_0xa0a91
UnknownScript_0xbdc9d:
- trainertotext BIRD_KEEPER, 7, $0
+ trainertotext BIRD_KEEPER, VANCE1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_VANCE
iftrue UnknownScript_0xbdcbd
- checkflag ENGINE_9B
+ checkflag ENGINE_VANCE_WEDNESDAY_NIGHT
iftrue UnknownScript_0xbdcbd
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbdcc4
@@ -1662,7 +1707,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbdcc1:
- setflag ENGINE_9B
+ setflag ENGINE_VANCE_WEDNESDAY_NIGHT
UnknownScript_0xbdcc4:
displaylocation ROUTE_44, $2
@@ -1670,16 +1715,16 @@
farjump UnknownScript_0xa0376
UnknownScript_0xbdcce:
- trainertotext FISHER, 10, $0
+ trainertotext FISHER, WILTON1, $0
checkflag ENGINE_WILTON
iftrue UnknownScript_0xbdcf7
farscall UnknownScript_0xbde4e
- checkflag ENGINE_9C
+ checkflag ENGINE_WILTON_THRUSDAY_MORNING
iftrue UnknownScript_0xbdcf3
checkflag ENGINE_WILTON_HAS_ITEM
iftrue UnknownScript_0xbdcfe
checkcode VAR_WEEKDAY
- if_not_equal $4, UnknownScript_0xbdcf3
+ if_not_equal THURSDAY, UnknownScript_0xbdcf3
checkmorn
iftrue UnknownScript_0xbdd33
@@ -1695,11 +1740,11 @@
farjump UnknownScript_0xa0aed
UnknownScript_0xbdd05:
- trainertotext FISHER, 10, $0
+ trainertotext FISHER, WILTON1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_WILTON
iftrue UnknownScript_0xbdd2f
- checkflag ENGINE_9C
+ checkflag ENGINE_WILTON_THRUSDAY_MORNING
iftrue UnknownScript_0xbdd2f
checkflag ENGINE_WILTON_HAS_ITEM
iftrue UnknownScript_0xbdd2f
@@ -1712,7 +1757,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbdd33:
- setflag ENGINE_9C
+ setflag ENGINE_WILTON_THRUSDAY_MORNING
UnknownScript_0xbdd36:
displaylocation ROUTE_44, $2
@@ -1745,25 +1790,29 @@
UnknownScript_0xbdd6d:
farjump UnknownScript_0xa05e6
+; Kenji
+
UnknownScript_0xbdd71:
- trainertotext BLACKBELT_T, 8, $0
+ trainertotext BLACKBELT_T, KENJI3, $0
farscall UnknownScript_0xbde4e
farjump UnknownScript_0xa09ee
UnknownScript_0xbdd7d:
- trainertotext BLACKBELT_T, 8, $0
+ trainertotext BLACKBELT_T, KENJI3, $0
farscall UnknownScript_0xbe1b6
farjump UnknownScript_0xa064c
+; Parry
+
UnknownScript_0xbdd89:
- trainertotext HIKER, 9, $0
+ trainertotext HIKER, PARRY1, $0
checkflag ENGINE_PARRY
iftrue UnknownScript_0xbddac
farscall UnknownScript_0xbde4e
- checkflag ENGINE_9D
+ checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
iftrue UnknownScript_0xbdda8
checkcode VAR_WEEKDAY
- if_not_equal $5, UnknownScript_0xbdda8
+ if_not_equal FRIDAY, UnknownScript_0xbdda8
checkday
iftrue UnknownScript_0xbddd7
@@ -1775,11 +1824,11 @@
farjump UnknownScript_0xa0a9b
UnknownScript_0xbddb3:
- trainertotext HIKER, 9, $0
+ trainertotext HIKER, PARRY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_PARRY
iftrue UnknownScript_0xbddd3
- checkflag ENGINE_9D
+ checkflag ENGINE_PARRY_FRIDAY_AFTERNOON
iftrue UnknownScript_0xbddd3
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xbddda
@@ -1789,7 +1838,7 @@
farjump UnknownScript_0xa0000
UnknownScript_0xbddd7:
- setflag ENGINE_9D
+ setflag ENGINE_PARRY_FRIDAY_AFTERNOON
UnknownScript_0xbddda:
displaylocation ROUTE_45, $2
@@ -1796,15 +1845,17 @@
setflag ENGINE_PARRY
farjump UnknownScript_0xa0376
+; Erin
+
UnknownScript_0xbdde4:
- trainertotext PICNICKER, 10, $0
+ trainertotext PICNICKER, ERIN1, $0
checkflag ENGINE_ERIN
iftrue UnknownScript_0xbde07
farscall UnknownScript_0xbe0b6
- checkflag ENGINE_9E
+ checkflag ENGINE_ERIN_SATURDAY_NIGHT
iftrue UnknownScript_0xbde03
checkcode VAR_WEEKDAY
- if_not_equal $6, UnknownScript_0xbde03
+ if_not_equal SATURDAY, UnknownScript_0xbde03
checknite
iftrue UnknownScript_0xbde32
@@ -1816,11 +1867,11 @@
farjump UnknownScript_0xa0aa0
UnknownScript_0xbde0e:
- trainertotext PICNICKER, 10, $0
+ trainertotext PICNICKER, ERIN1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_ERIN
iftrue UnknownScript_0xbde2e
- checkflag ENGINE_9E
+ checkflag ENGINE_ERIN_SATURDAY_NIGHT
iftrue UnknownScript_0xbde2e
farscall UnknownScript_0xbde42
if_equal $0, UnknownScript_0xbde35
@@ -1830,7 +1881,7 @@
farjump UnknownScript_0xa0017
UnknownScript_0xbde32:
- setflag ENGINE_9E
+ setflag ENGINE_ERIN_SATURDAY_NIGHT
UnknownScript_0xbde35:
displaylocation ROUTE_46, $2
@@ -1863,26 +1914,26 @@
checknite
iftrue UnknownScript_0xbdfec
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbdeaa
- if_equal $7, UnknownScript_0xbdeb0
- if_equal $b, UnknownScript_0xbdeb6
- if_equal $d, UnknownScript_0xbdebc
- if_equal $f, UnknownScript_0xbdec2
- if_equal $10, UnknownScript_0xbdec8
- if_equal $11, UnknownScript_0xbdece
- if_equal $13, UnknownScript_0xbded4
- if_equal $14, UnknownScript_0xbdeda
- if_equal $16, UnknownScript_0xbdee0
- if_equal $17, UnknownScript_0xbdee6
- if_equal $18, UnknownScript_0xbdeec
- if_equal $1b, UnknownScript_0xbdef2
- if_equal $1c, UnknownScript_0xbdef8
- if_equal $1d, UnknownScript_0xbdefe
- if_equal $1e, UnknownScript_0xbdf04
- if_equal $20, UnknownScript_0xbdf0a
- if_equal $21, UnknownScript_0xbdf10
- if_equal $22, UnknownScript_0xbdf16
- if_equal $23, UnknownScript_0xbdf1c
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbdeaa
+ if_equal PHONE_SAILOR_HUEY, UnknownScript_0xbdeb0
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbdeb6
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbdebc
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbdec2
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbdec8
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbdece
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbded4
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbdeda
+ if_equal PHONE_JUGGLER_IRWIN, UnknownScript_0xbdee0
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbdee6
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbdeec
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbdef2
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbdef8
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbdefe
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbdf04
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbdf0a
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbdf10
+ if_equal PHONE_BLACKBELT_KENJI, UnknownScript_0xbdf16
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbdf1c
UnknownScript_0xbdeaa:
farwritetext UnknownText_0x1b4dc5
@@ -1986,26 +2037,26 @@
UnknownScript_0xbdf22:
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbdf74
- if_equal $7, UnknownScript_0xbdf7a
- if_equal $b, UnknownScript_0xbdf80
- if_equal $d, UnknownScript_0xbdf86
- if_equal $f, UnknownScript_0xbdf8c
- if_equal $10, UnknownScript_0xbdf92
- if_equal $11, UnknownScript_0xbdf98
- if_equal $13, UnknownScript_0xbdf9e
- if_equal $14, UnknownScript_0xbdfa4
- if_equal $16, UnknownScript_0xbdfaa
- if_equal $17, UnknownScript_0xbdfb0
- if_equal $18, UnknownScript_0xbdfb6
- if_equal $1b, UnknownScript_0xbdfbc
- if_equal $1c, UnknownScript_0xbdfc2
- if_equal $1d, UnknownScript_0xbdfc8
- if_equal $1e, UnknownScript_0xbdfce
- if_equal $20, UnknownScript_0xbdfd4
- if_equal $21, UnknownScript_0xbdfda
- if_equal $22, UnknownScript_0xbdfe0
- if_equal $23, UnknownScript_0xbdfe6
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbdf74
+ if_equal PHONE_SAILOR_HUEY, UnknownScript_0xbdf7a
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbdf80
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbdf86
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbdf8c
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbdf92
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbdf98
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbdf9e
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbdfa4
+ if_equal PHONE_JUGGLER_IRWIN, UnknownScript_0xbdfaa
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbdfb0
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbdfb6
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbdfbc
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbdfc2
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbdfc8
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbdfce
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbdfd4
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbdfda
+ if_equal PHONE_BLACKBELT_KENJI, UnknownScript_0xbdfe0
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbdfe6
UnknownScript_0xbdf74:
farwritetext UnknownText_0x1b4ded
@@ -2109,26 +2160,26 @@
UnknownScript_0xbdfec:
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbe03e
- if_equal $7, UnknownScript_0xbe044
- if_equal $b, UnknownScript_0xbe04a
- if_equal $d, UnknownScript_0xbe050
- if_equal $f, UnknownScript_0xbe056
- if_equal $10, UnknownScript_0xbe05c
- if_equal $11, UnknownScript_0xbe062
- if_equal $13, UnknownScript_0xbe068
- if_equal $14, UnknownScript_0xbe06e
- if_equal $16, UnknownScript_0xbe074
- if_equal $17, UnknownScript_0xbe07a
- if_equal $18, UnknownScript_0xbe080
- if_equal $1b, UnknownScript_0xbe086
- if_equal $1c, UnknownScript_0xbe08c
- if_equal $1d, UnknownScript_0xbe092
- if_equal $1e, UnknownScript_0xbe098
- if_equal $20, UnknownScript_0xbe09e
- if_equal $21, UnknownScript_0xbe0a4
- if_equal $22, UnknownScript_0xbe0aa
- if_equal $23, UnknownScript_0xbe0b0
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbe03e
+ if_equal PHONE_SAILOR_HUEY, UnknownScript_0xbe044
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbe04a
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbe050
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbe056
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbe05c
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbe062
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbe068
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbe06e
+ if_equal PHONE_JUGGLER_IRWIN, UnknownScript_0xbe074
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbe07a
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbe080
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbe086
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbe08c
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbe092
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbe098
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbe09e
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbe0a4
+ if_equal PHONE_BLACKBELT_KENJI, UnknownScript_0xbe0aa
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbe0b0
UnknownScript_0xbe03e:
farwritetext UnknownText_0x1b4e16
@@ -2236,14 +2287,14 @@
checknite
iftrue UnknownScript_0xbe164
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe0e2
- if_equal $c, UnknownScript_0xbe0e8
- if_equal $e, UnknownScript_0xbe0ee
- if_equal $12, UnknownScript_0xbe0f4
- if_equal $15, UnknownScript_0xbe0fa
- if_equal $1a, UnknownScript_0xbe100
- if_equal $1f, UnknownScript_0xbe106
- if_equal $24, UnknownScript_0xbe10c
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe0e2
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe0e8
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe0ee
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe0f4
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe0fa
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe100
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe106
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe10c
UnknownScript_0xbe0e2:
farwritetext UnknownText_0x1b4f21
@@ -2287,14 +2338,14 @@
UnknownScript_0xbe112:
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe134
- if_equal $c, UnknownScript_0xbe13a
- if_equal $e, UnknownScript_0xbe140
- if_equal $12, UnknownScript_0xbe146
- if_equal $15, UnknownScript_0xbe14c
- if_equal $1a, UnknownScript_0xbe152
- if_equal $1f, UnknownScript_0xbe158
- if_equal $24, UnknownScript_0xbe15e
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe134
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe13a
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe140
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe146
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe14c
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe152
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe158
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe15e
UnknownScript_0xbe134:
farwritetext UnknownText_0x1b4f4d
@@ -2338,14 +2389,14 @@
UnknownScript_0xbe164:
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe186
- if_equal $c, UnknownScript_0xbe18c
- if_equal $e, UnknownScript_0xbe192
- if_equal $12, UnknownScript_0xbe198
- if_equal $15, UnknownScript_0xbe19e
- if_equal $1a, UnknownScript_0xbe1a4
- if_equal $1f, UnknownScript_0xbe1aa
- if_equal $24, UnknownScript_0xbe1b0
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe186
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe18c
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe192
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe198
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe19e
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe1a4
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe1aa
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe1b0
UnknownScript_0xbe186:
farwritetext UnknownText_0x1b4f75
@@ -2393,26 +2444,26 @@
checknite
iftrue UnknownScript_0xbe354
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbe212
- if_equal $7, UnknownScript_0xbe218
- if_equal $b, UnknownScript_0xbe21e
- if_equal $d, UnknownScript_0xbe224
- if_equal $f, UnknownScript_0xbe22a
- if_equal $10, UnknownScript_0xbe230
- if_equal $11, UnknownScript_0xbe236
- if_equal $13, UnknownScript_0xbe23c
- if_equal $14, UnknownScript_0xbe242
- if_equal $16, UnknownScript_0xbe248
- if_equal $17, UnknownScript_0xbe24e
- if_equal $18, UnknownScript_0xbe254
- if_equal $1b, UnknownScript_0xbe25a
- if_equal $1c, UnknownScript_0xbe260
- if_equal $1d, UnknownScript_0xbe266
- if_equal $1e, UnknownScript_0xbe26c
- if_equal $20, UnknownScript_0xbe272
- if_equal $21, UnknownScript_0xbe278
- if_equal $22, UnknownScript_0xbe27e
- if_equal $23, UnknownScript_0xbe284
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbe212
+ if_equal PHONE_SAILOR_HUEY, UnknownScript_0xbe218
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbe21e
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbe224
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbe22a
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbe230
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbe236
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbe23c
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbe242
+ if_equal PHONE_JUGGLER_IRWIN, UnknownScript_0xbe248
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbe24e
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbe254
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbe25a
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbe260
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbe266
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbe26c
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbe272
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbe278
+ if_equal PHONE_BLACKBELT_KENJI, UnknownScript_0xbe27e
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbe284
UnknownScript_0xbe212:
farwritetext UnknownText_0x1b4e3e
@@ -2516,26 +2567,26 @@
UnknownScript_0xbe28a:
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbe2dc
- if_equal $7, UnknownScript_0xbe2e2
- if_equal $b, UnknownScript_0xbe2e8
- if_equal $d, UnknownScript_0xbe2ee
- if_equal $f, UnknownScript_0xbe2f4
- if_equal $10, UnknownScript_0xbe2fa
- if_equal $11, UnknownScript_0xbe300
- if_equal $13, UnknownScript_0xbe306
- if_equal $14, UnknownScript_0xbe30c
- if_equal $16, UnknownScript_0xbe312
- if_equal $17, UnknownScript_0xbe318
- if_equal $18, UnknownScript_0xbe31e
- if_equal $1b, UnknownScript_0xbe324
- if_equal $1c, UnknownScript_0xbe32a
- if_equal $1d, UnknownScript_0xbe330
- if_equal $1e, UnknownScript_0xbe336
- if_equal $20, UnknownScript_0xbe33c
- if_equal $21, UnknownScript_0xbe342
- if_equal $22, UnknownScript_0xbe348
- if_equal $23, UnknownScript_0xbe34e
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbe2dc
+ if_equal PHONE_SAILOR_HUEY, UnknownScript_0xbe2e2
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbe2e8
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbe2ee
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbe2f4
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbe2fa
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbe300
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbe306
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbe30c
+ if_equal PHONE_JUGGLER_IRWIN, UnknownScript_0xbe312
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbe318
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbe31e
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbe324
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbe32a
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbe330
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbe336
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbe33c
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbe342
+ if_equal PHONE_BLACKBELT_KENJI, UnknownScript_0xbe348
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbe34e
UnknownScript_0xbe2dc:
farwritetext UnknownText_0x1b4e72
@@ -2639,26 +2690,26 @@
UnknownScript_0xbe354:
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbe3a6
- if_equal $7, UnknownScript_0xbe3ac
- if_equal $b, UnknownScript_0xbe3b2
- if_equal $d, UnknownScript_0xbe3b8
- if_equal $f, UnknownScript_0xbe3be
- if_equal $10, UnknownScript_0xbe3c4
- if_equal $11, UnknownScript_0xbe3ca
- if_equal $13, UnknownScript_0xbe3d0
- if_equal $14, UnknownScript_0xbe3d6
- if_equal $16, UnknownScript_0xbe3dc
- if_equal $17, UnknownScript_0xbe3e2
- if_equal $18, UnknownScript_0xbe3e8
- if_equal $1b, UnknownScript_0xbe3ee
- if_equal $1c, UnknownScript_0xbe3f4
- if_equal $1d, UnknownScript_0xbe3fa
- if_equal $1e, UnknownScript_0xbe400
- if_equal $20, UnknownScript_0xbe406
- if_equal $21, UnknownScript_0xbe40c
- if_equal $22, UnknownScript_0xbe412
- if_equal $23, UnknownScript_0xbe418
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbe3a6
+ if_equal PHONE_SAILOR_HUEY, UnknownScript_0xbe3ac
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbe3b2
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbe3b8
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbe3be
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbe3c4
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbe3ca
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbe3d0
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbe3d6
+ if_equal PHONE_JUGGLER_IRWIN, UnknownScript_0xbe3dc
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbe3e2
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbe3e8
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbe3ee
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbe3f4
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbe3fa
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbe400
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbe406
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbe40c
+ if_equal PHONE_BLACKBELT_KENJI, UnknownScript_0xbe412
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbe418
UnknownScript_0xbe3a6:
farwritetext UnknownText_0x1b4e9e
@@ -2766,14 +2817,14 @@
checknite
iftrue UnknownScript_0xbe4cc
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe44a
- if_equal $c, UnknownScript_0xbe450
- if_equal $e, UnknownScript_0xbe456
- if_equal $12, UnknownScript_0xbe45c
- if_equal $15, UnknownScript_0xbe462
- if_equal $1a, UnknownScript_0xbe468
- if_equal $1f, UnknownScript_0xbe46e
- if_equal $24, UnknownScript_0xbe474
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe44a
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe450
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe456
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe45c
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe462
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe468
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe46e
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe474
UnknownScript_0xbe44a:
farwritetext UnknownText_0x1b4fa1
@@ -2817,14 +2868,14 @@
UnknownScript_0xbe47a:
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe49c
- if_equal $c, UnknownScript_0xbe4a2
- if_equal $e, UnknownScript_0xbe4a8
- if_equal $12, UnknownScript_0xbe4ae
- if_equal $15, UnknownScript_0xbe4b4
- if_equal $1a, UnknownScript_0xbe4ba
- if_equal $1f, UnknownScript_0xbe4c0
- if_equal $24, UnknownScript_0xbe4c6
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe49c
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe4a2
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe4a8
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe4ae
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe4b4
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe4ba
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe4c0
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe4c6
UnknownScript_0xbe49c:
farwritetext UnknownText_0x1b4fda
@@ -2868,14 +2919,14 @@
UnknownScript_0xbe4cc:
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe4ee
- if_equal $c, UnknownScript_0xbe4f4
- if_equal $e, UnknownScript_0xbe4fa
- if_equal $12, UnknownScript_0xbe500
- if_equal $15, UnknownScript_0xbe506
- if_equal $1a, UnknownScript_0xbe50c
- if_equal $1f, UnknownScript_0xbe512
- if_equal $24, UnknownScript_0xbe518
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe4ee
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe4f4
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe4fa
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe500
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe506
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe50c
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe512
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe518
UnknownScript_0xbe4ee:
farwritetext UnknownText_0x1b5004
@@ -2919,23 +2970,23 @@
UnknownScript_0xbe51e:
checkcode VAR_CALLERID
- if_equal $5, UnknownScript_0xbe564
- if_equal $b, UnknownScript_0xbe570
- if_equal $d, UnknownScript_0xbe576
- if_equal $f, UnknownScript_0xbe57c
- if_equal $10, UnknownScript_0xbe582
- if_equal $11, UnknownScript_0xbe588
- if_equal $13, UnknownScript_0xbe58e
- if_equal $14, UnknownScript_0xbe594
- if_equal $17, UnknownScript_0xbe59a
- if_equal $18, UnknownScript_0xbe5a0
- if_equal $1b, UnknownScript_0xbe5a6
- if_equal $1c, UnknownScript_0xbe5ac
- if_equal $1d, UnknownScript_0xbe5b2
- if_equal $1e, UnknownScript_0xbe5b8
- if_equal $20, UnknownScript_0xbe5be
- if_equal $21, UnknownScript_0xbe5c4
- if_equal $23, UnknownScript_0xbe5ca
+ if_equal PHONE_SCHOOLBOY_JACK, UnknownScript_0xbe564
+ if_equal PHONE_COOLTRAINERM_GAVEN, UnknownScript_0xbe570
+ if_equal PHONE_BIRDKEEPER_JOSE, UnknownScript_0xbe576
+ if_equal PHONE_YOUNGSTER_JOEY, UnknownScript_0xbe57c
+ if_equal PHONE_BUG_CATCHER_WADE, UnknownScript_0xbe582
+ if_equal PHONE_FISHER_RALPH, UnknownScript_0xbe588
+ if_equal PHONE_HIKER_ANTHONY, UnknownScript_0xbe58e
+ if_equal PHONE_CAMPER_TODD, UnknownScript_0xbe594
+ if_equal PHONE_BUG_CATCHER_ARNIE, UnknownScript_0xbe59a
+ if_equal PHONE_SCHOOLBOY_ALAN, UnknownScript_0xbe5a0
+ if_equal PHONE_SCHOOLBOY_CHAD, UnknownScript_0xbe5a6
+ if_equal PHONE_POKEFANM_DEREK, UnknownScript_0xbe5ac
+ if_equal PHONE_FISHER_TULLY, UnknownScript_0xbe5b2
+ if_equal PHONE_POKEMANIAC_BRENT, UnknownScript_0xbe5b8
+ if_equal PHONE_BIRDKEEPER_VANCE, UnknownScript_0xbe5be
+ if_equal PHONE_FISHER_WILTON, UnknownScript_0xbe5c4
+ if_equal PHONE_HIKER_PARRY, UnknownScript_0xbe5ca
UnknownScript_0xbe564:
farwritetext UnknownText_0x1b4ecd
@@ -3029,14 +3080,14 @@
UnknownScript_0xbe5d0:
checkcode VAR_CALLERID
- if_equal $6, UnknownScript_0xbe5f2
- if_equal $c, UnknownScript_0xbe5f8
- if_equal $e, UnknownScript_0xbe5fe
- if_equal $12, UnknownScript_0xbe604
- if_equal $15, UnknownScript_0xbe60a
- if_equal $1a, UnknownScript_0xbe610
- if_equal $1f, UnknownScript_0xbe616
- if_equal $24, UnknownScript_0xbe61c
+ if_equal PHONE_POKEFAN_BEVERLY, UnknownScript_0xbe5f2
+ if_equal PHONE_COOLTRAINERF_BETH, UnknownScript_0xbe5f8
+ if_equal PHONE_COOLTRAINERF_REENA, UnknownScript_0xbe5fe
+ if_equal PHONE_PICNICKER_LIZ, UnknownScript_0xbe604
+ if_equal PHONE_PICNICKER_GINA, UnknownScript_0xbe60a
+ if_equal PHONE_LASS_DANA, UnknownScript_0xbe610
+ if_equal PHONE_PICNICKER_TIFFANY, UnknownScript_0xbe616
+ if_equal PHONE_PICNICKER_ERIN, UnknownScript_0xbe61c
UnknownScript_0xbe5f2:
farwritetext UnknownText_0x1b502b
@@ -3116,11 +3167,11 @@
SeenByTrainerScript:: ; 0xbe675
loadtrainerdata
playrammusic
- showemote EMOTE_SHOCK, $fe, 30
+ showemote EMOTE_SHOCK, -2, 30
callasm Function831e
applymovement2 MovementBuffer
- writepersonxy $fe
- faceperson $0, $fe
+ writepersonxy -2
+ faceperson $0, -2
jump StartBattleWithMapTrainerScript
; 0xbe68a
@@ -3132,8 +3183,8 @@
loadtrainerdata
startbattle
returnafterbattle
- trainerstatus $1
- loadvar wd04d, $ff
+ trainerstatus 1
+ loadvar wd04d, -1
AlreadyBeatenTrainerScript:
scripttalkafter
--- /dev/null
+++ b/engine/predef.asm
@@ -1,0 +1,106 @@
+GetPredefPointer:: ; 854b
+; Return the bank and address of PredefID in a and PredefAddress.
+
+; Save hl for later (back in Predef)
+ ld a, h
+ ld [PredefTemp], a
+ ld a, l
+ ld [PredefTemp + 1], a
+
+ push de
+ ld a, [PredefID]
+ ld e, a
+ ld d, 0
+ ld hl, PredefPointers
+ add_n_times hl, de, 3
+ pop de
+
+ ld a, [hli]
+ ld [PredefAddress + 1], a
+ ld a, [hli]
+ ld [PredefAddress], a
+ ld a, [hl]
+
+ ret
+; 856b
+
+PredefPointers:: ; 856b
+; $4b Predef pointers
+; address, bank
+
+ add_predef LearnMove ; $0
+ add_predef Predef1
+ add_predef HealParty
+ add_predef FlagPredef
+ add_predef Functionc699
+ add_predef FillPP
+ add_predef Functiond88c
+ add_predef Functionda96
+ add_predef Functiondb3f ; $8
+ add_predef Functionde6e
+ add_predef GiveEgg
+ add_predef Functionc6e0
+ add_predef Functione167
+ add_predef Functione17b
+ add_predef CanLearnTMHMMove
+ add_predef GetTMHMMove
+ add_predef Function28eef ; $ 10
+ add_predef PrintMoveDesc
+ add_predef UpdatePlayerHUD
+ add_predef FillBox
+ add_predef Function3d873
+ add_predef UpdateEnemyHUD
+ add_predef StartBattle
+ add_predef FillInExpBar
+ add_predef Function3f43d ; $18
+ add_predef Function3f47c
+ add_predef LearnLevelMoves
+ add_predef FillMoves
+ add_predef Function421e6
+ add_predef Function28f63
+ add_predef Function28f24
+ add_predef Function5084a
+ add_predef ListMoves ; $20
+ add_predef Function50d2e
+ add_predef Function50cdb
+ add_predef Function50c50
+ add_predef GetGender
+ add_predef StatsScreenInit
+ add_predef DrawPlayerHP
+ add_predef DrawEnemyHP
+ add_predef PrintTempMonStats ; $28
+ add_predef GetTypeName
+ add_predef PrintMoveType
+ add_predef PrintType
+ add_predef PrintMonTypes
+ add_predef GetUnownLetter
+ add_predef Functioncbcdd
+ add_predef Predef2F
+ add_predef Function9853 ; $30
+ add_predef Function864c
+ add_predef Function91d11
+ add_predef CheckContestMon
+ add_predef Function8c20f
+ add_predef Function8c000
+ add_predef Function8c000_2
+ add_predef PlayBattleAnim
+ add_predef Predef38 ; $38
+ add_predef Predef39
+ add_predef Functionfd1d0
+ add_predef PartyMonItemName
+ add_predef GetFrontpic
+ add_predef GetBackpic
+ add_predef Function5108b
+ add_predef GetTrainerPic
+ add_predef DecompressPredef ; $40
+ add_predef Function347d3
+ add_predef ConvertMon_1to2
+ add_predef Functionfb877
+ add_predef Functiond0000
+ add_predef Function50d0a
+ add_predef Functiond00a3
+ add_predef Functiond008e
+ add_predef Functiond0669 ; $48
+ add_predef Functiond066e
+ dbw $ff, Function2d43 ; ????
+; 864c
\ No newline at end of file
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -2124,7 +2124,7 @@
CopyConvertedText: ; 976c8
ld hl, StringBuffer3
- ld bc, 19
+ ld bc, StringBuffer4 - StringBuffer3
call AddNTimes
call CopyName2
ret
@@ -2200,7 +2200,7 @@
call GetScriptByte
ld [wcf61], a
-Unknown_9771c: ; 0x9771c
+ContinueToGetName: ; 0x9771c
call GetScriptByte
ld [CurSpecies], a
call GetName
@@ -2216,7 +2216,7 @@
ld a, TRAINER_NAME
ld [wcf61], a
- jr Unknown_9771c ; 0x97730 $ea
+ jr ContinueToGetName ; 0x97730 $ea
; 0x97732
Script_readmoney: ; 0x97732
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -46,7 +46,7 @@
add_special Special_CheckMagikarpLength
add_special Functionfbcd2
add_special HealParty
- add_special Function1559a
+ add_special PokemonCenterPC
add_special Functionc2e7
add_special Function166d6
add_special Function1672a
@@ -64,10 +64,10 @@
add_special Functionc380
add_special Functionc38d
add_special Functionc3db
- add_special Function8c084
+ add_special FadeBlackBGMap
add_special Function8c092
add_special Function8c0b6
- add_special Function8c079
+ add_special FadeInBGMap
add_special Function8c0ab
add_special Functiond91
add_special WhiteBGMap
@@ -112,7 +112,7 @@
add_special Function2a4ab
add_special Function2a51f
add_special RandomPhoneMon
- add_special Function14209
+ add_special RunCallback_04
add_special Functionfb841
add_special SpecialSnorlaxAwake
add_special Function7413
@@ -182,7 +182,7 @@
add_special Function103780
add_special Function10387b
add_special Function4ae12
- add_special Function1047eb
+ add_special LoadMapPalettes
add_special Function4a927
add_special Function90a54
add_special Function90a88
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -221,7 +221,7 @@
PCScript:
loadfont
- special Function1559a
+ special PokemonCenterPC
loadmovesprites
end
@@ -306,13 +306,13 @@
scall BugContestResults_CopyContestantsToResults
setevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY
clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY
- setevent EVENT_2D2
+ setevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
warp GROUP_ROUTE_36_NATIONAL_PARK_GATE, MAP_ROUTE_36_NATIONAL_PARK_GATE, $0, $4
applymovement $0, Movement_ContestResults_WalkAfterWarp
BugContestResultsScript:
clearflag ENGINE_BUG_CONTEST_TIMER
- clearevent EVENT_2D2
+ clearevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
clearevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE
clearevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE
clearevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY
@@ -383,7 +383,7 @@
; 0xbc31e
BugContestResults_FirstPlace ; 0xbc31e
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
itemtotext SUN_STONE, $1
farwritetext ContestResults_PlayerWonAPrizeText
closetext
--- a/home.asm
+++ b/home.asm
@@ -836,7 +836,12 @@
dbw 0, PartyMonOT
dbw 0, OTPartyMonOT
dbw BANK(TrainerClassNames), TrainerClassNames
- dbw $04, MoveDescriptions ; ????
+; 33c0
+
+Function33c0:
+ inc b
+ ld d, d
+ ld c, e
; 33c3
GetName:: ; 33c3
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -321,7 +321,7 @@
ret
; 3cae
-Function3cae:: ; 3cae
+CrankUpTheVolume:: ; 3cae
ld a, 4 | 1 << 7
ld [MusicFade], a
ret
--- a/home/fade.asm
+++ b/home/fade.asm
@@ -36,7 +36,7 @@
jr FadeOut
; 4b6
-Function4b6:: ; 4b6
+FadeToWhite:: ; 4b6
ld a, [hCGB]
and a
jr z, .asm_4c2
--- a/home/map.asm
+++ b/home/map.asm
@@ -150,9 +150,7 @@
add a
ld l, a
ld h, 0
- add hl, hl
- add hl, hl
- add hl, hl
+ add_n_times hl, hl, 3
ld a, [TilesetBlocksAddress]
add l
ld l, a
@@ -387,7 +385,7 @@
; 2309
-Function2309:: ; 2309
+LoadMapAttributes:: ; 2309
call Function2326
call SwitchToMapScriptHeaderBank
call Function234f
@@ -396,7 +394,7 @@
ret
; 2317
-Function2317:: ; 2317
+LoadMapAttributes_IgnoreHidden:: ; 2317
call Function2326
call SwitchToMapScriptHeaderBank
call Function234f
@@ -664,7 +662,7 @@
ret
; 248a
-Function248a:: ; 248a
+RestoreFacingAfterWarp:: ; 248a
call GetMapScriptHeaderBank
rst Bankswitch
@@ -691,7 +689,7 @@
call Function24ba
.asm_24b3
- callba Function10486d
+ callba GetCoordOfUpperLeftCorner
ret
; 24ba
@@ -705,7 +703,7 @@
ret
; 24cd
-Function24cd:: ; 24cd
+LoadBlockData:: ; 24cd
ld hl, OverworldMap
ld bc, OverworldMapEnd - OverworldMap
ld a, 0
@@ -713,7 +711,7 @@
call ChangeMap
call FillMapConnections
ld a, $1
- call Function263b
+ call RunMapCallback
ret
; 24e4
@@ -976,7 +974,8 @@
jr CallScript
; 263b
-Function263b:: ; 263b
+RunMapCallback:: ; 263b
+; Will run the first callback found in the map header with execution index equal to a.
ld b, a
ld a, [hROMBank]
push af
@@ -988,7 +987,7 @@
ld b, a
ld d, h
ld e, l
- call Function2674
+ call ExecuteCallbackScript
.done
pop af
@@ -1007,18 +1006,18 @@
ld l, a
or h
ret z
- ld de, $0003
-.asm_2664
+ ld de, 3
+.loop
ld a, [hl]
cp b
- jr z, .asm_266e
+ jr z, .done
add hl, de
dec c
- jr nz, .asm_2664
+ jr nz, .loop
xor a
ret
-.asm_266e
+.done
inc hl
ld a, [hli]
ld h, [hl]
@@ -1027,7 +1026,7 @@
ret
; 2674
-Function2674:: ; 2674
+ExecuteCallbackScript:: ; 2674
callba Function974f3
ld a, [ScriptMode]
push af
@@ -1449,7 +1448,7 @@
ret
; 289d
-Function289d:: ; 289d
+SaveScreen:: ; 289d
ld hl, wd194
ld a, [hli]
ld h, [hl]
@@ -1499,7 +1498,7 @@
jr Function28f7
-Function28e3:: ; 28e3
+LoadNeighboringBlockData:: ; 28e3
ld hl, wd194
ld a, [hli]
ld h, [hl]
@@ -1947,7 +1946,7 @@
xor a
ld [hBGMapMode], a
call Function1d6e
- callba Function8c084
+ callba FadeBlackBGMap
call ClearSprites
call Function2ed3
ret
@@ -1976,7 +1975,7 @@
call GetSGBLayout
callba Function49409
call Function3200
- callba Function8c079
+ callba FadeInBGMap
call Function2ee4
ret
; 2b74
@@ -2308,23 +2307,23 @@
jr .done
; 2cff
-Function2cff:: ; 2cff
- call Function2d0d
+GetMapHeaderTimeOfDayNybble:: ; 2cff
+ call GetPhoneServiceTimeOfDayByte
and $f
ret
; 2d05
-Function2d05:: ; 2d05
- call Function2d0d
+GetMapHeaderPhoneServiceNybble:: ; 2d05
+ call GetPhoneServiceTimeOfDayByte
and $f0
swap a
ret
; 2d0d
-Function2d0d:: ; 2d0d
+GetPhoneServiceTimeOfDayByte:: ; 2d0d
push hl
push bc
- ld de, $0007
+ ld de, 7 ; phone service and time of day
call GetMapHeaderMember
ld a, c
pop bc
@@ -2336,7 +2335,7 @@
push de
push hl
push bc
- ld de, $0008
+ ld de, 8 ; fishing group
call GetMapHeaderMember
ld a, c
pop bc
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -67,7 +67,7 @@
; 1d7d
Function1d7d:: ; 1d7d
- call Function1c07
+ call ExitMenu
ret
; 1d81
@@ -541,7 +541,7 @@
Function2012:: ; 2012
call MenuTextBox
call CloseText
- call Function1c07
+ call ExitMenu
ret
; 201c
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -193,7 +193,7 @@
ret
; 1c07
-Function1c07:: ; 0x1c07
+ExitMenu:: ; 0x1c07
push af
callab Function243e8
pop af
@@ -205,7 +205,7 @@
WriteBackup:: ; 0x1c17
push af
- call Function1c07
+ call ExitMenu
call Function321c
call DrawOnMap
pop af
--- a/home/window.asm
+++ b/home/window.asm
@@ -41,7 +41,7 @@
ld a, $90
ld [hWY], a
call Functione4a
- callba Functionb8000
+ callba ReturnFromMapSetupScript
callba Function106594
ret
; 2e08
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -603,7 +603,7 @@
ld b, 0
callba Function116c1
- call Function4b6
+ call FadeToWhite
call Functione51
@@ -685,7 +685,7 @@
ld hl, UnknownText_0xedeb
call PrintText
- call Function4b6
+ call FadeToWhite
call Functione51
jr .asm_ebe2
--- a/macros.asm
+++ b/macros.asm
@@ -40,6 +40,11 @@
dw \3
ENDM
+dbww: MACRO
+ db \1
+ dw \2, \3
+ ENDM
+
dbwww: MACRO
db \1
dw \2, \3, \4
--- a/macros/map.asm
+++ b/macros/map.asm
@@ -67,7 +67,7 @@
map_header: MACRO
- ; label, tileset, permission, location, music, time of day, fishing group
+ ; label, tileset, permission, location, music, phone service flag, time of day, fishing group
\1_MapHeader:
db BANK(\1_SecondMapHeader), \2, \3
dw \1_SecondMapHeader
--- a/macros/predef.asm
+++ b/macros/predef.asm
@@ -1,7 +1,6 @@
add_predef: MACRO
\1Predef::
- dw \1
- db BANK(\1)
+ dwb \1, BANK(\1)
ENDM
predef_id: MACRO
--- a/main.asm
+++ b/main.asm
@@ -378,7 +378,7 @@
InitializeWorld: ; 5d23
call Function610f
- callba Function8029
+ callba GetSpawnCoord
callba Function113d6
ret
; 5d33
@@ -411,7 +411,7 @@
; 5d65
Continue: ; 5d65
- callba Function14ea5
+ callba TryLoadSaveFile
jr c, .asm_5dd6
callba Function150b9
call Function1d6e
@@ -444,7 +444,7 @@
call ClearTileMap
ld c, $14
call DelayFrames
- callba Function2a394
+ callba RestoreRoamMons
callba Function105091
callba Function140ae
ld a, [wd4b5]
@@ -734,7 +734,7 @@
call PlayMusic
call Function4a3
- call Function4b6
+ call FadeToWhite
xor a
ld [CurPartySpecies], a
ld a, POKEMON_PROF
@@ -743,11 +743,11 @@
ld b, $1c
call GetSGBLayout
- call Function616a
+ call Intro_FadeInFrontpic
ld hl, OakText1
call PrintText
- call Function4b6
+ call FadeToWhite
call ClearTileMap
ld a, WOOPER
@@ -764,13 +764,13 @@
ld b, $1c
call GetSGBLayout
- call Function6182
+ call Intro_WipeInFrontpic
ld hl, OakText2
call PrintText
ld hl, OakText4
call PrintText
- call Function4b6
+ call FadeToWhite
call ClearTileMap
xor a
@@ -781,11 +781,11 @@
ld b, $1c
call GetSGBLayout
- call Function616a
+ call Intro_FadeInFrontpic
ld hl, OakText5
call PrintText
- call Function4b6
+ call FadeToWhite
call ClearTileMap
xor a
@@ -794,7 +794,7 @@
ld b, $1c
call GetSGBLayout
- call Function616a
+ call Intro_FadeInFrontpic
ld hl, OakText6
call PrintText
@@ -852,7 +852,7 @@
ld de, PlayerName
callba Function116c1
- call Function4b6
+ call FadeToWhite
call ClearTileMap
call Functione5f
@@ -952,12 +952,12 @@
ld c, 50
call DelayFrames
- call Function4b6
+ call FadeToWhite
call ClearTileMap
ret
; 616a
-Function616a: ; 616a
+Intro_FadeInFrontpic: ; 616a
ld hl, IntroFadePalettes
ld b, IntroFadePalettesEnd - IntroFadePalettes
.asm_616f
@@ -980,7 +980,7 @@
IntroFadePalettesEnd
; 6182
-Function6182: ; 6182
+Intro_WipeInFrontpic: ; 6182
ld a, $77
ld [hWX], a
call DelayFrame
@@ -2735,9 +2735,7 @@
dec c
ld b, 0
ld hl, .Actions
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld d, 0
add hl, de
ld a, [hl]
@@ -2967,7 +2965,7 @@
call CopyName2
; Engine flag for this event.
- ld hl, wdc1e
+ ld hl, DailyFlags
set 5, [hl]
ld a, 1
@@ -3172,7 +3170,7 @@
ret
; 8029
-Function8029: ; 8029
+GetSpawnCoord: ; 8029
ld a, $ff
ld [wd4cd], a
ld [wd4ce], a
@@ -3233,10 +3231,10 @@
Function808f: ; 808f
push bc
ld a, [XCoord]
- add $4
+ add 4
ld d, a
ld a, [YCoord]
- add $4
+ add 4
ld e, a
pop bc
call Function807e
@@ -3261,25 +3259,25 @@
ret
; 80b8
-Function80b8: ; 80b8
+RefreshPlayerCoords: ; 80b8
ld a, [XCoord]
- add $4
+ add 4
ld d, a
ld hl, MapX
sub [hl]
ld [hl], d
- ld hl, MapObjects + 3
+ ld hl, MapObjects + MAPOBJECT_X_COORD
ld [hl], d
ld hl, MapX2
ld [hl], d
ld d, a
ld a, [YCoord]
- add $4
+ add 4
ld e, a
ld hl, MapY
sub [hl]
ld [hl], e
- ld hl, MapObjects + 2
+ ld hl, MapObjects + MAPOBJECT_Y_COORD
ld [hl], e
ld hl, MapY2
ld [hl], e
@@ -3832,31 +3830,34 @@
; 8417
GetRelativeFacing:: ; 8417
+; Determines which way map object e would have to turn to face map object d. Returns carry if it's impossible for whatever reason.
ld a, d
call GetMapObject
- ld hl, OBJECT_SPRITE
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
add hl, bc
ld a, [hl]
- cp $d
- jr nc, .asm_8437
+ cp NUM_OBJECT_STRUCTS
+ jr nc, .carry
ld d, a
ld a, e
call GetMapObject
- ld hl, OBJECT_SPRITE
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
add hl, bc
ld a, [hl]
- cp $d
- jr nc, .asm_8437
+ cp NUM_OBJECT_STRUCTS
+ jr nc, .carry
ld e, a
- call Function8439
+ call .GetFacing_e_relativeto_d
ret
-.asm_8437
+.carry
scf
ret
; 8439
-Function8439: ; 8439
+.GetFacing_e_relativeto_d: ; 8439
+; Determines which way object e would have to turn to face object d. Returns carry if it's impossible.
+; load the coordinates of object d into bc
ld a, d
call GetObjectStruct
ld hl, OBJECT_MAP_X
@@ -3867,6 +3868,7 @@
ld c, [hl]
ld b, a
push bc
+; load the coordinates of object e into de
ld a, e
call GetObjectStruct
ld hl, OBJECT_MAP_X
@@ -3876,55 +3878,61 @@
add hl, bc
ld e, [hl]
pop bc
+; |x1 - x2|
ld a, b
sub d
- jr z, .asm_846c
- jr nc, .asm_8460
+ jr z, .same_x_1
+ jr nc, .b_right_of_d_1
cpl
inc a
-.asm_8460
+.b_right_of_d_1
+; |y1 - y2|
ld h, a
ld a, c
sub e
- jr z, .asm_847a
- jr nc, .asm_8469
+ jr z, .same_y_1
+ jr nc, .c_below_e_1
cpl
inc a
-.asm_8469
+.c_below_e_1
+; |y1 - y2| - |x1 - x2|
sub h
- jr c, .asm_847a
+ jr c, .same_y_1
-.asm_846c
+.same_x_1
+; compare the y coordinates
ld a, c
cp e
- jr z, .asm_8488
- jr c, .asm_8476
- ld d, $0
+ jr z, .same_x_and_y
+ jr c, .c_directly_below_e
+; c directly above e
+ ld d, DOWN
and a
ret
-.asm_8476
- ld d, $1
+.c_directly_below_e
+ ld d, UP
and a
ret
-.asm_847a
+.same_y_1
ld a, b
cp d
- jr z, .asm_8488
- jr c, .asm_8484
- ld d, $3
+ jr z, .same_x_and_y
+ jr c, .b_directly_right_of_d
+; b directly left of d
+ ld d, RIGHT
and a
ret
-.asm_8484
- ld d, $2
+.b_directly_right_of_d
+ ld d, LEFT
and a
ret
-.asm_8488
+.same_x_and_y
scf
ret
; 848a
@@ -3931,14 +3939,14 @@
Function848a: ; 848a
call Function849d
- jr c, .asm_8497
+ jr c, .same
ld [wd4d1], a
xor a
ld [wd4d0], a
ret
-.asm_8497
- ld a, $ff
+.same
+ ld a, -1
ld [wd4d0], a
ret
; 849d
@@ -3958,34 +3966,34 @@
add hl, bc
ld a, d
cp [hl]
- jr z, .asm_84c5
- jr c, .asm_84c1
+ jr z, .check_y
+ jr c, .left
and a
- ld a, $f
+ ld a, $c + RIGHT
ret
-.asm_84c1
+.left
and a
- ld a, $e
+ ld a, $c + LEFT
ret
-.asm_84c5
+.check_y
ld hl, OBJECT_MAP_Y
add hl, bc
ld a, e
cp [hl]
- jr z, .asm_84d7
- jr c, .asm_84d3
+ jr z, .same_xy
+ jr c, .up
and a
- ld a, $c
+ ld a, $c + DOWN
ret
-.asm_84d3
+.up
and a
- ld a, $d
+ ld a, $c + UP
ret
-.asm_84d7
+.same_xy
scf
ret
; 84d9
@@ -4044,114 +4052,9 @@
; 854b
-GetPredefPointer:: ; 854b
-; Return the bank and address of PredefID in a and PredefAddress.
+INCLUDE "engine/predef.asm"
-; Save hl for later (back in Predef)
- ld a, h
- ld [PredefTemp], a
- ld a, l
- ld [PredefTemp + 1], a
- push de
- ld a, [PredefID]
- ld e, a
- ld d, 0
- ld hl, PredefPointers
- add_n_times hl, de, 3
- pop de
-
- ld a, [hli]
- ld [PredefAddress + 1], a
- ld a, [hli]
- ld [PredefAddress], a
- ld a, [hl]
-
- ret
-; 856b
-
-PredefPointers:: ; 856b
-; $4b Predef pointers
-; address, bank
-
- add_predef LearnMove ; $0
- add_predef Predef1
- add_predef HealParty
- add_predef FlagPredef
- add_predef Functionc699
- add_predef FillPP
- add_predef Functiond88c
- add_predef Functionda96
- add_predef Functiondb3f ; $8
- add_predef Functionde6e
- add_predef GiveEgg
- add_predef Functionc6e0
- add_predef Functione167
- add_predef Functione17b
- add_predef CanLearnTMHMMove
- add_predef GetTMHMMove
- add_predef Function28eef ; $ 10
- add_predef PrintMoveDesc
- add_predef UpdatePlayerHUD
- add_predef FillBox
- add_predef Function3d873
- add_predef UpdateEnemyHUD
- add_predef StartBattle
- add_predef FillInExpBar
- add_predef Function3f43d ; $18
- add_predef Function3f47c
- add_predef LearnLevelMoves
- add_predef FillMoves
- add_predef Function421e6
- add_predef Function28f63
- add_predef Function28f24
- add_predef Function5084a
- add_predef ListMoves ; $20
- add_predef Function50d2e
- add_predef Function50cdb
- add_predef Function50c50
- add_predef GetGender
- add_predef StatsScreenInit
- add_predef DrawPlayerHP
- add_predef DrawEnemyHP
- add_predef PrintTempMonStats ; $28
- add_predef GetTypeName
- add_predef PrintMoveType
- add_predef PrintType
- add_predef PrintMonTypes
- add_predef GetUnownLetter
- add_predef Functioncbcdd
- add_predef Predef2F
- add_predef Function9853 ; $30
- add_predef Function864c
- add_predef Function91d11
- add_predef CheckContestMon
- add_predef Function8c20f
- add_predef Function8c000
- add_predef Function8c000_2
- add_predef PlayBattleAnim
- add_predef Predef38 ; $38
- add_predef Predef39
- add_predef Functionfd1d0
- add_predef PartyMonItemName
- add_predef GetFrontpic
- add_predef GetBackpic
- add_predef Function5108b
- add_predef GetTrainerPic
- add_predef DecompressPredef ; $40
- add_predef Function347d3
- add_predef ConvertMon_1to2
- add_predef Functionfb877
- add_predef Functiond0000
- add_predef Function50d0a
- add_predef Functiond00a3
- add_predef Functiond008e
- add_predef Functiond0669 ; $48
- add_predef Functiond066e
- dbw $ff, Function2d43 ; ????
-; 864c
-
-
INCLUDE "engine/color.asm"
@@ -4313,10 +4216,10 @@
.two
dec e
- jr nz, .asm_c583
+ jr nz, .two_skip
ld a, "0"
ld [$ffb3], a
-.asm_c583
+.two_skip
ld c, 0
ld a, [$ffb6]
@@ -4331,11 +4234,11 @@
ld b, a
ld a, [$ffb3]
or c
- jr nz, .asm_c59b
+ jr nz, .money
call .PrintLeadingZero
- jr .asm_c5ad
+ jr .money_leading_zero
-.asm_c59b
+.money
call .PrintYen
push af
ld a, "0"
@@ -4345,11 +4248,11 @@
ld [$ffb3], a
inc e
dec e
- jr nz, .asm_c5ad
+ jr nz, .money_leading_zero
inc hl
ld [hl], $f2 ; XXX
-.asm_c5ad
+.money_leading_zero
call .AdvancePointer
call .PrintYen
ld a, "0"
@@ -4365,14 +4268,14 @@
push af
ld a, [$ffb3]
and a
- jr nz, .asm_c5c9
+ jr nz, .stop
bit 5, d
- jr z, .asm_c5c9
+ jr z, .stop
ld a, "¥"
ld [hli], a
res 5, d
-.asm_c5c9
+.stop
pop af
ret
; c5cb
@@ -4384,13 +4287,13 @@
ld [$ffb3], a
.ok
ld c, 0
-.asm_c5d4
+.loop
ld a, [$ffb7]
ld b, a
ld a, [$ffb4]
ld [$ffba], a
cp b
- jr c, .asm_c624
+ jr c, .skip1
sub b
ld [$ffb4], a
ld a, [$ffb8]
@@ -4398,14 +4301,14 @@
ld a, [$ffb5]
ld [$ffbb], a
cp b
- jr nc, .asm_c5f6
+ jr nc, .skip2
ld a, [$ffb4]
or 0
- jr z, .asm_c620
+ jr z, .skip3
dec a
ld [$ffb4], a
ld a, [$ffb5]
-.asm_c5f6
+.skip2
sub b
ld [$ffb5], a
ld a, [$ffb9]
@@ -4413,44 +4316,44 @@
ld a, [$ffb6]
ld [$ffbc], a
cp b
- jr nc, .asm_c616
+ jr nc, .skip4
ld a, [$ffb5]
and a
- jr nz, .asm_c611
+ jr nz, .skip5
ld a, [$ffb4]
and a
- jr z, .asm_c61c
+ jr z, .skip6
dec a
ld [$ffb4], a
xor a
-.asm_c611
+.skip5
dec a
ld [$ffb5], a
ld a, [$ffb6]
-.asm_c616
+.skip4
sub b
ld [$ffb6], a
inc c
- jr .asm_c5d4
-.asm_c61c
+ jr .loop
+.skip6
ld a, [$ffbb]
ld [$ffb5], a
-.asm_c620
+.skip3
ld a, [$ffba]
ld [$ffb4], a
-.asm_c624
+.skip1
ld a, [$ffb3]
or c
jr z, .PrintLeadingZero
ld a, [$ffb3]
and a
- jr nz, .asm_c637
+ jr nz, .done
bit 5, d
- jr z, .asm_c637
+ jr z, .done
ld a, $f0
ld [hli], a
res 5, d
-.asm_c637
+.done
ld a, "0"
add c
ld [hl], a
@@ -4544,7 +4447,7 @@
Functionc699: ; c699
ld a, b
or c
- jr z, .asm_c6dd
+ jr z, .zero
push hl
xor a
ld [hMultiplicand], a
@@ -4557,7 +4460,7 @@
call Multiply
ld a, d
and a
- jr z, .asm_c6cc
+ jr z, .divide
srl d
rr e
srl d
@@ -4573,7 +4476,7 @@
ld a, b
ld [$ffb5], a
-.asm_c6cc
+.divide
ld a, e
ld [hMultiplier], a
ld b, $4
@@ -4586,7 +4489,7 @@
ld e, $1
ret
-.asm_c6dd
+.zero
ld e, $0
ret
; c6e0
@@ -4599,10 +4502,10 @@
; c6ea
-Functionc6ea: ; c6ea
+ClearBuffer1: ; c6ea
xor a
ld hl, Buffer1
- ld bc, $0007
+ ld bc, 7
call ByteFill
ret
; c6f5
@@ -4731,7 +4634,7 @@
; 0xc785
CutFunction: ; c785
- call Functionc6ea
+ call ClearBuffer1
.loop
ld hl, .Jumptable
call FieldMoveJumptable
@@ -4791,14 +4694,14 @@
call GetFacingTileCoord
ld c, a
push de
- callba Function149f5
+ callba CheckCutCollision
pop de
jr nc, .fail
call GetBlockLocation
ld c, [hl]
push hl
- ld hl, Unknown_c862
- call Functionc840
+ ld hl, CutTreeBlockPointers
+ call CheckOverworldTileArrays
pop hl
jr nc, .fail
ld a, l
@@ -4853,7 +4756,7 @@
ret
; c840
-Functionc840: ; c840
+CheckOverworldTileArrays: ; c840
push bc
ld a, [wd199]
ld de, 3
@@ -4880,16 +4783,18 @@
ret
; c862
-Unknown_c862: ; c862
- dbw $01, Unknown_c872
- dbw $02, Unknown_c882
- dbw $03, Unknown_c886
- dbw $19, Unknown_c899
- dbw $1f, Unknown_c8a0
+CutTreeBlockPointers: ; c862
+; Which tileset are we in?
+ dbw $01, .one
+ dbw $02, .two
+ dbw $03, .three
+ dbw $19, .twentyfive
+ dbw $1f, .thirtyone
db -1
; c872
-Unknown_c872: ; c872
+.one: ; Johto OW
+; Which meta tile are we facing, which should we replace it with, and does it affect encounters?
db $03, $02, $01
db $5b, $3c, $00
db $5f, $3d, $00
@@ -4898,12 +4803,12 @@
db -1
; c882
-Unknown_c882: ; c882
+.two: ; Goldenrod area
db $03, $02, $01
db -1
; c886
-Unknown_c886: ; c886
+.three: ; Kanto OW
db $0b, $0a, $01
db $32, $6d, $00
db $33, $6c, $00
@@ -4913,23 +4818,23 @@
db -1
; c899
-Unknown_c899: ; c899
+.twentyfive: ; National Park
db $13, $03, $01
db $03, $04, $01
db -1
; c8a0
-Unknown_c8a0: ; c8a0
+.thirtyone: ; Ilex Forest
db $0f, $17, $00
db -1
; c8a4
-Unknown_c8a4: ; c8a4
- dbw $01, Unknown_c8a8
+WhirlpoolBlockPointers: ; c8a4
+ dbw $01, .one
db -1
; c8a8
-Unknown_c8a8: ; c8a8
+.one: ; c8a8
db $07, $36, $00
db -1
; c8ac
@@ -5002,7 +4907,7 @@
; 0xc909
SurfFunction: ; c909
- call Functionc6ea
+ call ClearBuffer1
.loop
ld hl, .Jumptable
call FieldMoveJumptable
@@ -5234,7 +5139,7 @@
FlyFunction: ; ca3b
- call Functionc6ea
+ call ClearBuffer1
.asm_ca3e
ld hl, .data_ca4c
call FieldMoveJumptable
@@ -5313,7 +5218,7 @@
callasm Function8caed
farscall UnknownScript_0x122c1
special WarpToSpawnPoint
- callasm Function154f1
+ callasm DelayLoadingNewSprites
writecode VAR_MOVEMENT, $0
newloadmap $fc
callasm Function8cb33
@@ -5459,12 +5364,12 @@
EscapeRopeFunction: ; cb95
- call Functionc6ea
+ call ClearBuffer1
ld a, $1
jr dig_incave
DigFunction: ; cb9c
- call Functionc6ea
+ call ClearBuffer1
ld a, $2
dig_incave
@@ -5603,7 +5508,7 @@
; 0xcc61
TeleportFunction: ; cc61
- call Functionc6ea
+ call ClearBuffer1
.loop
ld hl, .Jumptable
call FieldMoveJumptable
@@ -5851,7 +5756,7 @@
; cd9d
WhirlpoolFunction: ; cd9d
- call Functionc6ea
+ call ClearBuffer1
.loop
ld hl, Jumptable_cdae
call FieldMoveJumptable
@@ -5914,8 +5819,8 @@
call GetBlockLocation
ld c, [hl]
push hl
- ld hl, Unknown_c8a4
- call Functionc840
+ ld hl, WhirlpoolBlockPointers
+ call CheckOverworldTileArrays
pop hl
jr nc, .failed
ld a, l
@@ -6230,7 +6135,7 @@
FishFunction: ; cf8e
ld a, e
push af
- call Functionc6ea
+ call ClearBuffer1
pop af
ld [Buffer2], a
.loop
@@ -10451,7 +10356,7 @@
call Function11420
ret nc
xor a
- ld hl, wdc1e
+ ld hl, DailyFlags
ld [hli], a
ld [hli], a
ld [hli], a
@@ -10580,7 +10485,7 @@
; 1151c
Function1151c: ; 1151c
- ld hl, wdc1e
+ ld hl, DailyFlags
set 2, [hl]
ret
; 11522
@@ -10587,7 +10492,7 @@
Function11522: ; 11522
and a
- ld hl, wdc1e
+ ld hl, DailyFlags
bit 2, [hl]
ret nz
scf
@@ -12712,7 +12617,7 @@
UnknownScript_0x124ce: ; 0x124ce
writetext UnknownText_0x124f5
closetext
- special Function8c084
+ special FadeBlackBGMap
pause 40
special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER
@@ -12991,7 +12896,7 @@
pop af
ld [hOAMUpdate], a
.ReturnEnd
- call Function1c07
+ call ExitMenu
.ReturnEnd2
call Function2dcf
call UpdateTimePals
@@ -13024,7 +12929,7 @@
; 12691
.ReturnFour ; 12691
- call Function1c07
+ call ExitMenu
ld a, $80
ld [$ffa0], a
ret
@@ -13031,7 +12936,7 @@
; 12699
.ReturnThree ; 12699
- call Function1c07
+ call ExitMenu
ld a, $80
ld [$ffa0], a
jr .ReturnEnd2
@@ -13038,7 +12943,7 @@
; 126a2
.ReturnTwo ; 126a2
- call Function1c07
+ call ExitMenu
ld hl, wd0e9
ld a, [hli]
ld h, [hl]
@@ -13516,7 +13421,7 @@
callba Function24fbf
push af
call WriteBackup
- call Function1c07
+ call ExitMenu
pop af
jr c, .asm_12a42
ld hl, UnknownText_0x12a4a
@@ -13523,7 +13428,7 @@
call MenuTextBox
call YesNoBox
push af
- call Function1c07
+ call ExitMenu
pop af
jr c, .asm_12a42
pop hl
@@ -13532,7 +13437,7 @@
call PartyMonItemName
ld hl, UnknownText_0x12a4f
call MenuTextBox
- call Function1c07
+ call ExitMenu
and a
ret
.asm_12a3f
@@ -13711,7 +13616,7 @@
ld hl, GiveTakeItemMenuData
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
jr c, .asm_12ba6
call GetCurNick
@@ -13728,7 +13633,7 @@
call Function12ba9
call ClearPalettes
call Functione58
- call Function1c07
+ call ExitMenu
ld a, 0
ret
@@ -13974,7 +13879,7 @@
Function12cf5: ; 12cf5
call MenuTextBox
call YesNoBox
- jp Function1c07
+ jp ExitMenu
; 12cfe
@@ -14016,7 +13921,7 @@
ld hl, MenuDataHeader_0x12dc9
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
jp c, .asm_12dc6
ld a, [wcfa9]
cp $1
@@ -16628,7 +16533,7 @@
push af
res 7, [hl]
set 6, [hl]
- call Function14209
+ call RunCallback_04
pop af
ld [wd13e], a
ret
@@ -16640,7 +16545,7 @@
push af
set 7, [hl]
res 6, [hl]
- call Function14209
+ call RunCallback_04
pop af
ld [wd13e], a
ret
@@ -16649,7 +16554,7 @@
Function14168:: ; 14168
call Function1416f
- call Function14209
+ call RunCallback_04
ret
; 1416f
@@ -16755,8 +16660,7 @@
ld c, a
ld b, 0
ld hl, OutdoorSprites
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -16772,9 +16676,9 @@
; 14209
-Function14209: ; 14209
+RunCallback_04: ; 14209
ld a, $4
- call Function263b
+ call RunMapCallback
call Function1439b
call Function14215
ret
@@ -18135,15 +18039,15 @@
ret
; 149c6
-Function149c6: ; 149c6
+CheckWarpCollision: ; 149c6
ld de, 1
- ld hl, Unknown_149d3
+ ld hl, .blocks
ld a, [StandingTile]
call IsInArray
ret
; 149d3
-Unknown_149d3: ; 149d3
+.blocks: ; 149d3
db $71 ; door
db $79
db $7a ; stairs
@@ -18158,13 +18062,13 @@
Function149dd:: ; 149dd
ld a, [StandingTile]
- ld hl, Unknown_149ea
+ ld hl, .blocks
ld de, 1
call IsInArray
ret
; 149ea
-Unknown_149ea: ; 149ea
+.blocks: ; 149ea
db $08
db $18 ; tall grass
db $14 ; tall grass
@@ -18178,15 +18082,15 @@
db -1
; 149f5
-Function149f5: ; 149f5
+CheckCutCollision: ; 149f5
ld a, c
- ld hl, Unknown_14a00
+ ld hl, .blocks
ld de, 1
call IsInArray
ret
; 14a00
-Unknown_14a00: ; 14a00
+.blocks: ; 14a00
db $12 ; cut tree
db $1a ; cut tree
db $10 ; tall grass
@@ -18215,18 +18119,18 @@
call DrawOnMap
callba Function4cf45
ld hl, UnknownText_0x15283
- call Function14baf
- jr nz, .asm_14a4a
- call Function14b89
- jr c, .asm_14a4a
- call Function14b54
- call Function14be3
- call Function14b5a
- call Function1c07
+ call SaveTheGame_yesorno
+ jr nz, .refused
+ call CheckForExistingSaveFile
+ jr c, .refused
+ call SetWRAMStateForSave
+ call _SavingDontTurnOffThePower
+ call ClearWRAMStateAfterSave
+ call ExitMenu
and a
ret
-.asm_14a4a
- call Function1c07
+.refused
+ call ExitMenu
call Functiond90
callba Function4cf45
scf
@@ -18233,16 +18137,16 @@
ret
Function14a58: ; 14a58
- call Function14b54
+ call SetWRAMStateForSave
callba Function14056
callba Function1050d9
- call Function14df7
+ call SavePartyData
call Function14e13
- call Function14e76
+ call LoadSavedPartyData
call Function14e8b
callba Function44725
callba Function1406a
- call Function14b5a
+ call ClearWRAMStateAfterSave
ret
; 14a83
@@ -18252,39 +18156,39 @@
ld hl, UnknownText_0x152a1
call MenuTextBox
call YesNoBox
- call Function1c07
- jr c, .asm_14ab0
- call Function14b89
- jr c, .asm_14ab0
- call Function14b54
- call Function14c99
+ call ExitMenu
+ jr c, .refused
+ call CheckForExistingSaveFile
+ jr c, .refused
+ call SetWRAMStateForSave
+ call SavingDontTurnOffThePower
call Function14e0c
pop de
ld a, e
ld [wCurBox], a
call Function15021
- call Function14be6
- call Function14b5a
+ call SavedTheGame
+ call ClearWRAMStateAfterSave
and a
ret
-.asm_14ab0
+.refused
pop de
ret
Function14ab2: ; 14ab2
- call Function14b89
- jr c, .asm_14ac1
- call Function14b54
- call Function14be3
- call Function14b5a
+ call CheckForExistingSaveFile
+ jr c, .refused
+ call SetWRAMStateForSave
+ call _SavingDontTurnOffThePower
+ call ClearWRAMStateAfterSave
and a
-.asm_14ac1
+.refused
ret
; 14ac2
Function14ac2: ; 14ac2
- call Function14b54
+ call SetWRAMStateForSave
push de
call Function14e0c
pop de
@@ -18291,12 +18195,12 @@
ld a, e
ld [wCurBox], a
call Function15021
- call Function14b5a
+ call ClearWRAMStateAfterSave
ret
; 14ad5
Function14ad5: ; 14ad5
- call Function14b54
+ call SetWRAMStateForSave
push de
call Function14e0c
pop de
@@ -18307,20 +18211,20 @@
callba Function14056
callba Function1050d9
call Function14da9
- call Function14dbb
- call Function14dd7
- call Function14df7
+ call SaveOptionsSelection
+ call SavePlayerData
+ call SavePartyData
call Function14e13
call Function14e2d
- call Function14e40
- call Function14e55
- call Function14e76
+ call LoadSavedOptions
+ call LoadSavedPlayerData
+ call LoadSavedPartyData
call Function14e8b
callba Function44725
callba Function106187
callba Function1406a
call Function15021
- call Function14b5a
+ call ClearWRAMStateAfterSave
ld de, SFX_SAVE
call PlaySFX
ld c, $18
@@ -18332,13 +18236,13 @@
ld hl, UnknownText_0x152a6
call MenuTextBox
call YesNoBox
- call Function1c07
+ call ExitMenu
jr c, .asm_14b52
- call Function14b89
+ call CheckForExistingSaveFile
jr c, .asm_14b52
- call Function14b54
- call Function14be3
- call Function14b5a
+ call SetWRAMStateForSave
+ call _SavingDontTurnOffThePower
+ call ClearWRAMStateAfterSave
and a
ret
@@ -18347,13 +18251,13 @@
ret
; 14b54
-Function14b54: ; 14b54
+SetWRAMStateForSave: ; 14b54
ld a, $1
ld [wc2cd], a
ret
; 14b5a
-Function14b5a: ; 14b5a
+ClearWRAMStateAfterSave: ; 14b5a
xor a
ld [wc2cd], a
ret
@@ -18366,7 +18270,7 @@
ld hl, $bdd9
ld de, $be3b
ld bc, $0b1a
-.asm_14b6d
+.loop
ld a, [hld]
ld [de], a
dec de
@@ -18373,10 +18277,10 @@
dec bc
ld a, c
or b
- jr nz, .asm_14b6d
+ jr nz, .loop
ld hl, OverworldMap
ld de, $b2c0
- ld bc, $0062
+ ld bc, 7 * 14
call CopyBytes
call CloseSRAM
ret
@@ -18387,36 +18291,36 @@
ret
; 14b89
-Function14b89: ; 14b89
+CheckForExistingSaveFile: ; 14b89
ld a, [wcfcd]
and a
- jr z, .asm_14ba8
+ jr z, .getridofpreviousplayersave
call Function14bcb
- jr z, .asm_14b9e
+ jr z, .yoursavefile
ld hl, UnknownText_0x15297
- call Function14baf
- jr nz, .asm_14bad
- jr .asm_14ba8
+ call SaveTheGame_yesorno
+ jr nz, .refused
+ jr .getridofpreviousplayersave
-.asm_14b9e
+.yoursavefile
ld hl, UnknownText_0x15292
- call Function14baf
- jr nz, .asm_14bad
- jr .asm_14bab
+ call SaveTheGame_yesorno
+ jr nz, .refused
+ jr .ok
-.asm_14ba8
- call Function14cbb
+.getridofpreviousplayersave
+ call GetRidOfPreviousPlayersSave
-.asm_14bab
+.ok
and a
ret
-.asm_14bad
+.refused
scf
ret
; 14baf
-Function14baf: ; 14baf
+SaveTheGame_yesorno: ; 14baf
ld b, BANK(UnknownText_0x15283)
call MapTextbox
call LoadMenuTextBox
@@ -18448,23 +18352,29 @@
ret
; 14be3
-Function14be3: ; 14be3
- call Function14c99
-Function14be6: ; 14be6
+_SavingDontTurnOffThePower: ; 14be3
+ call SavingDontTurnOffThePower
+SavedTheGame: ; 14be6
call Function14c10
+ ; wait 32 frames
ld c, $20
call DelayFrames
+ ; copy the original text speed setting to the stack
ld a, [Options]
push af
- ld a, $3
+ ; set text speed super slow
+ ld a, 3
ld [Options], a
+ ; <PLAYER> saved the game!
ld hl, UnknownText_0x1528d
call PrintText
+ ; restore the original text speed setting
pop af
ld [Options], a
ld de, SFX_SAVE
call WaitPlaySFX
call WaitSFX
+ ; wait 30 frames
ld c, $1e
call DelayFrames
ret
@@ -18472,20 +18382,20 @@
Function14c10: ; 14c10
- ld a, $1
+ ld a, 1
ld [wcfcd], a
callba Function14056
callba Function1050d9
call Function14da9
- call Function14dbb
- call Function14dd7
- call Function14df7
+ call SaveOptionsSelection
+ call SavePlayerData
+ call SavePartyData
call Function14e0c
call Function14e13
call Function14e2d
- call Function14e40
- call Function14e55
- call Function14e76
+ call LoadSavedOptions
+ call LoadSavedPlayerData
+ call LoadSavedPartyData
call Function14e8b
call Function14c6b
callba Function44725
@@ -18541,20 +18451,26 @@
jr .asm_14c93
; 14c99
-Function14c99: ; 14c99
+SavingDontTurnOffThePower: ; 14c99
+ ; Prevent joypad interrupts
xor a
ld [hJoypadReleased], a
ld [hJoypadPressed], a
ld [hJoypadSum], a
ld [hJoypadDown], a
+ ; Save the text speed setting to the stack
ld a, [Options]
push af
+ ; Set the text speed to super slow
ld a, $3
ld [Options], a
+ ; SAVING... DON'T TURN OFF THE POWER.
ld hl, UnknownText_0x15288
call PrintText
+ ; Restore the text speed setting
pop af
ld [Options], a
+ ; Wait for 16 frames
ld c, $10
call DelayFrames
ret
@@ -18561,7 +18477,7 @@
; 14cbb
-Function14cbb: ; 14cbb
+GetRidOfPreviousPlayersSave: ; 14cbb
call Function151fb
call Function14d06
call Function14ce2
@@ -18610,11 +18526,12 @@
; 14d18
Function14d18: ; 14d18
+; copy Unknown_14d2c to SRA4:a007
ld a, $4
call GetSRAMBank
ld hl, Unknown_14d2c
ld de, $a007
- ld bc, $0030
+ ld bc, 48
call CopyBytes
jp CloseSRAM
; 14d2c
@@ -18649,10 +18566,10 @@
ld a, [$a60b]
ld b, $0
and a
- jr z, .asm_14d7b
+ jr z, .ok
ld b, $2
-.asm_14d7b
+.ok
ld a, b
ld [$a60b], a
call CloseSRAM
@@ -18683,7 +18600,7 @@
ld a, [wd4b4]
and a
ret nz
- call Function14cbb
+ call GetRidOfPreviousPlayersSave
ret
; 14da9
@@ -18690,19 +18607,20 @@
Function14da9: ; 14da9
ld a, $1
call GetSRAMBank
- ld a, $63
+ ld a, 99
ld [$a008], a
- ld a, $7f
+ ld a, " "
ld [$ad0f], a
jp CloseSRAM
; 14dbb
-Function14dbb: ; 14dbb
+SaveOptionsSelection: ; 14dbb
+; Copy Options to SRA1:a000
ld a, $1
call GetSRAMBank
ld hl, Options
ld de, $a000
- ld bc, $0008
+ ld bc, OptionsEnd - Options
call CopyBytes
ld a, [Options]
and $ef
@@ -18710,26 +18628,28 @@
jp CloseSRAM
; 14dd7
-Function14dd7: ; 14dd7
+SavePlayerData: ; 14dd7
+; Copy 2122 bytes starting at PlayerID to SRA1:a009
ld a, $1
call GetSRAMBank
ld hl, PlayerID
ld de, $a009
- ld bc, $082a
+ ld bc, VisitedSpawns - PlayerID
call CopyBytes
ld hl, VisitedSpawns
ld de, $a833
- ld bc, $0032
+ ld bc, PartyCount - VisitedSpawns
call CopyBytes
jp CloseSRAM
; 14df7
-Function14df7: ; 14df7
+SavePartyData: ; 14df7
+; Copy your party to SRA1:a865.
ld a, $1
call GetSRAMBank
ld hl, PartyCount
ld de, $a865
- ld bc, $031e
+ ld bc, wdff5 - PartyCount
call CopyBytes
call CloseSRAM
ret
@@ -18758,46 +18678,46 @@
Function14e2d: ; 14e2d
ld a, $0
call GetSRAMBank
- ld a, $63
+ ld a, 99
ld [$b208], a
- ld a, $7f
+ ld a, " "
ld [$bf0f], a
call CloseSRAM
ret
; 14e40
-Function14e40: ; 14e40
+LoadSavedOptions: ; 14e40
ld a, $0
call GetSRAMBank
ld hl, Options
ld de, $b200
- ld bc, $0008
+ ld bc, OptionsEnd - Options
call CopyBytes
call CloseSRAM
ret
; 14e55
-Function14e55: ; 14e55
+LoadSavedPlayerData: ; 14e55
ld a, $0
call GetSRAMBank
ld hl, PlayerID
ld de, $b209
- ld bc, $082a
+ ld bc, VisitedSpawns - PlayerID
call CopyBytes
ld hl, VisitedSpawns
ld de, $ba33
- ld bc, $0032
+ ld bc, PartyCount - VisitedSpawns
call CopyBytes
call CloseSRAM
ret
; 14e76
-Function14e76: ; 14e76
+LoadSavedPartyData: ; 14e76
ld a, $0
call GetSRAMBank
ld hl, PartyCount
ld de, $ba65
- ld bc, $031e
+ ld bc, wdff5 - PartyCount
call CopyBytes
call CloseSRAM
ret
@@ -18818,9 +18738,9 @@
; 14ea5
-Function14ea5: ; 14ea5 (5:4ea5)
+TryLoadSaveFile: ; 14ea5 (5:4ea5)
call Function15028
- jr nz, .asm_14ed6
+ jr nz, .trytowrite
call Function14fd7
call Function1500c
call Function15021
@@ -18828,15 +18748,15 @@
callba Function10619d
callba Function1050ea
call Function14e2d
- call Function14e40
- call Function14e55
- call Function14e76
+ call LoadSavedOptions
+ call LoadSavedPlayerData
+ call LoadSavedPartyData
call Function14e8b
and a
ret
-.asm_14ed6
+.trytowrite
call Function1507c
- jr nz, .asm_14f07
+ jr nz, .corrupt
call Function15046
call Function15067
call Function15021
@@ -18844,13 +18764,13 @@
callba Function10619d
callba Function1050ea
call Function14da9
- call Function14dbb
- call Function14dd7
- call Function14df7
+ call SaveOptionsSelection
+ call SavePlayerData
+ call SavePartyData
call Function14e13
and a
ret
-.asm_14f07
+.corrupt
ld a, [Options]
push af
set 4, a
@@ -18892,7 +18812,7 @@
call GetSRAMBank
ld hl, $b244
ld de, StartDay
- ld bc, $0008
+ ld bc, 8
call CopyBytes
ld hl, $b5da
ld de, StatusFlags
@@ -18904,7 +18824,7 @@
.asm_14f6c
ld hl, DefaultOptions
ld de, Options
- ld bc, $0008
+ ld bc, OptionsEnd - Options
call CopyBytes
call Function67e
ret
@@ -18921,25 +18841,24 @@
db $00
; 14f84
-
Function14f84: ; 14f84
ld a, $1
call GetSRAMBank
ld a, [$a008]
- cp $63
- jr nz, .asm_14fab
+ cp 99
+ jr nz, .nope
ld a, [$ad0f]
- cp $7f
- jr nz, .asm_14fab
+ cp " "
+ jr nz, .nope
ld hl, $a000
ld de, Options
- ld bc, $0008
+ ld bc, OptionsEnd - Options
call CopyBytes
call CloseSRAM
ld a, $1
ld [wcfcd], a
-.asm_14fab
+.nope
call CloseSRAM
ret
; 14faf
@@ -18948,19 +18867,19 @@
ld a, $0
call GetSRAMBank
ld a, [$b208]
- cp $63
- jr nz, .asm_14fd3
+ cp 99
+ jr nz, .nope
ld a, [$bf0f]
- cp $7f
- jr nz, .asm_14fd3
+ cp " "
+ jr nz, .nope
ld hl, $b200
ld de, Options
- ld bc, $0008
+ ld bc, OptionsEnd - Options
call CopyBytes
ld a, $2
ld [wcfcd], a
-.asm_14fd3
+.nope
call CloseSRAM
ret
; 14fd7
@@ -18971,11 +18890,11 @@
call GetSRAMBank
ld hl, $a009
ld de, PlayerID
- ld bc, $82a
+ ld bc, VisitedSpawns - PlayerID
call CopyBytes
ld hl, $a833
ld de, VisitedSpawns
- ld bc, $32
+ ld bc, PartyCount - VisitedSpawns
call CopyBytes
call CloseSRAM
ld a, $1
@@ -18994,7 +18913,7 @@
call GetSRAMBank
ld hl, $a865
ld de, PartyCount
- ld bc, $031e
+ ld bc, wdff5 - PartyCount
call CopyBytes
call CloseSRAM
ret
@@ -19028,11 +18947,11 @@
call GetSRAMBank
ld hl, $b209
ld de, PlayerID
- ld bc, $82a
+ ld bc, VisitedSpawns - PlayerID
call CopyBytes
ld hl, $ba33
ld de, VisitedSpawns
- ld bc, $32
+ ld bc, PartyCount - VisitedSpawns
call CopyBytes
call CloseSRAM
ret
@@ -19042,7 +18961,7 @@
call GetSRAMBank
ld hl, $ba65
ld de, PartyCount
- ld bc, $31e
+ ld bc, wdff5 - PartyCount
call CopyBytes
call CloseSRAM
ret
@@ -19070,7 +18989,7 @@
call GetSRAMBank
ld hl, PlayerGender
ld de, $be3d
- ld bc, $0007
+ ld bc, wd479 - PlayerGender
call CopyBytes
ld hl, wd479
ld a, [hli]
@@ -19086,7 +19005,7 @@
call GetSRAMBank
ld hl, $be3d
ld de, PlayerGender
- ld bc, $7
+ ld bc, wd479 - PlayerGender
call CopyBytes
ld hl, wd479
ld a, [$a60e]
@@ -19243,7 +19162,7 @@
Function151fb: ; 151fb
ld hl, Unknown_1522d
ld c, $e
-.asm_15200
+.outerloop
push bc
ld a, [hli]
call GetSRAMBank
@@ -19254,11 +19173,11 @@
xor a
ld [de], a
inc de
- ld a, $ff
+ ld a, -1
ld [de], a
inc de
ld bc, $044c
-.asm_15213
+.loop
xor a
ld [de], a
inc de
@@ -19265,12 +19184,12 @@
dec bc
ld a, b
or c
- jr nz, .asm_15213
+ jr nz, .loop
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
- ld a, $ff
+ ld a, -1
ld [de], a
inc de
xor a
@@ -19278,43 +19197,43 @@
call CloseSRAM
pop bc
dec c
- jr nz, .asm_15200
+ jr nz, .outerloop
ret
; 1522d
Unknown_1522d: ; 1522d
; dbww bank, address, address
- db $02, $00, $a0, $4e, $a4 ; 2, $a000, $a44e
- db $02, $50, $a4, $9e, $a8 ; 2, $a450, $a89e
- db $02, $a0, $a8, $ee, $ac ; 2, $a8a0, $acee
- db $02, $f0, $ac, $3e, $b1 ; 2, $acf0, $b13e
- db $02, $40, $b1, $8e, $b5 ; 2, $b140, $b5de
- db $02, $90, $b5, $de, $b9 ; 2, $b590, $b9de
- db $02, $e0, $b9, $2e, $be ; 2, $b9e0, $be2e
+ dbww $02, $a000, $a44e ; 2, $a000, $a44e
+ dbww $02, $a450, $a89e ; 2, $a450, $a89e
+ dbww $02, $a8a0, $acee ; 2, $a8a0, $acee
+ dbww $02, $acf0, $b13e ; 2, $acf0, $b13e
+ dbww $02, $b140, $b58e ; 2, $b140, $b5de
+ dbww $02, $b590, $b9de ; 2, $b590, $b9de
+ dbww $02, $b9e0, $be2e ; 2, $b9e0, $be2e
- db $03, $00, $a0, $4e, $a4 ; 3, $a000, $a44e
- db $03, $50, $a4, $9e, $a8 ; 3, $a450, $a89e
- db $03, $a0, $a8, $ee, $ac ; 3, $a8a0, $acee
- db $03, $f0, $ac, $3e, $b1 ; 3, $acf0, $b13e
- db $03, $40, $b1, $8e, $b5 ; 3, $b140, $b58e
- db $03, $90, $b5, $de, $b9 ; 3, $b590, $b9de
- db $03, $e0, $b9, $2e, $be ; 3, $b9e0, $be2e
+ dbww $03, $a000, $a44e ; 3, $a000, $a44e
+ dbww $03, $a450, $a89e ; 3, $a450, $a89e
+ dbww $03, $a8a0, $acee ; 3, $a8a0, $acee
+ dbww $03, $acf0, $b13e ; 3, $acf0, $b13e
+ dbww $03, $b140, $b58e ; 3, $b140, $b58e
+ dbww $03, $b590, $b9de ; 3, $b590, $b9de
+ dbww $03, $b9e0, $be2e ; 3, $b9e0, $be2e
; 15273
Function15273: ; 15273
- ld de, $0000
-.asm_15276
+ ld de, 0
+.loop
ld a, [hli]
add e
ld e, a
- ld a, $0
+ ld a, 0
adc d
ld d, a
dec bc
ld a, b
or c
- jr nz, .asm_15276
+ jr nz, .loop
ret
; 15283
@@ -19372,73 +19291,81 @@
INCLUDE "engine/map_setup.asm"
-Function1559a: ; 1559a
- call Function15650
+PokemonCenterPC: ; 1559a
+ call PC_CheckPartyForPokemon
ret c
- call Function156b3
+ call PC_PlayBootSound
ld hl, UnknownText_0x15a27
- call Function15a20
+ call PC_DisplayText
ld hl, UnknownText_0x15a2c
- call Function157bb
- ld hl, MenuDataHeader_0x155d6
+ call PC_DisplayTextWaitMenu
+ ld hl, .TopMenu
call LoadMenuDataHeader
-.asm_155b3
+.loop
xor a
ld [hBGMapMode], a
call Function1563e
ld [wcf76], a
call Function1e5d
- jr c, .asm_155cc
+ jr c, .shutdown
ld a, [MenuSelection]
- ld hl, Unknown_155e6
+ ld hl, .JumpTable
call Function1fa7
- jr nc, .asm_155b3
+ jr nc, .loop
-.asm_155cc
+.shutdown
call Function156b8
- call Function1c07
+ call ExitMenu
call WriteBackup
ret
; 155d6
-MenuDataHeader_0x155d6: ; 0x155d6
+.TopMenu: ; 0x155d6
db $48 ; flags
db 00, 00 ; start coords
db 12, 15 ; end coords
- dw MenuData2_0x155de
+ dw .MenuData2
db 1 ; default option
; 0x155de
-MenuData2_0x155de: ; 0x155de
+.MenuData2: ; 0x155de
db $a0 ; flags
db 0 ; items
- dw Unknown_1562c
+ dw .WhichPC
dw Function1f8d
- dw Unknown_155e6
+ dw .JumpTable
; 0x155e6
-Unknown_155e6: ; 155e6
- dw Function15679, String_155fa
- dw Function15668, String_15600
- dw Function15689, String_15609
- dw Function1569a, String_15616
- dw Function156ab, String_15623
+.JumpTable: ; 155e6
+ dw Function15679, .String_PlayersPC
+ dw Function15668, .String_BillsPC
+ dw Function15689, .String_OaksPC
+ dw Function1569a, .String_HallOfFame
+ dw Function156ab, .String_TurnOff
; 155fa
-String_155fa: db "<PLAYER>'s PC@"
-String_15600: db "BILL's PC@"
-String_15609: db "PROF.OAK's PC@"
-String_15616: db "HALL OF FAME@"
-String_15623: db "TURN OFF@"
+.String_PlayersPC: db "<PLAYER>'s PC@"
+.String_BillsPC: db "BILL's PC@"
+.String_OaksPC: db "PROF.OAK's PC@"
+.String_HallOfFame: db "HALL OF FAME@"
+.String_TurnOff: db "TURN OFF@"
; 1562c
-Unknown_1562c: ; 1562c
- db 3
- db 1, 0, 4, $ff
- db 4
- db 1, 0, 2, 4, $ff
- db 5
- db 1, 0, 2, 3, 4, $ff
+.WhichPC: ; 1562c
+ ; before pokedex
+ db 3 ; items
+ db 1, 0, 4 ; bill's, player's, turn off
+ db -1
+
+ ; before Hall Of Fame
+ db 4 ; items
+ db 1, 0, 2, 4 ; bill's, player's, oak's, turn off
+ db -1
+
+ ; postgame
+ db 5 ; items
+ db 1, 0, 2, 3, 4 ; bill's, player's, oak's, hall of fame, turn off
+ db -1
; 1563e
Function1563e: ; 1563e
@@ -19456,7 +19383,7 @@
ret
; 15650
-Function15650: ; 15650
+PC_CheckPartyForPokemon: ; 15650
ld a, [PartyCount]
and a
ret nz
@@ -19463,7 +19390,7 @@
ld de, SFX_CHOOSE_PC_OPTION
call PlaySFX
ld hl, UnknownText_0x15663
- call Function15a20
+ call PC_DisplayText
scf
ret
; 15663
@@ -19477,7 +19404,7 @@
Function15668: ; 15668
call Function156c2
ld hl, UnknownText_0x15a31
- call Function15a20
+ call PC_DisplayText
callba Functione3fd
and a
ret
@@ -19486,7 +19413,7 @@
Function15679: ; 15679
call Function156c2
ld hl, UnknownText_0x15a36
- call Function15a20
+ call PC_DisplayText
ld b, $0
call Function15704
and a
@@ -19496,7 +19423,7 @@
Function15689: ; 15689
call Function156c2
ld hl, UnknownText_0x15a3b
- call Function15a20
+ call PC_DisplayText
callba ProfOaksPC
and a
ret
@@ -19518,7 +19445,7 @@
ret
; 156b3
-Function156b3: ; 156b3
+PC_PlayBootSound: ; 156b3
ld de, SFX_BOOT_PC
jr Function156d0
@@ -19546,9 +19473,9 @@
; 156d9
Function156d9: ; 156d9
- call Function156b3
+ call PC_PlayBootSound
ld hl, UnknownText_0x156ff
- call Function15a20
+ call PC_DisplayText
ld b, $1
call Function15704
and a
@@ -19576,9 +19503,9 @@
ld a, b
ld [wcf76], a
ld hl, UnknownText_0x157cc
- call Function157bb
+ call PC_DisplayTextWaitMenu
call Function15715
- call Function1c07
+ call ExitMenu
ret
; 15715
@@ -19600,7 +19527,7 @@
xor a
.asm_15732
- call Function1c07
+ call ExitMenu
ret
; 15736
@@ -19650,7 +19577,7 @@
db TOSS_ITEM
db MAIL_BOX
db TURN_OFF
- db $ff
+ db -1
.KrissPCMenuList2
db 6
@@ -19660,9 +19587,9 @@
db MAIL_BOX
db DECORATION
db LOG_OFF
- db $ff
+ db -1
-Function157bb: ; 157bb
+PC_DisplayTextWaitMenu: ; 157bb
ld a, [Options]
push af
set 4, a
@@ -19710,8 +19637,8 @@
ld hl, .HowManyText
call MenuTextBox
callba Function24fbf
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
jr c, .done
.withdraw
@@ -19733,7 +19660,7 @@
call MenuTextBox
xor a
ld [hBGMapMode], a
- call Function1c07
+ call ExitMenu
ret
.PackFull
@@ -19883,8 +19810,8 @@
call MenuTextBox
callba Function24fbf
push af
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
pop af
jr c, .asm_1596c
@@ -20026,9 +19953,9 @@
dbw BANK(Function24ac3), Function24ac3
dbw BANK(Function244c3), Function244c3
-Function15a20: ; 15a20
+PC_DisplayText: ; 15a20
call MenuTextBox
- call Function1c07
+ call ExitMenu
ret
; 15a27
@@ -20122,7 +20049,7 @@
ld a, [hli]
or [hl]
jr z, .asm_15aa7
- ld hl, wdc1e
+ ld hl, DailyFlags
set 6, [hl]
.asm_15aa7
@@ -20266,7 +20193,7 @@
; 15b8d
Function15b8d: ; 15b8d
- call Function1c07
+ call ExitMenu
call ReadMart
call Function15c62
and a
@@ -20275,7 +20202,7 @@
; 15b9a
Function15b9a: ; 15b9a
- call Function1c07
+ call ExitMenu
call Function15eb3
ld a, $5
ret
@@ -20282,7 +20209,7 @@
; 15ba3
Function15ba3: ; 15ba3
- call Function1c07
+ call ExitMenu
ld hl, UnknownText_0x15fb4
call Function15fcd
ld a, $ff
@@ -20594,7 +20521,7 @@
ld a, $0
call Function15c7d
callba Function24fc9
- call Function1c07
+ call ExitMenu
ret
; 15d97
@@ -20652,7 +20579,7 @@
ld a, $63
ld [wd10d], a
callba Function24fcf
- call Function1c07
+ call ExitMenu
ret
; 15df9
@@ -20709,9 +20636,7 @@
ld c, a
ld b, 0
ld hl, DefaultFlypoint
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
push de
ld d, h
ld e, l
@@ -20920,7 +20845,7 @@
call PrintText
callba Function24af8
callba Function24fe1
- call Function1c07
+ call ExitMenu
jr c, .asm_15f6e
hlcoord 1, 14
ld bc, $0312
@@ -20946,7 +20871,7 @@
call Functiona36
.asm_15f6e
- call Function1c07
+ call ExitMenu
and a
ret
; 15f73
@@ -21038,7 +20963,7 @@
Function15fcd: ; 15fcd
call MenuTextBox
call Functiona36
- call Function1c07
+ call ExitMenu
ret
; 15fd7
@@ -23497,8 +23422,7 @@
ld c, a
ld b, 0
ld hl, EggMovePointers
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, BANK(EggMovePointers)
call GetFarHalfword
.loop
@@ -23531,8 +23455,7 @@
ld c, a
ld b, 0
ld hl, EvosAttacksPointers
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, BANK(EvosAttacksPointers)
call GetFarHalfword
.loop3
@@ -24099,7 +24022,7 @@
ld hl, UnknownText_0x2004c
call PrintText
call Function20051
- call Function1c07
+ call ExitMenu
pop bc
ld hl, Options
ld [hl], b
@@ -26058,8 +25981,7 @@
ld c, a
ld b, 0
ld hl, Unknown_24a91
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld c, [hl]
inc hl
ld b, [hl]
@@ -26431,7 +26353,7 @@
call Function24d59
ld [MenuSelection], a
- call Function1c07
+ call ExitMenu
ret
; 24d3f
@@ -26730,7 +26652,7 @@
call Function2039
ld a, [wcf88]
ld [wd0d2], a
- call Function1c07
+ call ExitMenu
ret
; 24f0b
@@ -26753,7 +26675,7 @@
call InterpretMenu
ld a, [wcf88]
ld [wd0d2], a
- call Function1c07
+ call ExitMenu
ret
; 24f2c
@@ -27701,7 +27623,7 @@
ld hl, OakPCText4
call PrintText
call Functiona36
- call Function1c07
+ call ExitMenu
ret
; 0x265ee
@@ -28003,7 +27925,7 @@
jr nc, .asm_2676f
.asm_2678e
- call Function1c07
+ call ExitMenu
pop af
ld [wcf76], a
ld a, [wd1ee]
@@ -28313,7 +28235,7 @@
call DoDecorationAction2
.no_action_1
- call Function1c07
+ call ExitMenu
ret
.beyond_eight
@@ -28338,7 +28260,7 @@
call DoDecorationAction2
.no_action_2
- call Function1c07
+ call ExitMenu
ret
.empty
@@ -28480,36 +28402,36 @@
ENDM
DecorationAttributes: ; 26a4f
- decoration DECO_PLANT, $00, $0, EVENT_000, $00
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_000, $00
+ decoration DECO_PLANT, $00, $0, EVENT_GAVE_KURT_APRICORNS, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_BED, FEATHERY_BED, SET_UP_BED, EVENT_DECO_BED_1, $1b
decoration DECO_BED, PINK_BED, SET_UP_BED, EVENT_DECO_BED_2, $1c
decoration DECO_BED, POLKADOT_BED, SET_UP_BED, EVENT_DECO_BED_3, $1d
decoration DECO_BED, PIKACHU_BED, SET_UP_BED, EVENT_DECO_BED_4, $1e
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CARPET, EVENT_000, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CARPET, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_CARPET, RED_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_1, $08
decoration DECO_CARPET, BLUE_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_2, $0b
decoration DECO_CARPET, YELLOW_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_3, $0e
decoration DECO_CARPET, GREEN_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_4, $11
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_PLANT, EVENT_000, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_PLANT, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_PLANT, MAGNAPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_1, $20
decoration DECO_PLANT, TROPICPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_2, $21
decoration DECO_PLANT, JUMBOPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_3, $22
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_POSTER, EVENT_000, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_POSTER, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_PLANT, TOWN_MAP_D, SET_UP_POSTER, EVENT_DECO_PLANT_4, $1f
decoration DECO_POSTER, PIKACHU, SET_UP_POSTER, EVENT_DECO_POSTER_1, $23
decoration DECO_POSTER, CLEFAIRY, SET_UP_POSTER, EVENT_DECO_POSTER_2, $24
decoration DECO_POSTER, JIGGLYPUFF, SET_UP_POSTER, EVENT_DECO_POSTER_3, $25
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CONSOLE, EVENT_000, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CONSOLE, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_PLANT, FAMICOM, SET_UP_CONSOLE, EVENT_DECO_FAMICOM, SPRITE_FAMICOM
decoration DECO_PLANT, SUPER_NES, SET_UP_CONSOLE, EVENT_DECO_SNES, SPRITE_SNES
decoration DECO_PLANT, NINTENDO_64, SET_UP_CONSOLE, EVENT_DECO_N64, SPRITE_N64
decoration DECO_PLANT, VIRTUAL_BOY, SET_UP_CONSOLE, EVENT_DECO_VIRTUAL_BOY, SPRITE_VIRTUAL_BOY
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BIG_DOLL, EVENT_000, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BIG_DOLL, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_BIGDOLL, SNORLAX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_SNORLAX_DOLL, SPRITE_BIG_SNORLAX
decoration DECO_BIGDOLL, ONIX, SET_UP_BIG_DOLL, EVENT_DECO_BIG_ONIX_DOLL, SPRITE_BIG_ONIX
decoration DECO_BIGDOLL, LAPRAS, SET_UP_BIG_DOLL, EVENT_DECO_BIG_LAPRAS_DOLL, SPRITE_BIG_LAPRAS
- decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_DOLL, EVENT_000, $00
+ decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_DOLL, EVENT_GAVE_KURT_APRICORNS, $00
decoration DECO_DOLL, PIKACHU, SET_UP_DOLL, EVENT_DECO_PIKACHU_DOLL, SPRITE_PIKACHU
decoration DECO_PLANT, SURF_PIKA_DOLL, SET_UP_DOLL, EVENT_DECO_SURFING_PIKACHU_DOLL, SPRITE_SURFING_PIKACHU
decoration DECO_DOLL, CLEFAIRY, SET_UP_DOLL, EVENT_DECO_CLEFAIRY_DOLL, SPRITE_CLEFAIRY
@@ -28937,7 +28859,7 @@
call MenuTextBox
ld hl, MenuDataHeader_0x26eab
call GetMenu2
- call Function1c07
+ call ExitMenu
call Function1c66
jr c, .nope
ld a, [wcfa9]
@@ -30018,7 +29940,7 @@
pop hl
bccoord 1, 14
call Function13e5
- call Function4b6
+ call FadeToWhite
call ClearScreen
ld b, $8
call GetSGBLayout
@@ -31106,7 +31028,7 @@
jr nz, .asm_28ade
Function28b22: ; 28b22
- call Function4b6
+ call FadeToWhite
call ClearScreen
ld b, $8
call GetSGBLayout
@@ -33645,7 +33567,7 @@
ret
; 29ff8
-Function29ff8: ; 29ff8
+LoadWildMonData: ; 29ff8
call Function2a205
jr c, .asm_2a006
ld hl, wd25a
@@ -34082,7 +34004,7 @@
asm_2a23d
call Function2a27f
push hl
- ld hl, wdc20
+ ld hl, SwarmFlags
bit 2, [hl]
pop hl
jr z, .asm_2a25c
@@ -34099,7 +34021,7 @@
.asm_2a25c
push hl
- ld hl, wdc20
+ ld hl, SwarmFlags
bit 3, [hl]
pop hl
jr z, asm_2a278
@@ -34250,7 +34172,7 @@
; 2a30d
-Function2a30d: ; 2a30d
+UpdateRoamMons: ; 2a30d
ld a, [wRoamMon1MapGroup]
cp $ff
jr z, .asm_2a324
@@ -34330,8 +34252,7 @@
inc hl
ld c, a
ld b, $0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [wdfe7]
cp [hl]
jr nz, .asm_2a390
@@ -34347,7 +34268,7 @@
ld c, [hl]
ret
-Function2a394: ; 2a394
+RestoreRoamMons: ; 2a394
ld a, [wRoamMon1MapGroup]
cp $ff
jr z, .asm_2a3a6
@@ -34491,8 +34412,7 @@
dec a
ld c, a
ld b, $0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
inc hl
ld c, [hl]
pop hl
@@ -34564,8 +34484,7 @@
and $3
ld c, a
ld b, $0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
inc hl
ld a, [hl]
ld [wd265], a
@@ -34584,8 +34503,7 @@
dec a
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, BANK(TrainerGroups)
call GetFarHalfword
@@ -36157,8 +36075,7 @@
dec a
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld e, a
ld d, [hl]
@@ -36709,8 +36626,7 @@
ld c, a
ld b, 0
ld hl, TrainerGroups
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -36738,8 +36654,7 @@
ld d, h
ld e, l
ld hl, TrainerTypes
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -37039,8 +36954,7 @@
push bc
ld b, 0
ld hl, TrainerGroups
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -37209,8 +37123,7 @@
ld b, 0
ld c, a
ld hl, EvosAttacksPointers
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -37600,8 +37513,7 @@
ld b, 0
ld c, a
ld hl, EvosAttacksPointers
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -37800,8 +37712,7 @@
.asm_42583
ld hl, EvosAttacksPointers
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -37953,8 +37864,7 @@
ld hl, AIScoringPointers
dec c
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -38769,7 +38679,7 @@
ld hl, MenuData44964
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
jr c, .asm_44860
ld a, [wcfa9]
dec a
@@ -38799,7 +38709,7 @@
ld hl, .MessageLostText
call MenuTextBox
call YesNoBox
- call Function1c07
+ call ExitMenu
ret c
ld a, [MenuSelection]
dec a
@@ -39267,7 +39177,7 @@
ld [wcf88], a
call Function1bc9
call PlayClickSFX
- call Function1c07
+ call ExitMenu
bit 0, a
jp z, Function4840c
ld hl, wcfa9
@@ -39337,8 +39247,8 @@
ld [wd0e4], a
ld a, d
push af
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
pop af
ld a, [hJoyPressed] ; $ff00+$a7
bit 0, a
@@ -39822,7 +39732,7 @@
ld [wd473], a
.asm_487da
ld a, [wd473]
- call Function1c07
+ call ExitMenu
hlcoord 11, 6
call Function487ec
pop af
@@ -40122,7 +40032,7 @@
pop de
pop bc
pop af
- call Function1c07
+ call ExitMenu
hlcoord 11, 10
call Function489ea
hlcoord 11, 9
@@ -40195,7 +40105,7 @@
call Function1bc9
push af
call PlayClickSFX
- call Function1c07
+ call ExitMenu
pop af
bit 1, a
jp nz, Function48a9a
@@ -40999,12 +40909,12 @@
jr .learned
.didnt_learn
- call Function1c07
+ call ExitMenu
and a
ret
.learned
- call Function1c07
+ call ExitMenu
scf
ret
; 4930a
@@ -42809,7 +42719,7 @@
call PrintText
call Functiona36
.asm_4a338
- call Function1c07
+ call ExitMenu
.asm_4a33b
call Function1d7d
callba Function104148
@@ -43355,9 +43265,7 @@
; Load the box.
ld hl, BoxAddressTable1
ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld a, [hli]
call GetSRAMBank
ld a, [hli]
@@ -43570,9 +43478,7 @@
jr z, .asm_4a8d1
ld hl, BoxAddressTable2
ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld a, [hli]
call GetSRAMBank
ld a, [hli]
@@ -44228,7 +44134,7 @@
ld a, $1
ld [hBGMapMode], a
call Function4acaa
- call Function1c07
+ call ExitMenu
and a
ret
; 4aca2
@@ -44503,7 +44409,7 @@
Function4ae5e: ; 4ae5e
ld a, [hOAMUpdate]
push af
- call Function1c07
+ call ExitMenu
call DrawOnMap
xor a
ld [hOAMUpdate], a
@@ -45673,9 +45579,7 @@
jr z, .asm_4d90b
ld hl, Unknown_4d99f
ld b, 0
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld a, [hli]
call GetSRAMBank
ld a, [hli]
@@ -47398,8 +47302,7 @@
ld c, a
ld hl, Jumptable_4e564
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -49561,12 +49464,12 @@
special HealParty
reloadmappart
playsound SFX_WARP_TO
- special Function8c084
- special Function8c079
- special Function8c084
- special Function8c079
- special Function8c084
- special Function8c079
+ special FadeBlackBGMap
+ special FadeInBGMap
+ special FadeBlackBGMap
+ special FadeInBGMap
+ special FadeBlackBGMap
+ special FadeInBGMap
waitbutton
writetext UnknownText_0x50845
playsound SFX_CAUGHT_MON
@@ -49722,8 +49625,7 @@
dec a
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -52336,9 +52238,7 @@
ld c, a
ld b, 0
ld hl, VarActionTable
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld e, [hl]
inc hl
ld d, [hl]
@@ -53968,8 +53868,7 @@
ld c, a
ld b, $0
ld hl, wc608
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, e
ld [hli], a
ld [hl], d
@@ -55068,12 +54967,12 @@
Function84757: ; 84757
ld a, [wca88]
cp $ff
- jr nz, .asm_84765
+ jr nz, .c_directly_below_e5
ld a, [wca89]
cp $ff
jr z, .asm_8477f
-.asm_84765
+.c_directly_below_e5
ld a, [wca89]
and $e0
ret z
@@ -55299,7 +55198,7 @@
ld a, [CurPartySpecies]
cp $fd
pop hl
- jr z, .asm_84972
+ jr z, .ok2
ld bc, $b
add hl, bc
call Function8498a
@@ -55343,7 +55242,7 @@
ld a, [hl]
pop hl
call Function383d
-.asm_84972
+.ok2
ld hl, DefaultFlypoint
inc [hl]
pop de
@@ -55515,7 +55414,7 @@
ld [MusicFadeIDHi], a
ld a, $a
ld [MusicFade], a
- callba Function8c084
+ callba FadeBlackBGMap
xor a
ld [VramState], a
ld [$ffde], a
@@ -55538,7 +55437,7 @@
ld [MusicFadeIDHi], a
ld a, 10
ld [MusicFade], a
- callba Function8c084
+ callba FadeBlackBGMap
xor a
ld [VramState], a
ld [$ffde], a
@@ -55589,7 +55488,7 @@
call Function86810
ld a, $4
ld [MusicFade], a
- call Function4b6
+ call FadeToWhite
ld c, $8
call DelayFrames
ret
@@ -56445,8 +56344,7 @@
inc hl
ld c, a
ld b, $0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
inc hl
ld a, [hl]
pop bc
@@ -56461,8 +56359,7 @@
ld c, a
ld b, $0
inc hl
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [CurItem]
ld c, a
ld a, [hli]
@@ -57002,7 +56899,7 @@
Function89245: ; 89245 (22:5245)
- callba Function14ea5
+ callba TryLoadSaveFile
ret c
callba Function150b9
and a
@@ -59586,7 +59483,7 @@
ld c, $10
call DelayFrames
.asm_8a15a
- call Function1c07
+ call ExitMenu
call Function891de
call Function893e2
call Function89245
@@ -59766,7 +59663,7 @@
call Function8a20d
jr .asm_8a2ea
.asm_8a2cf
- call Function1c07
+ call ExitMenu
call Function8a241
jr c, .asm_8a2ed
ld a, $1
@@ -61560,7 +61457,8 @@
Unknown_8afb8: ; 8afb8
db 3
- db 0, 1, 2, $ff
+ db 0, 1, 2
+ db -1
Function8afbd: ; 8afbd
push de
@@ -61832,8 +61730,7 @@
ld hl, BuenaPrizes
ld b, 0
ld c, a
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ret
; 8b15e
@@ -62058,8 +61955,7 @@
inc hl
inc hl
ld b, $0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
call Function8b28a
call PrintText
pop bc
@@ -63168,8 +63064,7 @@
ld b, 0
ld c, a
ld hl, Unknown_8b903
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -63239,7 +63134,7 @@
call Function89d5e
ld hl, Function8b9ab
call Function89d85
- call Function1c07
+ call ExitMenu
jr c, .asm_8b99c
call Function8b99f
jr nz, .asm_8b99d
@@ -63470,7 +63365,7 @@
ret
; 8c079
-Function8c079:: ; 8c079
+FadeInBGMap:: ; 8c079
ld c, $12
call GetTimePalFade
ld b, $4
@@ -63478,7 +63373,7 @@
ret
; 8c084
-Function8c084:: ; 8c084
+FadeBlackBGMap:: ; 8c084
call Function8c0c1
ld c, $9
call GetTimePalFade
@@ -63693,8 +63588,7 @@
ld c, a
ld b, $0
ld hl, .dmgfades
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -64589,7 +64483,7 @@
; 8c7e1
BlindingFlash: ; 8c7e1
- callba Function8c084
+ callba FadeBlackBGMap
ld hl, StatusFlags
set 2, [hl]
callba Function8c0e5
@@ -64597,7 +64491,7 @@
ld b, $9
call GetSGBLayout
callba Function49409
- callba Function8c079
+ callba FadeInBGMap
ret
; 8c80a
@@ -68937,7 +68831,7 @@
cp b
jr nz, .no_call
- call Function2d05
+ call GetMapHeaderPhoneServiceNybble
and a
jr nz, .no_call
@@ -69120,7 +69014,7 @@
ld a, [InLinkBattle]
and a
jr nz, .asm_901e7
- call Function2d05
+ call GetMapHeaderPhoneServiceNybble
and a
jr nz, .asm_901e7
ld a, b
@@ -69163,7 +69057,7 @@
.asm_901e7
ld b, BANK(UnknownScript_0x90209)
ld de, UnknownScript_0x90209
- call Function2674
+ call ExecuteCallbackScript
ret
.asm_901f0
@@ -69175,7 +69069,7 @@
ld [wd004], a
ld b, BANK(UnknownScript_0x90205)
ld de, UnknownScript_0x90205
- call Function2674
+ call ExecuteCallbackScript
ret
; 90205 (24:4205)
@@ -69483,8 +69377,7 @@
ld c, b
ld b, 0
ld hl, Unknown_903d6
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld e, a
ld d, [hl]
@@ -70099,7 +69992,7 @@
call Functiona57
call Function90993
jr nc, .asm_9096a
- call Function1c07
+ call ExitMenu
call DrawOnMap
ld hl, UnknownText_0x90a44
call PrintText
@@ -70795,7 +70688,7 @@
hlcoord 17, 2
inc a
ld [hli], a
- call Function2d05
+ call GetMapHeaderPhoneServiceNybble
and a
ret nz
hlcoord 18, 2
@@ -71330,7 +71223,7 @@
ret
Function911eb: ; 911eb (24:51eb)
- call Function2d05
+ call GetMapHeaderPhoneServiceNybble
and a
jr nz, .asm_91234
ld hl, Options
@@ -71660,7 +71553,7 @@
ld hl, UnknownText_0x914d8
call MenuTextBox
call YesNoBox
- call Function1c07
+ call ExitMenu
jr c, .asm_91419
call Function9131e
xor a
@@ -75711,7 +75604,7 @@
SECTION "bank2E", ROMX, BANK[$2E]
-Functionb8000:: ; b8000
+ReturnFromMapSetupScript:: ; b8000
xor a
ld [hBGMapMode], a
callba Functionb800a
@@ -76738,8 +76631,7 @@
ld hl, Unknown_b87f2
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld b, [hl]
inc hl
ld c, [hl]
@@ -77323,8 +77215,7 @@
ld hl, PokedexDataPointerTable
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
call Functionb8a2d
@@ -77975,8 +77866,7 @@
ld hl, Unknown_b8e11
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld b, [hl]
inc hl
ld c, [hl]
@@ -78218,7 +78108,7 @@
call Functionb9169
jp c, Functionb90c5
ld a, [wdc4a]
- ld hl, wdc1f
+ ld hl, WeeklyFlags
bit 7, [hl]
jr nz, .asm_b8f83
.asm_b8f65
@@ -78235,7 +78125,7 @@
jr nc, .asm_b8f71
add e
ld [wdc4a], a
- ld hl, wdc1f
+ ld hl, WeeklyFlags
set 7, [hl]
.asm_b8f83
ld c, a
@@ -78376,7 +78266,7 @@
Functionb90b9: ; b90b9 (2e:50b9)
push hl
- ld hl, wdc1f
+ ld hl, WeeklyFlags
res 7, [hl]
pop hl
ld a, $46
@@ -78383,7 +78273,7 @@
jp Functionb9221
Functionb90c5: ; b90c5 (2e:50c5)
- ld hl, wdc1f
+ ld hl, WeeklyFlags
res 7, [hl]
ld hl, UnknownText_0xb91d2
ld a, $47
@@ -78451,7 +78341,7 @@
callba NoRadioName
pop af
ld [hBGMapMode], a ; $ff00+$d4
- ld hl, wdc1f
+ ld hl, WeeklyFlags
res 7, [hl]
ld a, $4
ld [wd002], a
@@ -78609,8 +78499,7 @@
ld a, [wd002]
ld c, a
ld b, 0
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld e, [hl]
inc hl
ld d, [hl]
@@ -80006,8 +79895,7 @@
call Functione0057
ld hl, Unknown_e008b
pop bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld e, a
ld d, [hl]
@@ -80755,8 +80643,7 @@
and a
jr nz, .asm_e0575
hlcoord 13, 3
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $36
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80765,8 +80652,7 @@
.asm_e0575
hlcoord 13, 3
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $36
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80781,8 +80667,7 @@
and a
jr nz, .asm_e0599
hlcoord 13, 4
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $3b
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80791,8 +80676,7 @@
.asm_e0599
hlcoord 13, 4
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $3d
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80807,8 +80691,7 @@
and a
jr nz, .asm_e05bd
hlcoord 13, 6
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $36
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80817,8 +80700,7 @@
.asm_e05bd
hlcoord 13, 6
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $36
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80833,8 +80715,7 @@
and a
jr nz, .asm_e05e1
hlcoord 13, 7
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $3c
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80843,8 +80724,7 @@
.asm_e05e1
hlcoord 13, 7
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $3d
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80859,8 +80739,7 @@
and a
jr nz, .asm_e0605
hlcoord 13, 9
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $36
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80869,8 +80748,7 @@
.asm_e0605
hlcoord 13, 9
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $36
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80885,8 +80763,7 @@
and a
jr nz, .asm_e0629
hlcoord 13, 10
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $3c
ld bc, SCREEN_WIDTH
add hl, bc
@@ -80895,8 +80772,7 @@
.asm_e0629
hlcoord 13, 10
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld [hl], $3d
ld bc, SCREEN_WIDTH
add hl, bc
@@ -83418,7 +83294,7 @@
BillsPCDepositFuncStats: ; e24c8 (38:64c8)
call Function1d6e
call Functione2f7e
- call Function1c07
+ call ExitMenu
call PCMonInfo
call Functione2def
ld [CurPartySpecies], a
@@ -83440,7 +83316,7 @@
call PlaceYesNoBox
ld a, [wcfa9]
dec a
- call Function1c07
+ call ExitMenu
and a
jr nz, .asm_e252c
ld a, [wcb2b]
@@ -83681,7 +83557,7 @@
BillsPCWithdrawFuncStats: ; e26c0 (38:66c0)
call Function1d6e
call Functione2f7e
- call Function1c07
+ call ExitMenu
call PCMonInfo
call Functione2def
ld [CurPartySpecies], a
@@ -83701,7 +83577,7 @@
call PlaceYesNoBox
ld a, [wcfa9]
dec a
- call Function1c07
+ call ExitMenu
and a
jr nz, .asm_e2720
ld a, [wcb2b]
@@ -83939,7 +83815,7 @@
Functione28a5: ; e28a5
call Function1d6e
call Functione2f7e
- call Function1c07
+ call ExitMenu
call PCMonInfo
call Functione2def
ld [CurPartySpecies], a
@@ -85265,8 +85141,7 @@
.asm_e321d
ld hl, Jumptable_e3245
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -85468,9 +85343,7 @@
ld c, b
ld b, 0
ld hl, Unknown_e33a6
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld a, [hli]
ld b, a
ld a, [hli]
@@ -85679,9 +85552,7 @@
ld c, a
ld b, 0
ld hl, Unknown_e36a5
- add hl, bc
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 3
ld a, [hli]
ld b, a
call GetSRAMBank
@@ -85751,7 +85622,7 @@
ld hl, MenuDataHeader_0xe377b
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
ret c
ld a, [wcfa9]
cp $1
@@ -86026,8 +85897,7 @@
.NonePressed
ld b, 0
ld hl, .Strings
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld e, [hl]
inc hl
ld d, [hl]
@@ -86245,8 +86115,7 @@
.NonePressed
ld b, $0
ld hl, .Strings
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld e, [hl]
inc hl
ld d, [hl]
@@ -88120,8 +87989,7 @@
pop hl
push hl
ld hl, Unknown_e5288
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld d, [hl]
ld e, a
@@ -88132,8 +88000,7 @@
ld [hli], a
push hl
ld hl, Unknown_e52c8
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld d, [hl]
ld e, a
@@ -88144,8 +88011,7 @@
ld [hli], a
push hl
ld hl, Unknown_e5308
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld d, [hl]
ld e, a
@@ -89247,8 +89113,7 @@
ld [CurSpecies], a
call GetBaseData
ld hl, wcbea
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [BaseType1]
cp [hl]
jr nz, .asm_fb5db
@@ -89564,7 +89429,7 @@
pop af
ld [wPokedexStatus], a
call MaxVolume
- call Function4b6
+ call FadeToWhite
ld a, [hSCX]
add $fb
ld [hSCX], a
@@ -90825,8 +90690,7 @@
call AddNTimes
ld a, [wcf64]
ld c, a
- add hl, bc
- add hl, bc
+ add_n_times hl, bc, 2
ld a, [hli]
ld h, [hl]
ld l, a
@@ -91006,7 +90870,7 @@
ld a, [wd45c]
and a
ret nz
- call Function2d05
+ call GetMapHeaderPhoneServiceNybble
and a
ret nz
xor a
@@ -91859,7 +91723,7 @@
FishingRodGFX: INCBIN "gfx/misc/fishing.2bpp"
-Function1045b0: ; 1045b0
+RunCallback_05_03: ; 1045b0
call Function210f
call Function2e50
call Function2e5d
@@ -91866,13 +91730,13 @@
call GetCurrentMapTrigger
call Function2e56
ld a, $5
- call Function263b
+ call RunMapCallback
-Function1045c4: ; 1045c4
+RunCallback_03: ; 1045c4
callba Function97df9
ld a, $3
- call Function263b
- call Function2cff
+ call RunMapCallback
+ call GetMapHeaderTimeOfDayNybble
ld [wc2d0], a
ret
@@ -92024,7 +91888,7 @@
ret
; 1046c6
-Function1046c6: ; 1046c6
+LoadWarpData: ; 1046c6
call Function1046df
call Function104718
ld a, [wd146]
@@ -92092,7 +91956,7 @@
ld [wdcb3], a
ret
-Function104750: ; 104750
+LoadMapTimeOfDay: ; 104750
ld hl, VramState
res 6, [hl]
ld a, $1
@@ -92159,7 +92023,7 @@
ld [rVBK], a ; $ff00+$4f
ret
-Function1047cf: ; 1047cf
+LoadGraphics: ; 1047cf
call LoadTilesetHeader
call Function2821
xor a
@@ -92171,14 +92035,14 @@
callba Function106594
ret
-Function1047eb: ; 1047eb
+LoadMapPalettes: ; 1047eb
ld b, $9
jp GetSGBLayout
; 1047f0
-Function1047f0: ; 1047f0
+RefreshMapSprites: ; 1047f0
call ClearSprites
- callba Functionb8000
+ callba ReturnFromMapSetupScript
call Function2914
callba Function579d
callba Function154f7
@@ -92247,7 +92111,7 @@
ret
-Function10486d:: ; 10486d
+GetCoordOfUpperLeftCorner:: ; 10486d
ld hl, OverworldMap
ld a, [XCoord]
bit 0, a
--- a/maps/BattleTowerBattleRoom.asm
+++ b/maps/BattleTowerBattleRoom.asm
@@ -31,7 +31,7 @@
keeptextopen
loadmovesprites
special Function170215
- special Function8c084
+ special FadeBlackBGMap
reloadmap
if_not_equal $0, UnknownScript_0x9f4c2
copybytetovar wcf64
@@ -46,10 +46,10 @@
closetext
loadmovesprites
playmusic MUSIC_HEAL
- special Function8c084
- special Function1047eb
+ special FadeBlackBGMap
+ special LoadMapPalettes
pause 60
- special Function8c079
+ special FadeInBGMap
special RestartMapMusic
loadfont
writetext UnknownText_0x9eebc
@@ -73,7 +73,7 @@
special Function170687
playsound SFX_SAVE
waitbutton
- special Function8c084
+ special FadeBlackBGMap
special Reset
UnknownScript_0x9f4a3:
writetext UnknownText_0x9efbf
@@ -84,7 +84,7 @@
writebyte $6
special Function170687
loadmovesprites
- special Function8c084
+ special FadeBlackBGMap
warpfacing $1, GROUP_BATTLE_TOWER_1F, MAP_BATTLE_TOWER_1F, $7, $7
loadfont
jump UnknownScript_0x9e4b0
--- a/maps/BillsHouse.asm
+++ b/maps/BillsHouse.asm
@@ -8,7 +8,7 @@
GrampsScript_0x189538:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x1896ba
checkevent EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA
iftrue UnknownScript_0x1896c0
@@ -120,7 +120,7 @@
verbosegiveitem EVERSTONE, 1
iffalse UnknownScript_0x1896cc
setevent EVENT_GOT_EVERSTONE_FROM_BILLS_GRANDPA
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
loadmovesprites
end
@@ -131,7 +131,7 @@
verbosegiveitem LEAF_STONE, 1
iffalse UnknownScript_0x1896cc
setevent EVENT_GOT_LEAF_STONE_FROM_BILLS_GRANDPA
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
loadmovesprites
end
@@ -142,7 +142,7 @@
verbosegiveitem WATER_STONE, 1
iffalse UnknownScript_0x1896cc
setevent EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
loadmovesprites
end
@@ -153,7 +153,7 @@
verbosegiveitem FIRE_STONE, 1
iffalse UnknownScript_0x1896cc
setevent EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
loadmovesprites
end
--- a/maps/BluesHouse.asm
+++ b/maps/BluesHouse.asm
@@ -30,10 +30,10 @@
writetext UnknownText_0x19b266
closetext
loadmovesprites
- special Function8c084
+ special FadeBlackBGMap
playmusic MUSIC_HEAL
pause 60
- special Function8c079
+ special FadeInBGMap
special RestartMapMusic
loadfont
writetext UnknownText_0x19b296
--- a/maps/CharcoalKiln.asm
+++ b/maps/CharcoalKiln.asm
@@ -163,6 +163,6 @@
; people-events
db 3
- person_event SPRITE_BLACK_BELT, 7, 6, OW_DOWN | $3, $0, -1, -1, $0, 0, CharcoalKilnBoss, EVENT_6F7
- person_event SPRITE_YOUNGSTER, 7, 9, OW_DOWN | $2, $11, -1, -1, $0, 0, CharcoalKilnApprentice, EVENT_6F6
- person_event SPRITE_MOLTRES, 10, 9, OW_UP | $12, $22, -1, -1, (PAL_OW_BROWN << 4) | $80, 0, CharcoalKilnFarfetchd, EVENT_6F5
+ person_event SPRITE_BLACK_BELT, 7, 6, OW_DOWN | $3, $0, -1, -1, $0, 0, CharcoalKilnBoss, EVENT_CHARCOAL_KILN_BOSS
+ person_event SPRITE_YOUNGSTER, 7, 9, OW_DOWN | $2, $11, -1, -1, $0, 0, CharcoalKilnApprentice, EVENT_CHARCOAL_KILN_APPRENTICE
+ person_event SPRITE_MOLTRES, 10, 9, OW_UP | $12, $22, -1, -1, (PAL_OW_BROWN << 4) | $80, 0, CharcoalKilnFarfetchd, EVENT_CHARCOAL_KILN_FARFETCH_D
--- a/maps/Colosseum.asm
+++ b/maps/Colosseum.asm
@@ -83,5 +83,5 @@
; people-events
db 2
- person_event SPRITE_CHRIS, 8, 7, OW_LEFT | $1, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_000
- person_event SPRITE_CHRIS, 8, 10, OW_LEFT | $0, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_001
+ person_event SPRITE_CHRIS, 8, 7, OW_LEFT | $1, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_GAVE_KURT_APRICORNS
+ person_event SPRITE_CHRIS, 8, 10, OW_LEFT | $0, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_RECEIVED_BALLS_FROM_KURT
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -41,7 +41,7 @@
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_KRIS
.Part2
- special Function14209
+ special RunCallback_04
checkevent EVENT_RETURNED_MACHINE_PART
iftrue .Part7
loadfont
@@ -65,7 +65,7 @@
.Part6
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
- special Function14209
+ special RunCallback_04
loadfont
writetext UnknownText_0x18b028
closetext
@@ -94,7 +94,7 @@
.Part11
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
- special Function14209
+ special RunCallback_04
loadfont
writetext UnknownText_0x18b116
closetext
@@ -137,7 +137,7 @@
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_KRIS
.Part17
- special Function14209
+ special RunCallback_04
loadfont
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Part18
@@ -159,7 +159,7 @@
.Part21
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
- special Function14209
+ special RunCallback_04
loadfont
writetext UnknownText_0x18b2f5
closetext
--- a/maps/DragonShrine.asm
+++ b/maps/DragonShrine.asm
@@ -23,7 +23,7 @@
writetext UnknownText_0x18d2ea
keeptextopen
.Question1:
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
writetext UnknownText_0x18d3bc
keeptextopen
loadmenudata MenuDataHeader_0x18d215
@@ -35,7 +35,7 @@
end
.Question2:
- setevent EVENT_002
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
writetext UnknownText_0x18d3d3
keeptextopen
loadmenudata MenuDataHeader_0x18d234
@@ -45,7 +45,7 @@
if_equal $2, .RightAnswer
if_equal $3, .WrongAnswer
.Question3:
- setevent EVENT_003
+ setevent EVENT_DRAGON_SHRINE_QUESTION_3
writetext UnknownText_0x18d3f3
keeptextopen
loadmenudata MenuDataHeader_0x18d258
@@ -55,7 +55,7 @@
if_equal $2, .RightAnswer
if_equal $3, .RightAnswer
.Question4:
- setevent EVENT_004
+ setevent EVENT_DRAGON_SHRINE_QUESTION_4
writetext UnknownText_0x18d420
keeptextopen
loadmenudata MenuDataHeader_0x18d283
@@ -65,7 +65,7 @@
if_equal $2, .WrongAnswer
if_equal $3, .RightAnswer
.Question5:
- setevent EVENT_005
+ setevent EVENT_DRAGON_SHRINE_QUESTION_5
writetext UnknownText_0x18d44a
keeptextopen
loadmenudata MenuDataHeader_0x18d2a5
@@ -75,17 +75,17 @@
if_equal $2, .RightAnswer
if_equal $3, .WrongAnswer
.RightAnswer:
- checkevent EVENT_005
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_5
iftrue .PassedTheTest
writetext UnknownText_0x18d82d
keeptextopen
- checkevent EVENT_004
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_4
iftrue .Question5
- checkevent EVENT_003
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_3
iftrue .Question4
- checkevent EVENT_002
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_2
iftrue .Question3
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue .Question2
.WrongAnswer:
loadmovesprites
@@ -101,15 +101,15 @@
loadmovesprites
setevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG
loadfont
- checkevent EVENT_005
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_5
iftrue .Question5
- checkevent EVENT_004
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_4
iftrue .Question4
- checkevent EVENT_003
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_3
iftrue .Question3
- checkevent EVENT_002
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_2
iftrue .Question2
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue .Question1
.PassedTheTest:
writetext UnknownText_0x18d47c
@@ -184,15 +184,15 @@
playsound SFX_ENTER_DOOR
disappear $5
waitbutton
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
end
ElderScript_0x18d1a5:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue .DontGiveDratiniYet
- checkevent EVENT_006
+ checkevent EVENT_JUST_RECEIVED_DRATINI
iftrue .ReceivedDratini
checkevent EVENT_GOT_DRATINI
iffalse .GiveDratini
@@ -215,7 +215,7 @@
checkevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG
special SpecialDratini
setevent EVENT_GOT_DRATINI
- setevent EVENT_006
+ setevent EVENT_JUST_RECEIVED_DRATINI
writetext UnknownText_0x18d6ca
closetext
loadmovesprites
@@ -681,7 +681,7 @@
; people-events
db 4
- person_event SPRITE_ELDER, 5, 9, OW_UP | $2, $0, -1, -1, $0, 0, ElderScript_0x18d1a5, EVENT_000
- person_event SPRITE_ELDER, 8, 6, OW_LEFT | $1, $0, -1, -1, $0, 0, ElderScript_0x18d205, EVENT_000
- person_event SPRITE_ELDER, 8, 11, OW_LEFT | $0, $0, -1, -1, $0, 0, ElderScript_0x18d20d, EVENT_000
+ person_event SPRITE_ELDER, 5, 9, OW_UP | $2, $0, -1, -1, $0, 0, ElderScript_0x18d1a5, EVENT_GAVE_KURT_APRICORNS
+ person_event SPRITE_ELDER, 8, 6, OW_LEFT | $1, $0, -1, -1, $0, 0, ElderScript_0x18d205, EVENT_GAVE_KURT_APRICORNS
+ person_event SPRITE_ELDER, 8, 11, OW_LEFT | $0, $0, -1, -1, $0, 0, ElderScript_0x18d20d, EVENT_GAVE_KURT_APRICORNS
person_event SPRITE_CLAIR, 12, 8, OW_UP | $3, $0, -1, -1, (PAL_OW_BLUE << 4) | $80, 0, ObjectEvent, EVENT_DRAGON_SHRINE_CLAIR
--- a/maps/DragonsDenB1F.asm
+++ b/maps/DragonsDenB1F.asm
@@ -148,12 +148,12 @@
playmusic MUSIC_RIVAL_ENCOUNTER
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x18c995
writetext UnknownText_0x18cc83
closetext
loadmovesprites
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
special RestartMapMusic
end
--- a/maps/EcruteakGym.asm
+++ b/maps/EcruteakGym.asm
@@ -84,7 +84,7 @@
follow $0, $8
applymovement $0, MovementData_0x99e5f
stopfollow
- special Function8c084
+ special FadeBlackBGMap
playsound SFX_ENTER_DOOR
waitbutton
warp GROUP_ECRUTEAK_CITY, MAP_ECRUTEAK_CITY, $6, $1b
--- a/maps/EcruteakHouse.asm
+++ b/maps/EcruteakHouse.asm
@@ -86,7 +86,7 @@
.CheckForClearBell:
checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER
iftrue .AllowedThrough
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue .Event000
checkitem CLEAR_BELL
iftrue .RingClearBell
@@ -102,7 +102,7 @@
dotrigger $1
setevent EVENT_RANG_CLEAR_BELL_2
clearevent EVENT_RANG_CLEAR_BELL_1
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
end
.AllowedThrough:
--- a/maps/FastShip1F.asm
+++ b/maps/FastShip1F.asm
@@ -3,24 +3,24 @@
db 3
; triggers
- dw UnknownScript_0x75135, $0000
- dw UnknownScript_0x75136, $0000
- dw UnknownScript_0x7513a, $0000
+ dw .Trigger1, $0000
+ dw .Trigger2, $0000
+ dw .Trigger3, $0000
; callback count
db 0
-UnknownScript_0x75135:
+.Trigger1:
end
-UnknownScript_0x75136:
- priorityjump UnknownScript_0x7513b
+.Trigger2:
+ priorityjump .PriorityJump2
end
-UnknownScript_0x7513a:
+.Trigger3:
end
-UnknownScript_0x7513b:
+.PriorityJump2:
applymovement $2, MovementData_0x7520e
applymovement $0, MovementData_0x75217
applymovement $2, MovementData_0x75211
@@ -28,13 +28,13 @@
playsound SFX_BOAT
earthquake 30
blackoutmod GROUP_FAST_SHIP_CABINS_SW_SSW_NW, MAP_FAST_SHIP_CABINS_SW_SSW_NW
- clearevent EVENT_031
- checkevent EVENT_030
- iftrue UnknownScript_0x7515d
+ clearevent EVENT_FAST_SHIP_HAS_ARRIVED
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
+ iftrue .Vermilion
dotrigger $2
end
-UnknownScript_0x7515d:
+.Vermilion:
dotrigger $0
end
@@ -41,8 +41,8 @@
SailorScript_0x75160:
faceplayer
loadfont
- checkevent EVENT_031
- iftrue UnknownScript_0x7517a
+ checkevent EVENT_FAST_SHIP_HAS_ARRIVED
+ iftrue .Arrived
checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE
iftrue .Olivine
writetext UnknownText_0x7523b
@@ -56,15 +56,15 @@
loadmovesprites
end
-UnknownScript_0x7517a:
+.Arrived:
checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE
- iftrue .Olivine
+ iftrue ._Olivine
writetext UnknownText_0x754be
closetext
loadmovesprites
- scall UnknownScript_0x751b8
+ scall .LetThePlayerOut
playsound SFX_EXIT_BUILDING
- special Function8c084
+ special FadeBlackBGMap
waitbutton
setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY
domaptrigger GROUP_VERMILION_PORT, MAP_VERMILION_PORT, $1
@@ -71,13 +71,13 @@
warp GROUP_VERMILION_PORT, MAP_VERMILION_PORT, $7, $11
end
-.Olivine
+._Olivine
writetext UnknownText_0x7548d
closetext
loadmovesprites
- scall UnknownScript_0x751b8
+ scall .LetThePlayerOut
playsound SFX_EXIT_BUILDING
- special Function8c084
+ special FadeBlackBGMap
waitbutton
setevent EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY
domaptrigger GROUP_OLIVINE_PORT, MAP_OLIVINE_PORT, $1
@@ -84,14 +84,14 @@
warp GROUP_OLIVINE_PORT, MAP_OLIVINE_PORT, $7, $17
end
-UnknownScript_0x751b8:
+.LetThePlayerOut:
checkcode VAR_FACING
- if_equal $3, UnknownScript_0x751c7
+ if_equal RIGHT, .YouAreFacingRight
applymovement $2, MovementData_0x7520e
applymovement $0, MovementData_0x75235
end
-UnknownScript_0x751c7:
+.YouAreFacingRight:
applymovement $2, MovementData_0x75214
applymovement $0, MovementData_0x75238
end
@@ -99,14 +99,14 @@
SailorScript_0x751d0:
faceplayer
loadfont
- checkevent EVENT_030
- iftrue UnknownScript_0x751de
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
+ iftrue .Vermilion
writetext UnknownText_0x752f9
closetext
loadmovesprites
end
-UnknownScript_0x751de:
+.Vermilion:
writetext UnknownText_0x7534f
closetext
loadmovesprites
--- a/maps/FastShipB1F.asm
+++ b/maps/FastShipB1F.asm
@@ -41,16 +41,16 @@
SailorScript_0x76767:
faceplayer
loadfont
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue UnknownScript_0x767a0
- checkevent EVENT_033
+ checkevent EVENT_FAST_SHIP_LAZY_SAILOR
iftrue UnknownScript_0x7678d
- checkevent EVENT_034
+ checkevent EVENT_FAST_SHIP_INFORMED_ABOUT_LAZY_SAILOR
iftrue UnknownScript_0x76787
writetext UnknownText_0x7687b
closetext
loadmovesprites
- setevent EVENT_034
+ setevent EVENT_FAST_SHIP_INFORMED_ABOUT_LAZY_SAILOR
clearevent EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR
end
@@ -62,7 +62,7 @@
UnknownScript_0x7678d:
writetext UnknownText_0x7692e
- checkevent EVENT_032
+ checkevent EVENT_FAST_SHIP_FOUND_GIRL
iffalse UnknownScript_0x76799
closetext
loadmovesprites
--- a/maps/FastShipCabins_NNW_NNE_NE.asm
+++ b/maps/FastShipCabins_NNW_NNE_NE.asm
@@ -88,7 +88,7 @@
writetext UnknownText_0x758b1
closetext
loadmovesprites
- setevent EVENT_033
+ setevent EVENT_FAST_SHIP_LAZY_SAILOR
domaptrigger GROUP_FAST_SHIP_B1F, MAP_FAST_SHIP_B1F, $1
checkcode VAR_FACING
if_equal $3, UnknownScript_0x75629
--- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
+++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm
@@ -11,7 +11,7 @@
CaptainScript_0x75ea7:
faceplayer
loadfont
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue UnknownScript_0x75eb5
writetext UnknownText_0x76012
closetext
@@ -98,8 +98,8 @@
loadfont
writetext UnknownText_0x76645
closetext
- setevent EVENT_031
- setevent EVENT_032
+ setevent EVENT_FAST_SHIP_HAS_ARRIVED
+ setevent EVENT_FAST_SHIP_FOUND_GIRL
loadmovesprites
end
--- a/maps/FastShipCabins_SW_SSW_NW.asm
+++ b/maps/FastShipCabins_SW_SSW_NW.asm
@@ -75,11 +75,11 @@
writetext FastShipBedText2
closetext
loadmovesprites
- checkevent EVENT_031
+ checkevent EVENT_FAST_SHIP_HAS_ARRIVED
iftrue UnknownScript_0x75ae1
- checkevent EVENT_032
+ checkevent EVENT_FAST_SHIP_FOUND_GIRL
iftrue UnknownScript_0x75ae2
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue UnknownScript_0x75ae2
UnknownScript_0x75ae1:
end
@@ -93,7 +93,7 @@
writetext FastShipArrivedVermilionText
closetext
loadmovesprites
- setevent EVENT_031
+ setevent EVENT_FAST_SHIP_HAS_ARRIVED
end
UnknownScript_0x75af7:
@@ -101,7 +101,7 @@
writetext FastShipArrivedOlivineText
closetext
loadmovesprites
- setevent EVENT_031
+ setevent EVENT_FAST_SHIP_HAS_ARRIVED
end
FastShipCabinsNorthwestCabinTrashcan:
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -27,7 +27,7 @@
variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS
variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS
variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER
- special Function14209
+ special RunCallback_04
loadfont
writetext UnknownText_0x195feb
playsound SFX_GET_BADGE
@@ -57,7 +57,7 @@
applymovement $3, MovementData_0x195f27
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_LASS
- special Function14209
+ special RunCallback_04
UnknownScript_0x195e2c:
faceplayer
loadfont
@@ -91,7 +91,7 @@
applymovement $4, MovementData_0x195f27
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS
- special Function14209
+ special RunCallback_04
UnknownScript_0x195e66:
faceplayer
loadfont
@@ -125,7 +125,7 @@
applymovement $5, MovementData_0x195f27
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS
- special Function14209
+ special RunCallback_04
UnknownScript_0x195ea0:
faceplayer
loadfont
@@ -159,7 +159,7 @@
applymovement $6, MovementData_0x195f27
faceplayer
variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER
- special Function14209
+ special RunCallback_04
UnknownScript_0x195eda:
faceplayer
loadfont
--- a/maps/FuchsiaPokeCenter1F.asm
+++ b/maps/FuchsiaPokeCenter1F.asm
@@ -29,7 +29,7 @@
applymovement $5, MovementData_0x196486
faceplayer
variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_JANINE
- special Function14209
+ special RunCallback_04
loadfont
writetext UnknownText_0x19654e
closetext
@@ -37,7 +37,7 @@
applymovement $5, MovementData_0x196486
faceplayer
variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS
- special Function14209
+ special RunCallback_04
end
MovementData_0x196486:
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -11,7 +11,7 @@
.FlyPointAndFloria
setflag ENGINE_FLYPOINT_GOLDENROD
- setflag ENGINE_16
+ setflag ENGINE_FLORIA
checkevent EVENT_MET_FLORIA
iftrue .FloriaDone
clearevent EVENT_FLORIA_AT_SUDOWOODO
--- a/maps/GoldenrodDeptStoreB1F.asm
+++ b/maps/GoldenrodDeptStoreB1F.asm
@@ -12,7 +12,7 @@
dbw 5, UnknownScript_0x7d7ac
UnknownScript_0x7d781:
- checkevent EVENT_04A
+ checkevent EVENT_RECEIVED_CARD_KEY
iftrue UnknownScript_0x7d78a
jump UnknownScript_0x7d791
--- a/maps/GoldenrodFlowerShop.asm
+++ b/maps/GoldenrodFlowerShop.asm
@@ -12,7 +12,7 @@
iftrue UnknownScript_0x55399
checkevent EVENT_MET_FLORIA
iffalse UnknownScript_0x5539f
- checkevent EVENT_0BA
+ checkevent EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP
iffalse UnknownScript_0x5538f
checkflag ENGINE_PLAINBADGE
iffalse UnknownScript_0x5539c
@@ -54,7 +54,7 @@
writetext UnknownText_0x55561
closetext
loadmovesprites
- setevent EVENT_0BA
+ setevent EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP
setevent EVENT_FLORIA_AT_FLOWER_SHOP
clearevent EVENT_FLORIA_AT_SUDOWOODO
end
--- a/maps/IcePath1F.asm
+++ b/maps/IcePath1F.asm
@@ -33,6 +33,6 @@
; people-events
db 3
- person_event SPRITE_POKE_BALL, 11, 35, OW_DOWN | $1, $0, -1, -1, $1, 0, ItemFragment_0x7e472, EVENT_ICE_PATH_1F_HM_WATERFALL
+ person_event SPRITE_POKE_BALL, 11, 35, OW_DOWN | $1, $0, -1, -1, $1, 0, ItemFragment_0x7e472, EVENT_GOT_HM07_WATERFALL
person_event SPRITE_POKE_BALL, 27, 36, OW_DOWN | $1, $0, -1, -1, $1, 0, ItemFragment_0x7e474, EVENT_ICE_PATH_1F_PP_UP
person_event SPRITE_POKE_BALL, 13, 39, OW_DOWN | $1, $0, -1, -1, $1, 0, ItemFragment_0x7e476, EVENT_ICE_PATH_1F_PROTEIN
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -293,7 +293,7 @@
appear $2
loadvar FarfetchdPosition, $a
appear $4
- setevent EVENT_6F7
+ setevent EVENT_CHARCOAL_KILN_BOSS
setevent EVENT_HERDED_FARFETCHD
end
@@ -347,9 +347,9 @@
setevent EVENT_ILEX_FOREST_FARFETCHD
setevent EVENT_ILEX_FOREST_APPRENTICE
setevent EVENT_ILEX_FOREST_CHARCOAL_MASTER
- clearevent EVENT_6F5
- clearevent EVENT_6F6
- clearevent EVENT_6F7
+ clearevent EVENT_CHARCOAL_KILN_FARFETCH_D
+ clearevent EVENT_CHARCOAL_KILN_APPRENTICE
+ clearevent EVENT_CHARCOAL_KILN_BOSS
end
UnknownScript_0x6edd8:
--- a/maps/IndigoPlateauPokeCenter1F.asm
+++ b/maps/IndigoPlateauPokeCenter1F.asm
@@ -154,7 +154,7 @@
closetext
loadmovesprites
playsound SFX_WARP_TO
- special Function8c084
+ special FadeBlackBGMap
waitbutton
warp GROUP_NEW_BARK_TOWN, MAP_NEW_BARK_TOWN, $d, $6
end
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -16,13 +16,13 @@
end
UnknownScript_0x7a4d8:
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
UnknownScript_0x7a4db:
playmusic MUSIC_MOM
showemote EMOTE_SHOCK, $2, 15
spriteface $0, LEFT
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x7a4f2
applymovement $2, MovementData_0x7a5fc
jump UnknownScript_0x7a4f6
@@ -77,9 +77,9 @@
writetext UnknownText_0x7a850
closetext
loadmovesprites
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x7a55d
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iffalse UnknownScript_0x7a564
jump UnknownScript_0x7a56b
@@ -109,11 +109,11 @@
MomScript_0x7a582:
faceplayer
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
checktriggers
iffalse UnknownScript_0x7a572
loadfont
- checkevent EVENT_076
+ checkevent EVENT_FIRST_TIME_BANKING_WITH_MOM
iftrue UnknownScript_0x7a5af
checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
iftrue UnknownScript_0x7a5b8
@@ -139,7 +139,7 @@
end
UnknownScript_0x7a5b5:
- setevent EVENT_076
+ setevent EVENT_FIRST_TIME_BANKING_WITH_MOM
UnknownScript_0x7a5b8:
setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
special Function16218
--- a/maps/KrissHouse2F.asm
+++ b/maps/KrissHouse2F.asm
@@ -16,7 +16,7 @@
.InitializeRoom:
special ToggleDecorationsVisibility
- setevent EVENT_007
+ setevent EVENT_IN_YOUR_ROOM
checkevent EVENT_INITIALIZED_EVENTS
iftrue .SkipInizialization
jumpstd initializeevents
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -33,10 +33,10 @@
KurtScript_0x18e178:
faceplayer
loadfont
- checkevent EVENT_035
- iftrue UnknownScript_0x18e1cc
+ checkevent EVENT_KURT_GAVE_YOU_LURE_BALL
+ iftrue .GotLureBall
checkevent EVENT_CLEARED_SLOWPOKE_WELL
- iftrue UnknownScript_0x18e1bf
+ iftrue .ClearedSlowpokeWell
writetext UnknownText_0x18e473
closetext
loadmovesprites
@@ -43,7 +43,7 @@
special Functionc48f
setevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
checkcode VAR_FACING
- if_equal $1, UnknownScript_0x18e1ab
+ if_equal UP, .RunAround
spriteface $0, DOWN
playsound SFX_FLY
applymovement $2, MovementData_0x18e466
@@ -53,7 +53,7 @@
special RestartMapMusic
end
-UnknownScript_0x18e1ab:
+.RunAround:
spriteface $0, DOWN
playsound SFX_FLY
applymovement $2, MovementData_0x18e46c
@@ -63,211 +63,205 @@
special RestartMapMusic
end
-UnknownScript_0x18e1bf:
+.ClearedSlowpokeWell:
writetext UnknownText_0x18e615
keeptextopen
verbosegiveitem LURE_BALL, 1
- iffalse UnknownScript_0x18e2b2
- setevent EVENT_035
-UnknownScript_0x18e1cc:
- checkevent EVENT_000
- iftrue UnknownScript_0x18e29f
- checkevent EVENT_258
- iftrue UnknownScript_0x18e2b4
- checkevent EVENT_259
- iftrue UnknownScript_0x18e2ca
- checkevent EVENT_25A
- iftrue UnknownScript_0x18e2e0
- checkevent EVENT_25B
- iftrue UnknownScript_0x18e2f6
- checkevent EVENT_25C
- iftrue UnknownScript_0x18e30c
- checkevent EVENT_25D
- iftrue UnknownScript_0x18e322
- checkevent EVENT_25E
- iftrue UnknownScript_0x18e338
+ iffalse .NoRoomForBall
+ setevent EVENT_KURT_GAVE_YOU_LURE_BALL
+.GotLureBall:
+ checkevent EVENT_GAVE_KURT_APRICORNS
+ iftrue .WaitForApricorns
+ checkevent EVENT_GAVE_KURT_RED_APRICORN
+ iftrue .GiveLevelBall
+ checkevent EVENT_GAVE_KURT_BLU_APRICORN
+ iftrue .GiveLureBall
+ checkevent EVENT_GAVE_KURT_YLW_APRICORN
+ iftrue .GiveMoonBall
+ checkevent EVENT_GAVE_KURT_GRN_APRICORN
+ iftrue .GiveFriendBall
+ checkevent EVENT_GAVE_KURT_WHT_APRICORN
+ iftrue .GiveFastBall
+ checkevent EVENT_GAVE_KURT_BLK_APRICORN
+ iftrue .GiveHeavyBall
+ checkevent EVENT_GAVE_KURT_PNK_APRICORN
+ iftrue .GiveLoveBall
checkevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
- iftrue UnknownScript_0x18e34e
-UnknownScript_0x18e202:
- checkevent EVENT_001
- iftrue UnknownScript_0x18e212
- checkevent EVENT_002
- iftrue UnknownScript_0x18e212
+ iftrue .CanGiveGSBallToKurt
+.NoGSBall:
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue .CheckApricorns
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_2
+ iftrue .CheckApricorns
writetext UnknownText_0x18e6c9
closetext
-UnknownScript_0x18e212:
+.CheckApricorns:
checkitem RED_APRICORN
- iftrue UnknownScript_0x18e249
+ iftrue .AskApricorn
checkitem BLU_APRICORN
- iftrue UnknownScript_0x18e249
+ iftrue .AskApricorn
checkitem YLW_APRICORN
- iftrue UnknownScript_0x18e249
+ iftrue .AskApricorn
checkitem GRN_APRICORN
- iftrue UnknownScript_0x18e249
+ iftrue .AskApricorn
checkitem WHT_APRICORN
- iftrue UnknownScript_0x18e249
+ iftrue .AskApricorn
checkitem BLK_APRICORN
- iftrue UnknownScript_0x18e249
+ iftrue .AskApricorn
checkitem PNK_APRICORN
- iftrue UnknownScript_0x18e249
- checkevent EVENT_001
- iftrue UnknownScript_0x18e2ae
- checkevent EVENT_002
- iftrue UnknownScript_0x18e243
+ iftrue .AskApricorn
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
+ iftrue .ThatTurnedOutGreat
+ checkevent EVENT_DRAGON_SHRINE_QUESTION_2
+ iftrue .IMakeBallsFromApricorns
loadmovesprites
end
-UnknownScript_0x18e243:
+.IMakeBallsFromApricorns:
writetext UnknownText_0x18e6c9
closetext
loadmovesprites
end
-UnknownScript_0x18e249:
+.AskApricorn:
writetext UnknownText_0x18e736
keeptextopen
- setevent EVENT_002
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
special Function88018
- if_equal $0, UnknownScript_0x18e2a5
- if_equal $59, UnknownScript_0x18e275
- if_equal $5c, UnknownScript_0x18e27b
- if_equal $5d, UnknownScript_0x18e281
- if_equal $61, UnknownScript_0x18e287
- if_equal $63, UnknownScript_0x18e28d
- if_equal $65, UnknownScript_0x18e293
- setevent EVENT_258
- jump UnknownScript_0x18e299
+ if_equal $0, .Cancel
+ if_equal BLU_APRICORN, .Blu
+ if_equal YLW_APRICORN, .Ylw
+ if_equal GRN_APRICORN, .Grn
+ if_equal WHT_APRICORN, .Wht
+ if_equal BLK_APRICORN, .Blk
+ if_equal PNK_APRICORN, .Pnk
+; .Red
+ setevent EVENT_GAVE_KURT_RED_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e275:
- setevent EVENT_259
- jump UnknownScript_0x18e299
+.Blu:
+ setevent EVENT_GAVE_KURT_BLU_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e27b:
- setevent EVENT_25A
- jump UnknownScript_0x18e299
+.Ylw:
+ setevent EVENT_GAVE_KURT_YLW_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e281:
- setevent EVENT_25B
- jump UnknownScript_0x18e299
+.Grn:
+ setevent EVENT_GAVE_KURT_GRN_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e287:
- setevent EVENT_25C
- jump UnknownScript_0x18e299
+.Wht:
+ setevent EVENT_GAVE_KURT_WHT_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e28d:
- setevent EVENT_25D
- jump UnknownScript_0x18e299
+.Blk:
+ setevent EVENT_GAVE_KURT_BLK_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e293:
- setevent EVENT_25E
- jump UnknownScript_0x18e299
+.Pnk:
+ setevent EVENT_GAVE_KURT_PNK_APRICORN
+ jump .GaveKurtApricorns
-UnknownScript_0x18e299:
- setevent EVENT_000
+.GaveKurtApricorns:
+ setevent EVENT_GAVE_KURT_APRICORNS
setflag ENGINE_KURT_MAKING_BALLS
-UnknownScript_0x18e29f:
+.WaitForApricorns:
writetext UnknownText_0x18e779
closetext
loadmovesprites
end
-UnknownScript_0x18e2a5:
+.Cancel:
writetext UnknownText_0x18e7bc
closetext
loadmovesprites
end
-UnknownScript_0x18e2ab:
- setevent EVENT_001
-UnknownScript_0x18e2ae:
+._ThatTurnedOutGreat:
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+.ThatTurnedOutGreat:
writetext UnknownText_0x18e82a
closetext
-UnknownScript_0x18e2b2:
+.NoRoomForBall:
loadmovesprites
end
-UnknownScript_0x18e2b4:
+.GiveLevelBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 LEVEL_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e2c4:
- clearevent EVENT_258
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_RED_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e2ca:
+.GiveLureBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 LURE_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e2da:
- clearevent EVENT_259
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_BLU_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e2e0:
+.GiveMoonBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 MOON_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e2f0:
- clearevent EVENT_25A
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_YLW_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e2f6:
+.GiveFriendBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 FRIEND_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e306:
- clearevent EVENT_25B
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_GRN_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e30c:
+.GiveFastBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 FAST_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e31c:
- clearevent EVENT_25C
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_WHT_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e322:
+.GiveHeavyBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 HEAVY_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e332:
- clearevent EVENT_25D
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_BLK_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e338:
+.GiveLoveBall:
checkflag ENGINE_KURT_MAKING_BALLS
- iftrue UnknownScript_0x18e3c5
+ iftrue KurtMakingBallsScript
writetext UnknownText_0x18e7fb
keeptextopen
verbosegiveitem2 LOVE_BALL, $16
- iffalse UnknownScript_0x18e2b2
-UnknownScript_0x18e348:
- clearevent EVENT_25E
- jump UnknownScript_0x18e2ab
+ iffalse .NoRoomForBall
+ clearevent EVENT_GAVE_KURT_PNK_APRICORN
+ jump ._ThatTurnedOutGreat
-UnknownScript_0x18e34e:
+.CanGiveGSBallToKurt:
checkevent EVENT_GAVE_GS_BALL_TO_KURT
- iftrue UnknownScript_0x18e368
+ iftrue .GaveGSBallToKurt
checkitem GS_BALL
- iffalse UnknownScript_0x18e202
+ iffalse .NoGSBall
writetext UnknownText_0x18e8ab
closetext
loadmovesprites
@@ -276,9 +270,9 @@
setflag ENGINE_KURT_MAKING_BALLS
end
-UnknownScript_0x18e368:
+.GaveGSBallToKurt:
checkflag ENGINE_KURT_MAKING_BALLS
- iffalse UnknownScript_0x18e378
+ iffalse .NotMakingBalls
writetext UnknownText_0x18e934
closetext
writetext UnknownText_0x18e949
@@ -286,7 +280,7 @@
loadmovesprites
end
-UnknownScript_0x18e378:
+.NotMakingBalls:
writetext UnknownText_0x18e95c
closetext
loadmovesprites
@@ -297,17 +291,17 @@
pause 20
showemote EMOTE_SHOCK, $2, 30
checkcode VAR_FACING
- if_equal $1, UnknownScript_0x18e3a2
+ if_equal UP, .GSBallRunAround
spriteface $0, DOWN
playsound SFX_FLY
applymovement $2, MovementData_0x18e466
- jump UnknownScript_0x18e3ac
+ jump .KurtHasLeftTheBuilding
-UnknownScript_0x18e3a2:
+.GSBallRunAround:
spriteface $0, DOWN
playsound SFX_FLY
applymovement $2, MovementData_0x18e46c
-UnknownScript_0x18e3ac:
+.KurtHasLeftTheBuilding:
playsound SFX_EXIT_BUILDING
disappear $2
clearevent EVENT_AZALEA_TOWN_KURT
@@ -320,10 +314,10 @@
faceplayer
loadfont
checkevent EVENT_GAVE_GS_BALL_TO_KURT
- iftrue UnknownScript_0x18e3e0
-UnknownScript_0x18e3c5:
+ iftrue KurtScript_ImCheckingItNow
+KurtMakingBallsScript:
checkevent EVENT_BUGGING_KURT_TOO_MUCH
- iffalse UnknownScript_0x18e3d4
+ iffalse Script_FirstTimeBuggingKurt
writetext UnknownText_0x18e7d8
closetext
loadmovesprites
@@ -330,7 +324,7 @@
spriteface $5, UP
end
-UnknownScript_0x18e3d4:
+Script_FirstTimeBuggingKurt:
writetext UnknownText_0x18e863
closetext
loadmovesprites
@@ -338,7 +332,7 @@
setevent EVENT_BUGGING_KURT_TOO_MUCH
end
-UnknownScript_0x18e3e0:
+KurtScript_ImCheckingItNow:
writetext UnknownText_0x18e934
closetext
spriteface $5, UP
@@ -349,13 +343,13 @@
KurtsGranddaughter1:
faceplayer
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue KurtsGranddaughter2Subscript
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue KurtsGranddaughterFunScript
checkevent EVENT_FOREST_IS_RESTLESS
iftrue .Lonely
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue .Dad
checkevent EVENT_CLEARED_SLOWPOKE_WELL
iftrue .SlowpokeBack
--- a/maps/LakeofRageMagikarpHouse.asm
+++ b/maps/LakeofRageMagikarpHouse.asm
@@ -8,18 +8,18 @@
FishingGuruScript_0x19a6ae:
faceplayer
loadfont
- checkevent EVENT_03A
+ checkevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
iftrue UnknownScript_0x19a6fe
- checkevent EVENT_039
+ checkevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
iftrue UnknownScript_0x19a6e0
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
iftrue UnknownScript_0x19a6d7
- checkevent EVENT_038
+ checkevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
iftrue UnknownScript_0x19a6d1
writetext UnknownText_0x19a72e
closetext
loadmovesprites
- setevent EVENT_038
+ setevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP
end
UnknownScript_0x19a6d1:
@@ -32,7 +32,7 @@
writetext UnknownText_0x19a890
closetext
loadmovesprites
- setevent EVENT_039
+ setevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP
end
UnknownScript_0x19a6e0:
@@ -55,12 +55,12 @@
writetext UnknownText_0x19a9c3
closetext
loadmovesprites
- clearevent EVENT_03A
+ clearevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
end
UnknownScript_0x19a711:
loadmovesprites
- setevent EVENT_03A
+ setevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY
end
UnknownScript_0x19a716:
--- a/maps/LancesRoom.asm
+++ b/maps/LancesRoom.asm
@@ -125,7 +125,7 @@
pause 30
loadmovesprites
applymovement $3, MovementData_0x180f5b
- special Function8c084
+ special FadeBlackBGMap
pause 15
warpfacing $1, GROUP_HALL_OF_FAME, MAP_HALL_OF_FAME, $4, $d
end
--- a/maps/MobileBattleRoom.asm
+++ b/maps/MobileBattleRoom.asm
@@ -35,11 +35,11 @@
writetext MobileBattleRoom_HealText
pause 20
loadmovesprites
- special Function8c084
+ special FadeBlackBGMap
playmusic MUSIC_HEAL
- special Function1047eb
+ special LoadMapPalettes
pause 60
- special Function8c079
+ special FadeInBGMap
special RestartMapMusic
refreshscreen $0
.two_:
--- a/maps/NewBarkTown.asm
+++ b/maps/NewBarkTown.asm
@@ -20,7 +20,7 @@
.FlyPoint
setflag ENGINE_FLYPOINT_NEW_BARK
- clearevent EVENT_076
+ clearevent EVENT_FIRST_TIME_BANKING_WITH_MOM
return
UnknownScript_0x1a8016:
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -43,7 +43,7 @@
disappear $5
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
- special Function14209
+ special RunCallback_04
end
UnknownScript_0x1a886b:
@@ -67,7 +67,7 @@
dotrigger $1
special RestartMapMusic
variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY
- special Function14209
+ special RunCallback_04
end
SailorScript_0x1a88a3:
--- a/maps/OlivineLighthouse6F.asm
+++ b/maps/OlivineLighthouse6F.asm
@@ -42,9 +42,9 @@
loadmovesprites
special RestartMapMusic
cry AMPHAROS
- special Function8c084
+ special FadeBlackBGMap
pause 10
- special Function8c079
+ special FadeInBGMap
loadfont
writetext UnknownText_0x60f3d
closetext
@@ -116,10 +116,10 @@
cry AMPHAROS
closetext
loadmovesprites
- special Function8c084
- special Function8c079
- special Function8c084
- special Function8c079
+ special FadeBlackBGMap
+ special FadeInBGMap
+ special FadeBlackBGMap
+ special FadeInBGMap
end
ItemFragment_0x60c66:
--- a/maps/OlivinePort.asm
+++ b/maps/OlivinePort.asm
@@ -20,7 +20,7 @@
applymovement $0, MovementData_0x74a32
appear $2
dotrigger $0
- setevent EVENT_000
+ setevent EVENT_GAVE_KURT_APRICORNS
blackoutmod GROUP_OLIVINE_CITY, MAP_OLIVINE_CITY
end
@@ -27,7 +27,7 @@
SailorScript_0x748c0:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x74919
writetext UnknownText_0x74a55
closetext
@@ -39,9 +39,9 @@
waitbutton
applymovement $0, MovementData_0x74a30
playsound SFX_EXIT_BUILDING
- special Function8c084
+ special FadeBlackBGMap
waitbutton
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse UnknownScript_0x7490a
clearevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
setevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
@@ -69,13 +69,13 @@
UnknownScript_0x7491f:
spriteface $4, RIGHT
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x7498b
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue UnknownScript_0x7498b
spriteface $0, LEFT
loadfont
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse UnknownScript_0x7494e
checkcode VAR_WEEKDAY
if_equal SUNDAY, UnknownScript_0x74977
@@ -94,7 +94,7 @@
writetext UnknownText_0x74b11
closetext
loadmovesprites
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
applymovement $0, MovementData_0x74a37
jump SailorScript_0x748c0
@@ -138,9 +138,9 @@
SailorScript_0x7499c:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x74919
- checkevent EVENT_030
+ checkevent EVENT_FAST_SHIP_FIRST_TIME
iffalse UnknownScript_0x749c0
checkcode VAR_WEEKDAY
if_equal SUNDAY, UnknownScript_0x749f2
@@ -159,7 +159,7 @@
writetext UnknownText_0x74b11
closetext
loadmovesprites
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
checkcode VAR_FACING
if_equal $3, UnknownScript_0x749e5
applymovement $0, MovementData_0x74a3f
--- a/maps/PokeCenter2F.asm
+++ b/maps/PokeCenter2F.asm
@@ -17,7 +17,7 @@
special Special_CheckMysteryGift
if_equal $0, .Trigger1Done
clearevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue .Trigger1Done
priorityjump PokeCenter2F_AppearMysteryGiftDeliveryGuy
@@ -46,7 +46,7 @@
PokeCenter2F_AppearMysteryGiftDeliveryGuy:
appear $5
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
end
Script_TradeCenterClosed:
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -92,16 +92,16 @@
iftrue UnknownScript_0x5d865
checkevent EVENT_MET_BUENA
iffalse UnknownScript_0x5d800
- checkflag ENGINE_60
+ checkflag ENGINE_BUENAS_PASSWORD_2
iftrue UnknownScript_0x5d82f
checkcode VAR_HOUR
- if_less_than $12, UnknownScript_0x5d893
- checkflag ENGINE_5F
+ if_less_than 18, UnknownScript_0x5d893
+ checkflag ENGINE_BUENAS_PASSWORD
iffalse UnknownScript_0x5d80a
checkitem BLUE_CARD
iffalse UnknownScript_0x5d86b
checkcode VAR_BLUECARDBALANCE
- if_equal $1e, UnknownScript_0x5d87f
+ if_equal 30, UnknownScript_0x5d87f
playmusic MUSIC_BUENAS_PASSWORD
writetext UnknownText_0x5de35
special Function4ae12
@@ -133,7 +133,7 @@
writevarcode VAR_BLUECARDBALANCE
waitbutton
playsound SFX_TRANSACTION
- setflag ENGINE_60
+ setflag ENGINE_BUENAS_PASSWORD_2
pause 20
spriteface $b, RIGHT
loadfont
@@ -188,7 +188,7 @@
end
UnknownScript_0x5d845:
- setflag ENGINE_60
+ setflag ENGINE_BUENAS_PASSWORD_2
loadfont
writetext UnknownText_0x5e01c
closetext
--- a/maps/RadioTower5F.asm
+++ b/maps/RadioTower5F.asm
@@ -124,7 +124,7 @@
dotrigger $2
domaptrigger GROUP_ECRUTEAK_HOUSE, MAP_ECRUTEAK_HOUSE, $0
setevent EVENT_GOT_CLEAR_BELL
- setevent EVENT_761
+ setevent EVENT_TEAM_ROCKET_DISBANDED
jump UnknownScript_0x600f1
UnknownScript_0x600f1:
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -296,7 +296,7 @@
verbosegiveitem LEAF_STONE, 1
iffalse UnknownScript_0x78225
clearflag ENGINE_GINA_HAS_LEAF_STONE
- setevent EVENT_100
+ setevent EVENT_GINA_GAVE_LEAF_STONE
jump UnknownScript_0x78234
UnknownScript_0x78225:
--- a/maps/Route35NationalParkgate.asm
+++ b/maps/Route35NationalParkgate.asm
@@ -75,7 +75,7 @@
loadmovesprites
scall Route35NationalParkgate_EnterContest
playsound SFX_ENTER_DOOR
- special Function8c084
+ special FadeBlackBGMap
waitbutton
warpfacing $1, GROUP_NATIONAL_PARK_BUG_CONTEST, MAP_NATIONAL_PARK_BUG_CONTEST, $a, $2f
end
@@ -112,7 +112,7 @@
special Special_GiveParkBalls
scall Route35NationalParkgate_EnterContest
playsound SFX_ENTER_DOOR
- special Function8c084
+ special FadeBlackBGMap
waitbutton
special Special_SelectRandomBugContestContestants
warpfacing $1, GROUP_NATIONAL_PARK_BUG_CONTEST, MAP_NATIONAL_PARK_BUG_CONTEST, $a, $2f
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -89,7 +89,7 @@
applymovement $4, MovementData_0x19424b
disappear $4
variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN
- special Function14209
+ special RunCallback_04
special Function14168
end
@@ -96,7 +96,7 @@
LassScript_0x19408c:
faceplayer
loadfont
- checkevent EVENT_0BA
+ checkevent EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP
iftrue UnknownScript_0x1940b3
setevent EVENT_MET_FLORIA
writetext UnknownText_0x1942f1
@@ -257,7 +257,7 @@
verbosegiveitem FIRE_STONE, 1
iffalse UnknownScript_0x1941c6
clearflag ENGINE_ALAN_HAS_FIRE_STONE
- setevent EVENT_101
+ setevent EVENT_ALAN_GAVE_FIRE_STONE
jump UnknownScript_0x1941d5
UnknownScript_0x1941c6:
--- a/maps/Route36NationalParkgate.asm
+++ b/maps/Route36NationalParkgate.asm
@@ -37,7 +37,7 @@
return
UnknownScript_0x6ab23:
- checkevent EVENT_2D2
+ checkevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE
iftrue UnknownScript_0x6ab46
checkcode VAR_WEEKDAY
if_equal TUESDAY, UnknownScript_0x6ab42
@@ -83,7 +83,7 @@
loadmovesprites
spriteface $0, LEFT
playsound SFX_EXIT_BUILDING
- special Function8c084
+ special FadeBlackBGMap
waitbutton
warpfacing $2, GROUP_NATIONAL_PARK_BUG_CONTEST, MAP_NATIONAL_PARK_BUG_CONTEST, $21, $12
end
@@ -166,7 +166,7 @@
special Special_GiveParkBalls
spriteface $0, LEFT
playsound SFX_EXIT_BUILDING
- special Function8c084
+ special FadeBlackBGMap
waitbutton
special Special_SelectRandomBugContestContestants
warpfacing $2, GROUP_NATIONAL_PARK_BUG_CONTEST, MAP_NATIONAL_PARK_BUG_CONTEST, $21, $12
@@ -300,7 +300,7 @@
YoungsterScript_0x6ad06:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad14
writetext UnknownText_0x6b399
closetext
@@ -316,7 +316,7 @@
YoungsterScript_0x6ad1a:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad28
writetext UnknownText_0x6b40f
closetext
@@ -332,7 +332,7 @@
RockerScript_0x6ad2e:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad3c
writetext UnknownText_0x6b462
closetext
@@ -348,7 +348,7 @@
PokefanMScript_0x6ad42:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad50
writetext UnknownText_0x6b4da
closetext
@@ -364,7 +364,7 @@
YoungsterScript_0x6ad56:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad64
writetext UnknownText_0x6b54e
closetext
@@ -380,7 +380,7 @@
YoungsterScript_0x6ad6a:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad78
writetext UnknownText_0x6b5b0
closetext
@@ -396,7 +396,7 @@
LassScript_0x6ad7e:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ad8c
writetext UnknownText_0x6b64b
closetext
@@ -412,7 +412,7 @@
YoungsterScript_0x6ad92:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6ada0
writetext UnknownText_0x6b6b8
closetext
@@ -428,7 +428,7 @@
YoungsterScript_0x6ada6:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6adb4
writetext UnknownText_0x6b71b
closetext
@@ -444,7 +444,7 @@
YoungsterScript_0x6adba:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iffalse UnknownScript_0x6adc8
writetext UnknownText_0x6b76f
closetext
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -36,7 +36,7 @@
loadfont
checkflag ENGINE_DANA
iftrue UnknownScript_0x1a1d82
- checkflag ENGINE_LIZ_HAS_THUNDERSTONE
+ checkflag ENGINE_DANA_HAS_THUNDERSTONE
iftrue UnknownScript_0x1a1df6
checkcellnum PHONE_LASS_DANA
iftrue UnknownScript_0x1a1e17
@@ -122,8 +122,8 @@
scall UnknownScript_0x1a1e27
verbosegiveitem THUNDERSTONE, 1
iffalse UnknownScript_0x1a1e08
- clearflag ENGINE_LIZ_HAS_THUNDERSTONE
- setevent EVENT_102
+ clearflag ENGINE_DANA_HAS_THUNDERSTONE
+ setevent EVENT_DANA_GAVE_THUNDERSTONE
jump UnknownScript_0x1a1e17
UnknownScript_0x1a1e08:
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -111,7 +111,7 @@
verbosegiveitem WATER_STONE, 1
iffalse UnknownScript_0x1a92ee
clearflag ENGINE_TULLY_HAS_WATER_STONE
- setevent EVENT_103
+ setevent EVENT_TULLY_GAVE_WATER_STONE
jump UnknownScript_0x1a92fd
UnknownScript_0x1a92ee:
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -254,7 +254,7 @@
verbosegiveitem PINK_BOW, 1
iffalse UnknownScript_0x19d230
clearflag ENGINE_TIFFANY_HAS_PINK_BOW
- setevent EVENT_104
+ setevent EVENT_TIFFANY_GAVE_PINK_BOW
jump UnknownScript_0x19d245
UnknownScript_0x19d230:
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -40,12 +40,12 @@
iftrue UnknownScript_0x19e10c
checknite
iftrue UnknownScript_0x19e112
- checkevent EVENT_26A
+ checkevent EVENT_KENJI_ON_BREAK
iffalse UnknownScript_0x19e127
scall UnknownScript_0x19e137
verbosegiveitem PP_UP, 1
iffalse UnknownScript_0x19e118
- clearevent EVENT_26A
+ clearevent EVENT_KENJI_ON_BREAK
special Function11485
jump UnknownScript_0x19e127
--- a/maps/RuinsofAlphAerodactylChamber.asm
+++ b/maps/RuinsofAlphAerodactylChamber.asm
@@ -30,7 +30,7 @@
iftrue UnknownScript_0x58dc3
changeblock $4, $0, $2e
UnknownScript_0x58dc3:
- checkevent EVENT_2A3
+ checkevent EVENT_SOLVED_AERODACTYL_PUZZLE
iffalse UnknownScript_0x58dca
return
@@ -62,7 +62,7 @@
UnknownScript_0x58df7:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_2A3
+ setevent EVENT_SOLVED_AERODACTYL_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_3
domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
earthquake 30
--- a/maps/RuinsofAlphHoOhChamber.asm
+++ b/maps/RuinsofAlphHoOhChamber.asm
@@ -31,7 +31,7 @@
iftrue UnknownScript_0x58586
changeblock $4, $0, $2e
UnknownScript_0x58586:
- checkevent EVENT_2A0
+ checkevent EVENT_SOLVED_HO_OH_PUZZLE
iffalse UnknownScript_0x5858d
return
@@ -63,7 +63,7 @@
UnknownScript_0x585ba:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_2A0
+ setevent EVENT_SOLVED_HO_OH_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_4
domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
earthquake 30
--- a/maps/RuinsofAlphKabutoChamber.asm
+++ b/maps/RuinsofAlphKabutoChamber.asm
@@ -32,7 +32,7 @@
iftrue UnknownScript_0x58741
changeblock $4, $0, $2e
UnknownScript_0x58741:
- checkevent EVENT_2A1
+ checkevent EVENT_SOLVED_KABUTO_PUZZLE
iffalse UnknownScript_0x58748
return
@@ -67,7 +67,7 @@
UnknownScript_0x58778:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_2A1
+ setevent EVENT_SOLVED_KABUTO_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_1
setevent EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST
domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
@@ -92,7 +92,7 @@
if_equal 26, UnknownScript_0x587cf
checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER
iftrue UnknownScript_0x587c9
- checkevent EVENT_2A1
+ checkevent EVENT_SOLVED_KABUTO_PUZZLE
iffalse UnknownScript_0x587c0
writetext UnknownText_0x589b8
keeptextopen
--- a/maps/RuinsofAlphOmanyteChamber.asm
+++ b/maps/RuinsofAlphOmanyteChamber.asm
@@ -31,7 +31,7 @@
iftrue UnknownScript_0x58c02
changeblock $4, $0, $2e
UnknownScript_0x58c02:
- checkevent EVENT_2A2
+ checkevent EVENT_SOLVED_OMANYTE_PUZZLE
iffalse UnknownScript_0x58c09
return
@@ -63,7 +63,7 @@
UnknownScript_0x58c36:
setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS
- setevent EVENT_2A2
+ setevent EVENT_SOLVED_OMANYTE_PUZZLE
setflag ENGINE_UNLOCKED_UNOWNS_2
domaptrigger GROUP_RUINS_OF_ALPH_INNER_CHAMBER, MAP_RUINS_OF_ALPH_INNER_CHAMBER, $1
earthquake 30
--- a/maps/SlowpokeWellB1F.asm
+++ b/maps/SlowpokeWellB1F.asm
@@ -49,14 +49,14 @@
domaptrigger GROUP_AZALEA_TOWN, MAP_AZALEA_TOWN, $1
clearevent EVENT_ILEX_FOREST_APPRENTICE
clearevent EVENT_ILEX_FOREST_FARFETCHD
- setevent EVENT_6F5
- setevent EVENT_6F6
+ setevent EVENT_CHARCOAL_KILN_FARFETCH_D
+ setevent EVENT_CHARCOAL_KILN_APPRENTICE
setevent EVENT_SLOWPOKE_WELL_SLOWPOKES
setevent EVENT_SLOWPOKE_WELL_KURT
clearevent EVENT_AZALEA_TOWN_SLOWPOKES
clearevent EVENT_KURTS_HOUSE_SLOWPOKE
clearevent EVENT_KURTS_HOUSE_KURT_1
- special Function8c084
+ special FadeBlackBGMap
special HealParty
pause 15
warp GROUP_KURTS_HOUSE, MAP_KURTS_HOUSE, $3, $3
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -445,9 +445,9 @@
end
VoltorbExplodingTrap:
- special Function8c084
+ special FadeBlackBGMap
cry VOLTORB
- special Function8c079
+ special FadeInBGMap
setlasttalked $ff
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
loadpokedata VOLTORB, 23
@@ -455,9 +455,9 @@
end
GeodudeExplodingTrap:
- special Function8c084
+ special FadeBlackBGMap
cry GEODUDE
- special Function8c079
+ special FadeInBGMap
setlasttalked $ff
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
loadpokedata GEODUDE, 21
@@ -465,9 +465,9 @@
end
KoffingExplodingTrap:
- special Function8c084
+ special FadeBlackBGMap
cry KOFFING
- special Function8c079
+ special FadeInBGMap
setlasttalked $ff
writecode VAR_BATTLETYPE, BATTLETYPE_TRAP
loadpokedata KOFFING, 21
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -155,19 +155,19 @@
writetext UnknownText_0x6da97
closetext
loadmovesprites
- special Function8c084
+ special FadeBlackBGMap
special Mobile_HealParty
playsound SFX_FULL_HEAL
special HealParty
- special Function8c079
+ special FadeInBGMap
loadfont
writetext UnknownText_0x6daf7
closetext
loadmovesprites
dotrigger $1
- setevent EVENT_04C
+ setevent EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE
checkcode VAR_FACING
- if_equal $3, UnknownScript_0x6d0be
+ if_equal RIGHT, UnknownScript_0x6d0be
applymovement $4, MovementData_0x6d212
disappear $4
end
--- a/maps/TimeCapsule.asm
+++ b/maps/TimeCapsule.asm
@@ -73,5 +73,5 @@
; people-events
db 2
- person_event SPRITE_CHRIS, 8, 7, OW_LEFT | $1, $0, -1, -1, $0, 0, ChrisScript_0x19351a, EVENT_000
- person_event SPRITE_CHRIS, 8, 10, OW_LEFT | $0, $0, -1, -1, $0, 0, ChrisScript_0x19351a, EVENT_001
+ person_event SPRITE_CHRIS, 8, 7, OW_LEFT | $1, $0, -1, -1, $0, 0, ChrisScript_0x19351a, EVENT_GAVE_KURT_APRICORNS
+ person_event SPRITE_CHRIS, 8, 10, OW_LEFT | $0, $0, -1, -1, $0, 0, ChrisScript_0x19351a, EVENT_RECEIVED_BALLS_FROM_KURT
--- a/maps/TradeCenter.asm
+++ b/maps/TradeCenter.asm
@@ -73,5 +73,5 @@
; people-events
db 2
- person_event SPRITE_CHRIS, 8, 7, OW_LEFT | $1, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_000
- person_event SPRITE_CHRIS, 8, 10, OW_LEFT | $0, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_001
+ person_event SPRITE_CHRIS, 8, 7, OW_LEFT | $1, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_GAVE_KURT_APRICORNS
+ person_event SPRITE_CHRIS, 8, 10, OW_LEFT | $0, $0, -1, -1, $0, 0, ChrisScript_0x193499, EVENT_RECEIVED_BALLS_FROM_KURT
--- a/maps/UndergroundWarehouse.asm
+++ b/maps/UndergroundWarehouse.asm
@@ -65,12 +65,12 @@
GentlemanScript_0x7d9bf:
faceplayer
loadfont
- checkevent EVENT_04A
+ checkevent EVENT_RECEIVED_CARD_KEY
iftrue UnknownScript_0x7d9de
writetext UnknownText_0x7dbc6
keeptextopen
verbosegiveitem CARD_KEY, 1
- setevent EVENT_04A
+ setevent EVENT_RECEIVED_CARD_KEY
setevent EVENT_WAREHOUSE_LAYOUT_1
clearevent EVENT_WAREHOUSE_LAYOUT_2
clearevent EVENT_WAREHOUSE_LAYOUT_3
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -31,8 +31,8 @@
setevent EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN
setevent EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP
clearevent EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M
- setevent EVENT_030
- setevent EVENT_000
+ setevent EVENT_FAST_SHIP_FIRST_TIME
+ setevent EVENT_GAVE_KURT_APRICORNS
blackoutmod GROUP_VERMILION_CITY, MAP_VERMILION_CITY
end
@@ -39,7 +39,7 @@
SailorScript_0x74dc4:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x74e1a
writetext UnknownText_0x74f06
closetext
@@ -51,7 +51,7 @@
waitbutton
applymovement $0, MovementData_0x74ef1
playsound SFX_EXIT_BUILDING
- special Function8c084
+ special FadeBlackBGMap
waitbutton
setevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND
clearevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND
@@ -79,9 +79,9 @@
UnknownScript_0x74e20:
spriteface $3, RIGHT
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x74e86
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue UnknownScript_0x74e86
spriteface $0, LEFT
loadfont
@@ -101,7 +101,7 @@
writetext UnknownText_0x74fc2
closetext
loadmovesprites
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
applymovement $0, MovementData_0x74ef8
jump SailorScript_0x74dc4
@@ -145,7 +145,7 @@
SailorScript_0x74e97:
faceplayer
loadfont
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x74e1a
checkcode VAR_WEEKDAY
if_equal MONDAY, UnknownScript_0x74eda
@@ -163,7 +163,7 @@
writetext UnknownText_0x74fc2
closetext
loadmovesprites
- setevent EVENT_001
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
applymovement $0, MovementData_0x74efe
jump SailorScript_0x74dc4
--- a/maps/WarehouseEntrance.asm
+++ b/maps/WarehouseEntrance.asm
@@ -203,21 +203,21 @@
jump .else
.two:
- setevent EVENT_000
- clearevent EVENT_001
- clearevent EVENT_002
+ setevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
.three:
- clearevent EVENT_000
- setevent EVENT_001
- clearevent EVENT_002
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
.else:
- clearevent EVENT_000
- clearevent EVENT_001
- setevent EVENT_002
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
.then:
@@ -226,17 +226,17 @@
writetext UnknownText_0x7c6b8
closetext
loadmovesprites
- special Function8c084
+ special FadeBlackBGMap
playmusic MUSIC_HEAL
pause 60
- special Function8c079
+ special FadeInBGMap
special RestartMapMusic
loadfont
writetext UnknownText_0x7c6d8
closetext
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x7c2bb
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue UnknownScript_0x7c2c4
jump UnknownScript_0x7c2cd
@@ -286,21 +286,21 @@
jump .else
.two:
- setevent EVENT_000
- clearevent EVENT_001
- clearevent EVENT_002
+ setevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
.three:
- clearevent EVENT_000
- setevent EVENT_001
- clearevent EVENT_002
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ setevent EVENT_RECEIVED_BALLS_FROM_KURT
+ clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
.else:
- clearevent EVENT_000
- clearevent EVENT_001
- setevent EVENT_002
+ clearevent EVENT_GAVE_KURT_APRICORNS
+ clearevent EVENT_RECEIVED_BALLS_FROM_KURT
+ setevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
.then:
@@ -309,17 +309,17 @@
writetext UnknownText_0x7c80e
closetext
loadmovesprites
- special Function8c084
+ special FadeBlackBGMap
playmusic MUSIC_HEAL
pause 60
- special Function8c079
+ special FadeInBGMap
special RestartMapMusic
loadfont
writetext UnknownText_0x7c82a
closetext
- checkevent EVENT_000
+ checkevent EVENT_GAVE_KURT_APRICORNS
iftrue UnknownScript_0x7c2bb
- checkevent EVENT_001
+ checkevent EVENT_RECEIVED_BALLS_FROM_KURT
iftrue UnknownScript_0x7c2c4
jump UnknownScript_0x7c2cd
--- a/misc/crystal_misc.asm
+++ b/misc/crystal_misc.asm
@@ -249,7 +249,7 @@
ld a, [hJoyPressed] ; $ff00+$a7
and $3
ret z
- call Function1c07
+ call ExitMenu
call Function17ac1d
call Function17ac2a
ld hl, $d088
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -308,7 +308,7 @@
Function10020b: ; 10020b
xor a
ld [wc303], a
- callba Function8c084
+ callba FadeBlackBGMap
callba Function106464
call HideSprites
call DelayFrame
@@ -903,7 +903,7 @@
ld [wcfa9], a
.asm_1005a6
- call Function1c07
+ call ExitMenu
ld a, [wcd26]
set 7, a
ld [wcd26], a
@@ -954,7 +954,7 @@
xor a
ld [wcfa9], a
.asm_1005f0
- call Function1c07
+ call ExitMenu
ld a, [wcd26]
set 7, a
ld [wcd26], a
@@ -1792,7 +1792,7 @@
call Function100ed4
ld a, [wcf88]
ld [wd0d2], a
- call Function1c07
+ call ExitMenu
ret
; 100b45
@@ -4494,7 +4494,7 @@
Function101db2: ; 101db2
callba Function103302
- call Function1c07
+ call ExitMenu
ld hl, wcd29
set 5, [hl]
jr c, .asm_101dca
@@ -4976,12 +4976,12 @@
ld de, SFX_LEVEL_UP
call PlaySFX
call Functiona36
- call Function1c07
+ call ExitMenu
call Function10219f
ld hl, UnknownText_0x1021d6
call MenuTextBox
call YesNoBox
- call Function1c07
+ call ExitMenu
jr c, .asm_10217c
call Function1021b8
jr c, .asm_10217c
@@ -5053,7 +5053,7 @@
Function1021e0: ; 1021e0
call MenuTextBox
call Functiona36
- call Function1c07
+ call ExitMenu
ret
; 1021ea
@@ -6207,7 +6207,7 @@
Function102996: ; 102996
call Function1029af
- call Function1c07
+ call ExitMenu
scf
ret
; 10299e
@@ -6281,7 +6281,7 @@
and [hl]
ret z
push af
- call Function1c07
+ call ExitMenu
pop af
ld a, [wcfa9]
cp $1
@@ -7774,7 +7774,7 @@
ld hl, MenuDataHeader_103747
call LoadMenuDataHeader
call InterpretMenu2
- call Function1c07
+ call ExitMenu
jr c, .asm_1036f4
ld a, [wcfa9]
cp $1
@@ -7815,7 +7815,7 @@
Function103700: ; 103700
ld c, $a
- ld hl, wdc20
+ ld hl, SwarmFlags
bit 4, [hl]
jr z, .asm_10370f
callba Function1008a6
@@ -7913,11 +7913,11 @@
Function10378c: ; 10378c
ld c, $0
- ld hl, wdc20
+ ld hl, SwarmFlags
bit 4, [hl]
jr nz, .asm_10379c
ld c, $1
- ld hl, wdc20
+ ld hl, SwarmFlags
set 4, [hl]
.asm_10379c
@@ -7939,7 +7939,7 @@
ld a, c
and a
ret z
- ld hl, wdc20
+ ld hl, SwarmFlags
res 4, [hl]
ret
; 1037c2
--- a/misc/mobile_45.asm
+++ b/misc/mobile_45.asm
@@ -4330,7 +4330,7 @@
Function1158c2: ; 1158c2
ld a, e
- ld [wdc20], a
+ ld [SwarmFlags], a
ld a, d
ld [wdc21], a
xor a
@@ -4351,7 +4351,7 @@
ld l, c
ld h, b
xor a
- ld [wdc1f], a
+ ld [WeeklyFlags], a
.asm_1158e5
ld b, $3
@@ -4376,7 +4376,7 @@
push hl
dec hl
ld a, c
- ld [wdc1f], a
+ ld [WeeklyFlags], a
.asm_115908
xor a
ld [hld], a
@@ -4397,7 +4397,7 @@
ld [wdc1a], a
push de
push hl
- ld hl, wdc20
+ ld hl, SwarmFlags
ld a, [hli]
ld h, [hl]
ld l, a
@@ -4492,7 +4492,7 @@
ld a, $a
ld [hli], a
push hl
- ld hl, wdc20
+ ld hl, SwarmFlags
ld a, [hli]
ld h, [hl]
ld l, a
@@ -4517,7 +4517,7 @@
jp nz, .asm_1158e5
.asm_1159c4
- ld a, [wdc1f]
+ ld a, [WeeklyFlags]
cp $0
jr z, .asm_1159d8
push hl
@@ -4984,9 +4984,9 @@
Function115c49: ; 115c49
ld a, e
- ld [wdc1f], a
+ ld [WeeklyFlags], a
ld a, d
- ld [wdc20], a
+ ld [SwarmFlags], a
xor a
ld [de], a
inc de
@@ -5055,7 +5055,7 @@
ld [wdc1a], a
push de
push hl
- ld hl, wdc1f
+ ld hl, WeeklyFlags
ld a, [hli]
ld h, [hl]
ld l, a
@@ -5166,9 +5166,9 @@
.asm_115d38
push de
push hl
- ld a, [wdc1f]
+ ld a, [WeeklyFlags]
ld l, a
- ld a, [wdc20]
+ ld a, [SwarmFlags]
ld h, a
ld e, [hl]
inc hl
@@ -8021,13 +8021,13 @@
ld a, [wcd4e]
and a
jr nz, .asm_117939
- call Function1c07
+ call ExitMenu
ld a, $1
ld [wcd4f], a
jp Function117a0a
.asm_117939
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
jp Function117a0a
Function117942: ; 117942 (45:7942)
@@ -8055,7 +8055,7 @@
ld hl, wcd4e
dec [hl]
ret nz
- call Function1c07
+ call ExitMenu
asm_11797e: ; 11797e (45:797e)
ld a, $80
ld [wcd49], a
@@ -8078,7 +8078,7 @@
ld hl, wcd4e
dec [hl]
ret nz
- call Function1c07
+ call ExitMenu
ld a, $1
ld [wcd49], a
ret
@@ -8285,13 +8285,13 @@
ld a, [wcf64]
and a
jr nz, .asm_117ba4 ; 0x117b93 $f
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
callba Function104061
jp Function117cdd
.asm_117ba4
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
callba Function104061
ld a, $80
ld [wcf63], a
@@ -8395,7 +8395,7 @@
add hl, de
dec c
jr nz, .asm_117c71 ; 0x117c7b $f4
- call Function4b6
+ call FadeToWhite
pop af
ld [rSVBK], a
ld a, $80
@@ -12896,7 +12896,7 @@
ld a, [wcd44]
and a
jr nz, .asm_119fef
- call Function1c07
+ call ExitMenu
call Function11a63c
xor a
ld [ScriptVar], a
@@ -12904,7 +12904,7 @@
ld a, [ScriptVar]
and a
jr z, .asm_119fd4
- call Function1c07
+ call ExitMenu
callba Function104061
callba Function115dc3
ld a, [wcd33]
@@ -12927,8 +12927,8 @@
ret
.asm_119fef
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
callba Function104061
ld a, [wcd45]
ld [wcf66], a
@@ -13003,7 +13003,7 @@
callba Function117ab4
callba Function106462
callba Function106464
- call Function1c07
+ call ExitMenu
callba Function104061
callba Function115d99
ld c, $0
@@ -13026,7 +13026,7 @@
callba Function17d3f6
callba Function106462
callba Function106464
- call Function1c07
+ call ExitMenu
callba Function104061
callba Function115d99
ld c, $0
@@ -13118,7 +13118,7 @@
ld a, [wcd44]
and a
jr nz, .asm_11a1b6
- call Function1c07
+ call ExitMenu
callba Function104061
call Function11a63c
hlcoord 4, 2
@@ -13128,7 +13128,7 @@
ret
.asm_11a1b6
- call Function1c07
+ call ExitMenu
callba Function104061
ld a, [wcd45]
ld [wcf66], a
@@ -13259,7 +13259,7 @@
ld a, [wcd44]
and a
jr nz, .asm_11a2c4
- call Function1c07
+ call ExitMenu
callba Function104061
ld a, [wcd46]
cp $0
@@ -13281,7 +13281,7 @@
call PlayClickSFX
.asm_11a2c4
- call Function1c07
+ call ExitMenu
callba Function104061
and a
ret
@@ -13360,7 +13360,7 @@
ret
.asm_11a346
- call Function1c07
+ call ExitMenu
callba Function104061
callba Function115dc3
and a
@@ -13404,7 +13404,7 @@
ld a, [wcd44]
and a
jr nz, .asm_11a3b1
- call Function1c07
+ call ExitMenu
callba Function104061
call Function11a63c
hlcoord 4, 2
@@ -13414,7 +13414,7 @@
ret
.asm_11a3b1
- call Function1c07
+ call ExitMenu
callba Function104061
ld a, [wcd45]
ld [wcf66], a
@@ -13479,7 +13479,7 @@
ld a, [wcd44]
and a
jr nz, .asm_11a43f
- call Function1c07
+ call ExitMenu
callba Function104061
call Function11a63c
hlcoord 4, 2
@@ -13489,7 +13489,7 @@
ret
.asm_11a43f
- call Function1c07
+ call ExitMenu
callba Function104061
ld a, $1c
ld [wcf66], a
@@ -13550,7 +13550,7 @@
ld a, [wcd44]
and a
jr nz, .asm_11a4c7
- call Function1c07
+ call ExitMenu
callba Function104061
call Function11a63c
hlcoord 4, 2
@@ -13562,7 +13562,7 @@
ret
.asm_11a4c7
- call Function1c07
+ call ExitMenu
callba Function104061
ld a, [wcd46]
ld [wcf66], a
@@ -13597,7 +13597,7 @@
ld a, [wcd44]
and a
jr nz, .asm_11a522
- call Function1c07
+ call ExitMenu
callba Function104061
call Function11a63c
hlcoord 4, 2
@@ -13607,7 +13607,7 @@
ret
.asm_11a522
- call Function1c07
+ call ExitMenu
callba Function104061
ld a, [wcd45]
ld [wcf66], a
@@ -13636,7 +13636,7 @@
jr z, .asm_11a562
call Function11a9f0
jr nz, .asm_11a562
- call Function1c07
+ call ExitMenu
callba Function104061
.asm_11a562
@@ -14544,7 +14544,7 @@
call Function11ad8a
.asm_11ae2e
- call Function1c07
+ call ExitMenu
callba Function104061
ret
; 11ae38
@@ -14649,8 +14649,8 @@
call Function11ad8a
.asm_11aef7
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
callba Function104061
ret
; 11af04
@@ -14740,8 +14740,8 @@
ld [ScriptVar], a
.asm_11afaa
- call Function1c07
- call Function1c07
+ call ExitMenu
+ call ExitMenu
callba Function104061
ret
; 11afb7
@@ -23522,7 +23522,7 @@
ret
Function170737: ; 170737 (5c:4737)
- callba Function14dbb
+ callba SaveOptionsSelection
ret
Function17073e: ; 17073e (5c:473e)
@@ -24729,7 +24729,7 @@
ld hl, wcd4c
dec [hl]
ret nz
- call Function1c07
+ call ExitMenu
call WhiteBGMap
jr asm_171c60
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -1975,7 +1975,7 @@
add hl, de
dec c
jr nz, .asm_17dcbb
- call Function4b6
+ call FadeToWhite
ld a, $4
ld [rSVBK], a
ret
--- a/wram.asm
+++ b/wram.asm
@@ -1307,6 +1307,7 @@
ds 1
ds 2
+OptionsEnd::
wcfd4:: ds 1
wcfd5:: ds 1
wcfd6:: ds 1
@@ -2334,9 +2335,9 @@
wdc1a:: ds 1
wdc1b:: ds 1
wdc1c:: ds 2
-wdc1e:: ds 1
-wdc1f:: ds 1
-wdc20:: ds 1
+DailyFlags:: ds 1
+WeeklyFlags:: ds 1
+SwarmFlags:: ds 1
wdc21:: ds 1
wdc22:: ds 1
wdc23:: ds 1