Blindly use wram labels for everything except mobile, part 1.

Wram banks and mobile make this tough, since any address can secretly be a ghost.

As usual, mobile completely disregards 99% of the codebase. It's been ignored in kind.
This commit is contained in:
yenatch 2015-02-08 00:03:32 -08:00
parent 0683bc8770
commit 8e03321069
21 changed files with 10879 additions and 10151 deletions

View File

@ -40,7 +40,7 @@ _SoundRestart:: ; e8000
ld hl, Channel1 ; start of channel data
ld de, $01bf ; length of area to clear (entire sound wram area)
.clearchannels ; clear $c101-$c2bf
.clearchannels ; clear Channel1-$c2bf
xor a
ld [hli], a
dec de
@ -129,15 +129,15 @@ _UpdateSound:: ; e805c
ld hl, Channel1DutyCycle - Channel1
add hl, bc
ld a, [hli]
ld [$c292], a
ld [wc292], a
; intensity
ld a, [hli]
ld [$c293], a
ld [wc293], a
; frequency
ld a, [hli]
ld [$c294], a
ld [wc294], a
ld a, [hl]
ld [$c295], a
ld [wc295], a
;
call Functione8466 ; handle vibrato and other things
call HandleNoise
@ -151,16 +151,16 @@ _UpdateSound:: ; e805c
jr nc, .next
; are any sfx channels active?
; if so, mute
ld hl, $c1cc ; Channel5Flags
ld hl, Channel5Flags
bit 0, [hl]
jr nz, .restnote
ld hl, $c1fe ; Channel6Flags
ld hl, Channel6Flags
bit 0, [hl]
jr nz, .restnote
ld hl, $c230 ; Channel7Flags
ld hl, Channel7Flags
bit 0, [hl]
jr nz, .restnote
ld hl, $c262 ; Channel8Flags
ld hl, Channel8Flags
bit 0, [hl]
jr z, .next
.restnote
@ -261,14 +261,14 @@ UpdateChannels: ; e8125
jr nz, .asm_e8184
jr .asm_e8175
.asm_e816b
ld a, [$c294]
ld a, [wc294]
ld [rNR13], a
ld a, [$c295]
ld a, [wc295]
ld [rNR14], a
.asm_e8175
bit 0, [hl]
ret z
ld a, [$c292]
ld a, [wc292]
ld d, a
ld a, [rNR11]
and a, $3f ; sound length
@ -276,13 +276,13 @@ UpdateChannels: ; e8125
ld [rNR11], a
ret
.asm_e8184
ld a, [$c292]
ld a, [wc292]
ld d, a
ld a, [rNR11]
and a, $3f ; sound length
or d
ld [rNR11], a
ld a, [$c294]
ld a, [wc294]
ld [rNR13], a
ret
.ch1rest
@ -293,15 +293,15 @@ UpdateChannels: ; e8125
call ClearChannel
ret
.asm_e81a2
ld hl, $c292
ld hl, wc292
ld a, $3f ; sound length
or [hl]
ld [rNR11], a
ld a, [$c293]
ld a, [wc293]
ld [rNR12], a
ld a, [$c294]
ld a, [wc294]
ld [rNR13], a
ld a, [$c295]
ld a, [wc295]
or a, $80
ld [rNR14], a
ret
@ -318,7 +318,7 @@ UpdateChannels: ; e8125
jr nz, .asm_e81e6
bit 0, [hl]
ret z
ld a, [$c292]
ld a, [wc292]
ld d, a
ld a, [rNR21]
and a, $3f ; sound length
@ -326,19 +326,19 @@ UpdateChannels: ; e8125
ld [rNR21], a
ret
.asm_e81db ; unused
ld a, [$c294]
ld a, [wc294]
ld [rNR23], a
ld a, [$c295]
ld a, [wc295]
ld [rNR24], a
ret
.asm_e81e6
ld a, [$c292]
ld a, [wc292]
ld d, a
ld a, [rNR21]
and a, $3f ; sound length
or d
ld [rNR21], a
ld a, [$c294]
ld a, [wc294]
ld [rNR23], a
ret
.ch2rest
@ -349,15 +349,15 @@ UpdateChannels: ; e8125
call ClearChannel
ret
.asm_e8204
ld hl, $c292
ld hl, wc292
ld a, $3f ; sound length
or [hl]
ld [rNR21], a
ld a, [$c293]
ld a, [wc293]
ld [rNR22], a
ld a, [$c294]
ld a, [wc294]
ld [rNR23], a
ld a, [$c295]
ld a, [wc295]
or a, $80 ; initial (restart)
ld [rNR24], a
ret
@ -374,13 +374,13 @@ UpdateChannels: ; e8125
jr nz, .asm_e823a
ret
.asm_e822f ; unused
ld a, [$c294]
ld a, [wc294]
ld [rNR33], a
ld a, [$c295]
ld a, [wc295]
ld [rNR34], a
ret
.asm_e823a
ld a, [$c294]
ld a, [wc294]
ld [rNR33], a
ret
.ch3rest
@ -398,15 +398,15 @@ UpdateChannels: ; e8125
call .asm_e8268
ld a, $80
ld [rNR30], a
ld a, [$c294]
ld a, [wc294]
ld [rNR33], a
ld a, [$c295]
ld a, [wc295]
or a, $80
ld [rNR34], a
ret
.asm_e8268
push hl
ld a, [$c293]
ld a, [wc293]
and a, $0f ; only 0-9 are valid
ld l, a
ld h, $00
@ -453,7 +453,7 @@ UpdateChannels: ; e8125
ld a, [hli]
ld [$ff3f], a
pop hl
ld a, [$c293]
ld a, [wc293]
and a, $f0
sla a
ld [rNR32], a
@ -469,7 +469,7 @@ UpdateChannels: ; e8125
jr nz, .asm_e82d4
ret
.asm_e82c1 ; unused
ld a, [$c294]
ld a, [wc294]
ld [rNR43], a
ret
.ch4rest
@ -482,9 +482,9 @@ UpdateChannels: ; e8125
.asm_e82d4
ld a, $3f ; sound length
ld [rNR41], a
ld a, [$c293]
ld a, [wc293]
ld [rNR42], a
ld a, [$c294]
ld a, [wc294]
ld [rNR43], a
ld a, $80
ld [rNR44], a
@ -493,16 +493,16 @@ UpdateChannels: ; e8125
_CheckSFX: ; e82e7
; return carry if any sfx channels are active
ld hl, $c1cc ; Channel5Flags
ld hl, Channel5Flags
bit 0, [hl]
jr nz, .sfxon
ld hl, $c1fe ; Channel6Flags
ld hl, Channel6Flags
bit 0, [hl]
jr nz, .sfxon
ld hl, $c230 ; Channel7Flags
ld hl, Channel7Flags
bit 0, [hl]
jr nz, .sfxon
ld hl, $c262 ; Channel8Flags
ld hl, Channel8Flags
bit 0, [hl]
jr nz, .sfxon
and a
@ -692,7 +692,7 @@ LoadNote: ; e83d1
ld hl, Channel1NoteDuration - Channel1
add hl, bc
ld a, [hl]
ld hl, $c297 ; ????
ld hl, wc297 ; ????
sub [hl]
jr nc, .ok
ld a, $01
@ -771,7 +771,7 @@ LoadNote: ; e83d1
ld d, a
.asm_e843e
push bc
ld hl, $c297
ld hl, wc297
ld b, $00 ; loop count
.loop
inc b
@ -806,7 +806,7 @@ LoadNote: ; e83d1
Functione8466: ; e8466
; handle vibrato and other things
; unknowns: $c292, $c294
; unknowns: wc292, $c294
ld hl, Channel1Flags2 - Channel1
add hl, bc
bit 2, [hl]
@ -818,7 +818,7 @@ Functione8466: ; e8466
rlca
ld [hl], a
and a, $c0
ld [$c292], a
ld [wc292], a
ld hl, Channel1NoteFlags - Channel1
add hl, bc
set 0, [hl]
@ -832,14 +832,14 @@ Functione8466: ; e8466
ld e, [hl]
inc hl
ld d, [hl]
ld hl, $c294
ld hl, wc294
ld a, [hli]
ld h, [hl]
ld l, a
add hl, de
ld e, l
ld d, h
ld hl, $c294
ld hl, wc294
ld [hl], e
inc hl
ld [hl], d
@ -880,7 +880,7 @@ Functione8466: ; e8466
or [hl]
ld [hl], a
; ????
ld a, [$c294]
ld a, [wc294]
ld e, a
; toggle vibrato up/down
ld hl, Channel1Flags3 - Channel1
@ -912,7 +912,7 @@ Functione8466: ; e8466
jr nc, .asm_e84ef
ld a, $ff
.asm_e84ef
ld [$c294], a
ld [wc294], a
;
ld hl, Channel1NoteFlags - Channel1
add hl, bc
@ -1038,7 +1038,7 @@ HandleNoise: ; e858c
bit 2, a ; sfx
jr nz, .next
; is ch8 on? (noise)
ld hl, $c262 ; Channel8Flags
ld hl, Channel8Flags
bit 0, [hl] ; on?
jr z, .next
; is ch8 playing noise?
@ -1046,11 +1046,11 @@ HandleNoise: ; e858c
ret nz ; quit if so
;
.next
ld a, [$c2a2]
ld a, [wc2a2]
and a
jr z, ReadNoiseSample
dec a
ld [$c2a2], a
ld [wc2a2], a
ret
; e85af
@ -1081,15 +1081,15 @@ ReadNoiseSample: ; e85af
and $f
inc a
ld [$c2a2], a
ld [wc2a2], a
ld a, [de]
inc de
ld [$c293], a
ld [wc293], a
ld a, [de]
inc de
ld [$c294], a
ld [wc294], a
xor a
ld [$c295], a
ld [wc295], a
ld hl, NoiseSampleAddress
ld [hl], e
@ -1218,10 +1218,10 @@ RestoreVolume: ; e8679
cp a, $04
ret nz
xor a
ld hl, $c222
ld hl, Channel6CryPitch
ld [hli], a
ld [hl], a
ld hl, $c286
ld hl, Channel8CryPitch
ld [hli], a
ld [hl], a
ld a, [LastVolume]
@ -1279,7 +1279,7 @@ GetNoiseSample: ; e86c5
ld a, [CurChannel]
bit 2, a ; are we in a sfx channel?
jr nz, .sfx
ld hl, $c262 ; Channel8Flags
ld hl, Channel8Flags
bit 0, [hl] ; is ch8 on? (noise)
ret nz
ld a, [MusicNoiseSampleSet]
@ -1315,7 +1315,7 @@ GetNoiseSample: ; e86c5
ld [NoiseSampleAddressHi], a
; clear ????
xor a
ld [$c2a2], a
ld [wc2a2], a
ret
; e870f
@ -1608,8 +1608,8 @@ MusicEE; e883e
and a, $03 ; ch0-3
ld e, a
ld d, $00
; hl = $c2b8 + channel id
ld hl, $c2b8
; hl = wc2b8 + channel id
ld hl, wc2b8
add hl, de
; if set, jump
ld a, [hl]
@ -1652,7 +1652,7 @@ MusicF9: ; e886d
; seems to be unused
; params: 0
ld a, $01
ld [$c2b5], a
ld [wc2b5], a
ret
; e8873
@ -1729,7 +1729,7 @@ MusicE0: ; e88bd
; ????
; params: 2
call GetMusicByte
ld [$c297], a
ld [wc297], a
call GetMusicByte
ld d, a
and a, $0f
@ -2350,14 +2350,14 @@ _PlayMusic:: ; e8b30
dec a
jr nz, .loop
xor a
ld [$c2b5], a
ld [$c2b8], a
ld [$c2b9], a
ld [$c2ba], a
ld [$c2bb], a
ld [wc2b5], a
ld [wc2b8], a
ld [wc2b9], a
ld [wc2ba], a
ld [wc2bb], a
ld [NoiseSampleAddressLo], a
ld [NoiseSampleAddressHi], a
ld [$c2a2], a
ld [wc2a2], a
ld [MusicNoiseSampleSet], a
call MusicOn
ret
@ -2432,7 +2432,7 @@ _PlayCryHeader:: ; e8b79
ld [hl], a
.start
call StartChannel
ld a, [$c2bc]
ld a, [wc2bc]
and a
jr z, .next
@ -2479,7 +2479,7 @@ _PlayCryHeader:: ; e8b79
_PlaySFX:: ; e8c04
; clear channels if they aren't already
call MusicOff
ld hl, $c1cc ; Channel5Flags
ld hl, Channel5Flags
bit 0, [hl] ; ch5 on?
jr z, .ch6
res 0, [hl] ; turn it off
@ -2495,7 +2495,7 @@ _PlaySFX:: ; e8c04
ld [SoundInput], a ; global sound off
ld [rNR10], a ; sweep = 0
.ch6
ld hl, $c1fe ; ch6 on?
ld hl, Channel6Flags
bit 0, [hl]
jr z, .ch7
res 0, [hl] ; turn it off
@ -2508,7 +2508,7 @@ _PlaySFX:: ; e8c04
ld a, $80
ld [rNR24], a ; restart sound (freq hi = 0)
.ch7
ld hl, $c230 ; ch7 on?
ld hl, Channel7Flags
bit 0, [hl]
jr z, .ch8
res 0, [hl] ; turn it off
@ -2522,7 +2522,7 @@ _PlaySFX:: ; e8c04
ld a, $80
ld [rNR34], a ; restart sound (freq hi = 0)
.ch8
ld hl, $c262 ; ch8 on?
ld hl, Channel8Flags
bit 0, [hl]
jr z, .chscleared
res 0, [hl] ; turn it off
@ -2631,7 +2631,7 @@ PlayStereoSFX:: ; e8ca6
call GetLRTracks
add hl, de
ld a, [hl]
ld hl, $c2bc
ld hl, wc2bc
and [hl]
ld hl, Channel1Tracks - Channel1
@ -2647,7 +2647,7 @@ PlayStereoSFX:: ; e8ca6
jr c, .asm_e8d0c
; ch3-4
ld a, [$c2be]
ld a, [wc2be]
ld hl, $002e ; $c12f - Channel1
add hl, bc

