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.
This commit is contained in:
PikalaxALT 2015-07-25 14:25:37 -04:00
parent 432df825d4
commit 6c3000efd2
26 changed files with 760 additions and 729 deletions

View File

@ -2365,7 +2365,7 @@ Function3cf14: ; 3cf14
ld de, SFX_KINESIS ld de, SFX_KINESIS
call PlaySFX call PlaySFX
call Function3d432 call Function3d432
ld de, SFX_UNKNOWN_2A ld de, SFX_FAINT
call PlaySFX call PlaySFX
hlcoord 1, 0 hlcoord 1, 0
lb bc, 4, 10 lb bc, 4, 10
@ -4388,7 +4388,7 @@ Function3dc5b: ; 3dc5b
ld de, SFX_KINESIS ld de, SFX_KINESIS
call PlaySFX call PlaySFX
call WaitSFX call WaitSFX
ld de, SFX_UNKNOWN_2A ld de, SFX_FAINT
call PlaySFX call PlaySFX
call WaitSFX call WaitSFX
call Function3d432 call Function3d432

View File

@ -162,3 +162,4 @@
const ENGINE_KRIS_IN_CABLE_CLUB const ENGINE_KRIS_IN_CABLE_CLUB
const ENGINE_DUNSPARCE_SWARM ; a0 const ENGINE_DUNSPARCE_SWARM ; a0
const ENGINE_YANMA_SWARM const ENGINE_YANMA_SWARM
NUM_ENGINE_FLAGS EQU const_value

View File

@ -42,7 +42,7 @@
const SFX_ELEVATOR_END const SFX_ELEVATOR_END
const SFX_THROW_BALL const SFX_THROW_BALL
const SFX_BALL_POOF const SFX_BALL_POOF
const SFX_UNKNOWN_2A const SFX_FAINT
const SFX_RUN const SFX_RUN
const SFX_SLOT_MACHINE_START const SFX_SLOT_MACHINE_START
const SFX_FANFARE const SFX_FANFARE

View File

@ -1,4 +1,4 @@
UnknownScript_0xa0b14: BuenaPhoneScript1:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73 iftrue UnknownScript_0xa0b73
checkcode VAR_HOUR checkcode VAR_HOUR
@ -6,7 +6,7 @@ UnknownScript_0xa0b14:
scall UnknownScript_0xa0b32 scall UnknownScript_0xa0b32
jump UnknownScript_0xa0c0e jump UnknownScript_0xa0c0e
UnknownScript_0xa0b26: BuenaPhoneScript2:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73 iftrue UnknownScript_0xa0b73
scall UnknownScript_0xa0b4f scall UnknownScript_0xa0b4f

View File

@ -115,8 +115,8 @@
dwb WeeklyFlags, %00001000 ; goldenrod mall happiness event floor05 person07 dwb WeeklyFlags, %00001000 ; goldenrod mall happiness event floor05 person07
dwb WeeklyFlags, %00010000 ; tea in blues house dwb WeeklyFlags, %00010000 ; tea in blues house
dwb WeeklyFlags, %00100000 ; indigo plateau rival fight dwb WeeklyFlags, %00100000 ; indigo plateau rival fight
dwb WeeklyFlags, %01000000 dwb WeeklyFlags, %01000000 ; move tutor
dwb WeeklyFlags, %10000000 dwb WeeklyFlags, %10000000 ; buenas password
dwb SwarmFlags, %00000001 ; $60 dwb SwarmFlags, %00000001 ; $60
dwb SwarmFlags, %00000010 ; goldenrod dept store sale is on dwb SwarmFlags, %00000010 ; goldenrod dept store sale is on
@ -128,69 +128,69 @@
dwb wdbf3, %00000100 ; have gs ball after kurt examined it dwb wdbf3, %00000100 ; have gs ball after kurt examined it
; rematches ; rematches
dwb wdc4c, %00000001 ; jack dwb wDailyRematchFlags, %00000001 ; jack
dwb wdc4c, %00000010 ; huey dwb wDailyRematchFlags, %00000010 ; huey
dwb wdc4c, %00000100 ; gaven dwb wDailyRematchFlags, %00000100 ; gaven
dwb wdc4c, %00001000 ; beth ; $68 dwb wDailyRematchFlags, %00001000 ; beth ; $68
dwb wdc4c, %00010000 ; jose dwb wDailyRematchFlags, %00010000 ; jose
dwb wdc4c, %00100000 ; reena dwb wDailyRematchFlags, %00100000 ; reena
dwb wdc4c, %01000000 ; joey dwb wDailyRematchFlags, %01000000 ; joey
dwb wdc4c, %10000000 ; wade dwb wDailyRematchFlags, %10000000 ; wade
dwb wdc4c + 1, %00000001 ; ralph dwb wDailyRematchFlags + 1, %00000001 ; ralph
dwb wdc4c + 1, %00000010 ; liz dwb wDailyRematchFlags + 1, %00000010 ; liz
dwb wdc4c + 1, %00000100 ; anthony dwb wDailyRematchFlags + 1, %00000100 ; anthony
dwb wdc4c + 1, %00001000 ; todd ; $70 dwb wDailyRematchFlags + 1, %00001000 ; todd ; $70
dwb wdc4c + 1, %00010000 ; gina dwb wDailyRematchFlags + 1, %00010000 ; gina
dwb wdc4c + 1, %00100000 ; arnie dwb wDailyRematchFlags + 1, %00100000 ; arnie
dwb wdc4c + 1, %01000000 ; alan dwb wDailyRematchFlags + 1, %01000000 ; alan
dwb wdc4c + 1, %10000000 ; dana dwb wDailyRematchFlags + 1, %10000000 ; dana
dwb wdc4c + 2, %00000001 ; chad dwb wDailyRematchFlags + 2, %00000001 ; chad
dwb wdc4c + 2, %00000010 ; tully dwb wDailyRematchFlags + 2, %00000010 ; tully
dwb wdc4c + 2, %00000100 ; brent dwb wDailyRematchFlags + 2, %00000100 ; brent
dwb wdc4c + 2, %00001000 ; tiffany ; $78 dwb wDailyRematchFlags + 2, %00001000 ; tiffany ; $78
dwb wdc4c + 2, %00010000 ; vance dwb wDailyRematchFlags + 2, %00010000 ; vance
dwb wdc4c + 2, %00100000 ; wilton dwb wDailyRematchFlags + 2, %00100000 ; wilton
dwb wdc4c + 2, %01000000 ; parry dwb wDailyRematchFlags + 2, %01000000 ; parry
dwb wdc4c + 2, %10000000 ; erin dwb wDailyRematchFlags + 2, %10000000 ; erin
dwb wdc50, %00000001 ; beverly has nugget dwb wDailyPhoneItemFlags, %00000001 ; beverly has nugget
dwb wdc50, %00000010 ; jose has star piece dwb wDailyPhoneItemFlags, %00000010 ; jose has star piece
dwb wdc50, %00000100 ; wade has item (see bittable1 $032b-e) dwb wDailyPhoneItemFlags, %00000100 ; wade has item (see bittable1 $032b-e)
dwb wdc50, %00001000 ; gina has leaf stone ; $80 dwb wDailyPhoneItemFlags, %00001000 ; gina has leaf stone ; $80
dwb wdc50, %00010000 ; alan has fire stone dwb wDailyPhoneItemFlags, %00010000 ; alan has fire stone
dwb wdc50, %00100000 ; liz has thunderstone dwb wDailyPhoneItemFlags, %00100000 ; liz has thunderstone
dwb wdc50, %01000000 ; derek has nugget dwb wDailyPhoneItemFlags, %01000000 ; derek has nugget
dwb wdc50, %10000000 ; tully has water stone dwb wDailyPhoneItemFlags, %10000000 ; tully has water stone
dwb wdc50 + 1, %00000001 ; tiffany has pink bow dwb wDailyPhoneItemFlags + 1, %00000001 ; tiffany has pink bow
dwb wdc50 + 1, %00000010 ; wilton has item (see bittable1 $032f-31) dwb wDailyPhoneItemFlags + 1, %00000010 ; wilton has item (see bittable1 $032f-31)
dwb wdc54, %00000001 dwb wDailyPhoneTimeOfDayFlags, %00000001
dwb wdc54, %00000010 ; $88 dwb wDailyPhoneTimeOfDayFlags, %00000010 ; $88
dwb wdc54, %00000100 dwb wDailyPhoneTimeOfDayFlags, %00000100
dwb wdc54, %00001000 dwb wDailyPhoneTimeOfDayFlags, %00001000
dwb wdc54, %00010000 dwb wDailyPhoneTimeOfDayFlags, %00010000
dwb wdc54, %00100000 dwb wDailyPhoneTimeOfDayFlags, %00100000
dwb wdc54, %01000000 dwb wDailyPhoneTimeOfDayFlags, %01000000
dwb wdc54, %10000000 dwb wDailyPhoneTimeOfDayFlags, %10000000
dwb wdc54 + 1, %00000001 dwb wDailyPhoneTimeOfDayFlags + 1, %00000001
dwb wdc54 + 1, %00000010 ; $90 dwb wDailyPhoneTimeOfDayFlags + 1, %00000010 ; $90
dwb wdc54 + 1, %00000100 dwb wDailyPhoneTimeOfDayFlags + 1, %00000100
dwb wdc54 + 1, %00001000 dwb wDailyPhoneTimeOfDayFlags + 1, %00001000
dwb wdc54 + 1, %00010000 dwb wDailyPhoneTimeOfDayFlags + 1, %00010000
dwb wdc54 + 1, %00100000 dwb wDailyPhoneTimeOfDayFlags + 1, %00100000
dwb wdc54 + 1, %01000000 dwb wDailyPhoneTimeOfDayFlags + 1, %01000000
dwb wdc54 + 1, %10000000 dwb wDailyPhoneTimeOfDayFlags + 1, %10000000
dwb wdc54 + 2, %00000001 dwb wDailyPhoneTimeOfDayFlags + 2, %00000001
dwb wdc54 + 2, %00000010 ; $98 dwb wDailyPhoneTimeOfDayFlags + 2, %00000010 ; $98
dwb wdc54 + 2, %00000100 dwb wDailyPhoneTimeOfDayFlags + 2, %00000100
dwb wdc54 + 2, %00001000 dwb wDailyPhoneTimeOfDayFlags + 2, %00001000
dwb wdc54 + 2, %00010000 dwb wDailyPhoneTimeOfDayFlags + 2, %00010000
dwb wdc54 + 2, %00100000 dwb wDailyPhoneTimeOfDayFlags + 2, %00100000
dwb wdc54 + 2, %01000000 dwb wDailyPhoneTimeOfDayFlags + 2, %01000000
dwb wdc54 + 2, %10000000 dwb wDailyPhoneTimeOfDayFlags + 2, %10000000
dwb wd45b, %00000100 ; female player has been transformed into male dwb wd45b, %00000100 ; female player has been transformed into male

