ref: 6c3000efd2818f8d5cb0a01770d1b92991b80340
parent: 432df825d4039a44a49fff01ef843395ab5abb3d
author: PikalaxALT <PikalaxALT@gmail.com>
date: Sat Jul 25 10:25:37 EDT 2015
Macro update, roam mon annotations Updated map and mapgroup macros to get around an rgbds bug. Legendary beast locale handling annotated and relabeled. Added a new constant NUM_ENGINE_FLAGS for use in the EngineFlagAction function. This will make it easier for modders to add or remove engine flags.
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -2365,7 +2365,7 @@
ld de, SFX_KINESIS
call PlaySFX
call Function3d432
- ld de, SFX_UNKNOWN_2A
+ ld de, SFX_FAINT
call PlaySFX
hlcoord 1, 0
lb bc, 4, 10
@@ -4388,7 +4388,7 @@
ld de, SFX_KINESIS
call PlaySFX
call WaitSFX
- ld de, SFX_UNKNOWN_2A
+ ld de, SFX_FAINT
call PlaySFX
call WaitSFX
call Function3d432
--- a/constants/engine_flags.asm
+++ b/constants/engine_flags.asm
@@ -162,3 +162,4 @@
const ENGINE_KRIS_IN_CABLE_CLUB
const ENGINE_DUNSPARCE_SWARM ; a0
const ENGINE_YANMA_SWARM
+NUM_ENGINE_FLAGS EQU const_value
--- a/constants/sfx_constants.asm
+++ b/constants/sfx_constants.asm
@@ -42,7 +42,7 @@
const SFX_ELEVATOR_END
const SFX_THROW_BALL
const SFX_BALL_POOF
- const SFX_UNKNOWN_2A
+ const SFX_FAINT
const SFX_RUN
const SFX_SLOT_MACHINE_START
const SFX_FANFARE
--- a/engine/buena_phone_scripts.asm
+++ b/engine/buena_phone_scripts.asm
@@ -1,4 +1,4 @@
-UnknownScript_0xa0b14:
+BuenaPhoneScript1:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73
checkcode VAR_HOUR
@@ -6,7 +6,7 @@
scall UnknownScript_0xa0b32
jump UnknownScript_0xa0c0e
-UnknownScript_0xa0b26:
+BuenaPhoneScript2:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73
scall UnknownScript_0xa0b4f
--- a/engine/engine_flags.asm
+++ b/engine/engine_flags.asm
@@ -115,8 +115,8 @@
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 WeeklyFlags, %01000000 ; move tutor
+ dwb WeeklyFlags, %10000000 ; buenas password
dwb SwarmFlags, %00000001 ; $60
dwb SwarmFlags, %00000010 ; goldenrod dept store sale is on
@@ -128,69 +128,69 @@
dwb wdbf3, %00000100 ; have gs ball after kurt examined it
; rematches
- dwb wdc4c, %00000001 ; jack
- dwb wdc4c, %00000010 ; huey
- dwb wdc4c, %00000100 ; gaven
- dwb wdc4c, %00001000 ; beth ; $68
- dwb wdc4c, %00010000 ; jose
- dwb wdc4c, %00100000 ; reena
- dwb wdc4c, %01000000 ; joey
- dwb wdc4c, %10000000 ; wade
- dwb wdc4c + 1, %00000001 ; ralph
- dwb wdc4c + 1, %00000010 ; liz
- dwb wdc4c + 1, %00000100 ; anthony
- dwb wdc4c + 1, %00001000 ; todd ; $70
- dwb wdc4c + 1, %00010000 ; gina
- dwb wdc4c + 1, %00100000 ; arnie
- dwb wdc4c + 1, %01000000 ; alan
- dwb wdc4c + 1, %10000000 ; dana
- dwb wdc4c + 2, %00000001 ; chad
- dwb wdc4c + 2, %00000010 ; tully
- dwb wdc4c + 2, %00000100 ; brent
- dwb wdc4c + 2, %00001000 ; tiffany ; $78
- dwb wdc4c + 2, %00010000 ; vance
- dwb wdc4c + 2, %00100000 ; wilton
- dwb wdc4c + 2, %01000000 ; parry
- dwb wdc4c + 2, %10000000 ; erin
+ dwb wDailyRematchFlags, %00000001 ; jack
+ dwb wDailyRematchFlags, %00000010 ; huey
+ dwb wDailyRematchFlags, %00000100 ; gaven
+ dwb wDailyRematchFlags, %00001000 ; beth ; $68
+ dwb wDailyRematchFlags, %00010000 ; jose
+ dwb wDailyRematchFlags, %00100000 ; reena
+ dwb wDailyRematchFlags, %01000000 ; joey
+ dwb wDailyRematchFlags, %10000000 ; wade
+ dwb wDailyRematchFlags + 1, %00000001 ; ralph
+ dwb wDailyRematchFlags + 1, %00000010 ; liz
+ dwb wDailyRematchFlags + 1, %00000100 ; anthony
+ dwb wDailyRematchFlags + 1, %00001000 ; todd ; $70
+ dwb wDailyRematchFlags + 1, %00010000 ; gina
+ dwb wDailyRematchFlags + 1, %00100000 ; arnie
+ dwb wDailyRematchFlags + 1, %01000000 ; alan
+ dwb wDailyRematchFlags + 1, %10000000 ; dana
+ dwb wDailyRematchFlags + 2, %00000001 ; chad
+ dwb wDailyRematchFlags + 2, %00000010 ; tully
+ dwb wDailyRematchFlags + 2, %00000100 ; brent
+ dwb wDailyRematchFlags + 2, %00001000 ; tiffany ; $78
+ dwb wDailyRematchFlags + 2, %00010000 ; vance
+ dwb wDailyRematchFlags + 2, %00100000 ; wilton
+ dwb wDailyRematchFlags + 2, %01000000 ; parry
+ dwb wDailyRematchFlags + 2, %10000000 ; erin
- dwb wdc50, %00000001 ; beverly has nugget
- dwb wdc50, %00000010 ; jose has star piece
- dwb wdc50, %00000100 ; wade has item (see bittable1 $032b-e)
- dwb wdc50, %00001000 ; gina has leaf stone ; $80
- dwb wdc50, %00010000 ; alan has fire stone
- dwb wdc50, %00100000 ; liz has thunderstone
- dwb wdc50, %01000000 ; derek has nugget
- dwb wdc50, %10000000 ; tully has water stone
+ dwb wDailyPhoneItemFlags, %00000001 ; beverly has nugget
+ dwb wDailyPhoneItemFlags, %00000010 ; jose has star piece
+ dwb wDailyPhoneItemFlags, %00000100 ; wade has item (see bittable1 $032b-e)
+ dwb wDailyPhoneItemFlags, %00001000 ; gina has leaf stone ; $80
+ dwb wDailyPhoneItemFlags, %00010000 ; alan has fire stone
+ dwb wDailyPhoneItemFlags, %00100000 ; liz has thunderstone
+ dwb wDailyPhoneItemFlags, %01000000 ; derek has nugget
+ dwb wDailyPhoneItemFlags, %10000000 ; tully has water stone
- dwb wdc50 + 1, %00000001 ; tiffany has pink bow
- dwb wdc50 + 1, %00000010 ; wilton has item (see bittable1 $032f-31)
+ dwb wDailyPhoneItemFlags + 1, %00000001 ; tiffany has pink bow
+ dwb wDailyPhoneItemFlags + 1, %00000010 ; wilton has item (see bittable1 $032f-31)
- dwb wdc54, %00000001
- dwb wdc54, %00000010 ; $88
- dwb wdc54, %00000100
- dwb wdc54, %00001000
- dwb wdc54, %00010000
- dwb wdc54, %00100000
- dwb wdc54, %01000000
- dwb wdc54, %10000000
+ dwb wDailyPhoneTimeOfDayFlags, %00000001
+ dwb wDailyPhoneTimeOfDayFlags, %00000010 ; $88
+ dwb wDailyPhoneTimeOfDayFlags, %00000100
+ dwb wDailyPhoneTimeOfDayFlags, %00001000
+ dwb wDailyPhoneTimeOfDayFlags, %00010000
+ dwb wDailyPhoneTimeOfDayFlags, %00100000
+ dwb wDailyPhoneTimeOfDayFlags, %01000000
+ dwb wDailyPhoneTimeOfDayFlags, %10000000
- dwb wdc54 + 1, %00000001
- dwb wdc54 + 1, %00000010 ; $90
- dwb wdc54 + 1, %00000100
- dwb wdc54 + 1, %00001000
- dwb wdc54 + 1, %00010000
- dwb wdc54 + 1, %00100000
- dwb wdc54 + 1, %01000000
- dwb wdc54 + 1, %10000000
+ dwb wDailyPhoneTimeOfDayFlags + 1, %00000001
+ dwb wDailyPhoneTimeOfDayFlags + 1, %00000010 ; $90
+ dwb wDailyPhoneTimeOfDayFlags + 1, %00000100
+ dwb wDailyPhoneTimeOfDayFlags + 1, %00001000
+ dwb wDailyPhoneTimeOfDayFlags + 1, %00010000
+ dwb wDailyPhoneTimeOfDayFlags + 1, %00100000
+ dwb wDailyPhoneTimeOfDayFlags + 1, %01000000
+ dwb wDailyPhoneTimeOfDayFlags + 1, %10000000
- dwb wdc54 + 2, %00000001
- dwb wdc54 + 2, %00000010 ; $98
- dwb wdc54 + 2, %00000100
- dwb wdc54 + 2, %00001000
- dwb wdc54 + 2, %00010000
- dwb wdc54 + 2, %00100000
- dwb wdc54 + 2, %01000000
- dwb wdc54 + 2, %10000000
+ dwb wDailyPhoneTimeOfDayFlags + 2, %00000001
+ dwb wDailyPhoneTimeOfDayFlags + 2, %00000010 ; $98
+ dwb wDailyPhoneTimeOfDayFlags + 2, %00000100
+ dwb wDailyPhoneTimeOfDayFlags + 2, %00001000
+ dwb wDailyPhoneTimeOfDayFlags + 2, %00010000
+ dwb wDailyPhoneTimeOfDayFlags + 2, %00100000
+ dwb wDailyPhoneTimeOfDayFlags + 2, %01000000
+ dwb wDailyPhoneTimeOfDayFlags + 2, %10000000
dwb wd45b, %00000100 ; female player has been transformed into male
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -333,7 +333,7 @@
dbw BANK(DelayClearingOldSprites), DelayClearingOldSprites ; 24
dbw BANK(DelayLoadingNewSprites), DelayLoadingNewSprites ; 25
dbw BANK(UpdateRoamMons), UpdateRoamMons ; 26
- dbw BANK(RestoreRoamMons), RestoreRoamMons ; 27
+ dbw BANK(JumpRoamMons), JumpRoamMons ; 27
dbw BANK(FadeOldMapMusic), FadeOldMapMusic ; 28
dbw BANK(ActivateMapAnims), ActivateMapAnims ; 29
dbw BANK(SuspendMapAnims), SuspendMapAnims ; 2a
--- a/engine/map_triggers.asm
+++ b/engine/map_triggers.asm
@@ -87,5 +87,5 @@
trigger_def MOUNT_MOON_SQUARE, wMountMoonSquareTrigger
trigger_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileTrigger
trigger_def MOBILE_BATTLE_ROOM, wMobileBattleRoomTrigger
- db $ff
+ db -1
; 4d15b
--- a/engine/more_phone_scripts.asm
+++ b/engine/more_phone_scripts.asm
@@ -27,7 +27,7 @@
farjump UnknownScript_0xa0055
UnknownScript_0xa003e:
- special Function2a51f
+ special RandomPhoneWildMon
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xa0051
farscall UnknownScript_0xa017a
@@ -37,7 +37,7 @@
farjump UnknownScript_0xa006c
UnknownScript_0xa0055:
- special Function2a51f
+ special RandomPhoneWildMon
farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xa0068
farscall UnknownScript_0xa0226
@@ -851,7 +851,7 @@
farjump UnknownScript_0xa053a
UnknownScript_0xa05a0:
- special Function2a4ab
+ special RandomPhoneRareWildMon
end
UnknownScript_0xa05a4:
@@ -1653,7 +1653,7 @@
farwritetext UnknownText_0x17717c
end
-UnknownScript_0xa0b09:
+BikeShopPhoneScript:
farwritetext UnknownText_0x174000
clearflag ENGINE_BIKE_SHOP_CALL_ENABLED
specialphonecall ELMCALL_NONE
--- a/engine/phone_scripts.asm
+++ b/engine/phone_scripts.asm
@@ -298,7 +298,7 @@
; Jack
-UnknownScript_0xbd0d0:
+JackPhoneScript1:
trainertotext SCHOOLBOY, JACK1, $0
checkflag ENGINE_JACK
iftrue UnknownScript_0xbd0f3
@@ -317,7 +317,7 @@
displaylocation NATIONAL_PARK, $2
farjump UnknownScript_0xa0a2d
-UnknownScript_0xbd0fa:
+JackPhoneScript2:
trainertotext SCHOOLBOY, JACK1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
@@ -350,7 +350,7 @@
; Beverly
-UnknownScript_0xbd13f:
+BeverlyPhoneScript1:
trainertotext POKEFANF, BEVERLY1, $0
farscall UnknownScript_0xbe0b6
checkflag ENGINE_BEVERLY_HAS_NUGGET
@@ -361,7 +361,7 @@
displaylocation NATIONAL_PARK, $2
farjump UnknownScript_0xa0aa5
-UnknownScript_0xbd158:
+BeverlyPhoneScript2:
trainertotext POKEFANF, BEVERLY1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_BEVERLY_HAS_NUGGET
@@ -379,7 +379,7 @@
; Huey
-UnknownScript_0xbd17c:
+HueyPhoneScript1:
trainertotext SAILOR, HUEY1, $0
checkflag ENGINE_HUEY
iftrue UnknownScript_0xbd1a2
@@ -399,7 +399,7 @@
displaylocation LIGHTHOUSE, $2
farjump UnknownScript_0xa0a32
-UnknownScript_0xbd1a9:
+HueyPhoneScript2:
trainertotext SAILOR, HUEY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_HUEY
@@ -423,7 +423,7 @@
; Gaven
-UnknownScript_0xbd1da:
+GavenPhoneScript1:
trainertotext COOLTRAINERM, GAVEN3, $0
checkflag ENGINE_GAVEN
iftrue UnknownScript_0xbd1fd
@@ -442,7 +442,7 @@
displaylocation ROUTE_26, $2
farjump UnknownScript_0xa0a37
-UnknownScript_0xbd204:
+GavenPhoneScript2:
trainertotext COOLTRAINERM, GAVEN3, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_GAVEN
@@ -470,7 +470,7 @@
; Beth
-UnknownScript_0xbd23d:
+BethPhoneScript1:
trainertotext COOLTRAINERF, BETH1, $0
checkflag ENGINE_BETH
iftrue UnknownScript_0xbd260
@@ -489,7 +489,7 @@
displaylocation ROUTE_26, $2
farjump UnknownScript_0xa0a3c
-UnknownScript_0xbd267:
+BethPhoneScript2:
trainertotext COOLTRAINERF, BETH1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_BETH
@@ -512,7 +512,7 @@
; Jose
-UnknownScript_0xbd294:
+JosePhoneScript1:
trainertotext BIRD_KEEPER, JOSE2, $0
checkflag ENGINE_JOSE
iftrue UnknownScript_0xbd2bd
@@ -537,7 +537,7 @@
displaylocation ROUTE_27, $2
farjump UnknownScript_0xa0a41
-UnknownScript_0xbd2cb:
+JosePhoneScript2:
trainertotext BIRD_KEEPER, JOSE2, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_JOSE
@@ -574,7 +574,7 @@
; Reena
-UnknownScript_0xbd31c:
+ReenaPhoneScript1:
trainertotext COOLTRAINERF, REENA1, $0
checkflag ENGINE_REENA
iftrue UnknownScript_0xbd33f
@@ -593,7 +593,7 @@
displaylocation ROUTE_27, $2
farjump UnknownScript_0xa0a46
-UnknownScript_0xbd346:
+ReenaPhoneScript2:
trainertotext COOLTRAINERF, REENA1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_REENA
@@ -616,7 +616,7 @@
; Joey
-UnknownScript_0xbd373:
+JoeyPhoneScript1:
trainertotext YOUNGSTER, JOEY1, $0
checkflag ENGINE_JOEY
iftrue UnknownScript_0xbd399
@@ -636,7 +636,7 @@
displaylocation ROUTE_30, $2
farjump UnknownScript_0xa0a4b
-UnknownScript_0xbd3a0:
+JoeyPhoneScript2:
trainertotext YOUNGSTER, JOEY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_JOEY
@@ -660,7 +660,7 @@
; Wade
-UnknownScript_0xbd3d1:
+WadePhoneScript1:
trainertotext BUG_CATCHER, WADE1, $0
checkflag ENGINE_WADE
iftrue UnknownScript_0xbd41a
@@ -698,7 +698,7 @@
displaylocation ROUTE_31, $2
farjump UnknownScript_0xa0ab5
-UnknownScript_0xbd428:
+WadePhoneScript2:
trainertotext BUG_CATCHER, WADE1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
@@ -776,7 +776,7 @@
; Ralph
-UnknownScript_0xbd4d2:
+RalphPhoneScript1:
trainertotext FISHER, RALPH1, $0
checkflag ENGINE_RALPH
iftrue UnknownScript_0xbd4fb
@@ -801,7 +801,7 @@
displaylocation ROUTE_32, $2
farjump UnknownScript_0xa0af5
-UnknownScript_0xbd509:
+RalphPhoneScript2:
trainertotext FISHER, RALPH1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_FLYPOINT_GOLDENROD
@@ -841,7 +841,7 @@
; Liz
-UnknownScript_0xbd560:
+LizPhoneScript1:
trainertotext PICNICKER, LIZ1, $0
checkflag ENGINE_LIZ
iftrue UnknownScript_0xbd586
@@ -861,7 +861,7 @@
displaylocation ROUTE_32, $2
farjump UnknownScript_0xa0a5a
-UnknownScript_0xbd58d:
+LizPhoneScript2:
trainertotext PICNICKER, LIZ1, $0
farscall UnknownScript_0xbde45
if_equal $0, UnknownScript_0xbd5d0
@@ -946,7 +946,7 @@
; Anthony
-UnknownScript_0xbd634:
+AnthonyPhoneScript1:
trainertotext HIKER, ANTHONY2, $0
checkflag ENGINE_ANTHONY
iftrue UnknownScript_0xbd65d
@@ -971,7 +971,7 @@
displaylocation ROUTE_33, $2
farjump UnknownScript_0xa0afa
-UnknownScript_0xbd66b:
+AnthonyPhoneScript2:
trainertotext HIKER, ANTHONY2, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_FLYPOINT_GOLDENROD
@@ -1010,7 +1010,7 @@
; Todd
-UnknownScript_0xbd6c1:
+ToddPhoneScript1:
trainertotext CAMPER, TODD1, $0
checkflag ENGINE_TODD
iftrue UnknownScript_0xbd6ea
@@ -1034,7 +1034,7 @@
UnknownScript_0xbd6f1:
farjump UnknownScript_0xa0b04
-UnknownScript_0xbd6f5:
+ToddPhoneScript2:
trainertotext CAMPER, TODD1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_TODD
@@ -1072,7 +1072,7 @@
; Gina
-UnknownScript_0xbd743:
+GinaPhoneScript1:
trainertotext PICNICKER, GINA1, $0
checkflag ENGINE_GINA
iftrue UnknownScript_0xbd776
@@ -1102,7 +1102,7 @@
displaylocation ROUTE_34, $2
farjump UnknownScript_0xa0abd
-UnknownScript_0xbd784:
+GinaPhoneScript2:
trainertotext PICNICKER, GINA1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
@@ -1147,7 +1147,7 @@
; Irwin
-UnknownScript_0xbd7e7:
+IrwinPhoneScript1:
trainertotext JUGGLER, IRWIN1, $0
farscall UnknownScript_0xbde4e
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
@@ -1157,7 +1157,7 @@
UnknownScript_0xbd7f9:
farjump UnknownScript_0xa05be
-UnknownScript_0xbd7fd:
+IrwinPhoneScript2:
trainertotext JUGGLER, IRWIN1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
@@ -1169,7 +1169,7 @@
; Arnie
-UnknownScript_0xbd813:
+ArniePhoneScript1:
trainertotext BUG_CATCHER, ARNIE1, $0
checkflag ENGINE_ARNIE
iftrue UnknownScript_0xbd83c
@@ -1194,7 +1194,7 @@
displaylocation ROUTE_35, $2
farjump UnknownScript_0xa0aff
-UnknownScript_0xbd84a:
+ArniePhoneScript2:
trainertotext BUG_CATCHER, ARNIE1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_ARNIE
@@ -1236,7 +1236,7 @@
; Alan
-UnknownScript_0xbd8a6:
+AlanPhoneScript1:
trainertotext SCHOOLBOY, ALAN1, $0
checkflag ENGINE_ALAN
iftrue UnknownScript_0xbd8cf
@@ -1261,7 +1261,7 @@
displaylocation ROUTE_36, $2
farjump UnknownScript_0xa0ac5
-UnknownScript_0xbd8dd:
+AlanPhoneScript2:
trainertotext SCHOOLBOY, ALAN1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_ALAN
@@ -1299,7 +1299,7 @@
; Dana
-UnknownScript_0xbd930:
+DanaPhoneScript1:
trainertotext LASS, DANA1, $0
checkflag ENGINE_DANA
iftrue UnknownScript_0xbd959
@@ -1324,7 +1324,7 @@
displaylocation ROUTE_38, $2
farjump UnknownScript_0xa0acd
-UnknownScript_0xbd967:
+DanaPhoneScript2:
trainertotext LASS, DANA1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_DANA
@@ -1367,7 +1367,7 @@
; Chad
-UnknownScript_0xbd9c6:
+ChadPhoneScript1:
trainertotext SCHOOLBOY, CHAD1, $0
checkflag ENGINE_CHAD
iftrue UnknownScript_0xbd9e9
@@ -1386,7 +1386,7 @@
displaylocation ROUTE_38, $2
farjump UnknownScript_0xa0a7d
-UnknownScript_0xbd9f0:
+ChadPhoneScript2:
trainertotext SCHOOLBOY, CHAD1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
@@ -1417,7 +1417,7 @@
UnknownScript_0xbda31:
farjump UnknownScript_0xa0754
-UnknownScript_0xbda35:
+DerekPhoneScript1:
trainertotext POKEFANM, DEREK1, $0
farscall UnknownScript_0xbde4e
checkflag ENGINE_DEREK_HAS_NUGGET
@@ -1441,7 +1441,7 @@
displaylocation ROUTE_39, $2
farjump UnknownScript_0xa0ad5
-UnknownScript_0xbda6e:
+DerekPhoneScript2:
trainertotext POKEFANM, DEREK1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
@@ -1466,7 +1466,7 @@
displaylocation ROUTE_39, $2
farjump UnknownScript_0xa05e6
-UnknownScript_0xbdaac:
+TullyPhoneScript1:
trainertotext FISHER, TULLY1, $0
checkflag ENGINE_TULLY
iftrue UnknownScript_0xbdad5
@@ -1491,7 +1491,7 @@
displaylocation ROUTE_42, $2
farjump UnknownScript_0xa0add
-UnknownScript_0xbdae3:
+TullyPhoneScript2:
trainertotext FISHER, TULLY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_TULLY
@@ -1527,7 +1527,7 @@
displaylocation ROUTE_42, $2
farjump UnknownScript_0xa05e6
-UnknownScript_0xbdb36:
+BrentPhoneScript1:
trainertotext POKEMANIAC, BRENT1, $0
checkflag ENGINE_BRENT
iftrue UnknownScript_0xbdb59
@@ -1546,7 +1546,7 @@
displaylocation ROUTE_43, $2
farjump UnknownScript_0xa0a87
-UnknownScript_0xbdb60:
+BrentPhoneScript2:
trainertotext POKEMANIAC, BRENT1, $0
farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f
@@ -1572,7 +1572,7 @@
UnknownScript_0xbdb95:
farjump UnknownScript_0xa07ce
-UnknownScript_0xbdb99:
+TiffanyPhoneScript1:
trainertotext PICNICKER, TIFFANY3, $0
checkflag ENGINE_TIFFANY
iftrue UnknownScript_0xbdbc2
@@ -1597,7 +1597,7 @@
displaylocation ROUTE_43, $2
farjump UnknownScript_0xa0ae5
-UnknownScript_0xbdbd0:
+TiffanyPhoneScript2:
trainertotext PICNICKER, TIFFANY3, $0
farscall UnknownScript_0xbde45
if_equal $0, UnknownScript_0xbdc21
@@ -1673,7 +1673,7 @@
; Vance
-UnknownScript_0xbdc73:
+VancePhoneScript1:
trainertotext BIRD_KEEPER, VANCE1, $0
checkflag ENGINE_VANCE
iftrue UnknownScript_0xbdc96
@@ -1692,7 +1692,7 @@
displaylocation ROUTE_44, $2
farjump UnknownScript_0xa0a91
-UnknownScript_0xbdc9d:
+VancePhoneScript2:
trainertotext BIRD_KEEPER, VANCE1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_VANCE
@@ -1714,7 +1714,7 @@
setflag ENGINE_VANCE
farjump UnknownScript_0xa0376
-UnknownScript_0xbdcce:
+WiltonPhoneScript1:
trainertotext FISHER, WILTON1, $0
checkflag ENGINE_WILTON
iftrue UnknownScript_0xbdcf7
@@ -1739,7 +1739,7 @@
displaylocation ROUTE_44, $2
farjump UnknownScript_0xa0aed
-UnknownScript_0xbdd05:
+WiltonPhoneScript2:
trainertotext FISHER, WILTON1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_WILTON
@@ -1792,12 +1792,12 @@
; Kenji
-UnknownScript_0xbdd71:
+KenjiPhoneScript1:
trainertotext BLACKBELT_T, KENJI3, $0
farscall UnknownScript_0xbde4e
farjump UnknownScript_0xa09ee
-UnknownScript_0xbdd7d:
+KenjiPhoneScript2:
trainertotext BLACKBELT_T, KENJI3, $0
farscall UnknownScript_0xbe1b6
farjump UnknownScript_0xa064c
@@ -1804,7 +1804,7 @@
; Parry
-UnknownScript_0xbdd89:
+ParryPhoneScript1:
trainertotext HIKER, PARRY1, $0
checkflag ENGINE_PARRY
iftrue UnknownScript_0xbddac
@@ -1823,7 +1823,7 @@
displaylocation ROUTE_45, $2
farjump UnknownScript_0xa0a9b
-UnknownScript_0xbddb3:
+ParryPhoneScript2:
trainertotext HIKER, PARRY1, $0
farscall UnknownScript_0xbe1b6
checkflag ENGINE_PARRY
@@ -1847,7 +1847,7 @@
; Erin
-UnknownScript_0xbdde4:
+ErinPhoneScript1:
trainertotext PICNICKER, ERIN1, $0
checkflag ENGINE_ERIN
iftrue UnknownScript_0xbde07
@@ -1866,7 +1866,7 @@
displaylocation ROUTE_46, $2
farjump UnknownScript_0xa0aa0
-UnknownScript_0xbde0e:
+ErinPhoneScript2:
trainertotext PICNICKER, ERIN1, $0
farscall UnknownScript_0xbe41e
checkflag ENGINE_ERIN
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -1285,7 +1285,7 @@
pop bc
jr c, LuckyNumberShow18
push bc
- callab Function3952d
+ callab GetTrainerClassName
ld de, StringBuffer1
call CopyName1
pop bc
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -111,8 +111,8 @@
add_special Functionc2da
add_special GetFirstPokemonHappiness
add_special CheckFirstMonIsEgg
- add_special Function2a4ab
- add_special Function2a51f
+ add_special RandomPhoneRareWildMon
+ add_special RandomPhoneWildMon
add_special RandomPhoneMon
add_special RunCallback_04
add_special Functionfb841
--- a/home.asm
+++ b/home.asm
@@ -215,7 +215,7 @@
Function309d:: ; 309d
ld a, [rSVBK]
push af
- ld a, 2
+ ld a, BANK(w2_d000)
ld [rSVBK], a
hlcoord 0, 0
ld de, w2_d000
@@ -238,7 +238,7 @@
Function30bf:: ; 30bf
ld a, [rSVBK]
push af
- ld a, 2
+ ld a, BANK(w2_d000)
ld [rSVBK], a
ld hl, w2_d000
decoord 0, 0
@@ -251,9 +251,11 @@
CopyName1:: ; 30d6
+; Copies the name from de to StringBuffer2
ld hl, StringBuffer2
CopyName2:: ; 30d9
+; Copies the name from de to hl
.loop
ld a, [de]
inc de
@@ -300,18 +302,7 @@
ret
; 0x30fe
-AddNTimes:: ; 0x30fe
-; Add bc * a to hl.
- and a
- ret z
-.loop
- add hl, bc
- dec a
- jr nz, .loop
- ret
-; 0x3105
-
INCLUDE "home/math.asm"
@@ -727,7 +718,7 @@
ld a, [rSVBK]
push af
- ld a, 5
+ ld a, BANK(BGPals)
ld [rSVBK], a
; Fill BGPals and OBPals with $ffff (white)
@@ -1273,11 +1264,11 @@
; 35b0
Function35b0:: ; 35b0
- ld hl, wdbf9 + 3
+ ld hl, wCurrentCaller + 3
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [wdbf9 + 2]
+ ld a, [wCurrentCaller + 2]
and a
jr z, .asm_35d3
@@ -1311,7 +1302,7 @@
.asm_35d5
pop af
ld d, a
- ld a, [wdbf9 + 2]
+ ld a, [wCurrentCaller + 2]
sub d
inc a
scf
--- a/home/map.asm
+++ b/home/map.asm
@@ -97,7 +97,7 @@
Function2173:: ; 2173
call Function217a
- call FarCallFunction4c000
+ call FarCallSwapTextboxPalettes
ret
; 217a
@@ -1204,7 +1204,7 @@
ld de, BGMapBuffer
call Function27b7
ld c, $28
- call FarCallFunction4c03f
+ call FarCallScrollBGMapPalettes
ld a, [wd152]
ld e, a
ld a, [wd153]
@@ -1220,7 +1220,7 @@
ld de, BGMapBuffer
call Function27b7
ld c, $28
- call FarCallFunction4c03f
+ call FarCallScrollBGMapPalettes
ld a, [wd152]
ld l, a
ld a, [wd153]
@@ -1243,7 +1243,7 @@
ld de, BGMapBuffer
call Function27c0
ld c, $24
- call FarCallFunction4c03f
+ call FarCallScrollBGMapPalettes
ld a, [wd152]
ld e, a
ld a, [wd153]
@@ -1259,7 +1259,7 @@
ld de, BGMapBuffer
call Function27c0
ld c, $24
- call FarCallFunction4c03f
+ call FarCallScrollBGMapPalettes
ld a, [wd152]
ld e, a
and $e0
--- a/home/math.asm
+++ b/home/math.asm
@@ -1,3 +1,14 @@
+AddNTimes:: ; 0x30fe
+; Add bc * a to hl.
+ and a
+ ret z
+.loop
+ add hl, bc
+ dec a
+ jr nz, .loop
+ ret
+; 0x3105
+
SimpleMultiply:: ; 3105
; Return a * c.
and a
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -323,23 +323,23 @@
; db1
-FarCallFunction4c000:: ; db1
+FarCallSwapTextboxPalettes:: ; db1
ld a, [hROMBank]
push af
- ld a, BANK(Function4c000)
+ ld a, BANK(SwapTextboxPalettes)
rst Bankswitch
- call Function4c000
+ call SwapTextboxPalettes
pop af
rst Bankswitch
ret
; dbd
-FarCallFunction4c03f:: ; dbd
+FarCallScrollBGMapPalettes:: ; dbd
ld a, [hROMBank]
push af
- ld a, BANK(Function4c03f)
+ ld a, BANK(ScrollBGMapPalettes)
rst Bankswitch
- call Function4c03f
+ call ScrollBGMapPalettes
pop af
rst Bankswitch
ret
--- a/macros/enum.asm
+++ b/macros/enum.asm
@@ -31,6 +31,6 @@
ENDM
shift_const: MACRO
-\1 EQU 1 << const_value
+\1 EQU (1 << const_value)
const_value = const_value + 1
ENDM
--- a/macros/map.asm
+++ b/macros/map.asm
@@ -5,8 +5,8 @@
; db GROUP_\1, MAP_\1
\1\@ EQUS "GROUP_\1"
-\1\@2 EQUS "MAP_\1"
- db \1\@, \1\@2
+\1\@_2 EQUS "MAP_\1"
+ db \1\@, \1\@_2
ENDM
roam_map: MACRO
@@ -165,9 +165,9 @@
mapgroup: MACRO
; map id, height, width
\1\@ EQUS "GROUP_\1"
-\1\@2 EQUS "MAP_\1"
+\1\@_2 EQUS "MAP_\1"
\1\@ EQU const_value
- enum \1\@2
+ enum \1\@_2
\1_HEIGHT EQU \2
\1_WIDTH EQU \3
ENDM
--- a/macros/text.asm
+++ b/macros/text.asm
@@ -12,7 +12,7 @@
dex EQUS "db $e8, $50" ; End a Pokedex entry.
-TX_RAM EQU 1
+TX_RAM EQU $01
TX_FAR EQU $16
text_jump: MACRO
--- a/main.asm
+++ b/main.asm
@@ -201,7 +201,7 @@
ld [wd84b], a
ld hl, PartyCount
- call InitializePartyAndBag
+ call InitList
xor a
ld [wCurBox], a
@@ -212,20 +212,20 @@
ld a, 1
call GetSRAMBank
ld hl, sBoxCount
- call InitializePartyAndBag
+ call InitList
call CloseSRAM
ld hl, NumItems
- call InitializePartyAndBag
+ call InitList
ld hl, NumKeyItems
- call InitializePartyAndBag
+ call InitList
ld hl, NumBalls
- call InitializePartyAndBag
+ call InitList
ld hl, PCItems
- call InitializePartyAndBag
+ call InitList
xor a
ld [wRoamMon1Species], a
@@ -293,7 +293,7 @@
ret
; 5ca1
-InitializePartyAndBag: ; 5ca1
+InitList: ; 5ca1
; Loads 0 in the count and -1 in the first item or mon slot.
xor a
ld [hli], a
@@ -445,7 +445,7 @@
call ClearTileMap
ld c, $14
call DelayFrames
- callba RestoreRoamMons
+ callba JumpRoamMons
callba Function105091
callba Function140ae
ld a, [wd4b5]
@@ -1070,7 +1070,7 @@
Function620b: ; 620b
callab Functione4579
jr c, Function6219
- callba Functione48ac
+ callba CrystalIntro
Function6219: ; 6219
ld a, [rSVBK]
@@ -2978,7 +2978,7 @@
; Engine flag for this event.
ld hl, DailyFlags
set 5, [hl]
-
+; setflag ENGINE_SHUCKLE_GIVEN
ld a, 1
ld [ScriptVar], a
ret
@@ -10382,15 +10382,15 @@
ld [hli], a
endr
ld [hl], a
- ld hl, wdc4c
+ ld hl, wDailyRematchFlags
rept 4
ld [hli], a
endr
- ld hl, wdc50
+ ld hl, wDailyPhoneItemFlags
rept 4
ld [hli], a
endr
- ld hl, wdc54
+ ld hl, wDailyPhoneTimeOfDayFlags
rept 4
ld [hli], a
endr
@@ -15549,7 +15549,7 @@
push hl
push bc
; Get the Trainer Class name and copy it into wd016.
- callab Function3952d
+ callab GetTrainerClassName
ld hl, StringBuffer1
ld de, wd016
ld bc, TRAINER_CLASS_NAME_LENGTH
@@ -33892,9 +33892,9 @@
ld hl, wd25a
call CheckOnWater
ld a, 3
- jr z, .asm_2a11e
+ jr z, .ok
ld a, [TimeOfDay]
-.asm_2a11e
+.ok
ld c, a
ld b, 0
add hl, bc
@@ -34012,7 +34012,7 @@
call ValidateTempWildMonSpecies
jr c, .nowildbattle
- ld a, b
+ ld a, b ; This is in the wrong place.
cp UNOWN
jr nz, .done
@@ -34297,12 +34297,12 @@
UpdateRoamMons: ; 2a30d
ld a, [wRoamMon1MapGroup]
- cp $ff
+ cp GROUP_N_A
jr z, .SkipRaikou
ld b, a
ld a, [wRoamMon1MapNumber]
ld c, a
- call Function2a355
+ call .Update
ld a, b
ld [wRoamMon1MapGroup], a
ld a, c
@@ -34310,12 +34310,12 @@
.SkipRaikou
ld a, [wRoamMon2MapGroup]
- cp $ff
+ cp GROUP_N_A
jr z, .SkipEntei
ld b, a
ld a, [wRoamMon2MapNumber]
ld c, a
- call Function2a355
+ call .Update
ld a, b
ld [wRoamMon2MapGroup], a
ld a, c
@@ -34323,12 +34323,12 @@
.SkipEntei
ld a, [wRoamMon3MapGroup]
- cp $ff
+ cp GROUP_N_A
jr z, .SkipSuicune
ld b, a
ld a, [wRoamMon3MapNumber]
ld c, a
- call Function2a355
+ call .Update
ld a, b
ld [wRoamMon3MapGroup], a
ld a, c
@@ -34335,43 +34335,47 @@
ld [wRoamMon3MapNumber], a
.SkipSuicune
- jp Function2a3f6
+ jp _BackUpMapIndices
; 2a355
-Function2a355: ; 2a355
+.Update: ; 2a355
ld hl, RoamMaps
-.asm_2a358
+.loop
+; Are we at the end of the table?
ld a, [hl]
- cp $ff
+ cp -1
ret z
+; Is this the correct entry?
ld a, b
cp [hl]
- jr nz, .asm_2a365
+ jr nz, .next
inc hl
ld a, c
cp [hl]
- jr z, .asm_2a36b
-
-.asm_2a365
+ jr z, .yes
+; We don't have the correct entry yet, so let's continue. A 0 terminates each entry.
+.next
ld a, [hli]
and a
- jr nz, .asm_2a365
- jr .asm_2a358
+ jr nz, .next
+ jr .loop
-.asm_2a36b
+; We have the correct entry now, so let's choose a random map from it.
+.yes
inc hl
ld d, h
ld e, l
-.asm_2a36e
+.update_loop
ld h, d
ld l, e
+; Choose which map to warp to.
call Random
- and $1f
- jr z, Function2a3cd
+ and $1f ; 1/8n chance it moves to a completely random map, where n is the number of roaming connections from the current map.
+ jr z, JumpRoamMon
and 3
cp [hl]
- jr nc, .asm_2a36e
+ jr nc, .update_loop ; invalid index, try again
inc hl
ld c, a
ld b, $0
@@ -34380,82 +34384,82 @@
endr
ld a, [wdfe7]
cp [hl]
- jr nz, .asm_2a390
+ jr nz, .done
inc hl
ld a, [wdfe6]
cp [hl]
- jr z, .asm_2a36e
+ jr z, .update_loop
dec hl
-.asm_2a390
+.done
ld a, [hli]
ld b, a
ld c, [hl]
ret
-RestoreRoamMons: ; 2a394
+JumpRoamMons: ; 2a394
ld a, [wRoamMon1MapGroup]
- cp $ff
- jr z, .asm_2a3a6
- call Function2a3cd
+ cp GROUP_N_A
+ jr z, .SkipRaikou
+ call JumpRoamMon
ld a, b
ld [wRoamMon1MapGroup], a
ld a, c
ld [wRoamMon1MapNumber], a
-.asm_2a3a6
+.SkipRaikou
ld a, [wRoamMon2MapGroup]
- cp $ff
- jr z, .asm_2a3b8
- call Function2a3cd
+ cp GROUP_N_A
+ jr z, .SkipEntei
+ call JumpRoamMon
ld a, b
ld [wRoamMon2MapGroup], a
ld a, c
ld [wRoamMon2MapNumber], a
-.asm_2a3b8
+.SkipEntei
ld a, [wRoamMon3MapGroup]
- cp $ff
- jr z, .asm_2a3ca
- call Function2a3cd
+ cp GROUP_N_A
+ jr z, .SkipSuicune
+ call JumpRoamMon
ld a, b
ld [wRoamMon3MapGroup], a
ld a, c
ld [wRoamMon3MapNumber], a
-.asm_2a3ca
+.SkipSuicune
- jp Function2a3f6
+ jp _BackUpMapIndices
-Function2a3cd: ; 2a3cd
-.asm_2a3cd
+JumpRoamMon: ; 2a3cd
+.loop
ld hl, RoamMaps
-.asm_2a3d0
- call Random
- and $f
- cp $10
- jr nc, .asm_2a3d0
+.innerloop1 ; This loop is completely unnecessary.
+ call Random ; Choose a random number
+ and $f ; Take the lower nybble only. This gives a number between 0 and 15.
+ cp $10 ; If the number is greater than or equal to 16, loop back and try again.
+ jr nc, .innerloop1 ; I'm sure you can guess why this check is bogus.
inc a
ld b, a
-.asm_2a3db
+.innerloop2 ; Loop to get hl to the address of the chosen roam map.
dec b
- jr z, .asm_2a3e4
-.asm_2a3de
+ jr z, .ok
+.innerloop3 ; Loop to skip the current roam map, which is terminated by a 0.
ld a, [hli]
and a
- jr nz, .asm_2a3de
- jr .asm_2a3db
-
-.asm_2a3e4
+ jr nz, .innerloop3
+ jr .innerloop2
+; Check to see if the selected map is the one the player is currently in. If so, try again.
+.ok
ld a, [MapGroup]
cp [hl]
- jr nz, .asm_2a3f2
+ jr nz, .done
inc hl
ld a, [MapNumber]
cp [hl]
- jr z, .asm_2a3cd
+ jr z, .loop
dec hl
-
-.asm_2a3f2
+; Return the map group and number in bc.
+.done
ld a, [hli]
ld b, a
ld c, [hl]
@@ -34462,7 +34466,7 @@
ret
; 2a3f6
-Function2a3f6: ; 2a3f6
+_BackUpMapIndices: ; 2a3f6
ld a, [wdfe4]
ld [wdfe6], a
ld a, [wdfe5]
@@ -34495,7 +34499,7 @@
roam_map ROUTE_44, 3, ROUTE_42, ROUTE_43, ROUTE_45
roam_map ROUTE_45, 2, ROUTE_44, ROUTE_46
roam_map ROUTE_46, 2, ROUTE_45, ROUTE_29
- db $ff
+ db -1
; 2a4a0
ValidateTempWildMonSpecies: ; 2a4a0
@@ -34512,29 +34516,30 @@
ret
; 2a4ab
-Function2a4ab: ; 2a4ab
- callba Function90439
+RandomPhoneRareWildMon: ; 2a4ab
+; Related to the phone?
+ callba GetCallerLocation
ld d, b
ld e, c
ld hl, JohtoGrassWildMons
- ld bc, $002f
+ ld bc, GRASS_WILDDATA_LENGTH
call LookUpWildmonsForMapDE
- jr c, .asm_2a4c6
+ jr c, .GetGrassmon
ld hl, KantoGrassWildMons
call LookUpWildmonsForMapDE
- jr nc, .asm_2a514
+ jr nc, .done
-.asm_2a4c6
+.GetGrassmon
push hl
- ld bc, $000d
+ ld bc, 5 + 4 * 2 ; Location of the level of the 5th wild Pokemon in that map
add hl, bc
ld a, [TimeOfDay]
- ld bc, $000e
+ ld bc, 7 * 2
call AddNTimes
-.asm_2a4d4
+.randloop1
call Random
and $3
- jr z, .asm_2a4d4
+ jr z, .randloop1
dec a
ld c, a
ld b, $0
@@ -34541,26 +34546,29 @@
rept 2
add hl, bc
endr
+; We now have the pointer to one of the last (rarest) three wild Pokemon found in that area.
inc hl
- ld c, [hl]
+ ld c, [hl] ; Contains the species index of this rare Pokemon
pop hl
- ld de, $0005
+ ld de, 5 + 0 * 2
add hl, de
- inc hl
- ld b, $4
-.asm_2a4eb
+ inc hl ; Species index of the most common Pokemon on that route
+ ld b, 4
+.loop2
ld a, [hli]
- cp c
- jr z, .asm_2a514
+ cp c ; Compare this most common Pokemon with the rare one stored in c.
+ jr z, .done
inc hl
dec b
- jr nz, .asm_2a4eb
+ jr nz, .loop2
+; This Pokemon truly is rare.
push bc
dec c
ld a, c
call CheckSeenMon
pop bc
- jr nz, .asm_2a514
+ jr nz, .done
+; Since we haven't seen it, have the caller tell us about it.
ld de, StringBuffer1
call CopyName1
ld a, c
@@ -34572,7 +34580,7 @@
ld [ScriptVar], a
ret
-.asm_2a514
+.done
ld a, $1
ld [ScriptVar], a
ret
@@ -34584,30 +34592,30 @@
db "@"
; 0x2a51f
-Function2a51f: ; 2a51f
- callba Function90439
+RandomPhoneWildMon: ; 2a51f
+ callba GetCallerLocation
ld d, b
ld e, c
ld hl, JohtoGrassWildMons
- ld bc, $002f
+ ld bc, GRASS_WILDDATA_LENGTH
call LookUpWildmonsForMapDE
- jr c, .asm_2a538
+ jr c, .ok
ld hl, KantoGrassWildMons
call LookUpWildmonsForMapDE
-.asm_2a538
- ld bc, $0005
+.ok
+ ld bc, 5 + 0 * 2
add hl, bc
ld a, [TimeOfDay]
inc a
- ld bc, $000e
-.asm_2a543
+ ld bc, 7 * 2
+.loop
dec a
- jr z, .asm_2a549
+ jr z, .done
add hl, bc
- jr .asm_2a543
+ jr .loop
-.asm_2a549
+.done
call Random
and $3
ld c, a
@@ -34621,13 +34629,13 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, StringBuffer4
- ld bc, $000b
+ ld bc, PKMN_NAME_LENGTH
jp CopyBytes
; 2a567
RandomPhoneMon: ; 2a567
; Get a random monster owned by the trainer who's calling.
- callba Function90439
+ callba GetCallerLocation
ld hl, TrainerGroups
ld a, d
dec a
@@ -36656,7 +36664,7 @@
INCLUDE "battle/ai/scoring.asm"
-Function3952d: ; 3952d
+GetTrainerClassName: ; 3952d
ld hl, RivalName
ld a, c
cp RIVAL1
@@ -43953,7 +43961,7 @@
push hl
cp -1
jr z, .done
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
inc a
ld d, a
.inner_loop
@@ -44591,18 +44599,18 @@
SECTION "bank13", ROMX, BANK[$13]
-Function4c000:: ; 4c000
+SwapTextboxPalettes:: ; 4c000
hlcoord 0, 0
decoord 0, 0, AttrMap
ld b, $12
-.asm_4c008
+.loop
push bc
- ld c, $14
-.asm_4c00b
+ ld c, SCREEN_WIDTH
+.innerloop
ld a, [hl]
push hl
srl a
- jr c, .asm_4c021
+ jr c, .UpperNybble
ld hl, TilesetPalettes
add [hl]
ld l, a
@@ -44611,9 +44619,9 @@
ld h, a
ld a, [hl]
and $f
- jr .asm_4c031
+ jr .next
-.asm_4c021
+.UpperNybble
ld hl, TilesetPalettes
add [hl]
ld l, a
@@ -44624,7 +44632,7 @@
swap a
and $f
-.asm_4c031
+.next
pop hl
ld [de], a
res 7, [hl]
@@ -44631,21 +44639,21 @@
inc hl
inc de
dec c
- jr nz, .asm_4c00b
+ jr nz, .innerloop
pop bc
dec b
- jr nz, .asm_4c008
+ jr nz, .loop
ret
; 4c03f
-Function4c03f:: ; 4c03f
+ScrollBGMapPalettes:: ; 4c03f
ld hl, BGMapBuffer
ld de, BGMapPalBuffer
-.asm_4c045
+.loop
ld a, [hl]
push hl
srl a
- jr c, .asm_4c05b
+ jr c, .UpperNybble
ld hl, TilesetPalettes
add [hl]
ld l, a
@@ -44654,9 +44662,9 @@
ld h, a
ld a, [hl]
and $f
- jr .asm_4c06b
+ jr .next
-.asm_4c05b
+.UpperNybble
ld hl, TilesetPalettes
add [hl]
ld l, a
@@ -44667,7 +44675,7 @@
swap a
and $f
-.asm_4c06b
+.next
pop hl
ld [de], a
res 7, [hl]
@@ -44674,7 +44682,7 @@
inc hl
inc de
dec c
- jr nz, .asm_4c045
+ jr nz, .loop
ret
; 4c075
@@ -52363,7 +52371,7 @@
.ceiling
ld a, e
- cp $a2
+ cp NUM_ENGINE_FLAGS
jr c, .read
; Invalid flags are treated as flag 00.
@@ -52493,7 +52501,7 @@
dwb wSpecialPhoneCallID, $00
dwb wcf64, $00
dwb wdca4, $00
- dwb wdbf9, $40
+ dwb wCurrentCaller, $40
dwb wdc4b, $40
dwb wdc4a, $40
dwb wdc58, $00
@@ -65200,18 +65208,18 @@
Special_MagnetTrain: ; 8cc04
ld a, [ScriptVar]
and a
- jr nz, .asm_8cc14
- ld a, $1
+ jr nz, .ToGoldenrod
+ ld a, 1 ; forwards
lb bc, $40, $60
ld de, $fca0
- jr .asm_8cc1c
+ jr .continue
-.asm_8cc14
- ld a, $ff
+.ToGoldenrod
+ ld a, -1 ; backwards
lb bc, $c0, $a0
ld de, $b460
-.asm_8cc1c
+.continue
ld h, a
ld a, [rSVBK]
push af
@@ -65218,15 +65226,15 @@
ld a, $5
ld [rSVBK], a
ld a, h
- ld [wd191], a
+ ld [w5_d191], a
ld a, c
- ld [wd192], a
+ ld [w5_d192], a
ld a, b
- ld [wd193], a
+ ld [w5_d193], a
ld a, e
- ld [wd194], a
+ ld [w5_d194], a
ld a, d
- ld [wd195], a
+ ld [w5_d195], a
ld a, [hSCX]
push af
ld a, [hSCY]
@@ -65236,24 +65244,24 @@
ld a, [hl]
push af
ld [hl], $1
-.asm_8cc48
+.loop
ld a, [wcf63]
and a
- jr z, .asm_8cc66
+ jr z, .initialize
bit 7, a
- jr nz, .asm_8cc6b
+ jr nz, .done
callab Function8cf69
call Function8cdf7
call Function8cc99
call Function3b0c
call DelayFrame
- jr .asm_8cc48
+ jr .loop
-.asm_8cc66
+.initialize
call Function8ceae
- jr .asm_8cc48
+ jr .loop
-.asm_8cc6b
+.done
pop af
ld [hVBlank], a
call WhiteBGMap
@@ -65661,10 +65669,26 @@
ret
; 8ceff
-MagnetTrainTilemap1: db $1f, $05, $06, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0b, $0c, $1f
-MagnetTrainTilemap2: db $14, $15, $16, $1a, $1a, $1a, $19, $1a, $1a, $1a, $1a, $1a, $1a, $19, $1a, $1a, $1a, $1b, $1c, $1d
-MagnetTrainTilemap3: db $24, $25, $26, $27, $07, $2f, $29, $28, $28, $28, $28, $28, $28, $29, $07, $2f, $2a, $2b, $2c, $2d
-MagnetTrainTilemap4: db $20, $1f, $2e, $1f, $17, $00, $2e, $1f, $1f, $1f, $1f, $1f, $1f, $2e, $17, $00, $1f, $2e, $1f, $0f
+MagnetTrainTilemap1:
+ db $1f, $05, $06, $0a, $0a
+ db $0a, $09, $0a, $0a, $0a
+ db $0a, $0a, $0a, $09, $0a
+ db $0a, $0a, $0b, $0c, $1f
+MagnetTrainTilemap2:
+ db $14, $15, $16, $1a, $1a
+ db $1a, $19, $1a, $1a, $1a
+ db $1a, $1a, $1a, $19, $1a
+ db $1a, $1a, $1b, $1c, $1d
+MagnetTrainTilemap3:
+ db $24, $25, $26, $27, $07
+ db $2f, $29, $28, $28, $28
+ db $28, $28, $28, $29, $07
+ db $2f, $2a, $2b, $2c, $2d
+MagnetTrainTilemap4:
+ db $20, $1f, $2e, $1f, $17
+ db $00, $2e, $1f, $1f, $1f
+ db $1f, $1f, $1f, $2e, $17
+ db $00, $1f, $2e, $1f, $0f
; 8cf4f
Function8cf4f: ; 8cf4f
@@ -65708,7 +65732,7 @@
; 8cf7a
Function8cf7a: ; 8cf7a
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld e, 10 ; Do this first loop 10 times
.loop
ld a, [hl]
@@ -65719,7 +65743,7 @@
push hl
push de
call Function8d24b
- call Function8d04c
+ call LoadBouncingMonIcon
pop de
pop hl
jr c, .done
@@ -65745,58 +65769,58 @@
; 8cfa8
Function8cfa8: ; 8cfa8 (23:4fa8)
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld e, $a
-.asm_8cfad
+.loop
ld a, [hl]
and a
- jr z, .asm_8cfbf
+ jr z, .next
ld c, l
ld b, h
push hl
push de
call Function8d24b
- call Function8d04c
+ call LoadBouncingMonIcon
pop de
pop hl
- jr c, .asm_8cfd5
-.asm_8cfbf
+ jr c, .done
+.next
ld bc, $10
add hl, bc
dec e
- jr nz, .asm_8cfad
+ jr nz, .loop
ld a, [wc3b5]
ld l, a
ld h, $c4
-.asm_8cfcc
+.loop2
ld a, l
cp $40
- jr nc, .asm_8cfd5
+ jr nc, .done
xor a
ld [hli], a
- jr .asm_8cfcc
-.asm_8cfd5
+ jr .loop2
+.done
ret
Function8cfd6:: ; 8cfd6
push de
push af
- ld hl, wPartyMon1MenuIconAnim
- ld e, $a
-.asm_8cfdd
+ ld hl, wPartyMonMenuIconAnims
+ ld e, 2 * 4 + 2 ; 4 tiles for each frame, then one frame each for mail and item
+.loop
ld a, [hl]
and a
- jr z, .asm_8cfec
+ jr z, .found
ld bc, $0010
add hl, bc
dec e
- jr nz, .asm_8cfdd
+ jr nz, .loop
pop af
pop de
scf
ret
-.asm_8cfec
+.found
ld c, l
ld b, h
ld hl, wc3b4
@@ -65803,10 +65827,10 @@
inc [hl]
ld a, [hl]
and a
- jr nz, .asm_8cff7
+ jr nz, .initialized
inc [hl]
-.asm_8cff7
+.initialized
pop af
ld e, a
ld d, 0
@@ -65867,7 +65891,7 @@
Function8d03d: ; 8d03d (23:503d)
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld bc, $10
ld e, $a
xor a
@@ -65879,14 +65903,14 @@
ret
-Function8d04c: ; 8d04c
-; Populate Sprites with the bounding mon icons
+LoadBouncingMonIcon: ; 8d04c
+; Populate Sprites with the bouncing mon icons
call Function8d0ec
call Function8d132
cp $fd
- jr z, .asm_8d0b9
+ jr z, .done
cp $fc
- jr z, .asm_8d0b6
+ jr z, .almost
call Function8d1a2
ld a, [wc3ba]
add [hl]
@@ -65901,7 +65925,7 @@
ld d, Sprites / $100
ld a, [hli]
ld c, a
-.asm_8d071
+.loop
ld a, [wc3bc]
ld b, a
ld a, [wc3be]
@@ -65940,20 +65964,20 @@
ld a, e
ld [wc3b5], a
cp SpritesEnd % $100
- jr nc, .asm_8d0bb
+ jr nc, .outofroom
dec c
- jr nz, .asm_8d071
+ jr nz, .loop
pop bc
- jr .asm_8d0b9
+ jr .done
-.asm_8d0b6
+.almost
call Function8d036
-.asm_8d0b9
+.done
and a
ret
-.asm_8d0bb
+.outofroom
pop bc
scf
ret
@@ -65964,12 +65988,12 @@
ld a, [hl]
ld hl, wc3b8
bit 6, [hl]
- jr z, .asm_8d0cc
+ jr z, .ok
add $8
xor $ff
inc a
-.asm_8d0cc
+.ok
pop hl
ret
; 8d0ce
@@ -65979,12 +66003,12 @@
ld a, [hl]
ld hl, wc3b8
bit 5, [hl]
- jr z, .asm_8d0dc
+ jr z, .ok
add $8
xor $ff
inc a
-.asm_8d0dc
+.ok
pop hl
ret
; 8d0de
@@ -66026,20 +66050,20 @@
ld hl, wc300
ld b, a
ld c, $a
-.asm_8d111
+.loop
ld a, [hli]
cp b
- jr z, .asm_8d11c
+ jr z, .ok
inc hl
dec c
- jr nz, .asm_8d111
+ jr nz, .loop
xor a
- jr .asm_8d11d
+ jr .done
-.asm_8d11c
+.ok
ld a, [hl]
-.asm_8d11d
+.done
pop bc
pop hl
ret
@@ -66065,14 +66089,14 @@
add hl, bc
ld a, [hl]
and a
- jr z, .asm_8d142
+ jr z, .ok
dec [hl]
call Function8d189
ld a, [hli]
push af
- jr .asm_8d163
+ jr .skip
-.asm_8d142
+.ok
ld hl, $000a
add hl, bc
inc [hl]
@@ -66079,9 +66103,9 @@
call Function8d189
ld a, [hli]
cp $fe
- jr z, .asm_8d17b
+ jr z, .minus_2
cp $ff
- jr z, .asm_8d16d
+ jr z, .minus_1
push af
ld a, [hl]
push hl
@@ -66094,7 +66118,7 @@
ld [hl], a
pop hl
-.asm_8d163
+.skip
ld a, [hl]
and $c0
srl a
@@ -66102,7 +66126,7 @@
pop af
ret
-.asm_8d16d
+.minus_1
xor a
ld hl, $0008
add hl, bc
@@ -66114,7 +66138,7 @@
endr
jr .loop
-.asm_8d17b
+.minus_2
xor a
ld hl, $0008
add hl, bc
@@ -66157,7 +66181,7 @@
ret
; 8d1ac
-Function8d1ac: ; 8d1ac
+Function8d1ac: ; unreferenced
push hl
ld l, a
ld h, 0
@@ -66234,7 +66258,7 @@
add hl, bc
ld e, [hl]
ld d, 0
- ld hl, Jumptable_8d25b
+ ld hl, .Jumptable
rept 2
add hl, de
endr
@@ -66245,53 +66269,53 @@
; 8d25b
-Jumptable_8d25b: ; 8d25b (23:525b)
- dw Function8d2a1
- dw Function8d2a2
- dw Function8d2b9
- dw Function8d2ea
- dw Function8d302
- dw Function8d36c
- dw Function8d37a
- dw Function8d381
- dw Function8d3c3
- dw Function8d422
- dw Function8d429
- dw Function8d43e
- dw Function8d373
- dw Function8d46e
- dw Function8d47c
- dw Function8d475
- dw Function8d483
- dw Function8d52a
- dw Function8d543
- dw Function8d54a
- dw Function8d578
- dw Function8d57f
- dw Function8d5b0
- dw Function8d5e2
- dw Function8d607
- dw Function8d35a
- dw Function8d6b7
- dw Function8d630
- dw Function8d637
- dw Function8d63e
- dw Function8d666
- dw Function8d6be
- dw Function8d680
- dw Function8d6a2
- dw Function8d6ae
+.Jumptable: ; 8d25b (23:525b)
+ dw .zero
+ dw .one
+ dw .two
+ dw .three
+ dw .four
+ dw .five
+ dw .six
+ dw .seven
+ dw .eight
+ dw .nine
+ dw .ten
+ dw .eleven
+ dw .twelve
+ dw .thirteen
+ dw .fourteen
+ dw .fifteen
+ dw .sixteen
+ dw .seventeen
+ dw .eighteen
+ dw .nineteen
+ dw .twenty
+ dw .twentyone
+ dw .twentytwo
+ dw .twentythree
+ dw .twentyfour
+ dw .twentyfive
+ dw .twentysix
+ dw .twentyseven
+ dw .twentyeight
+ dw .twentynine
+ dw .thirty
+ dw .thirtyone
+ dw .thirtytwo
+ dw .thirtythree
+ dw .thirtyfour
-Function8d2a1: ; 8d2a1 (23:52a1)
+.zero: ; 8d2a1 (23:52a1)
ret
-Function8d2a2: ; 8d2a2 (23:52a2)
+.one: ; 8d2a2 (23:52a2)
ld a, [wcfa9]
ld hl, $0
add hl, bc
cp [hl]
- jr z, Function8d2b9
+ jr z, .two
ld hl, $4
add hl, bc
ld [hl], $10
@@ -66300,7 +66324,7 @@
ld [hl], $0
ret
-Function8d2b9: ; 8d2b9 (23:52b9)
+.two: ; 8d2b9 (23:52b9)
ld hl, $4
add hl, bc
ld [hl], $18
@@ -66337,7 +66361,7 @@
ld [hl], a
ret
-Function8d2ea: ; 8d2ea (23:52ea)
+.three: ; 8d2ea (23:52ea)
ld a, [wcfa9]
ld hl, $0
add hl, bc
@@ -66353,17 +66377,17 @@
ld [hl], $18
ret
-Function8d302: ; 8d302 (23:5302)
- call Function8d6c5
+.four: ; 8d302 (23:5302)
+ call .anonymous_jumptable
jp [hl]
; 8d306 (23:5306)
-; Anonymous jumptable (see Function8d6c5)
- dw Function8d30a
- dw Function8d321
+; Anonymous jumptable (see .anonymous_jumptable)
+ dw .four_zero
+ dw .four_one
; 8d30a
-Function8d30a: ; 8d30a
+.four_zero: ; 8d30a
call Function8d6d8
ld hl, $0000
add hl, bc
@@ -66378,7 +66402,7 @@
add hl, bc
ld [hl], a
-Function8d321: ; 8d321
+.four_one: ; 8d321
ld hl, $0004
add hl, bc
ld a, [hl]
@@ -66415,7 +66439,7 @@
ret
; 8d35a
-Function8d35a: ; 8d35a (23:535a)
+.twentyfive: ; 8d35a (23:535a)
ld hl, $c
add hl, bc
ld a, [hl]
@@ -66428,19 +66452,19 @@
ld [hl], a
ret
-Function8d36c: ; 8d36c (23:536c)
+.five: ; 8d36c (23:536c)
callab Function11a3b
ret
-Function8d373: ; 8d373 (23:5373)
+.twelve: ; 8d373 (23:5373)
callab Function120c1
ret
-Function8d37a: ; 8d37a (23:537a)
- callab Functione46ed
+.six: ; 8d37a (23:537a)
+ callab GameFreakLogoJumper
ret
-Function8d381: ; 8d381 (23:5381)
+.seven: ; 8d381 (23:5381)
ld hl, $c
add hl, bc
ld a, [hl]
@@ -66485,7 +66509,7 @@
call Function8d036
ret
-Function8d3c3: ; 8d3c3 (23:53c3)
+.eight: ; 8d3c3 (23:53c3)
ld hl, $c
add hl, bc
ld a, [hli]
@@ -66551,11 +66575,11 @@
call Function8d036
ret
-Function8d422: ; 8d422 (23:5422)
+.nine: ; 8d422 (23:5422)
callab Function9321d
ret
-Function8d429: ; 8d429 (23:5429)
+.ten: ; 8d429 (23:5429)
callab Function932ac
ld hl, wcf64
ld a, [hl]
@@ -66566,7 +66590,7 @@
call Function8d120
ret
-Function8d43e: ; 8d43e (23:543e)
+.eleven: ; 8d43e (23:543e)
ld hl, $b
add hl, bc
ld a, [hl]
@@ -66596,33 +66620,33 @@
ld [hl], a
ret
-Function8d46e: ; 8d46e (23:546e)
+.thirteen: ; 8d46e (23:546e)
callab Functione00ed
ret
-Function8d475: ; 8d475 (23:5475)
+.fifteen: ; 8d475 (23:5475)
callab Function90d41
ret
-Function8d47c: ; 8d47c (23:547c)
+.fourteen: ; 8d47c (23:547c)
callab Functione21a1
ret
-Function8d483: ; 8d483 (23:5483)
- call Function8d6c5
+.sixteen: ; 8d483 (23:5483)
+ call .anonymous_jumptable
jp [hl]
; 8d487 (23:5487)
-; Anonymous jumptable (see Function8d6c5)
- dw Function8d493
- dw Function8d4d5
- dw Function8d4a5
- dw Function8d4b8
- dw Function8d4e8
- dw Function8d526
+; Anonymous jumptable (see .anonymous_jumptable)
+ dw .sixteen_zero
+ dw .sixteen_one
+ dw .sixteen_two
+ dw .sixteen_three
+ dw .sixteen_four
+ dw .sixteen_five
; 8d493
-Function8d493: ; 8d493
+.sixteen_zero: ; 8d493
ld a, $14
call Function8d120
ld hl, $000b
@@ -66634,7 +66658,7 @@
ret
; 8d4a5
-Function8d4a5: ; 8d4a5
+.sixteen_two: ; 8d4a5
ld hl, $000c
add hl, bc
ld a, [hl]
@@ -66649,7 +66673,7 @@
add hl, bc
ld [hl], $40
-Function8d4b8: ; 8d4b8
+.sixteen_three: ; 8d4b8
ld hl, $000c
add hl, bc
ld a, [hl]
@@ -66666,10 +66690,10 @@
.asm_8d4cd
ld de, SFX_GOT_SAFARI_BALLS
call PlaySFX
- jr Function8d526
+ jr .sixteen_five
; 8d4d5
-Function8d4d5: ; 8d4d5
+.sixteen_one: ; 8d4d5
ld hl, $000b
add hl, bc
ld [hl], $4
@@ -66682,7 +66706,7 @@
ret
; 8d4e8
-Function8d4e8: ; 8d4e8
+.sixteen_four: ; 8d4e8
ld hl, $000d
add hl, bc
ld a, [hl]
@@ -66722,12 +66746,12 @@
call Function8d6d8
ret
-Function8d526: ; 8d526
+.sixteen_five: ; 8d526
call Function8d036
ret
; 8d52a
-Function8d52a: ; 8d52a (23:552a)
+.seventeen: ; 8d52a (23:552a)
ld hl, $4
add hl, bc
ld a, [hl]
@@ -66745,11 +66769,11 @@
call Function8d036
ret
-Function8d543: ; 8d543 (23:5543)
+.eighteen: ; 8d543 (23:5543)
callab Function29676
ret
-Function8d54a: ; 8d54a (23:554a)
+.nineteen: ; 8d54a (23:554a)
ld hl, $c
add hl, bc
ld a, [hl]
@@ -66780,11 +66804,11 @@
call Function8d036
ret
-Function8d578: ; 8d578 (23:5578)
+.twenty: ; 8d578 (23:5578)
callab Function91640
ret
-Function8d57f: ; 8d57f (23:557f)
+.twentyone: ; 8d57f (23:557f)
ld hl, $d
add hl, bc
ld e, [hl]
@@ -66819,7 +66843,7 @@
ld [hl], a
ret
-Function8d5b0: ; 8d5b0 (23:55b0)
+.twentytwo: ; 8d5b0 (23:55b0)
ld hl, $5
add hl, bc
ld a, [hl]
@@ -66855,7 +66879,7 @@
ld [hl], a
ret
-Function8d5e2: ; 8d5e2 (23:55e2)
+.twentythree: ; 8d5e2 (23:55e2)
ld hl, $4
add hl, bc
ld a, [hl]
@@ -66881,7 +66905,7 @@
call Function8d036
ret
-Function8d607: ; 8d607 (23:5607)
+.twentyfour: ; 8d607 (23:5607)
ld hl, $5
add hl, bc
ld a, [hl]
@@ -66911,15 +66935,15 @@
ld [hl], a
ret
-Function8d630: ; 8d630 (23:5630)
+.twentyseven: ; 8d630 (23:5630)
callba Function108bc7
ret
-Function8d637: ; 8d637 (23:5637)
+.twentyeight: ; 8d637 (23:5637)
callba Function108be0
ret
-Function8d63e: ; 8d63e (23:563e)
+.twentynine: ; 8d63e (23:563e)
ld a, [wcf65]
and a
jr nz, .asm_8d645
@@ -66944,7 +66968,7 @@
call Function8d120
ret
-Function8d666: ; 8d666 (23:5666)
+.thirty: ; 8d666 (23:5666)
ld hl, $c
add hl, bc
ld a, [hl]
@@ -66962,7 +66986,7 @@
.asm_8d67f
ret
-Function8d680: ; 8d680 (23:5680)
+.thirtytwo: ; 8d680 (23:5680)
ld hl, $b
add hl, bc
ld d, [hl]
@@ -66986,7 +67010,7 @@
ld [hl], a
ret
-Function8d6a2: ; 8d6a2 (23:56a2)
+.thirtythree: ; 8d6a2 (23:56a2)
ld a, [wcf64]
cp $40
ret nz
@@ -66994,7 +67018,7 @@
call Function8d120
ret
-Function8d6ae: ; 8d6ae (23:56ae)
+.thirtyfour: ; 8d6ae (23:56ae)
ld hl, $5
add hl, bc
ld a, [hl]
@@ -67002,15 +67026,15 @@
ld [hl], a
ret
-Function8d6b7: ; 8d6b7 (23:56b7)
+.twentysix: ; 8d6b7 (23:56b7)
callba Function11d0b6
ret
-Function8d6be: ; 8d6be (23:56be)
+.thirtyone: ; 8d6be (23:56be)
callba Function49aa2
ret
-Function8d6c5: ; 8d6c5 (23:56c5)
+.anonymous_jumptable: ; 8d6c5 (23:56c5)
ld hl, [sp+$0]
ld e, [hl]
inc hl
@@ -68487,6 +68511,7 @@
; 8e72a
+
Function8e72a: ; 8e72a
add $10
Function8e72c: ; 8e72c
@@ -68981,7 +69006,7 @@
; 8ea4a
Function8ea4a: ; 8ea4a
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld e, $6
ld a, [wcfa9]
ld d, a
@@ -69015,7 +69040,7 @@
; 8ea71
Function8ea71: ; 8ea71
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld e, $6
.loop
ld a, [hl]
@@ -69037,7 +69062,7 @@
; 8ea8c (23:6a8c)
Function8ea8c: ; 8ea8c
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld e, $6
ld a, [wd0e3]
ld d, a
@@ -69320,7 +69345,7 @@
dec a
ld c, a
ld b, 0
- ld hl, Unknown_90627
+ ld hl, SpecialPhoneCallList
ld a, 6
call AddNTimes
ld a, [hli]
@@ -69366,7 +69391,7 @@
dec a
ld c, a
ld b, 0
- ld hl, Unknown_90627
+ ld hl, SpecialPhoneCallList
ld a, 6
call AddNTimes
ret
@@ -69395,7 +69420,7 @@
and a
jr nz, .asm_901e7
ld a, b
- ld [wdbf9], a
+ ld [wCurrentCaller], a
ld hl, PhoneContacts
ld bc, 12
call AddNTimes
@@ -69464,7 +69489,7 @@
nop
nop
ld a, e
- ld [wdbf9], a
+ ld [wCurrentCaller], a
and a
jr nz, .asm_9021d
ld a, BANK(Unknown_90233)
@@ -69544,7 +69569,7 @@
ret
Phone_CallerTextboxWithName: ; 90292 (24:4292)
- ld a, [wdbf9]
+ ld a, [wCurrentCaller]
ld b, a
call Function90363
ret
@@ -69691,8 +69716,8 @@
Phone_CallerTextbox: ; 90375
hlcoord 0, 0
- ld b, $2
- ld c, $12
+ ld b, 2
+ ld c, SCREEN_WIDTH - 2
call TextBox
ret
; 90380
@@ -69702,13 +69727,13 @@
ld h, d
ld l, e
ld a, b
- call Function9039a
- call Function903a9
+ call GetCallerTrainerClass
+ call GetCallerName
ret
Function9038a: ; 9038a (24:438a)
ld a, c
- call Function9039a
+ call GetCallerTrainerClass
ld a, c
ret nz
ld a, b
@@ -69719,10 +69744,10 @@
ld c, $1
ret
-Function9039a: ; 9039a
+GetCallerTrainerClass: ; 9039a
push hl
- ld hl, PhoneContacts
- ld bc, 12
+ ld hl, PhoneContacts + 0 ; PHONE_CONTACT_TRAINER_CLASS
+ ld bc, 12 ; PHONE_TABLE_WIDTH
call AddNTimes
ld a, [hli]
ld b, [hl]
@@ -69732,12 +69757,12 @@
; 903a9
-Function903a9: ; 903a9 (24:43a9)
+GetCallerName: ; 903a9 (24:43a9)
ld a, c
and a
- jr z, .asm_903c5
+ jr z, .NotTrainer
- call Function90423
+ call Phone_GetTrainerName
push hl
push bc
call PlaceString
@@ -69745,17 +69770,17 @@
ld [bc], a
pop bc
pop hl
- ld de, 20 + 3
+ ld de, SCREEN_WIDTH + 3
add hl, de
- call Function9042e
+ call Phone_GetTrainerClassName
call PlaceString
ret
-.asm_903c5
+.NotTrainer
push hl
ld c, b
ld b, 0
- ld hl, Unknown_903d6
+ ld hl, NonTrainerCallerNames
rept 2
add hl, bc
endr
@@ -69767,23 +69792,23 @@
ret
; 903d6 (24:43d6)
-Unknown_903d6: ; 903d6
- dw String_903e2
- dw String_903ed
- dw String_90402
- dw String_903f2
- dw String_903f8
- dw String_9040d
+NonTrainerCallerNames: ; 903d6
+ dw .none
+ dw .mom
+ dw .bikeshop
+ dw .bill
+ dw .elm
+ dw .buena
-String_903e2: db "----------@"
-String_903ed: db "MOM:@"
-String_903f2: db "BILL:@"
-String_903f8: db "PROF.ELM:@"
-String_90402: db "BIKE SHOP:@"
-String_9040d: db "BUENA:", $22, " DISC JOCKEY@"
+.none: db "----------@"
+.mom: db "MOM:@"
+.bill: db "BILL:@"
+.elm: db "PROF.ELM:@"
+.bikeshop: db "BIKE SHOP:@"
+.buena: db "BUENA:", $22, " DISC JOCKEY@"
; 90423
-Function90423: ; 90423 (24:4423)
+Phone_GetTrainerName: ; 90423 (24:4423)
push hl
push bc
callba GetTrainerName
@@ -69791,23 +69816,23 @@
pop hl
ret
-Function9042e: ; 9042e (24:442e)
+Phone_GetTrainerClassName: ; 9042e (24:442e)
push hl
push bc
- callba Function3952d
+ callba GetTrainerClassName
pop bc
pop hl
ret
-Function90439: ; 90439
- ld a, [wdbf9]
- call Function9039a
+GetCallerLocation: ; 90439
+ ld a, [wCurrentCaller]
+ call GetCallerTrainerClass
ld d, c
ld e, b
push de
- ld a, [wdbf9]
- ld hl, PhoneContacts + 2
- ld bc, 12
+ ld a, [wCurrentCaller]
+ ld hl, PhoneContacts + 2 ; PHONE_CONTACT_MAP_GROUP
+ ld bc, 12 ; PHONE_TABLE_WIDTH
call AddNTimes
ld b, [hl]
inc hl
@@ -69836,72 +69861,72 @@
phone 0, 2, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone 0, 3, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
phone 0, 4, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
- phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, UnknownScript_0xbd0d0, 7, UnknownScript_0xbd0fa
- phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, UnknownScript_0xbd13f, 7, UnknownScript_0xbd158
- phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, UnknownScript_0xbd17c, 7, UnknownScript_0xbd1a9
+ phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
+ phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
+ phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
phone 0, 0, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone 0, 0, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
phone 0, 0, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, UnknownScript_0xbd1da, 7, UnknownScript_0xbd204
- phone COOLTRAINERF, BETH1, ROUTE_26, 7, UnknownScript_0xbd23d, 7, UnknownScript_0xbd267
- phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, UnknownScript_0xbd294, 7, UnknownScript_0xbd2cb
- phone COOLTRAINERF, REENA1, ROUTE_27, 7, UnknownScript_0xbd31c, 7, UnknownScript_0xbd346
- phone YOUNGSTER, JOEY1, ROUTE_30, 7, UnknownScript_0xbd373, 7, UnknownScript_0xbd3a0
- phone BUG_CATCHER, WADE1, ROUTE_31, 7, UnknownScript_0xbd3d1, 7, UnknownScript_0xbd428
- phone FISHER, RALPH1, ROUTE_32, 7, UnknownScript_0xbd4d2, 7, UnknownScript_0xbd509
- phone PICNICKER, LIZ1, ROUTE_32, 7, UnknownScript_0xbd560, 7, UnknownScript_0xbd58d
- phone HIKER, ANTHONY2, ROUTE_33, 7, UnknownScript_0xbd634, 7, UnknownScript_0xbd66b
- phone CAMPER, TODD1, ROUTE_34, 7, UnknownScript_0xbd6c1, 7, UnknownScript_0xbd6f5
- phone PICNICKER, GINA1, ROUTE_34, 7, UnknownScript_0xbd743, 7, UnknownScript_0xbd784
- phone JUGGLER, IRWIN1, ROUTE_35, 7, UnknownScript_0xbd7e7, 7, UnknownScript_0xbd7fd
- phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, UnknownScript_0xbd813, 7, UnknownScript_0xbd84a
- phone SCHOOLBOY, ALAN1, ROUTE_36, 7, UnknownScript_0xbd8a6, 7, UnknownScript_0xbd8dd
+ phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
+ phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
+ phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
+ phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2
+ phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2
+ phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2
+ phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2
+ phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2
+ phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2
+ phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2
+ phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2
+ phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
+ phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
+ phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2
phone 0, 0, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
- phone LASS, DANA1, ROUTE_38, 7, UnknownScript_0xbd930, 7, UnknownScript_0xbd967
- phone SCHOOLBOY, CHAD1, ROUTE_38, 7, UnknownScript_0xbd9c6, 7, UnknownScript_0xbd9f0
- phone POKEFANM, DEREK1, ROUTE_39, 7, UnknownScript_0xbda35, 7, UnknownScript_0xbda6e
- phone FISHER, TULLY1, ROUTE_42, 7, UnknownScript_0xbdaac, 7, UnknownScript_0xbdae3
- phone POKEMANIAC, BRENT1, ROUTE_43, 7, UnknownScript_0xbdb36, 7, UnknownScript_0xbdb60
- phone PICNICKER, TIFFANY3, ROUTE_43, 7, UnknownScript_0xbdb99, 7, UnknownScript_0xbdbd0
- phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, UnknownScript_0xbdc73, 7, UnknownScript_0xbdc9d
- phone FISHER, WILTON1, ROUTE_44, 7, UnknownScript_0xbdcce, 7, UnknownScript_0xbdd05
- phone BLACKBELT_T, KENJI3, ROUTE_45, 7, UnknownScript_0xbdd71, 7, UnknownScript_0xbdd7d
- phone HIKER, PARRY1, ROUTE_45, 7, UnknownScript_0xbdd89, 7, UnknownScript_0xbddb3
- phone PICNICKER, ERIN1, ROUTE_46, 7, UnknownScript_0xbdde4, 7, UnknownScript_0xbde0e
- phone 0, 5, GOLDENROD_DEPT_STORE_ROOF, 7, UnknownScript_0xa0b14, 7, UnknownScript_0xa0b26
+ phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
+ phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
+ phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
+ phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2
+ phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2
+ phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2
+ phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2
+ phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2
+ phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
+ phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
+ phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2
+ phone 0, 5, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
; 90627
-Unknown_90627: ; 90627
+SpecialPhoneCallList: ; 90627
dw Function90188
- db $04
+ db 4
dbw BANK(ElmPhoneScript2), ElmPhoneScript2
dw Function90188
- db $04
+ db 4
dbw BANK(ElmPhoneScript2), ElmPhoneScript2
dw Function90188
- db $04
+ db 4
dbw BANK(ElmPhoneScript2), ElmPhoneScript2
dw Function90188
- db $04
+ db 4
dbw BANK(ElmPhoneScript2), ElmPhoneScript2
dw Function90197
- db $04
+ db 4
dbw BANK(ElmPhoneScript2), ElmPhoneScript2
dw Function90197
- db $02
- dbw BANK(UnknownScript_0xa0b09), UnknownScript_0xa0b09 ; bike shop
+ db 2
+ dbw BANK(BikeShopPhoneScript), BikeShopPhoneScript ; bike shop
dw Function90197
- db $01
+ db 1
dbw BANK(MomPhoneLectureScript), MomPhoneLectureScript
dw Function90188
- db $04
+ db 4
dbw BANK(ElmPhoneScript2), ElmPhoneScript2
; 90657
@@ -72062,7 +72087,7 @@
Function914ab: ; 914ab (24:54ab)
- ld hl, wPartyMon2MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims + 16
ld bc, $90
xor a
call ByteFill
@@ -84948,12 +84973,12 @@
-Functione46ed: ; e46ed (39:46ed)
+GameFreakLogoJumper: ; e46ed (39:46ed)
ld hl, $b
add hl, bc
ld e, [hl]
ld d, 0
- ld hl, Jumptable_e46fd
+ ld hl, GameFreakLogoScenes
rept 2
add hl, de
endr
@@ -84962,21 +84987,21 @@
ld l, a
jp [hl]
-Jumptable_e46fd: ; e46fd (39:46fd)
- dw Functione4707
- dw Functione470d
- dw Functione4759
- dw Functione4776
- dw Functione47ab
+GameFreakLogoScenes: ; e46fd (39:46fd)
+ dw GameFreakLogoScene1
+ dw GameFreakLogoScene2
+ dw GameFreakLogoScene3
+ dw GameFreakLogoScene4
+ dw GameFreakLogoScene5
-Functione4707: ; e4707 (39:4707)
+GameFreakLogoScene1: ; e4707 (39:4707)
ld hl, $b
add hl, bc
inc [hl]
ret
-Functione470d: ; e470d (39:470d)
+GameFreakLogoScene2: ; e470d (39:470d)
ld hl, $c
add hl, bc
ld a, [hl]
@@ -85021,7 +85046,7 @@
call PlaySFX
ret
-Functione4759: ; e4759 (39:4759)
+GameFreakLogoScene3: ; e4759 (39:4759)
ld hl, $d
add hl, bc
ld a, [hl]
@@ -85040,7 +85065,7 @@
call PlaySFX
ret
-Functione4776: ; e4776 (39:4776)
+GameFreakLogoScene4: ; e4776 (39:4776)
ld hl, $d
add hl, bc
ld a, [hl]
@@ -85051,7 +85076,7 @@
srl a
ld e, a
ld d, $0
- ld hl, Unknown_e47ac
+ ld hl, GameFreakLogoPalettes
rept 2
add hl, de
endr
@@ -85074,11 +85099,11 @@
inc [hl]
call Functione4687
-Functione47ab: ; e47ab (39:47ab)
+GameFreakLogoScene5: ; e47ab (39:47ab)
ret
; e47ac (39:47ac)
-Unknown_e47ac: ; e47ac
+GameFreakLogoPalettes: ; e47ac
; Ditto's color as it turns into the Game Freak logo.
; Fade from pink to orange.
; One color per step.
@@ -85104,7 +85129,7 @@
INCBIN "gfx/splash/logo.1bpp"
; e48ac
-Functione48ac: ; e48ac
+CrystalIntro: ; e48ac
ld a, [rSVBK]
push af
ld a, $5
@@ -85114,25 +85139,24 @@
ld a, [hVBlank]
push af
call Functione4901
-
-Functione48bc: ; e48bc
+.loop: ; e48bc
call Functiona57
ld a, [$ffa9]
and $f
- jr nz, .asm_e48db
+ jr nz, .ShutOffMusic
ld a, [wcf63]
bit 7, a
- jr nz, .asm_e48e1
- call Functione490f
+ jr nz, .done
+ call IntroSceneJumper
callba Function8cf69
call DelayFrame
- jp Functione48bc
+ jp .loop
-.asm_e48db
+.ShutOffMusic
ld de, MUSIC_NONE
call PlayMusic
-.asm_e48e1
+.done
call WhiteBGMap
call ClearSprites
call ClearTileMap
@@ -85163,7 +85187,7 @@
ret
; e490f
-Functione490f: ; e490f
+IntroSceneJumper: ; e490f
ld a, [wcf63]
ld e, a
ld d, 0
@@ -89331,7 +89355,7 @@
inc [hl]
.ok
ld a, 1
- ld [wdbf9], a
+ ld [wCurrentCaller], a
ld bc, wd03f
ld hl, 0
add hl, bc
--- a/maps/GoldenrodMagnetTrainStation.asm
+++ b/maps/GoldenrodMagnetTrainStation.asm
@@ -3,12 +3,12 @@
db 1
; triggers
- dw UnknownScript_0x550eb, $0000
+ dw .Trigger1, $0000
.MapCallbacks:
db 0
-UnknownScript_0x550eb:
+.Trigger1:
end
OfficerScript_0x550ec:
@@ -15,18 +15,18 @@
faceplayer
loadfont
checkevent EVENT_RESTORED_POWER_TO_KANTO
- iftrue UnknownScript_0x550fa
+ iftrue .MagnetTrainToSaffron
writetext UnknownText_0x55160
closetext
loadmovesprites
end
-UnknownScript_0x550fa:
+.MagnetTrainToSaffron:
writetext UnknownText_0x551b7
yesorno
- iffalse UnknownScript_0x5512a
+ iffalse .DecidedNotToRide
checkitem PASS
- iffalse UnknownScript_0x55124
+ iffalse .PassNotInBag
writetext UnknownText_0x551ed
closetext
loadmovesprites
@@ -36,27 +36,27 @@
special Special_MagnetTrain
warpcheck
newloadmap $f9
- applymovement $0, MovementData_0x55122
+ applymovement $0, .MovementBoardTheTrain
wait $14
end
-MovementData_0x55122:
+.MovementBoardTheTrain:
turn_head_down
step_end
-UnknownScript_0x55124:
+.PassNotInBag:
writetext UnknownText_0x5522c
closetext
loadmovesprites
end
-UnknownScript_0x5512a:
+.DecidedNotToRide:
writetext UnknownText_0x5524f
closetext
loadmovesprites
end
-UnknownScript_0x55130:
+Script_ArriveFromSaffron:
applymovement $2, MovementData_0x55146
applymovement $0, MovementData_0x55158
applymovement $2, MovementData_0x5514b
@@ -175,7 +175,7 @@
.XYTriggers:
db 1
- xy_trigger 0, $6, $b, $0, UnknownScript_0x55130, $0, $0
+ xy_trigger 0, $6, $b, $0, Script_ArriveFromSaffron, $0, $0
.Signposts:
db 0
--- a/maps/MahoganyMart1F.asm
+++ b/maps/MahoganyMart1F.asm
@@ -86,7 +86,7 @@
writetext UnknownText_0x6c59e
closetext
showemote EMOTE_SHOCK, $2, 10
- playsound SFX_UNKNOWN_2A
+ playsound SFX_FAINT
changeblock $6, $2, $1e
reloadmappart
loadmovesprites
--- a/maps/SaffronTrainStation.asm
+++ b/maps/SaffronTrainStation.asm
@@ -3,12 +3,12 @@
db 1
; triggers
- dw UnknownScript_0x18a81d, $0000
+ dw .Trigger1, $0000
.MapCallbacks:
db 0
-UnknownScript_0x18a81d:
+.Trigger1:
end
OfficerScript_0x18a81e:
@@ -15,18 +15,18 @@
faceplayer
loadfont
checkevent EVENT_RESTORED_POWER_TO_KANTO
- iftrue UnknownScript_0x18a82c
+ iftrue .MagnetTrainToGoldenrod
writetext UnknownText_0x18a8a9
closetext
loadmovesprites
end
-UnknownScript_0x18a82c:
+.MagnetTrainToGoldenrod:
writetext UnknownText_0x18a8dd
yesorno
- iffalse UnknownScript_0x18a85c
+ iffalse .DecidedNotToRide
checkitem PASS
- iffalse UnknownScript_0x18a856
+ iffalse .PassNotInBag
writetext UnknownText_0x18a917
closetext
loadmovesprites
@@ -36,27 +36,27 @@
special Special_MagnetTrain
warpcheck
newloadmap $f9
- applymovement $0, MovementData_0x18a854
+ applymovement $0, .MovementBoardTheTrain
wait $14
end
-MovementData_0x18a854:
+.MovementBoardTheTrain:
turn_head_down
step_end
-UnknownScript_0x18a856:
+.PassNotInBag:
writetext UnknownText_0x18a956
closetext
loadmovesprites
end
-UnknownScript_0x18a85c:
+.DecidedNotToRide:
writetext UnknownText_0x18a978
closetext
loadmovesprites
end
-UnknownScript_0x18a862:
+Script_ArriveFromGoldenrod:
applymovement $2, MovementData_0x18a88f
applymovement $0, MovementData_0x18a8a1
applymovement $2, MovementData_0x18a894
@@ -224,7 +224,7 @@
.XYTriggers:
db 1
- xy_trigger 0, $6, $b, $0, UnknownScript_0x18a862, $0, $0
+ xy_trigger 0, $6, $b, $0, Script_ArriveFromGoldenrod, $0, $0
.Signposts:
db 0
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -173,7 +173,7 @@
xor a
ld [InLinkBattle], a
ld a, $4
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
callba Function11619d
ld hl, wcd29
set 6, [hl]
@@ -4356,7 +4356,7 @@
Function101cc8: ; 101cc8
ld a, $1
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
ld a, $1
ld [wc30d], a
ld hl, wcd29
@@ -4369,7 +4369,7 @@
Function101cdf: ; 101cdf
ld a, $6
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
ld a, $1
ld [wc30d], a
ld hl, wcd29
@@ -4382,7 +4382,7 @@
Function101cf6: ; 101cf6
ld a, $b
- ld [wPartyMon1MenuIconAnim + 1], a
+ ld [wPartyMonMenuIconAnims + 1], a
ld a, [wcd25]
inc a
ld [wcd25], a
@@ -4391,7 +4391,7 @@
Function101d03: ; 101d03
ld a, $e
- ld [wPartyMon1MenuIconAnim + 1], a
+ ld [wPartyMonMenuIconAnims + 1], a
ld a, [wcd25]
inc a
ld [wcd25], a
--- a/misc/mobile_45.asm
+++ b/misc/mobile_45.asm
@@ -5588,14 +5588,14 @@
Function11615a: ; 11615a
xor a
ld [wc30d], a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld [wc310], a
ld [wc311], a
ld [wc312], a
ld [wc313], a
- ld [wPartyMon1MenuIconAnim], a
- ld [wPartyMon1MenuIconAnim + 1], a
- ld [wPartyMon1MenuIconAnim + 4], a
+ ld [wPartyMonMenuIconAnims], a
+ ld [wPartyMonMenuIconAnims + 1], a
+ ld [wPartyMonMenuIconAnims + 4], a
ld [wc3f6], a
ld [wc3f8], a
ld [wc3f2], a
@@ -5617,7 +5617,7 @@
ld a, [wc30d]
and a
ret z
- ld a, [wPartyMon1MenuIconAnim + 5]
+ ld a, [wPartyMonMenuIconAnims + 5]
cp $2
jr c, .asm_1161b4
ld a, $a0
@@ -5631,7 +5631,7 @@
; 1161b8
Function1161b8: ; 1161b8
- ld a, [wPartyMon1MenuIconAnim + 5]
+ ld a, [wPartyMonMenuIconAnims + 5]
ld e, a
ld d, 0
ld hl, Jumptable_1161c7
@@ -5758,9 +5758,9 @@
ld [wc2a9], a
ld a, d
ld [wc2aa], a
- ld a, [wPartyMon1MenuIconAnim + 5]
+ ld a, [wPartyMonMenuIconAnims + 5]
inc a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ret
; 11628c
@@ -5774,15 +5774,15 @@
Function116294: ; 116294
callba Function170d02
- ld a, [wPartyMon1MenuIconAnim + 5]
+ ld a, [wPartyMonMenuIconAnims + 5]
inc a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld a, [rSVBK]
push af
ld a, $5
ld [rSVBK], a
ld hl, wd030
- ld de, wPartyMon1MenuIconAnim + 12
+ ld de, wPartyMonMenuIconAnims + 12
ld bc, $0010
call CopyBytes
ld hl, Palette_11734e
@@ -5799,9 +5799,9 @@
Function1162cb: ; 1162cb
callba Function170cc6
- ld a, [wPartyMon1MenuIconAnim + 5]
+ ld a, [wPartyMonMenuIconAnims + 5]
inc a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld a, [rSVBK]
push af
ld a, $5
@@ -5838,7 +5838,7 @@
ld c, a
ld a, [wc30f]
ld b, a
- ld a, [wPartyMon1MenuIconAnim + 4]
+ ld a, [wPartyMonMenuIconAnims + 4]
ld e, a
ld a, [hli]
sub e
@@ -5939,7 +5939,7 @@
xor a
ld [wc2aa], a
xor a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld [wc30d], a
ret
; 1163c0
@@ -5961,7 +5961,7 @@
push af
ld a, $5
ld [rSVBK], a
- ld hl, wPartyMon1MenuIconAnim + 12
+ ld hl, wPartyMonMenuIconAnims + 12
ld de, wd030
ld bc, $0010
call CopyBytes
@@ -5997,7 +5997,7 @@
.asm_116439
xor a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld [wc30d], a
ret
; 116441
@@ -6014,7 +6014,7 @@
xor a
ld [wc2aa], a
xor a
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld [wc30d], a
ret
; 116468
@@ -6021,7 +6021,7 @@
Function116468: ; 116468
call Function116567
- ld a, [wPartyMon1MenuIconAnim]
+ ld a, [wPartyMonMenuIconAnims]
cp $d
jr nz, .asm_1164a8
ld hl, wc30e
@@ -6213,7 +6213,7 @@
; 11659d
Function11659d: ; 11659d
- ld a, [wPartyMon1MenuIconAnim]
+ ld a, [wPartyMonMenuIconAnims]
cp $12
ret nc
ld e, a
@@ -6289,7 +6289,7 @@
call Function116780
ret c
ld a, $2
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
ret
; 116615
@@ -6332,17 +6332,17 @@
call Function116780
ret c
ld a, $7
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
ret
; 116655
Function116655: ; 116655
xor a
- ld [wPartyMon1MenuIconAnim + 3], a
+ ld [wPartyMonMenuIconAnims + 3], a
call Function11678e
Function11665c:
- ld hl, wPartyMon1MenuIconAnim + 3
+ ld hl, wPartyMonMenuIconAnims + 3
ld a, $1
xor [hl]
ld [hl], a
@@ -6349,7 +6349,7 @@
add $4
ld c, a
call Function11679c
- ld a, [wPartyMon1MenuIconAnim + 3]
+ ld a, [wPartyMonMenuIconAnims + 3]
and a
jr nz, .asm_116673
ld a, $48
@@ -6378,7 +6378,7 @@
call Function116780
ret c
ld a, $c
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
ret
; 11669f
@@ -6393,9 +6393,9 @@
ld [wc30f], a
ld [wc3f3], a
ld a, $ff
- ld [wPartyMon1MenuIconAnim + 2], a
+ ld [wPartyMonMenuIconAnims + 2], a
xor a
- ld [wPartyMon1MenuIconAnim + 3], a
+ ld [wPartyMonMenuIconAnims + 3], a
ld a, $0
ld c, a
call Function11679c
@@ -6417,7 +6417,7 @@
cp $48
jr nz, .asm_1166e4
xor a
- ld [wPartyMon1MenuIconAnim + 2], a
+ ld [wPartyMonMenuIconAnims + 2], a
.asm_1166e4
ld a, [wc311]
@@ -6424,9 +6424,9 @@
cp $ff
ret nz
ld a, $4
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
xor a
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
ret
; 1166f4
@@ -6433,9 +6433,9 @@
Function1166f4: ; 1166f4
ld [wc30e], a
ld a, b
- ld [wPartyMon1MenuIconAnim + 2], a
+ ld [wPartyMonMenuIconAnims + 2], a
xor a
- ld [wPartyMon1MenuIconAnim + 3], a
+ ld [wPartyMonMenuIconAnims + 3], a
ld hl, wc30f
.asm_116702
call Random
@@ -6460,9 +6460,9 @@
Function11671f: ; 11671f
ld [wc30f], a
ld a, b
- ld [wPartyMon1MenuIconAnim + 3], a
+ ld [wPartyMonMenuIconAnims + 3], a
xor a
- ld [wPartyMon1MenuIconAnim + 2], a
+ ld [wPartyMonMenuIconAnims + 2], a
ld hl, wc30e
.asm_11672d
call Random
@@ -6482,11 +6482,11 @@
Function116747: ; 116747
ld hl, wc30e
- ld a, [wPartyMon1MenuIconAnim + 2]
+ ld a, [wPartyMonMenuIconAnims + 2]
add [hl]
ld [hl], a
ld hl, wc30f
- ld a, [wPartyMon1MenuIconAnim + 3]
+ ld a, [wPartyMonMenuIconAnims + 3]
add [hl]
ld [hl], a
ret
@@ -6518,7 +6518,7 @@
ld a, $4
.asm_11677a
- ld [wPartyMon1MenuIconAnim + 4], a
+ ld [wPartyMonMenuIconAnims + 4], a
ret
; 11677e
@@ -6526,11 +6526,11 @@
ld a, $0
Function116780:
- ld hl, wPartyMon1MenuIconAnim + 1
+ ld hl, wPartyMonMenuIconAnims + 1
cp [hl]
jr z, .asm_11678c
ld a, [hl]
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
scf
ret
@@ -6540,15 +6540,15 @@
; 11678e
Function11678e: ; 11678e
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
ld a, [hl]
- ld [wPartyMon1MenuIconAnim + 1], a
+ ld [wPartyMonMenuIconAnims + 1], a
inc [hl]
ret
; 116797
Function116797: ; 116797
- ld hl, wPartyMon1MenuIconAnim
+ ld hl, wPartyMonMenuIconAnims
inc [hl]
ret
; 11679c
@@ -8938,7 +8938,7 @@
ld [wcd66], a
ld [wcd67], a
ld [wcd68], a
- ld [wPartyMon1MenuIconAnim + 6], a
+ ld [wPartyMonMenuIconAnims + 6], a
ld [wcd89], a
ld [wcd8a], a
ld [wcd8b], a
@@ -9527,7 +9527,7 @@
ld a, $a
call Function3e32
ld a, [wc3f0]
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld a, [wcd34]
ld [wcf66], a
ret
@@ -9571,13 +9571,13 @@
ld a, $a
call Function3e32
ld a, [wc3f0]
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld a, [wcd34]
ld [wcf66], a
ret
Function118821: ; 118821 (46:4821)
- ld a, [wPartyMon1MenuIconAnim + 5]
+ ld a, [wPartyMonMenuIconAnims + 5]
cp $3
jr c, .asm_11884a
cp $4
@@ -9590,7 +9590,7 @@
ld a, $a
ld [wc300], a
ld a, [wc3f0]
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld a, [wcd34]
ld [wcf66], a
scf
@@ -9669,7 +9669,7 @@
; 1188b0
Function1188b0: ; 1188b0 (46:48b0)
- ld de, wPartyMon4MenuIconAnim + 2
+ ld de, wPartyMonMenuIconAnims + 48 + 2
ld a, $c
jp Function119e2b
@@ -9701,7 +9701,7 @@
jp Function119e2b
Function1188e7: ; 1188e7 (46:48e7)
- ld de, wPartyMon4MenuIconAnim + 2
+ ld de, wPartyMonMenuIconAnims + 48 + 2
ld a, $5
call GetSRAMBank
ld a, [$aa4a]
@@ -9721,7 +9721,7 @@
Function118903: ; 118903 (46:4903)
ld a, [wc3f0]
- ld [wPartyMon1MenuIconAnim + 5], a
+ ld [wPartyMonMenuIconAnims + 5], a
ld c, $1
callba Function115e18
ld a, $8
@@ -9750,7 +9750,7 @@
call Function119e2e
Function118936:
- ld a, [wPartyMon1MenuIconAnim + 6]
+ ld a, [wPartyMonMenuIconAnims + 6]
and a
ret nz
ld hl, MenuDataHeader_119cf7
@@ -10032,7 +10032,7 @@
jp Function119e2b
Function118b24: ; 118b24 (46:4b24)
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, $8
ld [hli], a
ld a, $c7
@@ -10045,7 +10045,7 @@
call Function119ec2
ld a, $80
ld [wcd89], a
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ret
; 118b42 (46:4b42)
@@ -10380,22 +10380,22 @@
call Function118440
call SpeechTextBox
ld hl, $d80e
- ld de, wPartyMon1MenuIconAnim + 12
+ ld de, wPartyMonMenuIconAnims + 12
ld bc, $0026
call CopyBytes
xor a
- ld [wPartyMon1MenuIconAnim + 11], a
+ ld [wPartyMonMenuIconAnims + 11], a
ld a, $20
- ld [wPartyMon1MenuIconAnim + 7], a
+ ld [wPartyMonMenuIconAnims + 7], a
ld a, $c3
- ld [wPartyMon1MenuIconAnim + 8], a
+ ld [wPartyMonMenuIconAnims + 8], a
hlcoord 1, 14
ld a, l
- ld [wPartyMon1MenuIconAnim + 9], a
+ ld [wPartyMonMenuIconAnims + 9], a
ld a, h
- ld [wPartyMon1MenuIconAnim + 10], a
+ ld [wPartyMonMenuIconAnims + 10], a
ld a, $2
- ld [wPartyMon1MenuIconAnim + 6], a
+ ld [wPartyMonMenuIconAnims + 6], a
ld a, $1d
ld [wcd3c], a
ld a, $24
@@ -10468,7 +10468,7 @@
ld a, [wcc60]
and a
jr z, .asm_118fba
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, $c608 % $100
ld [hli], a
ld a, $c608 / $100
@@ -10489,7 +10489,7 @@
call Function119ec2
ld a, $40
ld [wcd89], a
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld de, $de00
ld bc, $0200
ld a, $2c
@@ -10549,7 +10549,7 @@
ld de, wcc60
call Function1191ad
ret c
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, $8
ld [hli], a
ld a, $c6
@@ -10570,7 +10570,7 @@
call Function119ec2
ld a, $40
ld [wcd89], a
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld de, Unkn1Pals
ld bc, $1000
ld a, $2c
@@ -11097,7 +11097,7 @@
ld a, $8
ld [wcd3c], a
call Function119ed8
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, wd000 % $100
ld [hli], a
ld a, wd000 / $100
@@ -11118,7 +11118,7 @@
call Function119ec2
ld a, $40
ld [wcd89], a
- ld hl, wPartyMon4MenuIconAnim + 2
+ ld hl, wPartyMonMenuIconAnims + 48 + 2
ld de, $de00
ld bc, $0200
ld a, $2c
@@ -11920,7 +11920,7 @@
call Function119e2e
Function1198f7:
- ld a, [wPartyMon1MenuIconAnim + 6]
+ ld a, [wPartyMonMenuIconAnims + 6]
and a
ret nz
ld hl, $c608 + 2
@@ -12466,7 +12466,7 @@
call Function119e2e
Function119cab:
- ld a, [wPartyMon1MenuIconAnim + 6]
+ ld a, [wPartyMonMenuIconAnims + 6]
and a
ret nz
ld a, $80
@@ -12503,7 +12503,7 @@
call Function119e2e
Function119cdf:
- ld a, [wPartyMon1MenuIconAnim + 6]
+ ld a, [wPartyMonMenuIconAnims + 6]
and a
ret nz
ld a, $f
@@ -12949,7 +12949,7 @@
ld a, $1
ld [wc30d], a
ld a, $1
- ld [wPartyMon1MenuIconAnim], a
+ ld [wPartyMonMenuIconAnims], a
callba Function104061
and a
ret
@@ -13131,7 +13131,7 @@
call Function11a63c
call Function11a1e6
hlcoord 4, 2
- ld de, wPartyMon4MenuIconAnim + 2
+ ld de, wPartyMonMenuIconAnims + 48 + 2
call PlaceString
call Function11a5f5
xor a
@@ -13185,7 +13185,7 @@
Function11a1e6: ; 11a1e6
ld hl, String_11a706
- ld de, wPartyMon4MenuIconAnim + 2
+ ld de, wPartyMonMenuIconAnims + 48 + 2
call Function11a1ff
ld hl, wcd85
call Function11a1ff
@@ -14011,7 +14011,7 @@
; 11a8fa
Function11a8fa: ; 11a8fa
- ld a, [wPartyMon1MenuIconAnim + 6]
+ ld a, [wPartyMonMenuIconAnims + 6]
ld e, a
ld d, 0
ld hl, Jumptable_11a909
@@ -14035,14 +14035,14 @@
ld [rSVBK], a
call SpeechTextBox
ld a, $50
- ld hl, wPartyMon1MenuIconAnim + 12
+ ld hl, wPartyMonMenuIconAnims + 12
ld bc, $008c
call ByteFill
- ld a, [wPartyMon1MenuIconAnim + 7]
+ ld a, [wPartyMonMenuIconAnims + 7]
ld l, a
- ld a, [wPartyMon1MenuIconAnim + 8]
+ ld a, [wPartyMonMenuIconAnims + 8]
ld h, a
- ld de, wPartyMon1MenuIconAnim + 12
+ ld de, wPartyMonMenuIconAnims + 12
.asm_11a92c
ld a, [hli]
cp $57
@@ -14073,17 +14073,17 @@
.asm_11a94f
xor a
- ld [wPartyMon1MenuIconAnim + 11], a
+ ld [wPartyMonMenuIconAnims + 11], a
ld a, $20
- ld [wPartyMon1MenuIconAnim + 7], a
+ ld [wPartyMonMenuIconAnims + 7], a
ld a, $c3
- ld [wPartyMon1MenuIconAnim + 8], a
+ ld [wPartyMonMenuIconAnims + 8], a
hlcoord 1, 14
ld a, l
- ld [wPartyMon1MenuIconAnim + 9], a
+ ld [wPartyMonMenuIconAnims + 9], a
ld a, h
- ld [wPartyMon1MenuIconAnim + 10], a
- ld hl, wPartyMon1MenuIconAnim + 6
+ ld [wPartyMonMenuIconAnims + 10], a
+ ld hl, wPartyMonMenuIconAnims + 6
inc [hl]
ld a, $3
ld [rSVBK], a
@@ -14093,7 +14093,7 @@
; 11a971
Function11a971: ; 11a971
- ld hl, wPartyMon1MenuIconAnim + 11
+ ld hl, wPartyMonMenuIconAnims + 11
ld a, [hJoyDown]
and a
jr nz, .asm_11a97f
@@ -14108,34 +14108,34 @@
and $7
ld [hl], a
ld hl, wcd8d
- ld a, [wPartyMon1MenuIconAnim + 7]
+ ld a, [wPartyMonMenuIconAnims + 7]
ld e, a
- ld a, [wPartyMon1MenuIconAnim + 8]
+ ld a, [wPartyMonMenuIconAnims + 8]
ld d, a
ld a, [de]
inc de
ld [hli], a
ld a, e
- ld [wPartyMon1MenuIconAnim + 7], a
+ ld [wPartyMonMenuIconAnims + 7], a
ld a, d
- ld [wPartyMon1MenuIconAnim + 8], a
+ ld [wPartyMonMenuIconAnims + 8], a
ld a, $50
ld [hl], a
- ld a, [wPartyMon1MenuIconAnim + 9]
+ ld a, [wPartyMonMenuIconAnims + 9]
ld l, a
- ld a, [wPartyMon1MenuIconAnim + 10]
+ ld a, [wPartyMonMenuIconAnims + 10]
ld h, a
ld de, wcd8d
call PlaceString
ld a, c
- ld [wPartyMon1MenuIconAnim + 9], a
+ ld [wPartyMonMenuIconAnims + 9], a
ld a, b
- ld [wPartyMon1MenuIconAnim + 10], a
+ ld [wPartyMonMenuIconAnims + 10], a
ld a, [wcd8d]
cp $50
jr nz, .asm_11a9bf
xor a
- ld [wPartyMon1MenuIconAnim + 6], a
+ ld [wPartyMonMenuIconAnims + 6], a
.asm_11a9bf
ret
@@ -14143,11 +14143,11 @@
Function11a9c0: ; 11a9c0
ld a, l
- ld [wPartyMon1MenuIconAnim + 7], a
+ ld [wPartyMonMenuIconAnims + 7], a
ld a, h
- ld [wPartyMon1MenuIconAnim + 8], a
+ ld [wPartyMonMenuIconAnims + 8], a
ld a, $1
- ld [wPartyMon1MenuIconAnim + 6], a
+ ld [wPartyMonMenuIconAnims + 6], a
ret
; 11a9ce
--- a/trainers/attributes.asm
+++ b/trainers/attributes.asm
@@ -1,20 +1,22 @@
-NO_AI EQU 0
-AI_BASIC EQU 1 << 0
-AI_SETUP EQU 1 << 1
-AI_TYPES EQU 1 << 2
-AI_OFFENSIVE EQU 1 << 3
-AI_SMART EQU 1 << 4
-AI_OPPORTUNIST EQU 1 << 5
-AI_AGGRESSIVE EQU 1 << 6
-AI_CAUTIOUS EQU 1 << 7
-AI_STATUS EQU 1 << 8
-AI_RISKY EQU 1 << 9
-AI_10 EQU 1 << 10
-AI_11 EQU 1 << 11
-AI_12 EQU 1 << 12
-AI_13 EQU 1 << 13
-AI_14 EQU 1 << 14
-AI_15 EQU 1 << 15
+ const_def
+ const NO_AI
+const_value = 0
+ shift_const AI_BASIC
+ shift_const AI_SETUP
+ shift_const AI_TYPES
+ shift_const AI_OFFENSIVE
+ shift_const AI_SMART
+ shift_const AI_OPPORTUNIST
+ shift_const AI_AGGRESSIVE
+ shift_const AI_CAUTIOUS
+ shift_const AI_STATUS
+ shift_const AI_RISKY
+ shift_const AI_10
+ shift_const AI_11
+ shift_const AI_12
+ shift_const AI_13
+ shift_const AI_14
+ shift_const AI_15
TrainerClassAttributes: ; 3959c
--- a/wram.asm
+++ b/wram.asm
@@ -356,12 +356,7 @@
wc311:: ds 1
wc312:: ds 1
wc313:: ds 1
-wPartyMon1MenuIconAnim:: ds 16 ; c314
-wPartyMon2MenuIconAnim:: ds 16 ; c324
-wPartyMon3MenuIconAnim:: ds 16 ; c334
-wPartyMon4MenuIconAnim:: ds 16 ; c344
-wPartyMon5MenuIconAnim:: ds 16 ; c354
-wPartyMon6MenuIconAnim:: ds 16 ; c364
+wPartyMonMenuIconAnims:: ds 96 ; c314
wc374:: ds 48 ; c374
wc3a4:: ds 8 ; c3b4
wc3ac:: ds 8 ; c3bc
@@ -2280,7 +2275,7 @@
wCurrentMapTriggerPointer:: ; dbf7
ds 2
-wdbf9:: ds 2
+wCurrentCaller:: ds 2
wdbfb:: ds 1
wdbfc:: ds 1
wdbfd:: ds 1
@@ -2353,10 +2348,10 @@
wdc42:: ds 8
wdc4a:: ds 1
wdc4b:: ds 1
-wdc4c:: ds 4
-wdc50:: ds 4
-wdc54:: ds 4
-wdc58:: ds 2
+wDailyRematchFlags:: ds 4
+wDailyPhoneItemFlags:: ds 4
+wDailyPhoneTimeOfDayFlags:: ds 4
+wdc58:: ds 2
wdc5a:: ds 1
wdc5b:: ds 1
wdc5c:: ds 3
@@ -2592,7 +2587,14 @@
ds SCREEN_HEIGHT_PX
LYOverridesEnd::
- ds $100 - SCREEN_HEIGHT_PX
+ ds 1
+w5_d191:: ds 1
+w5_d192:: ds 1
+w5_d193:: ds 1
+w5_d194:: ds 1
+w5_d195:: ds 1
+
+ds 106
LYOverridesBackup:: ; d200
ds SCREEN_HEIGHT_PX