View File

@ -16,12 +16,12 @@ Function38000: ; 38000
bit SUBSTATUS_CANT_RUN, a
jr nz, DontSwitch
ld a, [$c731]
ld a, [wc731]
and a
jr nz, DontSwitch
ld hl, TrainerClassAttributes + 5
ld a, [$cfc0]
ld a, [wcfc0]
and a
jr nz, .ok
ld a, [TrainerClass]
@ -44,7 +44,7 @@ DontSwitch: ; 38041
SwitchOften: ; 38045
callab Function34941
ld a, [$c717]
ld a, [wc717]
and $f0
jp z, DontSwitch
@ -70,16 +70,16 @@ SwitchOften: ; 38045
jp c, DontSwitch
.switch
ld a, [$c717]
ld a, [wc717]
and $f
inc a
ld [$c718], a
ld [wc718], a
jp AI_TrySwitch
; 38083
SwitchRarely: ; 38083
callab Function34941
ld a, [$c717]
ld a, [wc717]
and $f0
jp z, DontSwitch
@ -105,16 +105,16 @@ SwitchRarely: ; 38083
jp c, DontSwitch
.switch
ld a, [$c717]
ld a, [wc717]
and $f
inc a
ld [$c718], a
ld [wc718], a
jp AI_TrySwitch
; 380c1
SwitchSometimes: ; 380c1
callab Function34941
ld a, [$c717]
ld a, [wc717]
and $f0
jp z, DontSwitch
@ -140,10 +140,10 @@ SwitchSometimes: ; 380c1
jp c, DontSwitch
.switch
ld a, [$c717]
ld a, [wc717]
and $f
inc a
ld [$c718], a
ld [wc718], a
jp AI_TrySwitch
; 380ff
@ -156,13 +156,13 @@ Function380ff: ; 380ff
AI_TryItem: ; 38105
ld a, [$cfc0]
ld a, [wcfc0]
and a
ret nz
ld a, [$c650]
ld a, [wc650]
ld b, a
ld a, [$c651]
ld a, [wc651]
or b
ret z
@ -177,7 +177,7 @@ AI_TryItem: ; 38105
ld b, h
ld c, l
ld hl, AI_Items
ld de, $c650
ld de, wc650
.loop
ld a, [hl]
and a
@ -221,15 +221,15 @@ AI_TryItem: ; 38105
xor a
ld [de], a
inc a
ld [$c70f], a
ld [wc70f], a
ld hl, EnemySubStatus3
res SUBSTATUS_BIDE, [hl]
xor a
ld [EnemyFuryCutterCount], a
ld [$c681], a
ld [$c72c], a
ld [EnemyProtectCount], a
ld [wc72c], a
ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl]
@ -545,7 +545,7 @@ AIUpdateHUD: ; 38387
callba UpdateEnemyHUD
ld a, $1
ld [hBGMapMode], a
ld hl, $c6e6
ld hl, wc6e6
dec [hl]
scf
ret
@ -568,20 +568,20 @@ Function383a3: ; 383a3 (e:43a3)
Function383ae: ; 383ae (e:43ae)
ld a, MAX_POTION
ld [$d1f1], a
ld [wd1f1], a
jr asm_383c6
Function383b5: ; 383b5 (e:43b5)
call AI_HealStatus
ld a, FULL_RESTORE
ld [$d1f1], a
ld [wd1f1], a
ld hl, EnemySubStatus3
res SUBSTATUS_CONFUSED, [hl]
xor a
ld [EnemyConfuseCount], a
asm_383c6: ; 383c6
ld de, $d1ec
ld de, wd1ec
ld hl, EnemyMonHP + 1
ld a, [hld]
ld [de], a
@ -617,20 +617,20 @@ Function383f4: ; 383f4 (e:43f4)
ld b, 200
Function383f8: ; 383f8
ld [$d1f1], a
ld [wd1f1], a
ld hl, EnemyMonHP + 1
ld a, [hl]
ld [$d1ec], a
ld [wd1ec], a
add b
ld [hld], a
ld [$d1ee], a
ld [wd1ee], a
ld a, [hl]
ld [$d1ec + 1], a
ld [$d1ee + 1], a
ld [wd1ec + 1], a
ld [wd1ee + 1], a
jr nc, .asm_38415
inc a
ld [hl], a
ld [$d1ee + 1], a
ld [wd1ee + 1], a
.asm_38415
inc hl
ld a, [hld]
@ -650,17 +650,17 @@ Function383f8: ; 383f8
ld a, [de]
dec de
ld [hld], a
ld [$d1ee], a
ld [wd1ee], a
ld a, [de]
ld [hl], a
ld [$d1ef], a
ld [wd1ef], a
.asm_38436
Function38436: ; 38436
call Function38571
hlcoord 2, 2
xor a
ld [$d10a], a
ld [wd10a], a
call AIUsedItemSound
predef Functionc6e0
jp AIUpdateHUD
@ -695,8 +695,8 @@ AI_TrySwitch: ; 3844b
AI_Switch: ; 3846c
ld a, $1
ld [$c711], a
ld [$c70f], a
ld [wEnemyIsSwitching], a
ld [wc70f], a
ld hl, EnemySubStatus4
res SUBSTATUS_RAGE, [hl]
xor a
@ -718,7 +718,7 @@ AI_Switch: ; 3846c
call PrintText
.asm_384a3
ld a, $1
ld [$d264], a
ld [wd264], a
callab NewEnemyMonStatus
callab ResetEnemyStatLevels
ld hl, PlayerSubStatus1
@ -726,7 +726,7 @@ AI_Switch: ; 3846c
callba Function3d4e1
callba Function3d57a
xor a
ld [$d264], a
ld [wd264], a
ld a, [InLinkBattle]
and a
ret nz
@ -832,7 +832,7 @@ Function38553: ; 38553
ld a, X_SPECIAL
Function38557:
ld [$d1f1], a
ld [wd1f1], a
push bc
call Function38571
pop bc
@ -842,17 +842,17 @@ Function38557:
Function38568: ; 38568
ld [$d1f1], a
ld [wd1f1], a
call Function38571
jp AIUpdateHUD
; 38571
Function38571: ; 38571
ld a, [$d1f1]
ld [$d265], a
ld a, [wd1f1]
ld [wd265], a
call GetItemName
ld hl, StringBuffer1
ld de, $d050
ld de, wd050
ld bc, ITEM_NAME_LENGTH
call CopyBytes
ld hl, UnknownText_0x3858c