View File

@ -333,7 +333,7 @@ MapSetupCommands: ; 15440
dbw BANK(DelayClearingOldSprites), DelayClearingOldSprites ; 24 dbw BANK(DelayClearingOldSprites), DelayClearingOldSprites ; 24
dbw BANK(DelayLoadingNewSprites), DelayLoadingNewSprites ; 25 dbw BANK(DelayLoadingNewSprites), DelayLoadingNewSprites ; 25
dbw BANK(UpdateRoamMons), UpdateRoamMons ; 26 dbw BANK(UpdateRoamMons), UpdateRoamMons ; 26
dbw BANK(RestoreRoamMons), RestoreRoamMons ; 27 dbw BANK(JumpRoamMons), JumpRoamMons ; 27
dbw BANK(FadeOldMapMusic), FadeOldMapMusic ; 28 dbw BANK(FadeOldMapMusic), FadeOldMapMusic ; 28
dbw BANK(ActivateMapAnims), ActivateMapAnims ; 29 dbw BANK(ActivateMapAnims), ActivateMapAnims ; 29
dbw BANK(SuspendMapAnims), SuspendMapAnims ; 2a dbw BANK(SuspendMapAnims), SuspendMapAnims ; 2a

View File

@ -87,5 +87,5 @@ ENDM
trigger_def MOUNT_MOON_SQUARE, wMountMoonSquareTrigger trigger_def MOUNT_MOON_SQUARE, wMountMoonSquareTrigger
trigger_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileTrigger trigger_def MOBILE_TRADE_ROOM_MOBILE, wMobileTradeRoomMobileTrigger
trigger_def MOBILE_BATTLE_ROOM, wMobileBattleRoomTrigger trigger_def MOBILE_BATTLE_ROOM, wMobileBattleRoomTrigger
db $ff db -1
; 4d15b ; 4d15b

View File

@ -27,7 +27,7 @@ UnknownScript_0xa0036:
farjump UnknownScript_0xa0055 farjump UnknownScript_0xa0055
UnknownScript_0xa003e: UnknownScript_0xa003e:
special Function2a51f special RandomPhoneWildMon
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xa0051 if_equal $0, UnknownScript_0xa0051
farscall UnknownScript_0xa017a farscall UnknownScript_0xa017a
@ -37,7 +37,7 @@ UnknownScript_0xa0051:
farjump UnknownScript_0xa006c farjump UnknownScript_0xa006c
UnknownScript_0xa0055: UnknownScript_0xa0055:
special Function2a51f special RandomPhoneWildMon
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
if_equal $0, UnknownScript_0xa0068 if_equal $0, UnknownScript_0xa0068
farscall UnknownScript_0xa0226 farscall UnknownScript_0xa0226
@ -851,7 +851,7 @@ UnknownScript_0xa059c:
farjump UnknownScript_0xa053a farjump UnknownScript_0xa053a
UnknownScript_0xa05a0: UnknownScript_0xa05a0:
special Function2a4ab special RandomPhoneRareWildMon
end end
UnknownScript_0xa05a4: UnknownScript_0xa05a4:
@ -1653,7 +1653,7 @@ UnknownScript_0xa0b04:
farwritetext UnknownText_0x17717c farwritetext UnknownText_0x17717c
end end
UnknownScript_0xa0b09: BikeShopPhoneScript:
farwritetext UnknownText_0x174000 farwritetext UnknownText_0x174000
clearflag ENGINE_BIKE_SHOP_CALL_ENABLED clearflag ENGINE_BIKE_SHOP_CALL_ENABLED
specialphonecall ELMCALL_NONE specialphonecall ELMCALL_NONE

View File

