ref: 62b473d6c65a50134dda1511351fcab2cf476cf7
parent: 80b0d8cd2d61d6ca291717eb09b7926eaf62da80
author: yenatch <yenatch@gmail.com>
date: Tue Feb 10 10:14:21 EST 2015
Blind wram labels part 3.
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -685,7 +685,7 @@
ld a, [BattleAnimByte]
and $f
ld c, a
- ld hl, wd300
+ ld hl, w5_d300
xor a
ld [BattleAnimTemps], a
.asm_cc492
@@ -792,7 +792,7 @@
BattleAnimCmd_D9: ; cc52c (33:452c)
- ld hl, wd300
+ ld hl, w5_d300
.asm_cc52f
ld a, [hl]
and a
@@ -847,7 +847,7 @@
BattleAnimCmd_DA: ; cc57e (33:457e)
- ld hl, wd300
+ ld hl, w5_d300
.asm_cc581
ld a, [hl]
and a
@@ -1470,7 +1470,7 @@
Functioncc96e: ; cc96e
ld a, $0
- ld [wd418], a
+ ld [w5_d418], a
ld hl, OTPartyMon3HP
ld e, $a
.asm_cc978
@@ -1492,7 +1492,7 @@
add hl, bc
dec e
jr nz, .asm_cc978
- ld a, [wd418]
+ ld a, [w5_d418]
ld l, a
ld h, $c4
.asm_cc997
--- a/battle/anim_objects.asm
+++ b/battle/anim_objects.asm
@@ -17,7 +17,7 @@
.asm_cc9b3
ld c, l
ld b, h
- ld hl, wd40e
+ ld hl, w5_d40e
inc [hl]
call Functioncc9c4
ret
@@ -46,7 +46,7 @@
ld d, h
ld hl, $0
add hl, bc
- ld a, [wd40e]
+ ld a, [w5_d40e]
ld [hli], a
ld a, [de]
inc de
@@ -111,7 +111,7 @@
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [wd418]
+ ld a, [w5_d418]
ld e, a
ld d, $c4
.asm_cca3c
@@ -178,7 +178,7 @@
inc hl
inc de
ld a, e
- ld [wd418], a
+ ld [w5_d418], a
cp $a0
jr nc, .asm_ccaa7
dec c
@@ -287,7 +287,7 @@
Functionccb31: ; ccb31 (33:4b31)
push hl
push bc
- ld hl, wd300
+ ld hl, w5_d300
ld b, a
ld c, $5
.asm_ccb39
--- a/battle/bg_effects.asm
+++ b/battle/bg_effects.asm
@@ -399,7 +399,7 @@
Functionc8223: ; c8223 (32:4223)
call Functionc9042
jr z, .asm_c8230
- ld hl, wd40e
+ ld hl, w5_d40e
inc [hl]
call EndBattleBGEffect
ret
@@ -465,7 +465,7 @@
Functionc8290: ; c8290 (32:4290)
call Functionc9042
jr z, .asm_c829d
- ld hl, wd40e
+ ld hl, w5_d40e
inc [hl]
call EndBattleBGEffect
ret
@@ -912,8 +912,8 @@
ret
Functionc8565: ; c8565 (32:4565)
- ld hl, wd422
- ld de, wd422 + 1
+ ld hl, w5_d422
+ ld de, w5_d422 + 1
ld c, $3f
ld a, [hl]
push af
@@ -926,7 +926,7 @@
pop af
ld [hl], a
ld de, LYOverridesBackup
- ld hl, wd422
+ ld hl, w5_d422
ld bc, $0
.asm_c8580
ld a, [$ffc7]
@@ -2749,7 +2749,7 @@
ld [BattleAnimTemps + 2], a
ld a, $40
ld [BattleAnimTemps + 3], a
- ld bc, wd422
+ ld bc, w5_d422
.asm_c8f7e
ld a, [BattleAnimTemps + 2]
ld d, a
--- a/engine/phone_scripts.asm
+++ b/engine/phone_scripts.asm
@@ -3118,7 +3118,7 @@
playrammusic
showemote $0, $fe, 30
callasm Function831e
- applymovement2 $d007
+ applymovement2 MovementBuffer
writepersonxy $fe
faceperson $0, $fe
jump UnknownScript_0xbe68a
@@ -3133,7 +3133,7 @@
startbattle
returnafterbattle
trainerstatus $1
- loadvar $d04d, $ff
+ loadvar wd04d, $ff
UnknownScript_0xbe698:
scripttalkafter
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -316,11 +316,11 @@
; text_pointer (RawTextPointerLabelParam)
ld a, [ScriptBank]
- ld [$d44e], a
+ ld [wd44e], a
call GetScriptByte
- ld [$d44f], a
+ ld [wd44f], a
call GetScriptByte
- ld [$d450], a
+ ld [wd450], a
ld b, BANK(JumpTextFacePlayerScript)
ld hl, JumpTextFacePlayerScript
jp ScriptJump
@@ -332,11 +332,11 @@
; text_pointer (RawTextPointerLabelParam)
ld a, [ScriptBank]
- ld [$d44e], a
+ ld [wd44e], a
call GetScriptByte
- ld [$d44f], a
+ ld [wd44f], a
call GetScriptByte
- ld [$d450], a
+ ld [wd450], a
ld b, BANK(JumpTextScript)
ld hl, JumpTextScript
jp ScriptJump
@@ -361,11 +361,11 @@
; text_pointer (PointerLabelBeforeBank)
call GetScriptByte
- ld [$d44e], a
+ ld [wd44e], a
call GetScriptByte
- ld [$d44f], a
+ ld [wd44f], a
call GetScriptByte
- ld [$d450], a
+ ld [wd450], a
ld b, BANK(JumpTextScript)
ld hl, JumpTextScript
jp ScriptJump
@@ -419,7 +419,7 @@
ld a, l
cp $ff
jr nz, .asm_96ed8 ; 0x96eca $c
- ld hl, $d44e
+ ld hl, wd44e
ld a, [hli]
ld b, a
ld a, [hli]
@@ -515,7 +515,7 @@
ld a, [ScriptBank]
ld hl, Function1d81
rst FarCall
- ld a, [$cfa9]
+ ld a, [wcfa9]
jr nc, .ok
xor a
.ok
@@ -529,7 +529,7 @@
ld a, [ScriptBank]
ld hl, Function202a
rst FarCall
- ld a, [$cf88]
+ ld a, [wcf88]
jr nc, .ok
xor a
.ok
@@ -608,7 +608,7 @@
call GetScriptByte
call Function9769e
ld a, [de]
- ld [$d10c], a
+ ld [wd10c], a
ld hl, NumItems
call ReceiveItem
ld a, $1
@@ -651,7 +651,7 @@
; script command 0x88
callba CheckItemPocket
- ld a, [$d142]
+ ld a, [wd142]
cp TM_HM
ld de, SFX_GET_TM
jr z, .play
@@ -665,7 +665,7 @@
GetPocketName: ; 96ffe
callba CheckItemPocket
- ld a, [$d142]
+ ld a, [wd142]
dec a
ld hl, .Pockets
and 3
@@ -698,7 +698,7 @@
CurItemName: ; 97051
ld a, [CurItem]
- ld [$d265], a
+ ld [wd265], a
call GetItemName
ret
; 9705b
@@ -860,13 +860,13 @@
call GetScriptByte
ld c, a
ld b, $0
- ld hl, $d045
+ ld hl, WalkingX
add hl, bc
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [$d03e]
+ ld a, [EngineBuffer1]
ld b, a
call Function269a
ret
@@ -875,11 +875,11 @@
Script_scripttalkafter: ; 0x97125
; script command 0x65
- ld hl, $d04b
+ ld hl, wd04b
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [$d03e]
+ ld a, [EngineBuffer1]
ld b, a
jp ScriptJump
; 0x97132
@@ -891,7 +891,7 @@
xor a
ld [ScriptVar], a
- ld hl, $d041
+ ld hl, wd041
ld e, [hl]
inc hl
ld d, [hl]
@@ -912,12 +912,12 @@
; win_text_pointer (TextPointerLabelParam)
; loss_text_pointer (TextPointerLabelParam)
- ld hl, $d047
+ ld hl, WalkingTile
call GetScriptByte
ld [hli], a
call GetScriptByte
ld [hli], a
- ld hl, $d049
+ ld hl, wd048 + 1
call GetScriptByte
ld [hli], a
call GetScriptByte
@@ -928,7 +928,7 @@
Script_talkaftercancel: ; 0x97163
; script command 0x66
- ld a, [$d04d]
+ ld a, [wd04d]
and a
ret z
jp Script_end
@@ -939,7 +939,7 @@
ld a, $1
ld [ScriptVar], a
- ld a, [$d04d]
+ ld a, [wd04d]
and a
ret nz
xor a
@@ -950,7 +950,7 @@
Script_playrammusic: ; 0x9717a
; script command 0x80
- ld a, [$d22f]
+ ld a, [OtherTrainerClass]
ld e, a
callba PlayTrainerEncounterMusic
ret
@@ -971,7 +971,7 @@
ld de, MUSIC_NONE
call PlayMusic
xor a
- ld [$c2a7], a
+ ld [MusicFade], a
call MaxVolume
call GetScriptByte
ld e, a
@@ -993,7 +993,7 @@
ld [MusicFadeID + 1], a
call GetScriptByte
and $7f
- ld [$c2a7], a
+ ld [MusicFade], a
ret
; 0x971b7
@@ -1203,7 +1203,7 @@
pop de
ld a, e
call Function1af8
- ld hl, $d0ed
+ ld hl, VramState
bit 6, [hl]
jr nz, .asm_972b5 ; 0x972b0 $3
call Function972bc
@@ -1239,7 +1239,7 @@
call GetScriptByte
ld e, a
ld d, $0
- ld hl, $d82e
+ ld hl, VariableSprites
add hl, de
call GetScriptByte
ld [hl], a
@@ -1437,13 +1437,13 @@
; param (DecimalParam)
ld hl, EarthquakeMovement
- ld de, $d002
+ ld de, wd002
ld bc, EarthquakeMovementEnd - EarthquakeMovement
call CopyBytes
call GetScriptByte
- ld [$d003], a
+ ld [wd003], a
and $3f
- ld [$d005], a
+ ld [wd005], a
ld b, BANK(UnknownScript_0x973e6)
ld de, UnknownScript_0x973e6
jp ScriptCall
@@ -1450,7 +1450,7 @@
; 0x973e6
UnknownScript_0x973e6: ; 973e6
- applymovement $0, $d002
+ applymovement $0, wd002
end
; 973eb
@@ -1466,7 +1466,7 @@
; script command 0x5a
ld a, $19
- ld [$d22e], a
+ ld [wd22e], a
ld a, $5
ld [CurPartyLevel], a
ret
@@ -1476,7 +1476,7 @@
; script command 0x5b
xor a
- ld [$d459], a
+ ld [wd459], a
ret
; 0x97400
@@ -1484,11 +1484,11 @@
; script command 0x5c
ld a, $81
- ld [$d459], a
- ld a, [$d043]
- ld [$d22f], a
- ld a, [$d044]
- ld [$d231], a
+ ld [wd459], a
+ ld a, [WalkingDirection]
+ ld [OtherTrainerClass], a
+ ld a, [FacingDirection]
+ ld [OtherTrainerID], a
ret
; 0x97412
@@ -1499,9 +1499,9 @@
; level (DecimalParam)
ld a, $80
- ld [$d459], a
+ ld [wd459], a
call GetScriptByte
- ld [$d22e], a
+ ld [wd22e], a
call GetScriptByte
ld [CurPartyLevel], a
ret
@@ -1514,11 +1514,11 @@
; trainer_id (TrainerIdParam)
ld a, $81
- ld [$d459], a
+ ld [wd459], a
call GetScriptByte
- ld [$d22f], a
+ ld [OtherTrainerClass], a
call GetScriptByte
- ld [$d231], a
+ ld [OtherTrainerID], a
ret
; 0x97436
@@ -1527,7 +1527,7 @@
call Function2879
predef StartBattle
- ld a, [$d0ee]
+ ld a, [wd0ee]
and $3f
ld [ScriptVar], a
ret
@@ -1548,10 +1548,10 @@
Script_returnafterbattle: ; 0x97459
; script command 0x60
- ld hl, $d459
+ ld hl, wd459
ld d, [hl]
ld [hl], $0
- ld a, [$d0ee]
+ ld a, [wd0ee]
and $3f
cp $1
jr nz, .asm_97470 ; 0x97466 $8
@@ -1564,7 +1564,7 @@
callba Functionfcfec
jr .asm_9748e ; 0x9747a $12
.asm_9747c
- ld a, [$d0ee]
+ ld a, [wd0ee]
bit 7, a
jr z, .asm_9748e ; 0x97481 $b
ld b, BANK(UnknownScript_0x90255)
@@ -1578,7 +1578,7 @@
; script command 0x7b
xor a
- ld [$d459], a
+ ld [wd459], a
ld a, $f3
ld [$ff9f], a
ld a, $1
@@ -1633,11 +1633,11 @@
ScriptCall: ; 0x974cb
push de
- ld hl, $d43c
+ ld hl, wd43c
ld e, [hl]
inc [hl]
ld d, $0
- ld hl, $d43d
+ ld hl, wd43d
add hl, de
add hl, de
add hl, de
@@ -1845,11 +1845,11 @@
; pointer (ScriptPointerLabelParam)
ld a, [ScriptBank]
- ld [$d44e], a
+ ld [wd44e], a
call GetScriptByte
- ld [$d44f], a
+ ld [wd44f], a
call GetScriptByte
- ld [$d450], a
+ ld [wd450], a
ld hl, ScriptFlags
set 3, [hl]
ret
@@ -1896,9 +1896,9 @@
; parameters:
; trigger_id (SingleByteParam)
- ld a, [$dcb5]
+ ld a, [MapGroup]
ld b, a
- ld a, [$dcb6]
+ ld a, [MapNumber]
ld c, a
jr Unknown_975fd ; 0x975f3 $8
; 0x975f5
@@ -2111,7 +2111,7 @@
jr nz, .asm_976b7 ; 0x976b2 $3
ld a, [ScriptVar]
.asm_976b7
- ld [$d265], a
+ ld [wd265], a
call GetPokemonName
ld de, StringBuffer1
@@ -2141,7 +2141,7 @@
jr nz, .asm_976de ; 0x976d9 $3
ld a, [ScriptVar]
.asm_976de
- ld [$d265], a
+ ld [wd265], a
call GetItemName
ld de, StringBuffer1
jr Unknown_976c0 ; 0x976e7 $d7
@@ -2152,9 +2152,9 @@
; parameters:
; memory (SingleByteParam)
- ld a, [$dcb5]
+ ld a, [MapGroup]
ld b, a
- ld a, [$dcb6]
+ ld a, [MapNumber]
ld c, a
call GetWorldMapLocation
@@ -2198,11 +2198,11 @@
; memory (SingleByteParam)
call GetScriptByte
- ld [$cf61], a
+ ld [wcf61], a
Unknown_9771c: ; 0x9771c
call GetScriptByte
- ld [$cf60], a
+ ld [CurSpecies], a
call GetName
ld de, StringBuffer1
jp Unknown_976c0
@@ -2215,7 +2215,7 @@
; memory (SingleByteParam)
ld a, $7
- ld [$cf61], a
+ ld [wcf61], a
jr Unknown_9771c ; 0x97730 $ea
; 0x97732
@@ -2302,7 +2302,7 @@
push bc
inc hl
ld bc, $0020
- ld de, $d002
+ ld de, wd002
ld a, [ScriptBank]
call FarCopyBytes
pop bc
@@ -2338,7 +2338,7 @@
.asm_977d4
ld [CurItem], a
call GetScriptByte
- ld [$d10c], a
+ ld [wd10c], a
ld hl, NumItems
call ReceiveItem
jr nc, .asm_977eb ; 0x977e3 $6
@@ -2362,9 +2362,9 @@
call GetScriptByte
ld [CurItem], a
call GetScriptByte
- ld [$d10c], a
+ ld [wd10c], a
ld a, $ff
- ld [$d107], a
+ ld [wd107], a
ld hl, NumItems
call TossItem
ret nc
@@ -2443,9 +2443,9 @@
Function97861: ; 0x97861
call GetScriptByte
and a
- ld de, $d84e
+ ld de, Money
ret z
- ld de, $d851
+ ld de, wMomsMoney
ret
; 0x9786d
@@ -2590,9 +2590,9 @@
; call_id (MultiByteParam)
call GetScriptByte
- ld [$dc31], a
+ ld [wdc31], a
call GetScriptByte
- ld [$dc32], a
+ ld [wdc31 + 1], a
ret
; 0x97926
@@ -2599,7 +2599,7 @@
Script_checkphonecall: ; 0x97926
; script command 0x9d
- ld a, [$dc31]
+ ld a, [wdc31]
and a
jr z, .ok
ld a, 1
@@ -2651,7 +2651,7 @@
xor a
ld [ScriptVar], a
- ld [$cf5f], a
+ ld [MonType], a
call GetScriptByte
ld [CurPartySpecies], a
call GetScriptByte
@@ -2786,9 +2786,9 @@
; pointer (MultiByteParam)
call GetScriptByte
- ld [$d453], a
+ ld [wd453], a
call GetScriptByte
- ld [$d454], a
+ ld [wd454], a
ret
; 0x97a0e
@@ -2804,10 +2804,10 @@
call GetScriptByte
and $3
ld c, a
- ld a, [$d45b]
+ ld a, [wd45b]
set 5, a
or c
- ld [$d45b], a
+ ld [wd45b], a
; 0x97a1d
Script_warp: ; 0x97a1d
@@ -2821,15 +2821,15 @@
call GetScriptByte
and a
jr z, .asm_97a4a ; 0x97a21 $27
- ld [$dcb5], a
+ ld [MapGroup], a
call GetScriptByte
- ld [$dcb6], a
+ ld [MapNumber], a
call GetScriptByte
- ld [$dcb8], a
+ ld [XCoord], a
call GetScriptByte
- ld [$dcb7], a
+ ld [YCoord], a
ld a, $ff
- ld [$d001], a
+ ld [wd001], a
ld a, $f1
ld [$ff9f], a
ld a, $1
@@ -2841,7 +2841,7 @@
call GetScriptByte
call GetScriptByte
ld a, $ff
- ld [$d001], a
+ ld [wd001], a
ld a, $fb
ld [$ff9f], a
ld a, $1
@@ -2858,11 +2858,11 @@
; map_id (MapIdParam)
call GetScriptByte
- ld [$dcac], a
+ ld [wdcac], a
call GetScriptByte
- ld [$dcad], a
+ ld [BackupMapGroup], a
call GetScriptByte
- ld [$dcae], a
+ ld [BackupMapNumber], a
ret
; 0x97a78
@@ -2873,9 +2873,9 @@
; map_id (MapIdParam)
call GetScriptByte
- ld [$dcb2], a
+ ld [wdcb2], a
call GetScriptByte
- ld [$dcb3], a
+ ld [wdcb3], a
ret
; 0x97a85
@@ -2883,7 +2883,7 @@
; script command 0x83
ld a, $1
- ld [$c2c1], a
+ ld [wc2c1], a
ret
; 0x97a8b
@@ -2924,11 +2924,11 @@
; map_data_pointer (MapDataPointerParam)
call GetScriptByte
- ld [$d1a0], a
+ ld [MapBlockDataBank], a
call GetScriptByte
- ld [$d1a1], a
+ ld [MapBlockDataPointer], a
call GetScriptByte
- ld [$d1a2], a
+ ld [MapBlockDataPointer + 1], a
call Function24e4
call Function2879
ret
@@ -3023,7 +3023,7 @@
; byte (SingleByteParam)
call GetScriptByte
- ld [$c2cf], a
+ ld [wc2cf], a
ret
; 0x97b2e
@@ -3132,7 +3132,7 @@
ExitScriptSubroutine: ; 0x97b9a
; Return carry if there's no parent to return to.
- ld hl, $d43c
+ ld hl, wd43c
ld a, [hl]
and a
jr z, .asm_97bbe ; 0x97b9f $1d
@@ -3139,7 +3139,7 @@
dec [hl]
ld e, [hl]
ld d, $0
- ld hl, $d43d
+ ld hl, wd43d
add hl, de
add hl, de
add hl, de
@@ -3164,7 +3164,7 @@
; script command 0x93
xor a
- ld [$d43c], a
+ ld [wd43c], a
ld [ScriptRunning], a
ld a, SCRIPT_OFF
ld [ScriptMode], a
@@ -3177,12 +3177,12 @@
Script_halloffame: ; 0x97bd5
; script command 0xa1
- ld hl, $cfbc
+ ld hl, GameTimerPause
res 0, [hl]
callba Mobile_HallOfFame
callba Mobile_HallOfFame2
callba HallOfFame
- ld hl, $cfbc
+ ld hl, GameTimerPause
set 0, [hl]
jr DisplayCredits
; 0x97bf3
--- a/event/poke_seer.asm
+++ b/event/poke_seer.asm
@@ -44,7 +44,7 @@
SeerAction: ; 4f0ee
- ld a, [$d002]
+ ld a, [wd002]
ld hl, SeerActions
rst JumpTable
ret
@@ -100,14 +100,14 @@
ld a, PartyMon1CaughtData - PartyMon1
call GetPartyParamLocation
ld a, [hli]
- ld [$d03b], a
+ ld [wd03b], a
ld a, [hld]
- ld [$d03c], a
+ ld [wd03b + 1], a
or [hl]
jr z, .asm_4f170
ld a, 1
- ld [$d002], a
+ ld [wd002], a
ld a, PartyMon1ID - PartyMon1
call GetPartyParamLocation
@@ -120,7 +120,7 @@
jr nz, .asm_4f15f
ld a, 0
- ld [$d002], a
+ ld [wd002], a
.asm_4f15f
call GetCaughtLevel
@@ -133,7 +133,7 @@
.asm_4f170
ld a, 2
- ld [$d002], a
+ ld [wd002], a
ret
; 4f176
@@ -142,7 +142,7 @@
ld hl, PartyMonNicknames
ld bc, PKMN_NAME_LENGTH
call AddNTimes
- ld de, $d003
+ ld de, wd003
ld bc, PKMN_NAME_LENGTH
call CopyBytes
ret
@@ -150,12 +150,12 @@
GetCaughtLevel: ; 4f18c
ld a, "@"
- ld hl, $d036
+ ld hl, wd036
ld bc, 4
call ByteFill
; caught level
- ld a, [$d03b]
+ ld a, [wd03b]
and $3f
jr z, .unknown
cp 1 ; hatched from an egg
@@ -163,15 +163,15 @@
ld a, 5 ; egg hatch level
- ld [$d03a], a
- ld hl, $d036
- ld de, $d03a
+ ld [wd038 + 2], a
+ ld hl, wd036
+ ld de, wd038 + 2
ld bc, $4103
call PrintNum
ret
.unknown
- ld de, $d036
+ ld de, wd036
ld hl, .unknown_level
ld bc, 4
call CopyBytes
@@ -183,7 +183,7 @@
; 4f1c5
GetCaughtTime: ; 4f1c5
- ld a, [$d03b]
+ ld a, [wd03b]
and $c0
jr z, .none
@@ -194,13 +194,13 @@
call GetNthString
ld d, h
ld e, l
- ld hl, $d01f
+ ld hl, wd01f
call CopyName2
and a
ret
.none
- ld de, $d01f
+ ld de, wd01f
call UnknownCaughtData
ret
; 4f1e6
@@ -223,7 +223,7 @@
; 4f20a
GetCaughtLocation: ; 4f20a
- ld a, [$d03c]
+ ld a, [wd03b + 1]
and $7f
jr z, .asm_4f22e
cp $7f
@@ -233,7 +233,7 @@
ld e, a
callba GetLandmarkName
ld hl, StringBuffer1
- ld de, $d00e
+ ld de, wd00e
ld bc, $0011
call CopyBytes
and a
@@ -240,18 +240,18 @@
ret
.asm_4f22e
- ld de, $d00e
+ ld de, wd00e
jp UnknownCaughtData
.asm_4f234
ld a, $4
- ld [$d002], a
+ ld [wd002], a
scf
ret
.asm_4f23b
ld a, $3
- ld [$d002], a
+ ld [wd002], a
scf
ret
; 4f242
@@ -261,17 +261,17 @@
ld hl, PartyMonOT
ld bc, NAME_LENGTH
call AddNTimes
- ld de, $d02a
+ ld de, wd02a
ld bc, $000b
call CopyBytes
ld hl, .male
- ld a, [$d03c]
+ ld a, [wd03b + 1]
bit 7, a
jr z, .asm_4f264
ld hl, .female
.asm_4f264
- ld de, $d035
+ ld de, wd034 + 1
ld a, "@"
ld [de], a
ret
@@ -359,7 +359,7 @@
SeerAdvice: ; 4f2b4
ld a, PartyMon1Level - PartyMon1
call GetPartyParamLocation
- ld a, [$d03a]
+ ld a, [wd038 + 2]
ld c, a
ld a, [hl]
sub c
--- a/gfx/pics/animation.asm
+++ b/gfx/pics/animation.asm
@@ -109,10 +109,10 @@
push af
ld a, $2
ld [rSVBK], a
- ld a, [$d168]
+ ld a, [w2_d168]
ld c, a
ld b, 0
- ld hl, $d169
+ ld hl, w2_d169
ld a, [hli]
ld h, [hl]
ld l, a
@@ -120,7 +120,7 @@
ld a, [hl]
ld hl, Jumptable_d00da
rst JumpTable
- ld a, [$d168]
+ ld a, [w2_d168]
ld c, a
pop af
ld [rSVBK], a
@@ -148,18 +148,18 @@
Functiond00f2: ; d00f2
ld a, $12
- ld [$d181], a
- ld a, [$d168]
+ ld [w2_d181], a
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
Functiond00fe: ; d00fe
- ld hl, $d181
+ ld hl, w2_d181
dec [hl]
ret nz
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d010b
@@ -168,9 +168,9 @@
ld b, $0
call Functiond0228
call Functiond0504
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d011d
@@ -179,9 +179,9 @@
ld b, $4
call Functiond0228
call Functiond0504
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d012f
@@ -190,65 +190,65 @@
ld b, $0
call Functiond0228
call Functiond0504
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d0141
Functiond0141: ; d0141
call Functiond0250
- ld a, [$d17e]
+ ld a, [w2_d17e]
bit 7, a
ret z
call Functiond04bd
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d0155
Functiond0155: ; d0155
call Functiond0250
- ld a, [$d17e]
+ ld a, [w2_d17e]
bit 7, a
ret z
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d0166
Functiond0166: ; d0166
call Functiond01a9
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d0171
Functiond0171: ; d0171
call Functiond01a9
- ld hl, $d168
+ ld hl, w2_d168
set 7, [hl]
ret
; d017a
Functiond017a: ; d017a
- ld a, [$d16b]
+ ld a, [w2_d16b]
call _PlayCry
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d0188
Functiond0188: ; d0188
- ld a, [$d16b]
+ ld a, [w2_d16b]
call PlayCry2
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d0196
@@ -255,11 +255,11 @@
Functiond0196: ; d0196
ld a, $f
ld [CryTracks], a
- ld a, [$d16b]
+ ld a, [w2_d16b]
call PlayStereoCry2
- ld a, [$d168]
+ ld a, [w2_d168]
inc a
- ld [$d168], a
+ ld [w2_d168], a
ret
; d01a9
@@ -299,7 +299,7 @@
push bc
push de
push hl
- ld hl, $d168
+ ld hl, w2_d168
ld bc, $0029
xor a
call ByteFill
@@ -307,28 +307,28 @@
pop de
pop bc
ld a, c
- ld [$d169], a
+ ld [w2_d169], a
ld a, b
- ld [$d16a], a
+ ld [w2_d16a], a
ld a, l
- ld [$d16f], a
+ ld [w2_d16f], a
ld a, h
- ld [$d170], a
+ ld [w2_d170], a
ld a, d
- ld [$d16e], a
+ ld [w2_d16e], a
ld a, $1
ld hl, CurPartySpecies
call GetFarWRAMByte
- ld [$d16b], a
+ ld [w2_d16b], a
ld a, $1
ld hl, UnownLetter
call GetFarWRAMByte
- ld [$d16c], a
+ ld [w2_d16c], a
call Functiond065c
- ld [$d16d], a
+ ld [w2_d16d], a
call Functiond05b4
ld a, c
- ld [$d171], a
+ ld [w2_d171], a
pop af
ld [rSVBK], a
ret
@@ -340,15 +340,15 @@
ld a, $2
ld [rSVBK], a
push bc
- ld hl, $d172
+ ld hl, w2_d172
ld bc, $001f
xor a
call ByteFill
pop bc
ld a, b
- ld [$d173], a
+ ld [w2_d172 + 1], a
ld a, c
- ld [$d172], a
+ ld [w2_d172], a
call Functiond055c
call Functiond05ce
call Functiond061b
@@ -362,7 +362,7 @@
ld [hBGMapMode], a
Functiond0253: ; d0253
- ld a, [$d17e]
+ ld a, [w2_d17e]
and $7f
ld hl, Tabled025d
rst JumpTable
@@ -376,7 +376,7 @@
Functiond0261: ; d0261
call Functiond02f8
- ld a, [$d182]
+ ld a, [w2_d182]
cp $ff
jr z, Functiond02a8
cp $fe
@@ -384,15 +384,15 @@
cp $fd
jr z, Functiond0296
call Functiond02c8
- ld a, [$d183]
+ ld a, [w2_d183]
call Functiond02ae
- ld [$d181], a
+ ld [w2_d181], a
call Functiond02dc
Functiond0282: ; d0282
- ld a, [$d181]
+ ld a, [w2_d181]
dec a
- ld [$d181], a
+ ld [w2_d181], a
ret nz
call Functiond02e4
ret
@@ -399,25 +399,25 @@
; d028e
Functiond028e: ; d028e
- ld a, [$d183]
- ld [$d17f], a
+ ld a, [w2_d183]
+ ld [w2_d17f], a
jr Functiond0253
; d0296
Functiond0296: ; d0296
- ld a, [$d17f]
+ ld a, [w2_d17f]
and a
ret z
dec a
- ld [$d17f], a
+ ld [w2_d17f], a
ret z
- ld a, [$d183]
- ld [$d17d], a
+ ld a, [w2_d183]
+ ld [w2_d17d], a
jr Functiond0253
; d02a8
Functiond02a8: ; d02a8
- ld hl, $d17e
+ ld hl, w2_d17e
set 7, [hl]
ret
; d02ae
@@ -426,7 +426,7 @@
ld c, a
ld b, $0
ld hl, $0000
- ld a, [$d173]
+ ld a, [w2_d173]
call AddNTimes
ld a, h
swap a
@@ -442,7 +442,7 @@
Functiond02c8: ; d02c8
call Functiond04bd
- ld a, [$d182]
+ ld a, [w2_d182]
and a
ret z
call Functiond031b
@@ -454,27 +454,27 @@
; d02dc
Functiond02dc: ; d02dc
- ld a, [$d17e]
+ ld a, [w2_d17e]
inc a
- ld [$d17e], a
+ ld [w2_d17e], a
ret
; d02e4
Functiond02e4: ; d02e4
- ld a, [$d17e]
+ ld a, [w2_d17e]
dec a
- ld [$d17e], a
+ ld [w2_d17e], a
ret
; d02ec
Functiond02ec: ; d02ec
- ld a, [$d16b]
+ ld a, [w2_d16b]
cp UNOWN
ret
; d02f2
Functiond02f2: ; d02f2
- ld a, [$d16b]
+ ld a, [w2_d16b]
cp EGG
ret
; d02f8
@@ -481,22 +481,22 @@
Functiond02f8: ; d02f8
push hl
- ld a, [$d17d]
+ ld a, [w2_d17d]
ld e, a
ld d, $0
- ld hl, $d175
+ ld hl, w2_d175
ld a, [hli]
ld h, [hl]
ld l, a
add hl, de
add hl, de
- ld a, [$d174]
+ ld a, [w2_d174]
call GetFarHalfword
ld a, l
- ld [$d182], a
+ ld [w2_d182], a
ld a, h
- ld [$d183], a
- ld hl, $d17d
+ ld [w2_d183], a
+ ld hl, w2_d17d
inc [hl]
pop hl
ret
@@ -503,21 +503,21 @@
; d031b
Functiond031b: ; d031b
- ld a, [$d182]
+ ld a, [w2_d182]
dec a
ld c, a
ld b, $0
- ld hl, $d178
+ ld hl, w2_d178
ld a, [hli]
ld h, [hl]
ld l, a
add hl, bc
add hl, bc
- ld a, [$d177]
+ ld a, [w2_d177]
call GetFarHalfword
- ld a, [$d177]
+ ld a, [w2_d177]
call GetFarByte
- ld [$d180], a
+ ld [w2_d180], a
inc hl
ret
; d033b
@@ -525,15 +525,15 @@
Functiond033b: ; d033b
call Functiond0356
push bc
- ld hl, $d17b
+ ld hl, w2_d17b
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [$d180]
+ ld a, [w2_d180]
call AddNTimes
pop bc
- ld de, $d188
- ld a, [$d17a]
+ ld de, w2_d188
+ ld a, [w2_d17a]
call FarCopyBytes
ret
; d0356
@@ -540,7 +540,7 @@
Functiond0356: ; d0356
push hl
- ld a, [$d171]
+ ld a, [w2_d171]
sub 5
ld c, a
ld b, 0
@@ -556,9 +556,9 @@
Functiond036b: ; d036b
xor a
- ld [$d187], a
- ld [$d186], a
- ld [$d185], a
+ ld [w2_d187], a
+ ld [w2_d186], a
+ ld [w2_d185], a
.asm_d0375
push hl
call Functiond0392
@@ -567,7 +567,7 @@
and a
jr z, .asm_d038a
- ld a, [$d177]
+ ld a, [w2_d177]
call GetFarByte
inc hl
push hl
@@ -583,7 +583,7 @@
; d0392
Functiond0392: ; d0392
- ld a, [$d187]
+ ld a, [w2_d187]
and $f8
rrca
rrca
@@ -590,10 +590,10 @@
rrca
ld e, a
ld d, 0
- ld hl, $d188
+ ld hl, w2_d188
add hl, de
ld b, [hl]
- ld a, [$d187]
+ ld a, [w2_d187]
and 7
jr z, .asm_d03b0
@@ -613,7 +613,7 @@
.asm_d03b7
ld b, a
- ld hl, $d187
+ ld hl, w2_d187
inc [hl]
ret
; d03bd
@@ -624,7 +624,7 @@
pop af
push hl
call Functiond03f7
- ld hl, $d16e
+ ld hl, w2_d16e
add [hl]
pop hl
ld [hl], a
@@ -633,13 +633,13 @@
Functiond03cd: ; d03cd
call Functiond046c
- ld a, [$d186]
+ ld a, [w2_d186]
ld bc, $0014
call AddNTimes
- ld a, [$c2c6]
+ ld a, [wc2c6]
and a
jr nz, .asm_d03e8
- ld a, [$d185]
+ ld a, [w2_d185]
ld e, a
ld d, 0
add hl, de
@@ -646,7 +646,7 @@
jr .asm_d03f3
.asm_d03e8
- ld a, [$d185]
+ ld a, [w2_d185]
ld e, a
ld a, l
sub e
@@ -663,7 +663,7 @@
Functiond03f7: ; d03f7
push af
- ld a, [$d171]
+ ld a, [w2_d171]
cp 5
jr z, .asm_d0405
cp 6
@@ -727,12 +727,12 @@
Functiond046c: ; d046c
- ld hl, $d16f
+ ld hl, w2_d16f
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [$d171]
+ ld a, [w2_d171]
ld de, 0
ld bc, 6
cp 7
@@ -745,7 +745,7 @@
ld bc, 45
.asm_d048f
- ld a, [$c2c6]
+ ld a, [wc2c6]
and a
jr nz, .asm_d0497
add hl, de
@@ -757,20 +757,20 @@
; d0499
Functiond0499: ; d0499
- ld a, [$d186]
+ ld a, [w2_d186]
inc a
- ld [$d186], a
+ ld [w2_d186], a
ld c, a
- ld a, [$d171]
+ ld a, [w2_d171]
cp c
jr nz, .asm_d04bb
xor a
- ld [$d186], a
- ld a, [$d185]
+ ld [w2_d186], a
+ ld a, [w2_d185]
inc a
- ld [$d185], a
+ ld [w2_d185], a
ld c, a
- ld a, [$d171]
+ ld a, [w2_d171]
cp c
jr nz, .asm_d04bb
scf
@@ -783,7 +783,7 @@
Functiond04bd: ; d04bd
call Functiond04f6
- ld a, [$c2c6]
+ ld a, [wc2c6]
and a
jr nz, .asm_d04ce
ld de, 1
@@ -795,7 +795,7 @@
ld bc, 6
.asm_d04d4
- ld hl, $d16f
+ ld hl, w2_d16f
ld a, [hli]
ld h, [hl]
ld l, a
@@ -802,7 +802,7 @@
add hl, bc
ld c, 7
ld b, 7
- ld a, [$d16e]
+ ld a, [w2_d16e]
.asm_d04e2
push bc
push hl
@@ -824,7 +824,7 @@
; d04f6
Functiond04f6: ; d04f6
- ld hl, $d16f
+ ld hl, w2_d16f
ld a, [hli]
ld h, [hl]
ld l, a
@@ -895,7 +895,7 @@
; d0551
Functiond0551: ; d0551
- ld hl, $d16f
+ ld hl, w2_d16f
ld a, [hli]
ld h, [hl]
ld l, a
@@ -918,7 +918,7 @@
ld de, AnimationExtraPointers
.asm_d0576
- ld a, [$d172]
+ ld a, [w2_d172]
and a
jr z, .asm_d057e
ld h, d
@@ -925,7 +925,7 @@
ld l, e
.asm_d057e
- ld a, [$d16d]
+ ld a, [w2_d16d]
dec a
ld e, a
ld d, 0
@@ -932,18 +932,18 @@
add hl, de
add hl, de
ld a, c
- ld [$d174], a
+ ld [w2_d174], a
call GetFarHalfword
ld a, l
- ld [$d175], a
+ ld [w2_d175], a
ld a, h
- ld [$d176], a
+ ld [w2_d176], a
ret
.egg
ld hl, EggAnimation
ld c, BANK(EggAnimation)
- ld a, [$d172]
+ ld a, [w2_d172]
and a
jr z, .asm_d05a7
ld hl, EggAnimationExtra
@@ -951,11 +951,11 @@
.asm_d05a7
ld a, c
- ld [$d174], a
+ ld [w2_d174], a
ld a, l
- ld [$d175], a
+ ld [w2_d175], a
ld a, h
- ld [$d176], a
+ ld [w2_d176], a
ret
; d05b4
@@ -984,7 +984,7 @@
ld c, BANK(UnownsFrames)
ld hl, UnownFramesPointers
jr z, .asm_d05ef
- ld a, [$d16b]
+ ld a, [w2_d16b]
cp 151 + 1
ld b, BANK(FramesPointers)
ld c, BANK(KantoFrames)
@@ -993,9 +993,9 @@
ld c, BANK(JohtoFrames)
.asm_d05ef
ld a, c
- ld [$d177], a
+ ld [w2_d177], a
- ld a, [$d16d]
+ ld a, [w2_d16d]
dec a
ld e, a
ld d, 0
@@ -1004,9 +1004,9 @@
ld a, b
call GetFarHalfword
ld a, l
- ld [$d178], a
+ ld [w2_d178], a
ld a, h
- ld [$d179], a
+ ld [w2_d179], a
ret
.egg
@@ -1013,11 +1013,11 @@
ld hl, EggFrames
ld c, BANK(EggFrames)
ld a, c
- ld [$d177], a
+ ld [w2_d177], a
ld a, l
- ld [$d178], a
+ ld [w2_d178], a
ld a, h
- ld [$d179], a
+ ld [w2_d179], a
ret
; d061b
@@ -1032,20 +1032,20 @@
ld a, BANK(BitmasksPointers)
ld hl, BitmasksPointers
.asm_d062f
- ld [$d17a], a
+ ld [w2_d17a], a
- ld a, [$d16d]
+ ld a, [w2_d16d]
dec a
ld e, a
ld d, 0
add hl, de
add hl, de
- ld a, [$d17a]
+ ld a, [w2_d17a]
call GetFarHalfword
ld a, l
- ld [$d17b], a
+ ld [w2_d17b], a
ld a, h
- ld [$d17c], a
+ ld [w2_d17c], a
ret
.egg
@@ -1052,11 +1052,11 @@
ld c, BANK(EggBitmasks)
ld hl, EggBitmasks
ld a, c
- ld [$d17a], a
+ ld [w2_d17a], a
ld a, l
- ld [$d17b], a
+ ld [w2_d17b], a
ld a, h
- ld [$d17c], a
+ ld [w2_d17c], a
ret
; d065c
@@ -1063,17 +1063,17 @@
Functiond065c: ; d065c
call Functiond02ec
jr z, .asm_d0665
- ld a, [$d16b]
+ ld a, [w2_d16b]
ret
.asm_d0665
- ld a, [$d16c]
+ ld a, [w2_d16c]
ret
; d0669
Functiond0669: ; d0669
ld a, $1
- ld [$c2c6], a
+ ld [wc2c6], a
Functiond066e: ; d066e
call Functiond01c6
@@ -1090,12 +1090,12 @@
ld e, c
call Functiond008e
xor a
- ld [$c2c6], a
+ ld [wc2c6], a
ret
.asm_d068c
xor a
- ld [$c2c6], a
+ ld [wc2c6], a
inc a
ld [CurPartySpecies], a
ret
--- a/wram.asm
+++ b/wram.asm
@@ -281,7 +281,8 @@
wc2cc:: ds 1
wc2cd:: ds 1
-wc2ce:: ds 2
+wc2ce:: ds 1
+wc2cf:: ds 1
wc2d0:: ds 4
wc2d4:: ds 1
wc2d5:: ds 1
@@ -1357,7 +1358,8 @@
wd033:: ds 1
wd034:: ds 2
wd036:: ds 2
-wd038:: ds 6
+wd038:: ds 3
+wd03b:: ds 3
MenuItemsList::
CurFruitTree::
@@ -1389,7 +1391,9 @@
WalkingTile:: ; d047
ds 1
-wd048:: ds 6
+wd048:: ds 3
+wd04b:: ds 2
+wd04d:: ds 1
wd04e:: ds 2
wd050:: ds 10
wd05a:: ds 12
@@ -1853,12 +1857,16 @@
ScriptPos:: ; d43a
ds 2
- ds 17
+wd43c:: ds 1
+wd43d:: ds 16
ScriptDelay:: ; d44d
ds 1
- ds 4
+wd44e:: ds 1
+wd44f:: ds 1
+wd450:: ds 1
+wd451:: ds 1
wd452:: ds 1
wd453:: ds 1
wd454:: ds 1
@@ -2479,7 +2487,45 @@
wdff5::
+SECTION "Pic Animations", WRAMX, BANK [2]
+w2_d000:: ds $168
+
+w2_d168:: ds 1
+w2_d169:: ds 1
+w2_d16a:: ds 1
+w2_d16b:: ds 1
+w2_d16c:: ds 1
+w2_d16d:: ds 1
+w2_d16e:: ds 1
+w2_d16f:: ds 1
+w2_d170:: ds 1
+w2_d171:: ds 1
+w2_d172:: ds 1
+w2_d173:: ds 1
+w2_d174:: ds 1
+w2_d175:: ds 1
+w2_d176:: ds 1
+w2_d177:: ds 1
+w2_d178:: ds 1
+w2_d179:: ds 1
+w2_d17a:: ds 1
+w2_d17b:: ds 1
+w2_d17c:: ds 1
+w2_d17d:: ds 1
+w2_d17e:: ds 1
+w2_d17f:: ds 1
+w2_d180:: ds 1
+w2_d181:: ds 1
+w2_d182:: ds 1
+w2_d183:: ds 1
+w2_d184:: ds 1
+w2_d185:: ds 1
+w2_d186:: ds 1
+w2_d187:: ds 1
+w2_d188:: ds 1
+
+
SECTION "GBC Video", WRAMX, BANK [5]
; 8 4-color palettes
@@ -2503,7 +2549,7 @@
SECTION "Battle Animations", WRAMX, BANK [5]
-wd300:: ds 10
+w5_d300:: ds 10
ActiveAnimObjects:: ; d30a
ds 4 * 40
@@ -2513,7 +2559,7 @@
ActiveBGEffects:: ; d3fa
ds 4 * 5
-wd40e:: ds 1
+w5_d40e:: ds 1
BattleAnimFlags:: ; d40f
ds 1
@@ -2529,11 +2575,11 @@
ds 1
BattleAnimByte:: ; d417
ds 1
-wd418:: ds 1
+w5_d418:: ds 1
BattleAnimTemps:: ; d419
ds 8
ds 1
-wd422:: ds $40
+w5_d422:: ds $40
SECTION "Scratch", SRAM, BANK [0]