View File

@ -179,7 +179,7 @@ AI_Types: ; 38635
pop bc
pop hl
ld a, [$d265]
ld a, [wd265]
and a
jr z, .immune
cp 10 ; 1.0
@ -431,7 +431,7 @@ AI_Smart_LeechHit: ; 387f7
pop hl
; 60% chance to discourage this move if not very effective.
ld a, [$d265]
ld a, [wd265]
cp 10 ; 1.0
jr c, .asm_38815
@ -509,7 +509,7 @@ AI_Smart_LockOn: ; 3881d
push hl
push bc
callba Function347c8
ld a, [$d265]
ld a, [wd265]
cp $a
pop bc
pop hl
@ -969,7 +969,7 @@ AI_Smart_Whirlwind: ; 38a2a
push hl
callab Function3484e
ld a, [$c716]
ld a, [wc716]
cp 10 ; neutral
pop hl
ret c
@ -1048,7 +1048,7 @@ AI_Smart_Bind: ; 38a71
; Bind, Wrap, Fire Spin, Clamp
; 50% chance to discourage this move if the player is already trapped.
ld a, [$c730]
ld a, [wc730]
and a
jr nz, .asm_38a8b
@ -1325,11 +1325,11 @@ AI_Smart_Rage: ; 38b7f
; Encourage this move based on Rage's counter.
.asm_38b8c
ld a, [$c72c]
ld a, [wc72c]
cp $2
ret c
dec [hl]
ld a, [$c72c]
ld a, [wc72c]
cp $3
ret c
dec [hl]
@ -1368,7 +1368,7 @@ AI_Smart_Mimic: ; 38ba8
ld [hBattleTurn], a
callab Function347c8
ld a, [$d265]
ld a, [wd265]
cp $a
pop hl
jr c, .asm_38bef
@ -1489,7 +1489,7 @@ AI_Smart_Encore: ; 38c3b
predef Function347d3
pop hl
ld a, [$d265]
ld a, [wd265]
cp $a
jr nc, .asm_38c68
@ -1811,7 +1811,7 @@ AI_Smart_Conversion2: ; 38d98
callab Function347c8
ld a, [$d265]
ld a, [wd265]
cp $a
pop hl
jr c, .asm_38dc9
@ -1888,7 +1888,7 @@ AI_Smart_MeanLook: ; 38dfb
; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl
callab Function3484e
ld a, [$c716]
ld a, [wc716]
cp $b ; not very effective
pop hl
ret nc
@ -2051,7 +2051,7 @@ AI_Smart_Curse: ; 38e5c
AI_Smart_Protect: ; 38ed2
ld a, [$c681]
ld a, [EnemyProtectCount]
and a
jr nz, .asm_38f13
@ -2146,7 +2146,7 @@ AI_Smart_PerishSong: ; 38f4a
push hl
callab Function3484e
ld a, [$c716]
ld a, [wc716]
cp 10 ; 1.0
pop hl
ret c
@ -2218,7 +2218,7 @@ AI_Smart_Sandstorm: ; 38f7a
AI_Smart_Endure: ; 38fac
ld a, [$c681]
ld a, [EnemyProtectCount]
and a
jr nz, .asm_38fd8
@ -2404,7 +2404,7 @@ AI_Smart_BatonPass: ; 39062
push hl
callab Function3484e
ld a, [$c716]
ld a, [wc716]
cp 10 ; neutral
pop hl
ret c
@ -2437,7 +2437,7 @@ AI_Smart_RapidSpin: ; 39084
; 80% chance to greatly encourage this move if the enemy is
; trapped (Bind effect), seeded, or scattered with spikes.
ld a, [$c731]
ld a, [wc731]
and a
jr nz, .asm_39097
@ -2470,7 +2470,7 @@ AI_Smart_HiddenPower: ; 3909e
pop hl
; Discourage Hidden Power if not very effective.
ld a, [$d265]
ld a, [wd265]
cp 10
jr c, .bad
@ -2480,7 +2480,7 @@ AI_Smart_HiddenPower: ; 3909e
jr c, .bad
; Encourage Hidden Power if super-effective.
ld a, [$d265]
ld a, [wd265]
cp 11
jr nc, .good
@ -2825,7 +2825,7 @@ AI_Smart_FutureSight: ; 391f3
AI_Smart_Stomp: ; 39200
; 80% chance to encourage this move if the player has used Minimize.
ld a, [$c6fe]
ld a, [wc6fe]
and a
ret z
@ -3463,7 +3463,7 @@ AI_Status: ; 39453
pop bc
pop hl
ld a, [$d265]
ld a, [wd265]
and a
jr nz, .checkmove

View File