@ -298,7 +298,7 @@ ElmPhoneScript2: ; 0xbd081
; Jack ; Jack
UnknownScript_0xbd0d0: JackPhoneScript1:
trainertotext SCHOOLBOY, JACK1, $0 trainertotext SCHOOLBOY, JACK1, $0
checkflag ENGINE_JACK checkflag ENGINE_JACK
iftrue UnknownScript_0xbd0f3 iftrue UnknownScript_0xbd0f3
@ -317,7 +317,7 @@ UnknownScript_0xbd0f3:
displaylocation NATIONAL_PARK, $2 displaylocation NATIONAL_PARK, $2
farjump UnknownScript_0xa0a2d farjump UnknownScript_0xa0a2d
UnknownScript_0xbd0fa: JackPhoneScript2:
trainertotext SCHOOLBOY, JACK1, $0 trainertotext SCHOOLBOY, JACK1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
@ -350,7 +350,7 @@ UnknownScript_0xbd13b:
; Beverly ; Beverly
UnknownScript_0xbd13f: BeverlyPhoneScript1:
trainertotext POKEFANF, BEVERLY1, $0 trainertotext POKEFANF, BEVERLY1, $0
farscall UnknownScript_0xbe0b6 farscall UnknownScript_0xbe0b6
checkflag ENGINE_BEVERLY_HAS_NUGGET checkflag ENGINE_BEVERLY_HAS_NUGGET
@ -361,7 +361,7 @@ UnknownScript_0xbd151:
displaylocation NATIONAL_PARK, $2 displaylocation NATIONAL_PARK, $2
farjump UnknownScript_0xa0aa5 farjump UnknownScript_0xa0aa5
UnknownScript_0xbd158: BeverlyPhoneScript2:
trainertotext POKEFANF, BEVERLY1, $0 trainertotext POKEFANF, BEVERLY1, $0
farscall UnknownScript_0xbe41e farscall UnknownScript_0xbe41e
checkflag ENGINE_BEVERLY_HAS_NUGGET checkflag ENGINE_BEVERLY_HAS_NUGGET
@ -379,7 +379,7 @@ UnknownScript_0xbd172:
; Huey ; Huey
UnknownScript_0xbd17c: HueyPhoneScript1:
trainertotext SAILOR, HUEY1, $0 trainertotext SAILOR, HUEY1, $0
checkflag ENGINE_HUEY checkflag ENGINE_HUEY
iftrue UnknownScript_0xbd1a2 iftrue UnknownScript_0xbd1a2
@ -399,7 +399,7 @@ UnknownScript_0xbd1a2:
displaylocation LIGHTHOUSE, $2 displaylocation LIGHTHOUSE, $2
farjump UnknownScript_0xa0a32 farjump UnknownScript_0xa0a32
UnknownScript_0xbd1a9: HueyPhoneScript2:
trainertotext SAILOR, HUEY1, $0 trainertotext SAILOR, HUEY1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_HUEY checkflag ENGINE_HUEY
@ -423,7 +423,7 @@ UnknownScript_0xbd1d0:
; Gaven ; Gaven
UnknownScript_0xbd1da: GavenPhoneScript1:
trainertotext COOLTRAINERM, GAVEN3, $0 trainertotext COOLTRAINERM, GAVEN3, $0
checkflag ENGINE_GAVEN checkflag ENGINE_GAVEN
iftrue UnknownScript_0xbd1fd iftrue UnknownScript_0xbd1fd
@ -442,7 +442,7 @@ UnknownScript_0xbd1fd:
displaylocation ROUTE_26, $2 displaylocation ROUTE_26, $2
farjump UnknownScript_0xa0a37 farjump UnknownScript_0xa0a37
UnknownScript_0xbd204: GavenPhoneScript2:
trainertotext COOLTRAINERM, GAVEN3, $0 trainertotext COOLTRAINERM, GAVEN3, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_GAVEN checkflag ENGINE_GAVEN
@ -470,7 +470,7 @@ UnknownScript_0xbd239:
; Beth ; Beth
UnknownScript_0xbd23d: BethPhoneScript1:
trainertotext COOLTRAINERF, BETH1, $0 trainertotext COOLTRAINERF, BETH1, $0
checkflag ENGINE_BETH checkflag ENGINE_BETH
iftrue UnknownScript_0xbd260 iftrue UnknownScript_0xbd260
@ -489,7 +489,7 @@ UnknownScript_0xbd260:
displaylocation ROUTE_26, $2 displaylocation ROUTE_26, $2
farjump UnknownScript_0xa0a3c farjump UnknownScript_0xa0a3c
UnknownScript_0xbd267: BethPhoneScript2:
trainertotext COOLTRAINERF, BETH1, $0 trainertotext COOLTRAINERF, BETH1, $0
farscall UnknownScript_0xbe41e farscall UnknownScript_0xbe41e
checkflag ENGINE_BETH checkflag ENGINE_BETH
@ -512,7 +512,7 @@ UnknownScript_0xbd28a:
; Jose ; Jose
UnknownScript_0xbd294: JosePhoneScript1:
trainertotext BIRD_KEEPER, JOSE2, $0 trainertotext BIRD_KEEPER, JOSE2, $0
checkflag ENGINE_JOSE checkflag ENGINE_JOSE
iftrue UnknownScript_0xbd2bd iftrue UnknownScript_0xbd2bd
@ -537,7 +537,7 @@ UnknownScript_0xbd2c4:
displaylocation ROUTE_27, $2 displaylocation ROUTE_27, $2
farjump UnknownScript_0xa0a41 farjump UnknownScript_0xa0a41
UnknownScript_0xbd2cb: JosePhoneScript2:
trainertotext BIRD_KEEPER, JOSE2, $0 trainertotext BIRD_KEEPER, JOSE2, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_JOSE checkflag ENGINE_JOSE
@ -574,7 +574,7 @@ UnknownScript_0xbd312:
; Reena ; Reena
UnknownScript_0xbd31c: ReenaPhoneScript1:
trainertotext COOLTRAINERF, REENA1, $0 trainertotext COOLTRAINERF, REENA1, $0
checkflag ENGINE_REENA checkflag ENGINE_REENA
iftrue UnknownScript_0xbd33f iftrue UnknownScript_0xbd33f
@ -593,7 +593,7 @@ UnknownScript_0xbd33f:
displaylocation ROUTE_27, $2 displaylocation ROUTE_27, $2
farjump UnknownScript_0xa0a46 farjump UnknownScript_0xa0a46
UnknownScript_0xbd346: ReenaPhoneScript2:
trainertotext COOLTRAINERF, REENA1, $0 trainertotext COOLTRAINERF, REENA1, $0
farscall UnknownScript_0xbe41e farscall UnknownScript_0xbe41e
checkflag ENGINE_REENA checkflag ENGINE_REENA
@ -616,7 +616,7 @@ UnknownScript_0xbd369:
; Joey ; Joey
UnknownScript_0xbd373: JoeyPhoneScript1:
trainertotext YOUNGSTER, JOEY1, $0 trainertotext YOUNGSTER, JOEY1, $0
checkflag ENGINE_JOEY checkflag ENGINE_JOEY
iftrue UnknownScript_0xbd399 iftrue UnknownScript_0xbd399
@ -636,7 +636,7 @@ UnknownScript_0xbd399:
displaylocation ROUTE_30, $2 displaylocation ROUTE_30, $2
farjump UnknownScript_0xa0a4b farjump UnknownScript_0xa0a4b
UnknownScript_0xbd3a0: JoeyPhoneScript2:
trainertotext YOUNGSTER, JOEY1, $0 trainertotext YOUNGSTER, JOEY1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_JOEY checkflag ENGINE_JOEY
@ -660,7 +660,7 @@ UnknownScript_0xbd3c7:
; Wade ; Wade
UnknownScript_0xbd3d1: WadePhoneScript1:
trainertotext BUG_CATCHER, WADE1, $0 trainertotext BUG_CATCHER, WADE1, $0
checkflag ENGINE_WADE checkflag ENGINE_WADE
iftrue UnknownScript_0xbd41a iftrue UnknownScript_0xbd41a
@ -698,7 +698,7 @@ UnknownScript_0xbd421:
displaylocation ROUTE_31, $2 displaylocation ROUTE_31, $2
farjump UnknownScript_0xa0ab5 farjump UnknownScript_0xa0ab5
UnknownScript_0xbd428: WadePhoneScript2:
trainertotext BUG_CATCHER, WADE1, $0 trainertotext BUG_CATCHER, WADE1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
@ -776,7 +776,7 @@ UnknownScript_0xbd4ce:
; Ralph ; Ralph
UnknownScript_0xbd4d2: RalphPhoneScript1:
trainertotext FISHER, RALPH1, $0 trainertotext FISHER, RALPH1, $0
checkflag ENGINE_RALPH checkflag ENGINE_RALPH
iftrue UnknownScript_0xbd4fb iftrue UnknownScript_0xbd4fb
@ -801,7 +801,7 @@ UnknownScript_0xbd502:
displaylocation ROUTE_32, $2 displaylocation ROUTE_32, $2
farjump UnknownScript_0xa0af5 farjump UnknownScript_0xa0af5
UnknownScript_0xbd509: RalphPhoneScript2:
trainertotext FISHER, RALPH1, $0 trainertotext FISHER, RALPH1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_FLYPOINT_GOLDENROD checkflag ENGINE_FLYPOINT_GOLDENROD
@ -841,7 +841,7 @@ UnknownScript_0xbd55c:
; Liz ; Liz
UnknownScript_0xbd560: LizPhoneScript1:
trainertotext PICNICKER, LIZ1, $0 trainertotext PICNICKER, LIZ1, $0
checkflag ENGINE_LIZ checkflag ENGINE_LIZ
iftrue UnknownScript_0xbd586 iftrue UnknownScript_0xbd586
@ -861,7 +861,7 @@ UnknownScript_0xbd586:
displaylocation ROUTE_32, $2 displaylocation ROUTE_32, $2
farjump UnknownScript_0xa0a5a farjump UnknownScript_0xa0a5a
UnknownScript_0xbd58d: LizPhoneScript2:
trainertotext PICNICKER, LIZ1, $0 trainertotext PICNICKER, LIZ1, $0
farscall UnknownScript_0xbde45 farscall UnknownScript_0xbde45
if_equal $0, UnknownScript_0xbd5d0 if_equal $0, UnknownScript_0xbd5d0
@ -946,7 +946,7 @@ UnknownScript_0xbd630:
; Anthony ; Anthony
UnknownScript_0xbd634: AnthonyPhoneScript1:
trainertotext HIKER, ANTHONY2, $0 trainertotext HIKER, ANTHONY2, $0
checkflag ENGINE_ANTHONY checkflag ENGINE_ANTHONY
iftrue UnknownScript_0xbd65d iftrue UnknownScript_0xbd65d
@ -971,7 +971,7 @@ UnknownScript_0xbd664:
displaylocation ROUTE_33, $2 displaylocation ROUTE_33, $2
farjump UnknownScript_0xa0afa farjump UnknownScript_0xa0afa
UnknownScript_0xbd66b: AnthonyPhoneScript2:
trainertotext HIKER, ANTHONY2, $0 trainertotext HIKER, ANTHONY2, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_FLYPOINT_GOLDENROD checkflag ENGINE_FLYPOINT_GOLDENROD
@ -1010,7 +1010,7 @@ UnknownScript_0xbd6bd:
; Todd ; Todd
UnknownScript_0xbd6c1: ToddPhoneScript1:
trainertotext CAMPER, TODD1, $0 trainertotext CAMPER, TODD1, $0
checkflag ENGINE_TODD checkflag ENGINE_TODD
iftrue UnknownScript_0xbd6ea iftrue UnknownScript_0xbd6ea
@ -1034,7 +1034,7 @@ UnknownScript_0xbd6ea:
UnknownScript_0xbd6f1: UnknownScript_0xbd6f1:
farjump UnknownScript_0xa0b04 farjump UnknownScript_0xa0b04
UnknownScript_0xbd6f5: ToddPhoneScript2:
trainertotext CAMPER, TODD1, $0 trainertotext CAMPER, TODD1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_TODD checkflag ENGINE_TODD
@ -1072,7 +1072,7 @@ UnknownScript_0xbd73c:
; Gina ; Gina
UnknownScript_0xbd743: GinaPhoneScript1:
trainertotext PICNICKER, GINA1, $0 trainertotext PICNICKER, GINA1, $0
checkflag ENGINE_GINA checkflag ENGINE_GINA
iftrue UnknownScript_0xbd776 iftrue UnknownScript_0xbd776
@ -1102,7 +1102,7 @@ UnknownScript_0xbd77d:
displaylocation ROUTE_34, $2 displaylocation ROUTE_34, $2
farjump UnknownScript_0xa0abd farjump UnknownScript_0xa0abd
UnknownScript_0xbd784: GinaPhoneScript2:
trainertotext PICNICKER, GINA1, $0 trainertotext PICNICKER, GINA1, $0
farscall UnknownScript_0xbe41e farscall UnknownScript_0xbe41e
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
@ -1147,7 +1147,7 @@ UnknownScript_0xbd7dd:
; Irwin ; Irwin
UnknownScript_0xbd7e7: IrwinPhoneScript1:
trainertotext JUGGLER, IRWIN1, $0 trainertotext JUGGLER, IRWIN1, $0
farscall UnknownScript_0xbde4e farscall UnknownScript_0xbde4e
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
@ -1157,7 +1157,7 @@ UnknownScript_0xbd7e7:
UnknownScript_0xbd7f9: UnknownScript_0xbd7f9:
farjump UnknownScript_0xa05be farjump UnknownScript_0xa05be
UnknownScript_0xbd7fd: IrwinPhoneScript2:
trainertotext JUGGLER, IRWIN1, $0 trainertotext JUGGLER, IRWIN1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
@ -1169,7 +1169,7 @@ UnknownScript_0xbd80f:
; Arnie ; Arnie
UnknownScript_0xbd813: ArniePhoneScript1:
trainertotext BUG_CATCHER, ARNIE1, $0 trainertotext BUG_CATCHER, ARNIE1, $0
checkflag ENGINE_ARNIE checkflag ENGINE_ARNIE
iftrue UnknownScript_0xbd83c iftrue UnknownScript_0xbd83c
@ -1194,7 +1194,7 @@ UnknownScript_0xbd843:
displaylocation ROUTE_35, $2 displaylocation ROUTE_35, $2
farjump UnknownScript_0xa0aff farjump UnknownScript_0xa0aff
UnknownScript_0xbd84a: ArniePhoneScript2:
trainertotext BUG_CATCHER, ARNIE1, $0 trainertotext BUG_CATCHER, ARNIE1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_ARNIE checkflag ENGINE_ARNIE
@ -1236,7 +1236,7 @@ UnknownScript_0xbd8a2:
; Alan ; Alan
UnknownScript_0xbd8a6: AlanPhoneScript1:
trainertotext SCHOOLBOY, ALAN1, $0 trainertotext SCHOOLBOY, ALAN1, $0
checkflag ENGINE_ALAN checkflag ENGINE_ALAN
iftrue UnknownScript_0xbd8cf iftrue UnknownScript_0xbd8cf
@ -1261,7 +1261,7 @@ UnknownScript_0xbd8d6:
displaylocation ROUTE_36, $2 displaylocation ROUTE_36, $2
farjump UnknownScript_0xa0ac5 farjump UnknownScript_0xa0ac5
UnknownScript_0xbd8dd: AlanPhoneScript2:
trainertotext SCHOOLBOY, ALAN1, $0 trainertotext SCHOOLBOY, ALAN1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_ALAN checkflag ENGINE_ALAN
@ -1299,7 +1299,7 @@ UnknownScript_0xbd926:
; Dana ; Dana
UnknownScript_0xbd930: DanaPhoneScript1:
trainertotext LASS, DANA1, $0 trainertotext LASS, DANA1, $0
checkflag ENGINE_DANA checkflag ENGINE_DANA
iftrue UnknownScript_0xbd959 iftrue UnknownScript_0xbd959
@ -1324,7 +1324,7 @@ UnknownScript_0xbd960:
displaylocation ROUTE_38, $2 displaylocation ROUTE_38, $2
farjump UnknownScript_0xa0acd farjump UnknownScript_0xa0acd
UnknownScript_0xbd967: DanaPhoneScript2:
trainertotext LASS, DANA1, $0 trainertotext LASS, DANA1, $0
farscall UnknownScript_0xbe41e farscall UnknownScript_0xbe41e
checkflag ENGINE_DANA checkflag ENGINE_DANA
@ -1367,7 +1367,7 @@ UnknownScript_0xbd9bc:
; Chad ; Chad
UnknownScript_0xbd9c6: ChadPhoneScript1:
trainertotext SCHOOLBOY, CHAD1, $0 trainertotext SCHOOLBOY, CHAD1, $0
checkflag ENGINE_CHAD checkflag ENGINE_CHAD
iftrue UnknownScript_0xbd9e9 iftrue UnknownScript_0xbd9e9
@ -1386,7 +1386,7 @@ UnknownScript_0xbd9e9:
displaylocation ROUTE_38, $2 displaylocation ROUTE_38, $2
farjump UnknownScript_0xa0a7d farjump UnknownScript_0xa0a7d
UnknownScript_0xbd9f0: ChadPhoneScript2:
trainertotext SCHOOLBOY, CHAD1, $0 trainertotext SCHOOLBOY, CHAD1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
@ -1417,7 +1417,7 @@ UnknownScript_0xbda2d:
UnknownScript_0xbda31: UnknownScript_0xbda31:
farjump UnknownScript_0xa0754 farjump UnknownScript_0xa0754
UnknownScript_0xbda35: DerekPhoneScript1:
trainertotext POKEFANM, DEREK1, $0 trainertotext POKEFANM, DEREK1, $0
farscall UnknownScript_0xbde4e farscall UnknownScript_0xbde4e
checkflag ENGINE_DEREK_HAS_NUGGET checkflag ENGINE_DEREK_HAS_NUGGET
@ -1441,7 +1441,7 @@ UnknownScript_0xbda67:
displaylocation ROUTE_39, $2 displaylocation ROUTE_39, $2
farjump UnknownScript_0xa0ad5 farjump UnknownScript_0xa0ad5
UnknownScript_0xbda6e: DerekPhoneScript2:
trainertotext POKEFANM, DEREK1, $0 trainertotext POKEFANM, DEREK1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
@ -1466,7 +1466,7 @@ UnknownScript_0xbdaa2:
displaylocation ROUTE_39, $2 displaylocation ROUTE_39, $2
farjump UnknownScript_0xa05e6 farjump UnknownScript_0xa05e6
UnknownScript_0xbdaac: TullyPhoneScript1:
trainertotext FISHER, TULLY1, $0 trainertotext FISHER, TULLY1, $0
checkflag ENGINE_TULLY checkflag ENGINE_TULLY
iftrue UnknownScript_0xbdad5 iftrue UnknownScript_0xbdad5
@ -1491,7 +1491,7 @@ UnknownScript_0xbdadc:
displaylocation ROUTE_42, $2 displaylocation ROUTE_42, $2
farjump UnknownScript_0xa0add farjump UnknownScript_0xa0add
UnknownScript_0xbdae3: TullyPhoneScript2:
trainertotext FISHER, TULLY1, $0 trainertotext FISHER, TULLY1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_TULLY checkflag ENGINE_TULLY
@ -1527,7 +1527,7 @@ UnknownScript_0xbdb2c:
displaylocation ROUTE_42, $2 displaylocation ROUTE_42, $2
farjump UnknownScript_0xa05e6 farjump UnknownScript_0xa05e6
UnknownScript_0xbdb36: BrentPhoneScript1:
trainertotext POKEMANIAC, BRENT1, $0 trainertotext POKEMANIAC, BRENT1, $0
checkflag ENGINE_BRENT checkflag ENGINE_BRENT
iftrue UnknownScript_0xbdb59 iftrue UnknownScript_0xbdb59
@ -1546,7 +1546,7 @@ UnknownScript_0xbdb59:
displaylocation ROUTE_43, $2 displaylocation ROUTE_43, $2
farjump UnknownScript_0xa0a87 farjump UnknownScript_0xa0a87
UnknownScript_0xbdb60: BrentPhoneScript2:
trainertotext POKEMANIAC, BRENT1, $0 trainertotext POKEMANIAC, BRENT1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farscall UnknownScript_0xbde3f farscall UnknownScript_0xbde3f
@ -1572,7 +1572,7 @@ UnknownScript_0xbdb8b:
UnknownScript_0xbdb95: UnknownScript_0xbdb95:
farjump UnknownScript_0xa07ce farjump UnknownScript_0xa07ce
UnknownScript_0xbdb99: TiffanyPhoneScript1:
trainertotext PICNICKER, TIFFANY3, $0 trainertotext PICNICKER, TIFFANY3, $0
checkflag ENGINE_TIFFANY checkflag ENGINE_TIFFANY
iftrue UnknownScript_0xbdbc2 iftrue UnknownScript_0xbdbc2
@ -1597,7 +1597,7 @@ UnknownScript_0xbdbc9:
displaylocation ROUTE_43, $2 displaylocation ROUTE_43, $2
farjump UnknownScript_0xa0ae5 farjump UnknownScript_0xa0ae5
UnknownScript_0xbdbd0: TiffanyPhoneScript2:
trainertotext PICNICKER, TIFFANY3, $0 trainertotext PICNICKER, TIFFANY3, $0
farscall UnknownScript_0xbde45 farscall UnknownScript_0xbde45
if_equal $0, UnknownScript_0xbdc21 if_equal $0, UnknownScript_0xbdc21
@ -1673,7 +1673,7 @@ UnknownScript_0xbdc69:
; Vance ; Vance
UnknownScript_0xbdc73: VancePhoneScript1:
trainertotext BIRD_KEEPER, VANCE1, $0 trainertotext BIRD_KEEPER, VANCE1, $0
checkflag ENGINE_VANCE checkflag ENGINE_VANCE
iftrue UnknownScript_0xbdc96 iftrue UnknownScript_0xbdc96
@ -1692,7 +1692,7 @@ UnknownScript_0xbdc96:
displaylocation ROUTE_44, $2 displaylocation ROUTE_44, $2
farjump UnknownScript_0xa0a91 farjump UnknownScript_0xa0a91
UnknownScript_0xbdc9d: VancePhoneScript2:
trainertotext BIRD_KEEPER, VANCE1, $0 trainertotext BIRD_KEEPER, VANCE1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_VANCE checkflag ENGINE_VANCE
@ -1714,7 +1714,7 @@ UnknownScript_0xbdcc4:
setflag ENGINE_VANCE setflag ENGINE_VANCE
farjump UnknownScript_0xa0376 farjump UnknownScript_0xa0376
UnknownScript_0xbdcce: WiltonPhoneScript1:
trainertotext FISHER, WILTON1, $0 trainertotext FISHER, WILTON1, $0
checkflag ENGINE_WILTON checkflag ENGINE_WILTON
iftrue UnknownScript_0xbdcf7 iftrue UnknownScript_0xbdcf7
@ -1739,7 +1739,7 @@ UnknownScript_0xbdcfe:
displaylocation ROUTE_44, $2 displaylocation ROUTE_44, $2
farjump UnknownScript_0xa0aed farjump UnknownScript_0xa0aed
UnknownScript_0xbdd05: WiltonPhoneScript2:
trainertotext FISHER, WILTON1, $0 trainertotext FISHER, WILTON1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_WILTON checkflag ENGINE_WILTON
@ -1792,19 +1792,19 @@ UnknownScript_0xbdd6d:
; Kenji ; Kenji
UnknownScript_0xbdd71: KenjiPhoneScript1:
trainertotext BLACKBELT_T, KENJI3, $0 trainertotext BLACKBELT_T, KENJI3, $0
farscall UnknownScript_0xbde4e farscall UnknownScript_0xbde4e
farjump UnknownScript_0xa09ee farjump UnknownScript_0xa09ee
UnknownScript_0xbdd7d: KenjiPhoneScript2:
trainertotext BLACKBELT_T, KENJI3, $0 trainertotext BLACKBELT_T, KENJI3, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
farjump UnknownScript_0xa064c farjump UnknownScript_0xa064c
; Parry ; Parry
UnknownScript_0xbdd89: ParryPhoneScript1:
trainertotext HIKER, PARRY1, $0 trainertotext HIKER, PARRY1, $0
checkflag ENGINE_PARRY checkflag ENGINE_PARRY
iftrue UnknownScript_0xbddac iftrue UnknownScript_0xbddac
@ -1823,7 +1823,7 @@ UnknownScript_0xbddac:
displaylocation ROUTE_45, $2 displaylocation ROUTE_45, $2
farjump UnknownScript_0xa0a9b farjump UnknownScript_0xa0a9b
UnknownScript_0xbddb3: ParryPhoneScript2:
trainertotext HIKER, PARRY1, $0 trainertotext HIKER, PARRY1, $0
farscall UnknownScript_0xbe1b6 farscall UnknownScript_0xbe1b6
checkflag ENGINE_PARRY checkflag ENGINE_PARRY
@ -1847,7 +1847,7 @@ UnknownScript_0xbddda:
; Erin ; Erin
UnknownScript_0xbdde4: ErinPhoneScript1:
trainertotext PICNICKER, ERIN1, $0 trainertotext PICNICKER, ERIN1, $0
checkflag ENGINE_ERIN checkflag ENGINE_ERIN
iftrue UnknownScript_0xbde07 iftrue UnknownScript_0xbde07
@ -1866,7 +1866,7 @@ UnknownScript_0xbde07:
displaylocation ROUTE_46, $2 displaylocation ROUTE_46, $2
farjump UnknownScript_0xa0aa0 farjump UnknownScript_0xa0aa0
UnknownScript_0xbde0e: ErinPhoneScript2:
trainertotext PICNICKER, ERIN1, $0 trainertotext PICNICKER, ERIN1, $0
farscall UnknownScript_0xbe41e farscall UnknownScript_0xbe41e
checkflag ENGINE_ERIN checkflag ENGINE_ERIN