@ -77,7 +77,7 @@ Functioncc11c: ; cc11c
call BattleAnimRestoreHuds
.asm_cc141
ld a, [$cfca]
ld a, [wcfca]
and a
jr z, .asm_cc15f
@ -135,7 +135,7 @@ Functioncc163: ; cc163
call BattleAnimDelayFrame
.asm_cc196
ld a, [$d40f]
ld a, [BattleAnimFlags]
bit 0, a
jr z, .playframe
@ -191,13 +191,13 @@ BattleAnimRequestPals: ; cc1e2
ld a, [rBGP]
ld b, a
ld a, [$cfc7]
ld a, [wcfc7]
cp b
call nz, Functioncc91a
ld a, [rOBP0]
ld b, a
ld a, [$cfc8]
ld a, [wcfc8]
cp b
call nz, Functioncc94b
ret
@ -255,7 +255,7 @@ Functioncc220: ; cc220
Functioncc23d: ; cc23d
ld a, [$d40f]
ld a, [BattleAnimFlags]
bit 3, a
jr z, .asm_cc254
@ -291,12 +291,12 @@ Functioncc25f: ; cc25f
; cc267
Functioncc267: ; cc267
ld a, [$d412]
ld a, [BattleAnimDuration]
and a
jr z, .asm_cc273
dec a
ld [$d412], a
ld [BattleAnimDuration], a
and a
ret
@ -313,7 +313,7 @@ Functioncc275: ; cc275
jr nz, .asm_cc286
; Return from a subroutine.
ld hl, $d40f
ld hl, BattleAnimFlags
bit 1, [hl]
jr nz, .asm_cc28e
@ -324,7 +324,7 @@ Functioncc275: ; cc275
cp $d0
jr nc, .asm_cc28e
ld [$d412], a
ld [BattleAnimDuration], a
ret
.asm_cc28e
@ -334,8 +334,8 @@ Functioncc275: ; cc275
; cc293
Functioncc293: ; cc293
; Execute battle animation command in [$d417].
ld a, [$d417]
; Execute battle animation command in [BattleAnimByte].
ld a, [BattleAnimByte]
sub $d0
ld e, a
@ -409,13 +409,13 @@ BattleAnimCmd_ED: ; cc304 (33:4304)
ret
BattleAnimCmd_FF: ; cc305 (33:4305)
ld hl, $d40f
ld hl, BattleAnimFlags
res 1, [hl]
ld hl, $d413
ld hl, BattleAnimParent
ld e, [hl]
inc hl
ld d, [hl]
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@ -427,20 +427,20 @@ BattleAnimCmd_FE: ; cc317 (33:4317)
call GetBattleAnimByte
ld d, a
push de
ld hl, $d410
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
ld hl, $d413
ld hl, BattleAnimParent
ld [hl], e
inc hl
ld [hl], d
pop de
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
ld hl, $d40f
ld hl, BattleAnimFlags
set 1, [hl]
ret
@ -449,7 +449,7 @@ BattleAnimCmd_FC: ; cc339 (33:4339)
ld e, a
call GetBattleAnimByte
ld d, a
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@ -457,16 +457,16 @@ BattleAnimCmd_FC: ; cc339 (33:4339)
BattleAnimCmd_FD: ; cc348 (33:4348)
call GetBattleAnimByte
ld hl, $d40f
ld hl, BattleAnimFlags
bit 2, [hl]
jr nz, .asm_cc35b
and a
jr z, .asm_cc363
dec a
set 2, [hl]
ld [$d415], a
ld [BattleAnimLoops], a
.asm_cc35b
ld hl, $d415
ld hl, BattleAnimLoops
ld a, [hl]
and a
jr z, .asm_cc372
@ -476,15 +476,15 @@ BattleAnimCmd_FD: ; cc348 (33:4348)
ld e, a
call GetBattleAnimByte
ld d, a
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
ret
.asm_cc372
ld hl, $d40f
ld hl, BattleAnimFlags
res 2, [hl]
ld hl, $d410
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@ -496,7 +496,7 @@ BattleAnimCmd_FD: ; cc348 (33:4348)
ret
BattleAnimCmd_EF: ; cc383 (33:4383)
ld hl, $c689
ld hl, wc689
ld a, [hl]
and a
jr z, .asm_cc39a
@ -506,14 +506,14 @@ BattleAnimCmd_EF: ; cc383 (33:4383)
ld e, a
call GetBattleAnimByte
ld d, a
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
ret
.asm_cc39a
ld hl, $d410
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@ -526,21 +526,21 @@ BattleAnimCmd_EF: ; cc383 (33:4383)
BattleAnimCmd_F9: ; cc3a6 (33:43a6)
call GetBattleAnimByte
ld [$d416], a
ld [BattleAnimVar], a
ret
BattleAnimCmd_FA: ; cc3ad (33:43ad)
ld hl, $d416
ld hl, BattleAnimVar
inc [hl]
ret
BattleAnimCmd_FB: ; cc3b2 (33:43b2)
call GetBattleAnimByte
ld hl, $d416
ld hl, BattleAnimVar
cp [hl]
jr z, .jump
ld hl, $d410
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@ -556,7 +556,7 @@ BattleAnimCmd_FB: ; cc3b2 (33:43b2)
ld e, a
call GetBattleAnimByte
ld d, a
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@ -564,11 +564,11 @@ BattleAnimCmd_FB: ; cc3b2 (33:43b2)
BattleAnimCmd_F8: ; cc3d6 (33:43d6)
call GetBattleAnimByte
ld hl, $c689
ld hl, wc689
cp [hl]
jr z, .jump
ld hl, $d410
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@ -584,7 +584,7 @@ BattleAnimCmd_F8: ; cc3d6 (33:43d6)
ld e, a
call GetBattleAnimByte
ld d, a
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@ -593,11 +593,11 @@ BattleAnimCmd_F8: ; cc3d6 (33:43d6)
BattleAnimCmd_EE: ; cc3fa (33:43fa)
call GetBattleAnimByte
ld e, a
ld a, [$c689]
ld a, [wc689]
and e
jr nz, .jump
ld hl, $d410
ld hl, BattleAnimAddress
ld e, [hl]
inc hl
ld d, [hl]
@ -612,7 +612,7 @@ BattleAnimCmd_EE: ; cc3fa (33:43fa)
ld e, a
call GetBattleAnimByte
ld d, a
ld hl, $d410
ld hl, BattleAnimAddress
ld [hl], e
inc hl
ld [hl], d
@ -620,41 +620,41 @@ BattleAnimCmd_EE: ; cc3fa (33:43fa)
BattleAnimCmd_D0: ; cc41f (33:441f)
call GetBattleAnimByte
ld [$d419], a
ld [BattleAnimTemps], a
call GetBattleAnimByte
ld [$d41a], a
ld [BattleAnimTemps + 1], a
call GetBattleAnimByte
ld [$d41b], a
ld [BattleAnimTemps + 2], a
call GetBattleAnimByte
ld [$d41c], a
ld [BattleAnimTemps + 3], a
call Functioncc9a1
ret
BattleAnimCmd_F0: ; cc43b (33:443b)
call GetBattleAnimByte
ld [$d419], a
ld [BattleAnimTemps], a
call GetBattleAnimByte
ld [$d41a], a
ld [BattleAnimTemps + 1], a
call GetBattleAnimByte
ld [$d41b], a
ld [BattleAnimTemps + 2], a
call GetBattleAnimByte
ld [$d41c], a
ld [BattleAnimTemps + 3], a
call Functionccb4f
ret
BattleAnimCmd_F1: ; cc457 (33:4457)
call GetBattleAnimByte
ld [$cfc7], a
ld [wcfc7], a
ret
BattleAnimCmd_F2: ; cc45e (33:445e)
call GetBattleAnimByte
ld [$cfc8], a
ld [wcfc8], a
ret
BattleAnimCmd_F3: ; cc465 (33:4465)
call GetBattleAnimByte
ld [$cfc9], a
ld [wcfc9], a
ret
BattleAnimCmd_DF: ; cc46c (33:446c)
@ -664,11 +664,11 @@ BattleAnimCmd_DF: ; cc46c (33:446c)
jr z, .asm_cc475
ld a, $f0
.asm_cc475
ld [$cfc8], a
ld [wcfc8], a
ret
BattleAnimCmd_E5: ; cc479 (33:4479)
ld hl, $d30a
ld hl, OTPartyMon3HP
ld a, $a0
.asm_cc47e
ld [hl], $0
@ -682,19 +682,19 @@ BattleAnimCmd_D2:
BattleAnimCmd_D3:
BattleAnimCmd_D4:
BattleAnimCmd_D5: ; cc485 (33:4485)
ld a, [$d417]
ld a, [BattleAnimByte]
and $f
ld c, a
ld hl, $d300
ld hl, wd300
xor a
ld [$d419], a
ld [BattleAnimTemps], a
.asm_cc492
ld a, [$d419]
ld a, [BattleAnimTemps]
cp $4f
ret nc
call GetBattleAnimByte
ld [hli], a
ld a, [$d419]
ld a, [BattleAnimTemps]
ld [hli], a
push bc
push hl
@ -706,11 +706,11 @@ BattleAnimCmd_D5: ; cc485 (33:4485)
add hl, hl
ld de, $8310
add hl, de
ld a, [$d417]
ld a, [BattleAnimByte]
call Functionce846
ld a, [$d419]
ld a, [BattleAnimTemps]
add c
ld [$d419], a
ld [BattleAnimTemps], a
pop hl
pop bc
dec c
@ -720,12 +720,12 @@ BattleAnimCmd_D5: ; cc485 (33:4485)
BattleAnimCmd_D6: ; cc4c0 (33:44c0)
call GetBattleAnimByte
ld e, $a
ld bc, $d30a
ld bc, OTPartyMon3HP
.asm_cc4c8
ld hl, $0
add hl, bc
ld d, [hl]
ld a, [$d417]
ld a, [BattleAnimByte]
cp d
jr z, .asm_cc4dd
ld hl, $18
@ -744,12 +744,12 @@ BattleAnimCmd_D6: ; cc4c0 (33:44c0)
BattleAnimCmd_D8: ; cc4e3 (33:44e3)
call GetBattleAnimByte
ld e, $5
ld bc, $d3fa
ld bc, ActiveBGEffects
.asm_cc4eb
ld hl, $0
add hl, bc
ld d, [hl]
ld a, [$d417]
ld a, [BattleAnimByte]
cp d
jr z, .asm_cc500
ld hl, $4
@ -768,12 +768,12 @@ BattleAnimCmd_D8: ; cc4e3 (33:44e3)
BattleAnimCmd_D7: ; cc506 (33:4506)
call GetBattleAnimByte
ld e, $a
ld bc, $d30a
ld bc, OTPartyMon3HP
.asm_cc50e
ld hl, $0
add hl, bc
ld d, [hl]
ld a, [$d417]
ld a, [BattleAnimByte]
cp d
jr z, .asm_cc523
ld hl, $18
@ -792,7 +792,7 @@ BattleAnimCmd_D7: ; cc506 (33:4506)
BattleAnimCmd_D9: ; cc52c (33:452c)
ld hl, $d300
ld hl, wd300
.asm_cc52f
ld a, [hl]
and a
@ -814,12 +814,12 @@ BattleAnimCmd_D9: ; cc52c (33:452c)
ld hl, $8730
ld de, $9060
ld a, $70
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $7
call Functioncc561
ld de, $9310
ld a, $60
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $6
call Functioncc561
ret
@ -831,7 +831,7 @@ Functioncc561: ; cc561 (33:4561)
ld bc, $3301
call Request2bpp
pop de
ld a, [$d419]
ld a, [BattleAnimTemps]
ld l, a
ld h, $0
add hl, de
@ -847,7 +847,7 @@ Functioncc561: ; cc561 (33:4561)
BattleAnimCmd_DA: ; cc57e (33:457e)
ld hl, $d300
ld hl, wd300
.asm_cc581
ld a, [hl]
and a
@ -869,12 +869,12 @@ BattleAnimCmd_DA: ; cc57e (33:457e)
ld hl, $8660
ld de, $9050
ld a, $70
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $7
call Functioncc5b3
ld de, $9310
ld a, $60
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $6
call Functioncc5b3
ret
@ -886,7 +886,7 @@ Functioncc5b3: ; cc5b3 (33:45b3)
ld bc, $3302
call Request2bpp
pop de
ld a, [$d419]
ld a, [BattleAnimTemps]
ld l, a
ld h, $0
add hl, de
@ -903,7 +903,7 @@ Functioncc5b3: ; cc5b3 (33:45b3)
BattleAnimCmd_DB: ; cc5d0 (33:45d0)
callab GetPokeBallWobble
ld a, c
ld [$d416], a
ld [BattleAnimVar], a
ret
BattleAnimCmd_E7: ; cc5db (33:45db)
@ -914,32 +914,32 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
push af
ld a, 1
ld [rSVBK], a ; $ff00+$70
ld a, [CurPartySpecies] ; $d108
ld a, [CurPartySpecies] ; CurPartySpecies
push af
ld a, [hBattleTurn] ; $ff00+$e4
and a
jr z, .player
ld a, [TempBattleMonSpecies] ; $d205
ld [CurPartySpecies], a ; $d108
ld hl, BattleMonDVs ; $c632
ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies
ld hl, BattleMonDVs ; BattleMonDVs
predef GetUnownLetter
ld de, $8000
predef GetFrontpic
jr .done
.player
ld a, [TempEnemyMonSpecies] ; $d204
ld [CurPartySpecies], a ; $d108
ld hl, EnemyMonDVs ; $d20c
ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies
ld hl, EnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter
ld de, $8000
predef GetBackpic
.done
pop af
ld [CurPartySpecies], a ; $d108
ld [CurPartySpecies], a ; CurPartySpecies
pop af
ld [rSVBK], a ; $ff00+$70
ret
@ -1116,7 +1116,7 @@ BattleAnimCmd_DE: ; cc750 (33:4750)
ld a, $1
ld [rSVBK], a ; $ff00+$70
ld a, [CurPartySpecies] ; $d108
ld a, [CurPartySpecies] ; CurPartySpecies
push af
ld a, [hBattleTurn] ; $ff00+$e4
and a
@ -1130,7 +1130,7 @@ BattleAnimCmd_DE: ; cc750 (33:4750)
.done
pop af
ld [CurPartySpecies], a ; $d108
ld [CurPartySpecies], a ; CurPartySpecies
pop af
ld [rSVBK], a ; $ff00+$70
ret
@ -1140,31 +1140,31 @@ BattleAnimCmd_E6: ; cc776 (33:4776)
push af
ld a, $1
ld [rSVBK], a ; $ff00+$70
ld a, [CurPartySpecies] ; $d108
ld a, [CurPartySpecies] ; CurPartySpecies
push af
ld a, [$c689]
ld [CurPartySpecies], a ; $d108
ld a, [wc689]
ld [CurPartySpecies], a ; CurPartySpecies
ld a, [hBattleTurn] ; $ff00+$e4
and a
jr z, .player
ld hl, BattleMonDVs ; $c632
ld hl, BattleMonDVs ; BattleMonDVs
predef GetUnownLetter
ld de, $9000
predef GetFrontpic
jr .done
.player
ld hl, EnemyMonDVs ; $d20c
ld hl, EnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter
ld de, $9310
predef GetBackpic
.done
pop af
ld [CurPartySpecies], a ; $d108
ld [CurPartySpecies], a ; CurPartySpecies
ld b, $1
call GetSGBLayout
pop af
@ -1182,7 +1182,7 @@ BattleAnimCmd_E4: ; cc7bf (33:47bf)
ret
BattleAnimCmd_F4: ; cc7c4 (33:47c4)
ld hl, $d40f
ld hl, BattleAnimFlags
set 3, [hl]
ret
@ -1200,17 +1200,17 @@ BattleAnimCmd_E0: ; cc7cd (33:47cd)
ld e, a
srl a
srl a
ld [$c2be], a
ld [wc2be], a
call Functioncc7fc
and 3
ld [CryTracks], a ; $c2bd
ld [CryTracks], a ; CryTracks
ld e, a
ld d, 0
ld hl, Datacc7f8
add hl, de
ld a, [hl]
ld [$c2bc], a
ld [wc2bc], a
call GetBattleAnimByte
ld e, a
@ -1258,14 +1258,14 @@ BattleAnimCmd_E1: ; cc807 (33:4807)
jr nz, .enemy
ld a, $f0
ld [CryTracks], a ; $c2bd
ld a, [BattleMonSpecies] ; $c62c
ld [CryTracks], a ; CryTracks
ld a, [BattleMonSpecies] ; BattleMonSpecies
jr .asm_cc834
.enemy
ld a, $0f
ld [CryTracks], a ; $c2bd
ld a, [EnemyMonSpecies] ; $d206
ld [CryTracks], a ; CryTracks
ld a, [EnemyMonSpecies] ; EnemyMon
.asm_cc834
push hl
@ -1293,18 +1293,18 @@ BattleAnimCmd_E1: ; cc807 (33:4807)
ld a, [hli]
ld c, a
ld b, [hl]
ld hl, CryLength ; $c2b2
ld hl, CryLength ; CryLength
ld a, [hli]
ld h, [hl]
ld l, a
add hl, bc
ld a, l
ld [CryLength], a ; $c2b2
ld [CryLength], a ; CryLength
ld a, h
ld [CryLength + 1], a
ld a, 1
ld [$c2bc], a
ld [wc2bc], a
callab _PlayCryHeader
@ -1324,7 +1324,7 @@ Datacc871: ; cc871
Functioncc881: ; cc881
ld a, [$cfca]
ld a, [wcfca]
cp $1
jr z, .asm_cc88b
cp $4
@ -1360,17 +1360,17 @@ BattleAnimAssignPals: ; cc8a4
ld a, $f0
.asm_cc8b2
ld [$cfc8], a
ld [wcfc8], a
ld a, $e4
ld [$cfc7], a
ld [$cfc9], a
ld [wcfc7], a
ld [wcfc9], a
ret
.asm_cc8be
ld a, $e4
ld [$cfc7], a
ld [$cfc8], a
ld [$cfc9], a
ld [wcfc7], a
ld [wcfc8], a
ld [wcfc9], a
call DmgToCgbBGPals
ld de, $e4e4
call DmgToCgbObjPals
@ -1403,9 +1403,9 @@ Functioncc8d3: ; cc8d3
Functioncc8f6: ; cc8f6
call WaitTop
ld a, $e4
ld [$cfc7], a
ld [$cfc8], a
ld [$cfc9], a
ld [wcfc7], a
ld [wcfc8], a
ld [wcfc9], a
call DmgToCgbBGPals
ld de, $e4e4
call DmgToCgbObjPals
@ -1427,13 +1427,13 @@ Functioncc91a: ; cc91a
push af
ld a, $5
ld [rSVBK], a
ld hl, $d080
ld de, $d000
ld hl, BGPals
ld de, wd000
ld a, [rBGP]
ld b, a
ld c, $7
call CopyPals
ld hl, $d0c0
ld hl, OBPals
ld de, MartPointer
ld a, [rBGP]
ld b, a
@ -1455,8 +1455,8 @@ Functioncc94b: ; cc94b
push af
ld a, $5
ld [rSVBK], a
ld hl, $d0d0
ld de, $d050
ld hl, OBPals + $10
ld de, Unkn2Pals + $10
ld a, [rOBP0]
ld b, a
ld c, $2
@ -1470,8 +1470,8 @@ Functioncc94b: ; cc94b
Functioncc96e: ; cc96e
ld a, $0
ld [$d418], a
ld hl, $d30a
ld [wd418], a
ld hl, OTPartyMon3HP
ld e, $a
.asm_cc978
ld a, [hl]
@ -1492,7 +1492,7 @@ Functioncc96e: ; cc96e
add hl, bc
dec e
jr nz, .asm_cc978
ld a, [$d418]
ld a, [wd418]
ld l, a
ld h, $c4
.asm_cc997

View File

@ -2,7 +2,7 @@
Functioncc9a1: ; cc9a1 (33:49a1)
ld hl, $d30a
ld hl, OTPartyMon3HP
ld e, $a
.asm_cc9a6
ld a, [hl]
@ -17,7 +17,7 @@ Functioncc9a1: ; cc9a1 (33:49a1)
.asm_cc9b3
ld c, l
ld b, h
ld hl, $d40e
ld hl, wd40e
inc [hl]
call Functioncc9c4
ret
@ -32,7 +32,7 @@ Functioncc9bd: ; cc9bd
Functioncc9c4: ; cc9c4 (33:49c4)
ld a, [$d419]
ld a, [BattleAnimTemps]
ld e, a
ld d, 0
ld hl, BattleAnimObjects
@ -46,7 +46,7 @@ Functioncc9c4: ; cc9c4 (33:49c4)
ld d, h
ld hl, $0
add hl, bc
ld a, [$d40e]
ld a, [wd40e]
ld [hli], a
ld a, [de]
inc de
@ -66,14 +66,14 @@ Functioncc9c4: ; cc9c4 (33:49c4)
ld a, [de]
call Functionccb31
ld [hli], a
ld a, [$d41a]
ld a, [BattleAnimTemps + 1]
ld [hli], a
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
ld [hli], a
xor a
ld [hli], a
ld [hli], a
ld a, [$d41c]
ld a, [BattleAnimTemps + 3]
ld [hli], a
xor a
ld [hli], a
@ -94,35 +94,35 @@ Functioncca09: ; cca09
cp $fc
jp z, .asm_ccaa2
push af
ld hl, $d419
ld a, [$d420]
ld hl, BattleAnimTemps
ld a, [BattleAnimTemps + 7]
xor [hl]
and $e0
ld [hl], a
pop af
push bc
call Functionce83c
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
add [hl]
ld [$d41b], a
ld [BattleAnimTemps + 2], a
inc hl
ld a, [hli]
ld c, a
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [$d418]
ld a, [wd418]
ld e, a
ld d, $c4
.asm_cca3c
ld a, [$d41d]
ld a, [BattleAnimTemps + 4]
ld b, a
ld a, [$d41f]
ld a, [BattleAnimTemps + 6]
add b
ld b, a
push hl
ld a, [hl]
ld hl, $d419
ld hl, BattleAnimTemps
bit 6, [hl]
jr z, .asm_cca53
add $8
@ -135,14 +135,14 @@ Functioncca09: ; cca09
ld [de], a
inc hl
inc de
ld a, [$d41c]
ld a, [BattleAnimTemps + 3]
ld b, a
ld a, [$d41e]
ld a, [BattleAnimTemps + 5]
add b
ld b, a
push hl
ld a, [hl]
ld hl, $d419
ld hl, BattleAnimTemps
bit 5, [hl]
jr z, .asm_cca6f
add $8
@ -155,13 +155,13 @@ Functioncca09: ; cca09
ld [de], a
inc hl
inc de
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
add $31
add [hl]
ld [de], a
inc hl
inc de
ld a, [$d419]
ld a, [BattleAnimTemps]
ld b, a
ld a, [hl]
xor b
@ -171,14 +171,14 @@ Functioncca09: ; cca09
and $10
or b
ld b, a
ld a, [$d421]
ld a, [BattleAnimTemps + 8]
and $f
or b
ld [de], a
inc hl
inc de
ld a, e
ld [$d418], a
ld [wd418], a
cp $a0
jr nc, .asm_ccaa7
dec c
@ -204,36 +204,36 @@ Functionccaaa: ; ccaaa
add hl, bc
ld a, [hl]
and $80
ld [$d419], a
ld [BattleAnimTemps], a
xor a
ld [$d420], a
ld [BattleAnimTemps + 7], a
ld hl, $0005
add hl, bc
ld a, [hl]
ld [$d421], a
ld [BattleAnimTemps + 8], a
ld hl, $0002
add hl, bc
ld a, [hl]
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld hl, $0006
add hl, bc
ld a, [hli]
ld [$d41b], a
ld [BattleAnimTemps + 2], a
ld a, [hli]
ld [$d41c], a
ld [BattleAnimTemps + 3], a
ld a, [hli]
ld [$d41d], a
ld [BattleAnimTemps + 4], a
ld a, [hli]
ld [$d41e], a
ld [BattleAnimTemps + 5], a
ld a, [hli]
ld [$d41f], a
ld [BattleAnimTemps + 6], a
ld a, [hBattleTurn]
and a
ret z
ld hl, $0001
add hl, bc
ld a, [hl]
ld [$d419], a
ld [BattleAnimTemps], a
bit 0, [hl]
ret z
ld hl, $0007
@ -242,10 +242,10 @@ Functionccaaa: ; ccaaa
ld d, a
ld a, $b4
sub d
ld [$d41c], a
ld [BattleAnimTemps + 3], a
ld a, [hli]
ld d, a
ld a, [$d41a]
ld a, [BattleAnimTemps + 1]
cp $ff
jr nz, .asm_ccb09
ld a, $28
@ -275,11 +275,11 @@ Functionccaaa: ; ccaaa
pop af
.asm_ccb26
ld [$d41d], a
ld [BattleAnimTemps + 4], a
ld a, [hli]
xor $ff
inc a
ld [$d41e], a
ld [BattleAnimTemps + 5], a
ret
; ccb31
@ -287,7 +287,7 @@ Functionccaaa: ; ccaaa
Functionccb31: ; ccb31 (33:4b31)
push hl
push bc
ld hl, $d300
ld hl, wd300
ld b, a
ld c, $5
.asm_ccb39
@ -950,7 +950,7 @@ Functioncd249: ; cd249 (33:5249)
push af
ld a, $1
ld [rSVBK], a ; $ff00+$70
ld a, [CurItem] ; $d106
ld a, [CurItem] ; CurItem
ld e, a
pop af
ld [rSVBK], a ; $ff00+$70
@ -3894,7 +3894,7 @@ Functionce29f: ; ce29f (33:629f)
ld hl, $f
add hl, bc
and [hl]
ld [$cfc8], a
ld [wcfc8], a
ret
; ce2c4 (33:62c4)
@ -4853,7 +4853,7 @@ Functionce7d1: ; ce7d1
ld a, [hl]
and $c0
srl a
ld [$d420], a
ld [BattleAnimTemps + 7], a
pop af
ret