View File

@ -1285,7 +1285,7 @@ LuckyNumberShow18: ; b8cf2 (2e:4cf2)
pop bc pop bc
jr c, LuckyNumberShow18 jr c, LuckyNumberShow18
push bc push bc
callab Function3952d callab GetTrainerClassName
ld de, StringBuffer1 ld de, StringBuffer1
call CopyName1 call CopyName1
pop bc pop bc

View File

@ -111,8 +111,8 @@ SpecialsPointers:: ; c029
add_special Functionc2da add_special Functionc2da
add_special GetFirstPokemonHappiness add_special GetFirstPokemonHappiness
add_special CheckFirstMonIsEgg add_special CheckFirstMonIsEgg
add_special Function2a4ab add_special RandomPhoneRareWildMon
add_special Function2a51f add_special RandomPhoneWildMon
add_special RandomPhoneMon add_special RandomPhoneMon
add_special RunCallback_04 add_special RunCallback_04
add_special Functionfb841 add_special Functionfb841

View File

@ -215,7 +215,7 @@ INCLUDE "home/copy2.asm"
Function309d:: ; 309d Function309d:: ; 309d
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, 2 ld a, BANK(w2_d000)
ld [rSVBK], a ld [rSVBK], a
hlcoord 0, 0 hlcoord 0, 0
ld de, w2_d000 ld de, w2_d000
@ -238,7 +238,7 @@ Function30b4:: ; 30b4
Function30bf:: ; 30bf Function30bf:: ; 30bf
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, 2 ld a, BANK(w2_d000)
ld [rSVBK], a ld [rSVBK], a
ld hl, w2_d000 ld hl, w2_d000
decoord 0, 0 decoord 0, 0
@ -251,9 +251,11 @@ Function30bf:: ; 30bf
CopyName1:: ; 30d6 CopyName1:: ; 30d6
; Copies the name from de to StringBuffer2
ld hl, StringBuffer2 ld hl, StringBuffer2
CopyName2:: ; 30d9 CopyName2:: ; 30d9
; Copies the name from de to hl
.loop .loop
ld a, [de] ld a, [de]
inc de inc de
@ -300,17 +302,6 @@ SkipNames:: ; 0x30f4
ret ret
; 0x30fe ; 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" INCLUDE "home/math.asm"
@ -727,7 +718,7 @@ ClearPalettes:: ; 3317
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, 5 ld a, BANK(BGPals)
ld [rSVBK], a ld [rSVBK], a
; Fill BGPals and OBPals with $ffff (white) ; Fill BGPals and OBPals with $ffff (white)
@ -1273,11 +1264,11 @@ Function3599:: ; 3599
; 35b0 ; 35b0
Function35b0:: ; 35b0 Function35b0:: ; 35b0
ld hl, wdbf9 + 3 ld hl, wCurrentCaller + 3
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld a, [wdbf9 + 2] ld a, [wCurrentCaller + 2]
and a and a
jr z, .asm_35d3 jr z, .asm_35d3
@ -1311,7 +1302,7 @@ Function35b0:: ; 35b0
.asm_35d5 .asm_35d5
pop af pop af
ld d, a ld d, a
ld a, [wdbf9 + 2] ld a, [wCurrentCaller + 2]
sub d sub d
inc a inc a
scf scf

View File

@ -97,7 +97,7 @@ GetMapTrigger:: ; 2147
Function2173:: ; 2173 Function2173:: ; 2173
call Function217a call Function217a
call FarCallFunction4c000 call FarCallSwapTextboxPalettes
ret ret
; 217a ; 217a
@ -1204,7 +1204,7 @@ Function272a:: ; 272a
ld de, BGMapBuffer ld de, BGMapBuffer
call Function27b7 call Function27b7
ld c, $28 ld c, $28
call FarCallFunction4c03f call FarCallScrollBGMapPalettes
ld a, [wd152] ld a, [wd152]
ld e, a ld e, a
ld a, [wd153] ld a, [wd153]
@ -1220,7 +1220,7 @@ Function2748:: ; 2748
ld de, BGMapBuffer ld de, BGMapBuffer
call Function27b7 call Function27b7
ld c, $28 ld c, $28
call FarCallFunction4c03f call FarCallScrollBGMapPalettes
ld a, [wd152] ld a, [wd152]
ld l, a ld l, a
ld a, [wd153] ld a, [wd153]
@ -1243,7 +1243,7 @@ Function2771:: ; 2771
ld de, BGMapBuffer ld de, BGMapBuffer
call Function27c0 call Function27c0
ld c, $24 ld c, $24
call FarCallFunction4c03f call FarCallScrollBGMapPalettes
ld a, [wd152] ld a, [wd152]
ld e, a ld e, a
ld a, [wd153] ld a, [wd153]
@ -1259,7 +1259,7 @@ Function278f:: ; 278f
ld de, BGMapBuffer ld de, BGMapBuffer
call Function27c0 call Function27c0
ld c, $24 ld c, $24
call FarCallFunction4c03f call FarCallScrollBGMapPalettes
ld a, [wd152] ld a, [wd152]
ld e, a ld e, a
and $e0 and $e0

View File

@ -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 SimpleMultiply:: ; 3105
; Return a * c. ; Return a * c.
and a and a

View File

@ -323,23 +323,23 @@ Special_ReloadSpritesNoPalettes:: ; d91
; db1 ; db1
FarCallFunction4c000:: ; db1 FarCallSwapTextboxPalettes:: ; db1
ld a, [hROMBank] ld a, [hROMBank]
push af push af
ld a, BANK(Function4c000) ld a, BANK(SwapTextboxPalettes)
rst Bankswitch rst Bankswitch
call Function4c000 call SwapTextboxPalettes
pop af pop af
rst Bankswitch rst Bankswitch
ret ret
; dbd ; dbd
FarCallFunction4c03f:: ; dbd FarCallScrollBGMapPalettes:: ; dbd
ld a, [hROMBank] ld a, [hROMBank]
push af push af
ld a, BANK(Function4c03f) ld a, BANK(ScrollBGMapPalettes)
rst Bankswitch rst Bankswitch
call Function4c03f call ScrollBGMapPalettes
pop af pop af
rst Bankswitch rst Bankswitch
ret ret

View File

@ -31,6 +31,6 @@ const_value = const_value + 1
ENDM ENDM
shift_const: MACRO shift_const: MACRO
\1 EQU 1 << const_value \1 EQU (1 << const_value)
const_value = const_value + 1 const_value = const_value + 1
ENDM ENDM

View File

@ -5,8 +5,8 @@ map: MACRO
; db GROUP_\1, MAP_\1 ; db GROUP_\1, MAP_\1
\1\@ EQUS "GROUP_\1" \1\@ EQUS "GROUP_\1"
\1\@2 EQUS "MAP_\1" \1\@_2 EQUS "MAP_\1"
db \1\@, \1\@2 db \1\@, \1\@_2
ENDM ENDM
roam_map: MACRO roam_map: MACRO
@ -165,9 +165,9 @@ ENDM
mapgroup: MACRO mapgroup: MACRO
; map id, height, width ; map id, height, width
\1\@ EQUS "GROUP_\1" \1\@ EQUS "GROUP_\1"
\1\@2 EQUS "MAP_\1" \1\@_2 EQUS "MAP_\1"
\1\@ EQU const_value \1\@ EQU const_value
enum \1\@2 enum \1\@_2
\1_HEIGHT EQU \2 \1_HEIGHT EQU \2
\1_WIDTH EQU \3 \1_WIDTH EQU \3
ENDM ENDM

View File

@ -12,7 +12,7 @@ page EQUS "db $50," ; Start a new Pokedex page.
dex EQUS "db $e8, $50" ; End a Pokedex entry. dex EQUS "db $e8, $50" ; End a Pokedex entry.
TX_RAM EQU 1 TX_RAM EQU $01
TX_FAR EQU $16 TX_FAR EQU $16
text_jump: MACRO text_jump: MACRO

844
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -3,30 +3,30 @@ GoldenrodMagnetTrainStation_MapScriptHeader:
db 1 db 1
; triggers ; triggers
dw UnknownScript_0x550eb, $0000 dw .Trigger1, $0000
.MapCallbacks: .MapCallbacks:
db 0 db 0
UnknownScript_0x550eb: .Trigger1:
end end
OfficerScript_0x550ec: OfficerScript_0x550ec:
faceplayer faceplayer
loadfont loadfont
checkevent EVENT_RESTORED_POWER_TO_KANTO checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x550fa iftrue .MagnetTrainToSaffron
writetext UnknownText_0x55160 writetext UnknownText_0x55160
closetext closetext
loadmovesprites loadmovesprites
end end
UnknownScript_0x550fa: .MagnetTrainToSaffron:
writetext UnknownText_0x551b7 writetext UnknownText_0x551b7
yesorno yesorno
iffalse UnknownScript_0x5512a iffalse .DecidedNotToRide
checkitem PASS checkitem PASS
iffalse UnknownScript_0x55124 iffalse .PassNotInBag
writetext UnknownText_0x551ed writetext UnknownText_0x551ed
closetext closetext
loadmovesprites loadmovesprites
@ -36,27 +36,27 @@ UnknownScript_0x550fa:
special Special_MagnetTrain special Special_MagnetTrain
warpcheck warpcheck
newloadmap $f9 newloadmap $f9
applymovement $0, MovementData_0x55122 applymovement $0, .MovementBoardTheTrain
wait $14 wait $14
end end
MovementData_0x55122: .MovementBoardTheTrain:
turn_head_down turn_head_down
step_end step_end
UnknownScript_0x55124: .PassNotInBag:
writetext UnknownText_0x5522c writetext UnknownText_0x5522c
closetext closetext
loadmovesprites loadmovesprites
end end
UnknownScript_0x5512a: .DecidedNotToRide:
writetext UnknownText_0x5524f writetext UnknownText_0x5524f
closetext closetext
loadmovesprites loadmovesprites
end end
UnknownScript_0x55130: Script_ArriveFromSaffron:
applymovement $2, MovementData_0x55146 applymovement $2, MovementData_0x55146
applymovement $0, MovementData_0x55158 applymovement $0, MovementData_0x55158
applymovement $2, MovementData_0x5514b applymovement $2, MovementData_0x5514b
@ -175,7 +175,7 @@ GoldenrodMagnetTrainStation_MapEventHeader:
.XYTriggers: .XYTriggers:
db 1 db 1
xy_trigger 0, $6, $b, $0, UnknownScript_0x55130, $0, $0 xy_trigger 0, $6, $b, $0, Script_ArriveFromSaffron, $0, $0
.Signposts: .Signposts:
db 0 db 0

View File

@ -86,7 +86,7 @@ UnknownScript_0x6c38f:
writetext UnknownText_0x6c59e writetext UnknownText_0x6c59e
closetext closetext
showemote EMOTE_SHOCK, $2, 10 showemote EMOTE_SHOCK, $2, 10
playsound SFX_UNKNOWN_2A playsound SFX_FAINT
changeblock $6, $2, $1e changeblock $6, $2, $1e
reloadmappart reloadmappart
loadmovesprites loadmovesprites

View File

@ -3,30 +3,30 @@ SaffronTrainStation_MapScriptHeader:
db 1 db 1
; triggers ; triggers
dw UnknownScript_0x18a81d, $0000 dw .Trigger1, $0000
.MapCallbacks: .MapCallbacks:
db 0 db 0
UnknownScript_0x18a81d: .Trigger1:
end end
OfficerScript_0x18a81e: OfficerScript_0x18a81e:
faceplayer faceplayer
loadfont loadfont
checkevent EVENT_RESTORED_POWER_TO_KANTO checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue UnknownScript_0x18a82c iftrue .MagnetTrainToGoldenrod
writetext UnknownText_0x18a8a9 writetext UnknownText_0x18a8a9
closetext closetext
loadmovesprites loadmovesprites
end end
UnknownScript_0x18a82c: .MagnetTrainToGoldenrod:
writetext UnknownText_0x18a8dd writetext UnknownText_0x18a8dd
yesorno yesorno
iffalse UnknownScript_0x18a85c iffalse .DecidedNotToRide
checkitem PASS checkitem PASS
iffalse UnknownScript_0x18a856 iffalse .PassNotInBag
writetext UnknownText_0x18a917 writetext UnknownText_0x18a917
closetext closetext
loadmovesprites loadmovesprites
@ -36,27 +36,27 @@ UnknownScript_0x18a82c:
special Special_MagnetTrain special Special_MagnetTrain
warpcheck warpcheck
newloadmap $f9 newloadmap $f9
applymovement $0, MovementData_0x18a854 applymovement $0, .MovementBoardTheTrain
wait $14 wait $14
end end
MovementData_0x18a854: .MovementBoardTheTrain:
turn_head_down turn_head_down
step_end step_end
UnknownScript_0x18a856: .PassNotInBag:
writetext UnknownText_0x18a956 writetext UnknownText_0x18a956
closetext closetext
loadmovesprites loadmovesprites
end end
UnknownScript_0x18a85c: .DecidedNotToRide:
writetext UnknownText_0x18a978 writetext UnknownText_0x18a978
closetext closetext
loadmovesprites loadmovesprites
end end
UnknownScript_0x18a862: Script_ArriveFromGoldenrod:
applymovement $2, MovementData_0x18a88f applymovement $2, MovementData_0x18a88f
applymovement $0, MovementData_0x18a8a1 applymovement $0, MovementData_0x18a8a1
applymovement $2, MovementData_0x18a894 applymovement $2, MovementData_0x18a894
@ -224,7 +224,7 @@ SaffronTrainStation_MapEventHeader:
.XYTriggers: .XYTriggers:
db 1 db 1
xy_trigger 0, $6, $b, $0, UnknownScript_0x18a862, $0, $0 xy_trigger 0, $6, $b, $0, Script_ArriveFromGoldenrod, $0, $0
.Signposts: .Signposts:
db 0 db 0