View File

@ -1,7 +1,7 @@
; BG effects for use in battle animations.
Functionc8000: ; c8000 (32:4000)
ld hl, $d3fa
ld hl, ActiveBGEffects
ld e, $5
.asm_c8005
ld a, [hl]
@ -22,7 +22,7 @@ Functionc8000: ; c8000 (32:4000)
ret
Functionc801a: ; c801a (32:401a)
ld hl, $d3fa
ld hl, ActiveBGEffects
ld e, $5
.asm_c801f
ld a, [hl]
@ -39,13 +39,13 @@ Functionc801a: ; c801a (32:401a)
ld b, h
ld hl, $0
add hl, bc
ld a, [$d419]
ld a, [BattleAnimTemps]
ld [hli], a
ld a, [$d41a]
ld a, [BattleAnimTemps + 1]
ld [hli], a
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
ld [hli], a
ld a, [$d41c]
ld a, [BattleAnimTemps + 3]
ld [hl], a
ret
@ -182,7 +182,7 @@ Functionc80f3: ; c80f3 (32:40f3)
Functionc80fb: ; c80fb (32:40fb)
ld a, $1
ld [$d419], a
ld [BattleAnimTemps], a
ld hl, $1
add hl, bc
ld a, [hl]
@ -214,14 +214,14 @@ Functionc80fb: ; c80fb (32:40fb)
ld h, 0
add hl, de
ld a, [hl]
ld [$cfc7], a
ld [wcfc7], a
ret
Functionc812d: ; c812d (32:412d)
ld de, Unknown_c813d
call Functionc8d57
jr c, .asm_c8139
ld [$cfc7], a
ld [wcfc7], a
ret
.asm_c8139
call EndBattleBGEffect
@ -236,7 +236,7 @@ Functionc8141: ; c8141 (32:4141)
ld de, Unknown_c8151
call Functionc8d57
jr c, .asm_c814d
ld [$cfc7], a
ld [wcfc7], a
ret
.asm_c814d
call EndBattleBGEffect
@ -251,8 +251,8 @@ Functionc8155: ; c8155 (32:4155)
ld de, Unknown_c8168
call Functionc8d57
jr c, .asm_c8164
ld [$cfc7], a
ld [$cfc9], a
ld [wcfc7], a
ld [wcfc9], a
ret
.asm_c8164
call EndBattleBGEffect
@ -272,7 +272,7 @@ Functionc8171: ; c8171 (32:4171)
ld de, Unknown_c8188
.asm_c817e
call Functionc8d57
ld [$cfc8], a
ld [wcfc8], a
ret
; c8185 (32:4185)
@ -293,7 +293,7 @@ Functionc818b: ; c818b (32:418b)
ld de, Unknown_c81a2
.asm_c8198
call Functionc8d57
ld [$cfc8], a
ld [wcfc8], a
ret
; c819f (32:419f)
@ -308,7 +308,7 @@ Unknown_c81a2:
Functionc81a5: ; c81a5 (32:41a5)
ld de, Unknown_c81af
call Functionc8d57
ld [$cfc7], a
ld [wcfc7], a
ret
; c81af (32:41af)
@ -367,9 +367,9 @@ Functionc81ea: ; c81ea (32:41ea)
ld de, Unknown_c820c
.asm_c8200
ld a, e
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, d
ld [$d41b], a
ld [BattleAnimTemps + 2], a
call Functionc83ed
ret
; c820c (32:420c)
@ -399,7 +399,7 @@ Jumptable_c8217: ; c8217 (32:4217)
Functionc8223: ; c8223 (32:4223)
call Functionc9042
jr z, .asm_c8230
ld hl, $d40e
ld hl, wd40e
inc [hl]
call EndBattleBGEffect
ret
@ -409,19 +409,19 @@ Functionc8223: ; c8223 (32:4223)
call Functionc9038
jr nz, .asm_c8242
ld a, $b8
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $84
jr .asm_c8249
.asm_c8242
ld a, $b9
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $30
.asm_c8249
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, $40
ld [$d41b], a
ld [BattleAnimTemps + 2], a
xor a
ld [$d41c], a
ld [BattleAnimTemps + 3], a
call Functionc82ee
pop bc
ret
@ -465,7 +465,7 @@ Jumptable_c8284: ; c8284 (32:4284)
Functionc8290: ; c8290 (32:4290)
call Functionc9042
jr z, .asm_c829d
ld hl, $d40e
ld hl, wd40e
inc [hl]
call EndBattleBGEffect
ret
@ -475,19 +475,19 @@ Functionc8290: ; c8290 (32:4290)
call Functionc9038
jr nz, .asm_c82af
ld a, $ba
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $84
jr .asm_c82b6
.asm_c82af
ld a, $bb
ld [$d419], a
ld [BattleAnimTemps], a
ld a, $30
.asm_c82b6
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, $40
ld [$d41b], a
ld [BattleAnimTemps + 2], a
xor a
ld [$d41c], a
ld [BattleAnimTemps + 3], a
call Functionc82ee
pop bc
ret
@ -628,9 +628,9 @@ Functionc837b: ; c837b (32:437b)
ld de, Unknown_c8394
.asm_c8388
ld a, e
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, d
ld [$d41b], a
ld [BattleAnimTemps + 2], a
call Functionc83ed
ret
; c8394 (32:4394)
@ -658,9 +658,9 @@ Functionc83a8: ; c83a8 (32:43a8)
ld de, Unknown_c83c1
.asm_c83b5
ld a, e
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, d
ld [$d41b], a
ld [BattleAnimTemps + 2], a
call Functionc83ed
ret
; c83c1 (32:43c1)
@ -704,9 +704,9 @@ Functionc83fa: ; c83fa (32:43fa)
ld e, [hl]
ld d, $0
inc [hl]
ld a, [$d41a]
ld a, [BattleAnimTemps + 1]
ld l, a
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
ld h, a
add hl, de
add hl, de
@ -788,7 +788,7 @@ Functionc8458: ; c8458 (32:4458)
pop hl
inc hl
ld a, [hli]
ld [$d419], a
ld [BattleAnimTemps], a
push de
ld e, [hl]
ld d, 0
@ -802,7 +802,7 @@ Functionc8458: ; c8458 (32:4458)
.asm_c8484
push bc
push hl
ld a, [$d419]
ld a, [BattleAnimTemps]
ld b, a
.asm_c848a
ld a, [de]
@ -912,8 +912,8 @@ Functionc8561: ; c8561 (32:4561)
ret
Functionc8565: ; c8565 (32:4565)
ld hl, $d422
ld de, $d423
ld hl, wd422
ld de, wd422 + 1
ld c, $3f
ld a, [hl]
push af
@ -925,8 +925,8 @@ Functionc8565: ; c8565 (32:4565)
jr nz, .asm_c856f
pop af
ld [hl], a
ld de, $d200
ld hl, $d422
ld de, LYOverridesBackup
ld hl, wd422
ld bc, $0
.asm_c8580
ld a, [$ffc7]
@ -1006,7 +1006,7 @@ Functionc85ce: ; c85ce (32:45ce)
ld hl, $1
add hl, bc
ld a, [hl]
ld [$d419], a
ld [BattleAnimTemps], a
ld hl, $2
add hl, bc
ld a, [hl]
@ -1509,10 +1509,10 @@ Functionc8888: ; c8888 (32:4888)
Functionc88a5: ; c88a5 (32:48a5)
push af
ld a, [FXAnimIDHi] ; $cfc3
ld a, [FXAnimIDHi] ; FXAnimIDHi
or a
jr nz, .asm_c88b3
ld a, [FXAnimIDLo] ; $cfc2
ld a, [FXAnimIDLo] ; FXAnimID
cp ROLLOUT
jr z, .asm_c88b7
.asm_c88b3
@ -1990,7 +1990,7 @@ Functionc8b22: ; c8b22 (32:4b22)
ld hl, Unknown_c8bd8
add hl, de
ld a, [hli]
ld [$cfc9], a
ld [wcfc9], a
ld d, a
ld e, [hl]
ld bc, $2f30
@ -2001,7 +2001,7 @@ Functionc8b22: ; c8b22 (32:4b22)
ld d, [hl]
inc hl
ld a, [hl]
ld [$cfc9], a
ld [wcfc9], a
ld e, a
ld bc, $3728
.asm_c8b5b
@ -2012,12 +2012,12 @@ Functionc8b22: ; c8b22 (32:4b22)
Functionc8b60: ; c8b60 (32:4b60)
call Functionc8f19
ld a, $e4
ld [$cfc7], a
ld [$cfc9], a
ld [wcfc7], a
ld [wcfc9], a
ret
Functionc8b6c: ; c8b6c (32:4b6c)
ld hl, $d200
ld hl, LYOverridesBackup
.asm_c8b6f
ld [hl], d
inc hl
@ -2303,7 +2303,7 @@ Functionc8ce1: ; c8ce1 (32:4ce1)
ld [hSCY], a ; $ff00+$d0
xor $ff
inc a
ld [$d314], a
ld [OTPartyMon3SpclAtk], a
ret
Functionc8cf9: ; c8cf9 (32:4cf9)
@ -2563,13 +2563,13 @@ Functionc8e52: ; c8e52 (32:4e52)
ld a, h
push bc
push af
ld hl, BGPals ; $d080
ld de, Unkn1Pals ; $d000
ld hl, BGPals ; BGPals
ld de, Unkn1Pals ; wd000
ld b, a
ld c, $1
call CopyPals
ld hl, $d0c8
ld de, $d048
ld hl, OBPals + 8
ld de, Unkn2Pals + 8
pop af
ld b, a
ld c, $1
@ -2590,13 +2590,13 @@ Functionc8e7f: ; c8e7f (32:4e7f)
ld a, h
push bc
push af
ld hl, $d088
ld de, $d008
ld hl, BGPals + 8
ld de, Unkn1Pals + 8
ld b, a
ld c, $1
call CopyPals
ld hl, OBPals ; $d0c0
ld de, Unkn2Pals ; $d040
ld hl, OBPals ; OBPals
ld de, Unkn2Pals ; wd040
pop af
ld b, a
ld c, $1
@ -2638,7 +2638,7 @@ Functionc8eca: ; c8eca (32:4eca)
xor a
Functionc8ecb: ; c8ecb (32:4ecb)
ld hl, LYOverrides ; $d100
ld hl, LYOverrides ; wd100
ld e, $99
.asm_c8ed0
ld [hli], a
@ -2697,8 +2697,8 @@ Functionc8f19: ; c8f19 (32:4f19)
ld [hLCDStatCustom], a ; $ff00+$c6
ld a, $e4
ld [rBGP], a ; $ff00+$47
ld [$cfc7], a
ld [$cfc9], a
ld [wcfc7], a
ld [wcfc9], a
ld [$ffc7], a
ld [$ffc8], a
call Functionc8eca
@ -2707,14 +2707,14 @@ Functionc8f19: ; c8f19 (32:4f19)
Functionc8f2e: ; c8f2e (32:4f2e)
push bc
xor a
ld [$d419], a
ld [BattleAnimTemps], a
ld a, e
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, d
ld [$d41b], a
ld [BattleAnimTemps + 2], a
ld a, $80
ld [$d41c], a
ld bc, $d200
ld [BattleAnimTemps + 3], a
ld bc, LYOverridesBackup
.asm_c8f43
ld a, [$ffc7]
cp c
@ -2722,18 +2722,18 @@ Functionc8f2e: ; c8f2e (32:4f2e)
ld a, [$ffc8]
cp c
jr c, .asm_c8f58
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
ld d, a
ld a, [$d419]
ld a, [BattleAnimTemps]
call Functionc905d
ld [bc], a
.asm_c8f58
inc bc
ld a, [$d41a]
ld hl, $d419
ld a, [BattleAnimTemps + 1]
ld hl, BattleAnimTemps
add [hl]
ld [hl], a
ld hl, $d41c
ld hl, BattleAnimTemps + 3
dec [hl]
jr nz, .asm_c8f43
pop bc
@ -2742,26 +2742,26 @@ Functionc8f2e: ; c8f2e (32:4f2e)
Functionc8f69: ; c8f69 (32:4f69)
push bc
xor a
ld [$d419], a
ld [BattleAnimTemps], a
ld a, e
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, d
ld [$d41b], a
ld [BattleAnimTemps + 2], a
ld a, $40
ld [$d41c], a
ld bc, $d422
ld [BattleAnimTemps + 3], a
ld bc, wd422
.asm_c8f7e
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
ld d, a
ld a, [$d419]
ld a, [BattleAnimTemps]
call Functionc905d
ld [bc], a
inc bc
ld a, [$d41a]
ld hl, $d419
ld a, [BattleAnimTemps + 1]
ld hl, BattleAnimTemps
add [hl]
ld [hl], a
ld hl, $d41c
ld hl, BattleAnimTemps + 3
dec [hl]
jr nz, .asm_c8f7e
pop bc
@ -2769,26 +2769,26 @@ Functionc8f69: ; c8f69 (32:4f69)
Functionc8f9a: ; c8f9a (32:4f9a)
push bc
ld [$d41c], a
ld [BattleAnimTemps + 3], a
ld a, e
ld [$d41a], a
ld [BattleAnimTemps + 1], a
ld a, d
ld [$d41b], a
ld [BattleAnimTemps + 2], a
call Functionc8fe4
ld hl, $d200
ld hl, LYOverridesBackup
add hl, de
ld c, l
ld b, h
.asm_c8faf
ld a, [$d41c]
ld a, [BattleAnimTemps + 3]
and a
jr z, .asm_c8fe1
dec a
ld [$d41c], a
ld [BattleAnimTemps + 3], a
push af
ld a, [$d41b]
ld a, [BattleAnimTemps + 2]
ld d, a
ld a, [$d41a]
ld a, [BattleAnimTemps + 1]
push hl
call Functionc905d
ld e, a
@ -2806,9 +2806,9 @@ Functionc8f9a: ; c8f9a (32:4f9a)
ld [hl], e
dec hl
.asm_c8fd6
ld a, [$d41a]
ld a, [BattleAnimTemps + 1]
add $4
ld [$d41a], a
ld [BattleAnimTemps + 1], a
pop af
jr .asm_c8faf
.asm_c8fe1
@ -2819,7 +2819,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
Functionc8fe4: ; c8fe4 (32:4fe4)
ld a, [$ffc7]
ld e, a
ld a, [$d419]
ld a, [BattleAnimTemps]
add e
ld e, a
ld d, $0
@ -2907,11 +2907,11 @@ Functionc9042: ; c9042 (32:5042)
and $1
xor [hl]
jr nz, .asm_c9053
ld a, [EnemySubStatus3] ; $c66f
ld a, [EnemySubStatus3] ; EnemySubStatus3
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret
.asm_c9053
ld a, [PlayerSubStatus3] ; $c66a
ld a, [PlayerSubStatus3] ; PlayerSubStatus3
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@ BattleCommand54: ; 37588
; Raise Attack and Defense, and lower Speed.
ld a, $1
ld [$c689], a
ld [wc689], a
call AnimateCurrentMove
ld a, $2
call Function36532