View File

@ -173,7 +173,7 @@ Function1000fa: ; 1000fa
xor a xor a
ld [InLinkBattle], a ld [InLinkBattle], a
ld a, $4 ld a, $4
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
callba Function11619d callba Function11619d
ld hl, wcd29 ld hl, wcd29
set 6, [hl] set 6, [hl]
@ -4356,7 +4356,7 @@ Function101cc2: ; 101cc2 ; unreferenced
Function101cc8: ; 101cc8 Function101cc8: ; 101cc8
ld a, $1 ld a, $1
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ld a, $1 ld a, $1
ld [wc30d], a ld [wc30d], a
ld hl, wcd29 ld hl, wcd29
@ -4369,7 +4369,7 @@ Function101cc8: ; 101cc8
Function101cdf: ; 101cdf Function101cdf: ; 101cdf
ld a, $6 ld a, $6
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ld a, $1 ld a, $1
ld [wc30d], a ld [wc30d], a
ld hl, wcd29 ld hl, wcd29
@ -4382,7 +4382,7 @@ Function101cdf: ; 101cdf
Function101cf6: ; 101cf6 Function101cf6: ; 101cf6
ld a, $b ld a, $b
ld [wPartyMon1MenuIconAnim + 1], a ld [wPartyMonMenuIconAnims + 1], a
ld a, [wcd25] ld a, [wcd25]
inc a inc a
ld [wcd25], a ld [wcd25], a
@ -4391,7 +4391,7 @@ Function101cf6: ; 101cf6
Function101d03: ; 101d03 Function101d03: ; 101d03
ld a, $e ld a, $e
ld [wPartyMon1MenuIconAnim + 1], a ld [wPartyMonMenuIconAnims + 1], a
ld a, [wcd25] ld a, [wcd25]
inc a inc a
ld [wcd25], a ld [wcd25], a

View File