View File

@ -5,11 +5,11 @@ BattleCommand34: ; 37418
call Function34548
jr nz, .asm_3742b
ld a, [$c689]
ld a, [wc689]
push af
call BattleCommand0a
pop af
ld [$c689], a
ld [wc689], a
.asm_3742b
call Function37e36

View File

@ -24,7 +24,7 @@ BattleCommand1b: ; 373c9
.use
ld a, b
ld [hl], a
ld [$d265], a
ld [wd265], a
push af
ld a, BATTLE_VARS_MOVE_ANIM
@ -40,11 +40,11 @@ BattleCommand1b: ; 373c9
call Function34548
jr nz, .done
ld a, [$c689]
ld a, [wc689]
push af
call BattleCommand0a
pop af
ld [$c689], a
ld [wc689], a
.done
call BattleCommandaa

View File

@ -44,7 +44,7 @@ BattleCommand5c: ; 37734
and a
jr nz, .asm_37750
ld a, 1
ld [$c73e], a
ld [wc73e], a
.asm_37750
ld a, [AttackMissed]

View File

@ -21,7 +21,7 @@ BattleCommand50: ; 37492
; Can't steal mail.
ld [$d265], a
ld [wd265], a
ld d, a
callba ItemIsMail
ret c
@ -45,7 +45,7 @@ BattleCommand50: ; 37492
ld [de], a
call .playeritem
ld a, [$d265]
ld a, [wd265]
ld [hl], a
ld [de], a
jr .stole
@ -69,7 +69,7 @@ BattleCommand50: ; 37492
; Can't steal mail!
ld [$d265], a
ld [wd265], a
ld d, a
callba ItemIsMail
ret c
@ -87,7 +87,7 @@ BattleCommand50: ; 37492
ld [de], a
call .enemyitem
ld a, [$d265]
ld a, [wd265]
ld [hl], a
ld [de], a