@ -5588,14 +5588,14 @@ INCBIN "gfx/unknown/11601a.2bpp"
Function11615a: ; 11615a Function11615a: ; 11615a
xor a xor a
ld [wc30d], a ld [wc30d], a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld [wc310], a ld [wc310], a
ld [wc311], a ld [wc311], a
ld [wc312], a ld [wc312], a
ld [wc313], a ld [wc313], a
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ld [wPartyMon1MenuIconAnim + 1], a ld [wPartyMonMenuIconAnims + 1], a
ld [wPartyMon1MenuIconAnim + 4], a ld [wPartyMonMenuIconAnims + 4], a
ld [wc3f6], a ld [wc3f6], a
ld [wc3f8], a ld [wc3f8], a
ld [wc3f2], a ld [wc3f2], a
@ -5617,7 +5617,7 @@ Function11619d: ; 11619d
ld a, [wc30d] ld a, [wc30d]
and a and a
ret z ret z
ld a, [wPartyMon1MenuIconAnim + 5] ld a, [wPartyMonMenuIconAnims + 5]
cp $2 cp $2
jr c, .asm_1161b4 jr c, .asm_1161b4
ld a, $a0 ld a, $a0
@ -5631,7 +5631,7 @@ Function11619d: ; 11619d
; 1161b8 ; 1161b8
Function1161b8: ; 1161b8 Function1161b8: ; 1161b8
ld a, [wPartyMon1MenuIconAnim + 5] ld a, [wPartyMonMenuIconAnims + 5]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Jumptable_1161c7 ld hl, Jumptable_1161c7
@ -5758,9 +5758,9 @@ Function1161d5: ; 1161d5
ld [wc2a9], a ld [wc2a9], a
ld a, d ld a, d
ld [wc2aa], a ld [wc2aa], a
ld a, [wPartyMon1MenuIconAnim + 5] ld a, [wPartyMonMenuIconAnims + 5]
inc a inc a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ret ret
; 11628c ; 11628c
@ -5774,15 +5774,15 @@ MenuDataHeader_11628c: ; 11628c
Function116294: ; 116294 Function116294: ; 116294
callba Function170d02 callba Function170d02
ld a, [wPartyMon1MenuIconAnim + 5] ld a, [wPartyMonMenuIconAnims + 5]
inc a inc a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wd030 ld hl, wd030
ld de, wPartyMon1MenuIconAnim + 12 ld de, wPartyMonMenuIconAnims + 12
ld bc, $0010 ld bc, $0010
call CopyBytes call CopyBytes
ld hl, Palette_11734e ld hl, Palette_11734e
@ -5799,9 +5799,9 @@ Function116294: ; 116294
Function1162cb: ; 1162cb Function1162cb: ; 1162cb
callba Function170cc6 callba Function170cc6
ld a, [wPartyMon1MenuIconAnim + 5] ld a, [wPartyMonMenuIconAnims + 5]
inc a inc a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld a, [rSVBK] ld a, [rSVBK]
push af push af
ld a, $5 ld a, $5
@ -5838,7 +5838,7 @@ Function1162f2: ; 1162f2
ld c, a ld c, a
ld a, [wc30f] ld a, [wc30f]
ld b, a ld b, a
ld a, [wPartyMon1MenuIconAnim + 4] ld a, [wPartyMonMenuIconAnims + 4]
ld e, a ld e, a
ld a, [hli] ld a, [hli]
sub e sub e
@ -5939,7 +5939,7 @@ Function11636e: ; 11636e
xor a xor a
ld [wc2aa], a ld [wc2aa], a
xor a xor a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld [wc30d], a ld [wc30d], a
ret ret
; 1163c0 ; 1163c0
@ -5961,7 +5961,7 @@ Function1163c0: ; 1163c0
push af push af
ld a, $5 ld a, $5
ld [rSVBK], a ld [rSVBK], a
ld hl, wPartyMon1MenuIconAnim + 12 ld hl, wPartyMonMenuIconAnims + 12
ld de, wd030 ld de, wd030
ld bc, $0010 ld bc, $0010
call CopyBytes call CopyBytes
@ -5997,7 +5997,7 @@ Function1163c0: ; 1163c0
.asm_116439 .asm_116439
xor a xor a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld [wc30d], a ld [wc30d], a
ret ret
; 116441 ; 116441
@ -6014,14 +6014,14 @@ Function116441: ; 116441
xor a xor a
ld [wc2aa], a ld [wc2aa], a
xor a xor a
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld [wc30d], a ld [wc30d], a
ret ret
; 116468 ; 116468
Function116468: ; 116468 Function116468: ; 116468
call Function116567 call Function116567
ld a, [wPartyMon1MenuIconAnim] ld a, [wPartyMonMenuIconAnims]
cp $d cp $d
jr nz, .asm_1164a8 jr nz, .asm_1164a8
ld hl, wc30e ld hl, wc30e
@ -6213,7 +6213,7 @@ Function116567: ; 116567
; 11659d ; 11659d
Function11659d: ; 11659d Function11659d: ; 11659d
ld a, [wPartyMon1MenuIconAnim] ld a, [wPartyMonMenuIconAnims]
cp $12 cp $12
ret nc ret nc
ld e, a ld e, a
@ -6289,7 +6289,7 @@ Function116600:
call Function116780 call Function116780
ret c ret c
ld a, $2 ld a, $2
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ret ret
; 116615 ; 116615
@ -6332,24 +6332,24 @@ Function116640:
call Function116780 call Function116780
ret c ret c
ld a, $7 ld a, $7
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ret ret
; 116655 ; 116655
Function116655: ; 116655 Function116655: ; 116655
xor a xor a
ld [wPartyMon1MenuIconAnim + 3], a ld [wPartyMonMenuIconAnims + 3], a
call Function11678e call Function11678e
Function11665c: Function11665c:
ld hl, wPartyMon1MenuIconAnim + 3 ld hl, wPartyMonMenuIconAnims + 3
ld a, $1 ld a, $1
xor [hl] xor [hl]
ld [hl], a ld [hl], a
add $4 add $4
ld c, a ld c, a
call Function11679c call Function11679c
ld a, [wPartyMon1MenuIconAnim + 3] ld a, [wPartyMonMenuIconAnims + 3]
and a and a
jr nz, .asm_116673 jr nz, .asm_116673
ld a, $48 ld a, $48
@ -6378,7 +6378,7 @@ Function11668d:
call Function116780 call Function116780
ret c ret c
ld a, $c ld a, $c
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ret ret
; 11669f ; 11669f
@ -6393,9 +6393,9 @@ Function1166a2:
ld [wc30f], a ld [wc30f], a
ld [wc3f3], a ld [wc3f3], a
ld a, $ff ld a, $ff
ld [wPartyMon1MenuIconAnim + 2], a ld [wPartyMonMenuIconAnims + 2], a
xor a xor a
ld [wPartyMon1MenuIconAnim + 3], a ld [wPartyMonMenuIconAnims + 3], a
ld a, $0 ld a, $0
ld c, a ld c, a
call Function11679c call Function11679c
@ -6417,25 +6417,25 @@ Function1166d6:
cp $48 cp $48
jr nz, .asm_1166e4 jr nz, .asm_1166e4
xor a xor a
ld [wPartyMon1MenuIconAnim + 2], a ld [wPartyMonMenuIconAnims + 2], a
.asm_1166e4 .asm_1166e4
ld a, [wc311] ld a, [wc311]
cp $ff cp $ff
ret nz ret nz
ld a, $4 ld a, $4
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
xor a xor a
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
ret ret
; 1166f4 ; 1166f4
Function1166f4: ; 1166f4 Function1166f4: ; 1166f4
ld [wc30e], a ld [wc30e], a
ld a, b ld a, b
ld [wPartyMon1MenuIconAnim + 2], a ld [wPartyMonMenuIconAnims + 2], a
xor a xor a
ld [wPartyMon1MenuIconAnim + 3], a ld [wPartyMonMenuIconAnims + 3], a
ld hl, wc30f ld hl, wc30f
.asm_116702 .asm_116702
call Random call Random
@ -6460,9 +6460,9 @@ Function1166f4: ; 1166f4
Function11671f: ; 11671f Function11671f: ; 11671f
ld [wc30f], a ld [wc30f], a
ld a, b ld a, b
ld [wPartyMon1MenuIconAnim + 3], a ld [wPartyMonMenuIconAnims + 3], a
xor a xor a
ld [wPartyMon1MenuIconAnim + 2], a ld [wPartyMonMenuIconAnims + 2], a
ld hl, wc30e ld hl, wc30e
.asm_11672d .asm_11672d
call Random call Random
@ -6482,11 +6482,11 @@ Function11671f: ; 11671f
Function116747: ; 116747 Function116747: ; 116747
ld hl, wc30e ld hl, wc30e
ld a, [wPartyMon1MenuIconAnim + 2] ld a, [wPartyMonMenuIconAnims + 2]
add [hl] add [hl]
ld [hl], a ld [hl], a
ld hl, wc30f ld hl, wc30f
ld a, [wPartyMon1MenuIconAnim + 3] ld a, [wPartyMonMenuIconAnims + 3]
add [hl] add [hl]
ld [hl], a ld [hl], a
ret ret
@ -6518,7 +6518,7 @@ Function116758: ; 116758
ld a, $4 ld a, $4
.asm_11677a .asm_11677a
ld [wPartyMon1MenuIconAnim + 4], a ld [wPartyMonMenuIconAnims + 4], a
ret ret
; 11677e ; 11677e
@ -6526,11 +6526,11 @@ Function11677e: ; 11677e
ld a, $0 ld a, $0
Function116780: Function116780:
ld hl, wPartyMon1MenuIconAnim + 1 ld hl, wPartyMonMenuIconAnims + 1
cp [hl] cp [hl]
jr z, .asm_11678c jr z, .asm_11678c
ld a, [hl] ld a, [hl]
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
scf scf
ret ret
@ -6540,15 +6540,15 @@ Function116780:
; 11678e ; 11678e
Function11678e: ; 11678e Function11678e: ; 11678e
ld hl, wPartyMon1MenuIconAnim ld hl, wPartyMonMenuIconAnims
ld a, [hl] ld a, [hl]
ld [wPartyMon1MenuIconAnim + 1], a ld [wPartyMonMenuIconAnims + 1], a
inc [hl] inc [hl]
ret ret
; 116797 ; 116797
Function116797: ; 116797 Function116797: ; 116797
ld hl, wPartyMon1MenuIconAnim ld hl, wPartyMonMenuIconAnims
inc [hl] inc [hl]
ret ret
; 11679c ; 11679c
@ -8938,7 +8938,7 @@ Function1183cb: ; 1183cb
ld [wcd66], a ld [wcd66], a
ld [wcd67], a ld [wcd67], a
ld [wcd68], a ld [wcd68], a
ld [wPartyMon1MenuIconAnim + 6], a ld [wPartyMonMenuIconAnims + 6], a
ld [wcd89], a ld [wcd89], a
ld [wcd8a], a ld [wcd8a], a
ld [wcd8b], a ld [wcd8b], a
@ -9527,7 +9527,7 @@ Function11878d: ; 11878d (46:478d)
ld a, $a ld a, $a
call Function3e32 call Function3e32
ld a, [wc3f0] ld a, [wc3f0]
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld a, [wcd34] ld a, [wcd34]
ld [wcf66], a ld [wcf66], a
ret ret
@ -9571,13 +9571,13 @@ Function118805: ; 118805 (46:4805)
ld a, $a ld a, $a
call Function3e32 call Function3e32
ld a, [wc3f0] ld a, [wc3f0]
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld a, [wcd34] ld a, [wcd34]
ld [wcf66], a ld [wcf66], a
ret ret
Function118821: ; 118821 (46:4821) Function118821: ; 118821 (46:4821)
ld a, [wPartyMon1MenuIconAnim + 5] ld a, [wPartyMonMenuIconAnims + 5]
cp $3 cp $3
jr c, .asm_11884a jr c, .asm_11884a
cp $4 cp $4
@ -9590,7 +9590,7 @@ Function118821: ; 118821 (46:4821)
ld a, $a ld a, $a
ld [wc300], a ld [wc300], a
ld a, [wc3f0] ld a, [wc3f0]
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld a, [wcd34] ld a, [wcd34]
ld [wcf66], a ld [wcf66], a
scf scf
@ -9669,7 +9669,7 @@ Function118896: ; 118896
; 1188b0 ; 1188b0
Function1188b0: ; 1188b0 (46:48b0) Function1188b0: ; 1188b0 (46:48b0)
ld de, wPartyMon4MenuIconAnim + 2 ld de, wPartyMonMenuIconAnims + 48 + 2
ld a, $c ld a, $c
jp Function119e2b jp Function119e2b
@ -9701,7 +9701,7 @@ Function1188c8: ; 1188c8 (46:48c8)
jp Function119e2b jp Function119e2b
Function1188e7: ; 1188e7 (46:48e7) Function1188e7: ; 1188e7 (46:48e7)
ld de, wPartyMon4MenuIconAnim + 2 ld de, wPartyMonMenuIconAnims + 48 + 2
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld a, [$aa4a] ld a, [$aa4a]
@ -9721,7 +9721,7 @@ Function1188e7: ; 1188e7 (46:48e7)
Function118903: ; 118903 (46:4903) Function118903: ; 118903 (46:4903)
ld a, [wc3f0] ld a, [wc3f0]
ld [wPartyMon1MenuIconAnim + 5], a ld [wPartyMonMenuIconAnims + 5], a
ld c, $1 ld c, $1
callba Function115e18 callba Function115e18
ld a, $8 ld a, $8
@ -9750,7 +9750,7 @@ Function118922: ; 118922
call Function119e2e call Function119e2e
Function118936: Function118936:
ld a, [wPartyMon1MenuIconAnim + 6] ld a, [wPartyMonMenuIconAnims + 6]
and a and a
ret nz ret nz
ld hl, MenuDataHeader_119cf7 ld hl, MenuDataHeader_119cf7
@ -10032,7 +10032,7 @@ Function118b10:
jp Function119e2b jp Function119e2b
Function118b24: ; 118b24 (46:4b24) Function118b24: ; 118b24 (46:4b24)
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, $8 ld a, $8
ld [hli], a ld [hli], a
ld a, $c7 ld a, $c7
@ -10045,7 +10045,7 @@ Function118b24: ; 118b24 (46:4b24)
call Function119ec2 call Function119ec2
ld a, $80 ld a, $80
ld [wcd89], a ld [wcd89], a
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ret ret
; 118b42 (46:4b42) ; 118b42 (46:4b42)
@ -10380,22 +10380,22 @@ Function118ec6: ; 118ec6
call Function118440 call Function118440
call SpeechTextBox call SpeechTextBox
ld hl, $d80e ld hl, $d80e
ld de, wPartyMon1MenuIconAnim + 12 ld de, wPartyMonMenuIconAnims + 12
ld bc, $0026 ld bc, $0026
call CopyBytes call CopyBytes
xor a xor a
ld [wPartyMon1MenuIconAnim + 11], a ld [wPartyMonMenuIconAnims + 11], a
ld a, $20 ld a, $20
ld [wPartyMon1MenuIconAnim + 7], a ld [wPartyMonMenuIconAnims + 7], a
ld a, $c3 ld a, $c3
ld [wPartyMon1MenuIconAnim + 8], a ld [wPartyMonMenuIconAnims + 8], a
hlcoord 1, 14 hlcoord 1, 14
ld a, l ld a, l
ld [wPartyMon1MenuIconAnim + 9], a ld [wPartyMonMenuIconAnims + 9], a
ld a, h ld a, h
ld [wPartyMon1MenuIconAnim + 10], a ld [wPartyMonMenuIconAnims + 10], a
ld a, $2 ld a, $2
ld [wPartyMon1MenuIconAnim + 6], a ld [wPartyMonMenuIconAnims + 6], a
ld a, $1d ld a, $1d
ld [wcd3c], a ld [wcd3c], a
ld a, $24 ld a, $24
@ -10468,7 +10468,7 @@ Function118f68:
ld a, [wcc60] ld a, [wcc60]
and a and a
jr z, .asm_118fba jr z, .asm_118fba
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, $c608 % $100 ld a, $c608 % $100
ld [hli], a ld [hli], a
ld a, $c608 / $100 ld a, $c608 / $100
@ -10489,7 +10489,7 @@ Function118f68:
call Function119ec2 call Function119ec2
ld a, $40 ld a, $40
ld [wcd89], a ld [wcd89], a
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld de, $de00 ld de, $de00
ld bc, $0200 ld bc, $0200
ld a, $2c ld a, $2c
@ -10549,7 +10549,7 @@ Function119009:
ld de, wcc60 ld de, wcc60
call Function1191ad call Function1191ad
ret c ret c
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, $8 ld a, $8
ld [hli], a ld [hli], a
ld a, $c6 ld a, $c6
@ -10570,7 +10570,7 @@ Function119009:
call Function119ec2 call Function119ec2
ld a, $40 ld a, $40
ld [wcd89], a ld [wcd89], a
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld de, Unkn1Pals ld de, Unkn1Pals
ld bc, $1000 ld bc, $1000
ld a, $2c ld a, $2c
@ -11097,7 +11097,7 @@ Function1193a0:
ld a, $8 ld a, $8
ld [wcd3c], a ld [wcd3c], a
call Function119ed8 call Function119ed8
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld a, wd000 % $100 ld a, wd000 % $100
ld [hli], a ld [hli], a
ld a, wd000 / $100 ld a, wd000 / $100
@ -11118,7 +11118,7 @@ Function1193a0:
call Function119ec2 call Function119ec2
ld a, $40 ld a, $40
ld [wcd89], a ld [wcd89], a
ld hl, wPartyMon4MenuIconAnim + 2 ld hl, wPartyMonMenuIconAnims + 48 + 2
ld de, $de00 ld de, $de00
ld bc, $0200 ld bc, $0200
ld a, $2c ld a, $2c
@ -11920,7 +11920,7 @@ Function1198ee: ; 1198ee
call Function119e2e call Function119e2e
Function1198f7: Function1198f7:
ld a, [wPartyMon1MenuIconAnim + 6] ld a, [wPartyMonMenuIconAnims + 6]
and a and a
ret nz ret nz
ld hl, $c608 + 2 ld hl, $c608 + 2
@ -12466,7 +12466,7 @@ Function119ca2:
call Function119e2e call Function119e2e
Function119cab: Function119cab:
ld a, [wPartyMon1MenuIconAnim + 6] ld a, [wPartyMonMenuIconAnims + 6]
and a and a
ret nz ret nz
ld a, $80 ld a, $80
@ -12503,7 +12503,7 @@ Function119cc3: ; 119cc3
call Function119e2e call Function119e2e
Function119cdf: Function119cdf:
ld a, [wPartyMon1MenuIconAnim + 6] ld a, [wPartyMonMenuIconAnims + 6]
and a and a
ret nz ret nz
ld a, $f ld a, $f
@ -12949,7 +12949,7 @@ Function119f98: ; 119f98
ld a, $1 ld a, $1
ld [wc30d], a ld [wc30d], a
ld a, $1 ld a, $1
ld [wPartyMon1MenuIconAnim], a ld [wPartyMonMenuIconAnims], a
callba Function104061 callba Function104061
and a and a
ret ret
@ -13131,7 +13131,7 @@ Function11a16d: ; 11a16d
call Function11a63c call Function11a63c
call Function11a1e6 call Function11a1e6
hlcoord 4, 2 hlcoord 4, 2
ld de, wPartyMon4MenuIconAnim + 2 ld de, wPartyMonMenuIconAnims + 48 + 2
call PlaceString call PlaceString
call Function11a5f5 call Function11a5f5
xor a xor a
@ -13185,7 +13185,7 @@ Function11a1d6: ; 11a1d6
Function11a1e6: ; 11a1e6 Function11a1e6: ; 11a1e6
ld hl, String_11a706 ld hl, String_11a706
ld de, wPartyMon4MenuIconAnim + 2 ld de, wPartyMonMenuIconAnims + 48 + 2
call Function11a1ff call Function11a1ff
ld hl, wcd85 ld hl, wcd85
call Function11a1ff call Function11a1ff
@ -14011,7 +14011,7 @@ endr
; 11a8fa ; 11a8fa
Function11a8fa: ; 11a8fa Function11a8fa: ; 11a8fa
ld a, [wPartyMon1MenuIconAnim + 6] ld a, [wPartyMonMenuIconAnims + 6]
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, Jumptable_11a909 ld hl, Jumptable_11a909
@ -14035,14 +14035,14 @@ Function11a90f: ; 11a90f
ld [rSVBK], a ld [rSVBK], a
call SpeechTextBox call SpeechTextBox
ld a, $50 ld a, $50
ld hl, wPartyMon1MenuIconAnim + 12 ld hl, wPartyMonMenuIconAnims + 12
ld bc, $008c ld bc, $008c
call ByteFill call ByteFill
ld a, [wPartyMon1MenuIconAnim + 7] ld a, [wPartyMonMenuIconAnims + 7]
ld l, a ld l, a
ld a, [wPartyMon1MenuIconAnim + 8] ld a, [wPartyMonMenuIconAnims + 8]
ld h, a ld h, a
ld de, wPartyMon1MenuIconAnim + 12 ld de, wPartyMonMenuIconAnims + 12
.asm_11a92c .asm_11a92c
ld a, [hli] ld a, [hli]
cp $57 cp $57
@ -14073,17 +14073,17 @@ Function11a90f: ; 11a90f
.asm_11a94f .asm_11a94f
xor a xor a
ld [wPartyMon1MenuIconAnim + 11], a ld [wPartyMonMenuIconAnims + 11], a
ld a, $20 ld a, $20
ld [wPartyMon1MenuIconAnim + 7], a ld [wPartyMonMenuIconAnims + 7], a
ld a, $c3 ld a, $c3
ld [wPartyMon1MenuIconAnim + 8], a ld [wPartyMonMenuIconAnims + 8], a
hlcoord 1, 14 hlcoord 1, 14
ld a, l ld a, l
ld [wPartyMon1MenuIconAnim + 9], a ld [wPartyMonMenuIconAnims + 9], a
ld a, h ld a, h
ld [wPartyMon1MenuIconAnim + 10], a ld [wPartyMonMenuIconAnims + 10], a
ld hl, wPartyMon1MenuIconAnim + 6 ld hl, wPartyMonMenuIconAnims + 6
inc [hl] inc [hl]
ld a, $3 ld a, $3
ld [rSVBK], a ld [rSVBK], a
@ -14093,7 +14093,7 @@ Function11a970:
; 11a971 ; 11a971
Function11a971: ; 11a971 Function11a971: ; 11a971
ld hl, wPartyMon1MenuIconAnim + 11 ld hl, wPartyMonMenuIconAnims + 11
ld a, [hJoyDown] ld a, [hJoyDown]
and a and a
jr nz, .asm_11a97f jr nz, .asm_11a97f
@ -14108,34 +14108,34 @@ Function11a971: ; 11a971
and $7 and $7
ld [hl], a ld [hl], a
ld hl, wcd8d ld hl, wcd8d
ld a, [wPartyMon1MenuIconAnim + 7] ld a, [wPartyMonMenuIconAnims + 7]
ld e, a ld e, a
ld a, [wPartyMon1MenuIconAnim + 8] ld a, [wPartyMonMenuIconAnims + 8]
ld d, a ld d, a
ld a, [de] ld a, [de]
inc de inc de
ld [hli], a ld [hli], a
ld a, e ld a, e
ld [wPartyMon1MenuIconAnim + 7], a ld [wPartyMonMenuIconAnims + 7], a
ld a, d ld a, d
ld [wPartyMon1MenuIconAnim + 8], a ld [wPartyMonMenuIconAnims + 8], a
ld a, $50 ld a, $50
ld [hl], a ld [hl], a
ld a, [wPartyMon1MenuIconAnim + 9] ld a, [wPartyMonMenuIconAnims + 9]
ld l, a ld l, a
ld a, [wPartyMon1MenuIconAnim + 10] ld a, [wPartyMonMenuIconAnims + 10]
ld h, a ld h, a
ld de, wcd8d ld de, wcd8d
call PlaceString call PlaceString
ld a, c ld a, c
ld [wPartyMon1MenuIconAnim + 9], a ld [wPartyMonMenuIconAnims + 9], a
ld a, b ld a, b
ld [wPartyMon1MenuIconAnim + 10], a ld [wPartyMonMenuIconAnims + 10], a
ld a, [wcd8d] ld a, [wcd8d]
cp $50 cp $50
jr nz, .asm_11a9bf jr nz, .asm_11a9bf
xor a xor a
ld [wPartyMon1MenuIconAnim + 6], a ld [wPartyMonMenuIconAnims + 6], a
.asm_11a9bf .asm_11a9bf
ret ret
@ -14143,11 +14143,11 @@ Function11a971: ; 11a971
Function11a9c0: ; 11a9c0 Function11a9c0: ; 11a9c0
ld a, l ld a, l
ld [wPartyMon1MenuIconAnim + 7], a ld [wPartyMonMenuIconAnims + 7], a
ld a, h ld a, h
ld [wPartyMon1MenuIconAnim + 8], a ld [wPartyMonMenuIconAnims + 8], a
ld a, $1 ld a, $1
ld [wPartyMon1MenuIconAnim + 6], a ld [wPartyMonMenuIconAnims + 6], a
ret ret
; 11a9ce ; 11a9ce

View File

@ -1,20 +1,22 @@
NO_AI EQU 0 const_def
AI_BASIC EQU 1 << 0 const NO_AI
AI_SETUP EQU 1 << 1 const_value = 0
AI_TYPES EQU 1 << 2 shift_const AI_BASIC
AI_OFFENSIVE EQU 1 << 3 shift_const AI_SETUP
AI_SMART EQU 1 << 4 shift_const AI_TYPES
AI_OPPORTUNIST EQU 1 << 5 shift_const AI_OFFENSIVE
AI_AGGRESSIVE EQU 1 << 6 shift_const AI_SMART
AI_CAUTIOUS EQU 1 << 7 shift_const AI_OPPORTUNIST
AI_STATUS EQU 1 << 8 shift_const AI_AGGRESSIVE
AI_RISKY EQU 1 << 9 shift_const AI_CAUTIOUS
AI_10 EQU 1 << 10 shift_const AI_STATUS
AI_11 EQU 1 << 11 shift_const AI_RISKY
AI_12 EQU 1 << 12 shift_const AI_10
AI_13 EQU 1 << 13 shift_const AI_11
AI_14 EQU 1 << 14 shift_const AI_12
AI_15 EQU 1 << 15 shift_const AI_13
shift_const AI_14
shift_const AI_15
TrainerClassAttributes: ; 3959c TrainerClassAttributes: ; 3959c

View File

@ -356,12 +356,7 @@ wc310:: ds 1
wc311:: ds 1 wc311:: ds 1
wc312:: ds 1 wc312:: ds 1
wc313:: ds 1 wc313:: ds 1
wPartyMon1MenuIconAnim:: ds 16 ; c314 wPartyMonMenuIconAnims:: ds 96 ; c314
wPartyMon2MenuIconAnim:: ds 16 ; c324
wPartyMon3MenuIconAnim:: ds 16 ; c334
wPartyMon4MenuIconAnim:: ds 16 ; c344
wPartyMon5MenuIconAnim:: ds 16 ; c354
wPartyMon6MenuIconAnim:: ds 16 ; c364
wc374:: ds 48 ; c374 wc374:: ds 48 ; c374
wc3a4:: ds 8 ; c3b4 wc3a4:: ds 8 ; c3b4
wc3ac:: ds 8 ; c3bc wc3ac:: ds 8 ; c3bc
@ -2280,7 +2275,7 @@ BikeFlags:: ; dbf5
wCurrentMapTriggerPointer:: ; dbf7 wCurrentMapTriggerPointer:: ; dbf7
ds 2 ds 2
wdbf9:: ds 2 wCurrentCaller:: ds 2
wdbfb:: ds 1 wdbfb:: ds 1
wdbfc:: ds 1 wdbfc:: ds 1
wdbfd:: ds 1 wdbfd:: ds 1
@ -2353,9 +2348,9 @@ wdc41:: ds 1
wdc42:: ds 8 wdc42:: ds 8
wdc4a:: ds 1 wdc4a:: ds 1
wdc4b:: ds 1 wdc4b:: ds 1
wdc4c:: ds 4 wDailyRematchFlags:: ds 4
wdc50:: ds 4 wDailyPhoneItemFlags:: ds 4
wdc54:: ds 4 wDailyPhoneTimeOfDayFlags:: ds 4
wdc58:: ds 2 wdc58:: ds 2
wdc5a:: ds 1 wdc5a:: ds 1
wdc5b:: ds 1 wdc5b:: ds 1
@ -2592,7 +2587,14 @@ LYOverrides:: ; d100
ds SCREEN_HEIGHT_PX ds SCREEN_HEIGHT_PX
LYOverridesEnd:: 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 LYOverridesBackup:: ; d200
ds SCREEN_HEIGHT_PX ds SCREEN_HEIGHT_PX