View File

@ -82,7 +82,7 @@ CalcMagikarpLength: ; fbbfc
ld hl, .Lengths
ld a, 2
ld [$d265], a
ld [wd265], a
.read
ld a, [hli]
@ -111,7 +111,7 @@ CalcMagikarpLength: ; fbbfc
ld [hMultiplicand + 1], a
ld a, 100
ld [hMultiplicand + 2], a
ld a, [$d265]
ld a, [wd265]
ld [hMultiplier], a
call Multiply
ld b, 0
@ -125,9 +125,9 @@ CalcMagikarpLength: ; fbbfc
.next
inc hl ; align to next triplet
ld a, [$d265]
ld a, [wd265]
inc a
ld [$d265], a
ld [wd265], a
cp 16
jr c, .read

View File

@ -4,14 +4,14 @@ Function1f8000: ; 1f8000
ld a, $3
ld [rSVBK], a
xor a
ld hl, $d100
ld hl, wd100
ld bc, $00e0
call ByteFill
ld a, $ff
ld [$d10c], a
ld [$d147], a
ld [$d182], a
ld de, $d100
ld [wd10c], a
ld [wd147], a
ld [wd182], a
ld de, wd100
ld a, [hRandomAdd]
ld b, a
.asm_1f8022
@ -99,22 +99,22 @@ Function1f8081: ; 1f8081
ld b, a
ld a, [hld]
ld c, a
ld a, [$d10b]
ld a, [wd10b]
cp b
jr z, .asm_1f8089
ld a, [$d10c]
ld a, [wd10c]
cp c
jr z, .asm_1f8089
ld a, [$d146]
ld a, [wd146]
cp b
jr z, .asm_1f8089
ld a, [$d147]
ld a, [wd147]
cp c
jr z, .asm_1f8089
ld a, [$d181]
ld a, [wd181]
cp b
jr z, .asm_1f8089
ld a, [$d182]
ld a, [wd182]
cp c
jr z, .asm_1f8089
ld a, [$be51]
@ -138,13 +138,13 @@ Function1f8081: ; 1f8081
ld bc, $3b
call CopyBytes
ld a, [$d265]
ld a, [wd265]
push af
push de
ld hl, -$3b
add hl, de
ld a, [hl]
ld [$d265], a
ld [wd265], a
ld bc, $0030
add hl, bc
push hl
@ -156,7 +156,7 @@ Function1f8081: ; 1f8081
call CopyBytes
pop de
pop af
ld [$d265], a
ld [wd265], a
pop bc
dec c
jp nz, .loop
@ -167,11 +167,11 @@ Function1f8081: ; 1f8081
ld [$be55], a
ld a, [$be53]
ld [$be56], a
ld a, [$d10b]
ld a, [wd10b]
ld [$be51], a
ld a, [$d146]
ld a, [wd146]
ld [$be52], a
ld a, [$d181]
ld a, [wd181]
ld [$be53], a
call CloseSRAM
ret

View File

@ -43,44 +43,44 @@ GiveOddEgg: ; 1fb4b6
ld a, OddEgg2 - OddEgg1
call AddNTimes
ld de, $c608
ld de, wEnemyMoveStruct
ld bc, $0046
call CopyBytes
ld a, EGG_TICKET
ld [CurItem], a
ld a, $1
ld [$d10c], a
ld [wd10c], a
ld a, $ff
ld [$d107], a
ld [wd107], a
ld hl, NumItems
call TossItem
ld a, EGG
ld [$cd2a], a
ld [wcd2a], a
ld a, $cd29 % $100
ld [$cd20], a
ld a, $cd29 / $100
ld [$cd21], a
ld a, $c608 % $100
ld [$cd22], a
ld a, $c608 / $100
ld [$cd23], a
ld a, wcd29 % $100
ld [CreditsPos], a
ld a, wcd29 / $100
ld [wcd21], a
ld a, wEnemyMoveStruct % $100
ld [wcd22], a
ld a, wEnemyMoveStruct / $100
ld [wcd23], a
ld hl, .Odd
ld de, $cd2b
ld de, wcd2b
ld bc, PKMN_NAME_LENGTH
call CopyBytes
ld a, $cd2b % $100
ld [$cd24], a
ld a, $cd2b / $100
ld [$cd25], a
ld a, $c638 % $100
ld [$cd26], a
ld a, $c638 / $100
ld [$cd27], a
ld a, wcd2b % $100
ld [wcd24], a
ld a, wcd2b / $100
ld [wcd25], a
ld a, BattleMonHappiness % $100
ld [wcd26], a
ld a, BattleMonHappiness / $100
ld [wcd27], a
callba Function11b98f
ret
; 1fb546

View File

@ -122,7 +122,7 @@ GetFishGroupHeader: ; 9245b
; Return fishing encounter group header d in de.
push hl
ld hl, $dc1e
ld hl, wdc1e
bit 2, [hl]
pop hl
jr z, .end
@ -141,14 +141,14 @@ GetFishGroupHeader: ; 9245b
ret
.group11
ld a, [$dfce]
ld a, [wdfce]
cp 1
jr nz, .end
ld d, 6
jr .end
.group12
ld a, [$dfce]
ld a, [wdfce]
cp 2
jr nz, .end
ld d, 7

View File

@ -116,7 +116,7 @@ ReadCaughtData: ; 4f134
jr nz, .asm_4f15f
inc hl
ld a, [$d47c]
ld a, [PlayerID + 1]
jr nz, .asm_4f15f
ld a, 0

View File

@ -74,20 +74,16 @@ lb: MACRO ; r, hi, lo
ENDM
bccoord: MACRO
coord bc, \1, \2
ENDM
decoord: MACRO
coord de, \1, \2
ENDM
hlcoord: MACRO
coord hl, \1, \2
ENDM
bccoord equs "coord bc,"
decoord equs "coord de,"
hlcoord equs "coord hl,"
coord: MACRO
if _NARG < 4
ld \1, TileMap + SCREEN_WIDTH * (\3) + (\2)
else
ld \1, \4 + SCREEN_WIDTH * (\3) + (\2)
endc
ENDM
dwcoord: MACRO

17841
main.asm

File diff suppressed because it is too large Load Diff

993
wram.asm

File diff suppressed because it is too large Load Diff