Specify the ldh instruction, don't turn ld into ldh

This commit is contained in:
Rangi 2020-07-06 19:03:05 -04:00
parent c480632d54
commit 772fcc7588
219 changed files with 2556 additions and 2556 deletions

View file

@ -144,7 +144,7 @@ CheckFightingMapTrainers::
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
xor a
ld [hJoyHeld], a
ldh [hJoyHeld], a
call TrainerWalkUpToPlayer_Bank0
ld hl, wCurMapScript
inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
@ -157,7 +157,7 @@ DisplayEnemyTrainerTextAndStartBattle::
ret nz ; return if the enemy trainer hasn't finished walking to the player's sprite
ld [wJoyIgnore], a
ld a, [wSpriteIndex]
ld [hSpriteIndexOrTextID], a
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
; fall through
@ -211,9 +211,9 @@ EndTrainerBattle::
ResetButtonPressedAndMapScript::
xor a
ld [wJoyIgnore], a
ld [hJoyHeld], a
ld [hJoyPressed], a
ld [hJoyReleased], a
ldh [hJoyHeld], a
ldh [hJoyPressed], a
ldh [hJoyReleased], a
ld [wCurMapScript], a ; reset battle status
ret
@ -302,7 +302,7 @@ CheckForEngagingTrainers::
; hl = text if the player wins
; de = text if the player loses
SaveEndBattleTextPointers::
ld a, [hLoadedROMBank]
ldh a, [hLoadedROMBank]
ld [wEndBattleTextRomBank], a
ld a, h
ld [wEndBattleWinTextPointer], a
@ -337,10 +337,10 @@ PrintEndBattleText::
res 7, [hl]
pop hl
ret z
ld a, [hLoadedROMBank]
ldh a, [hLoadedROMBank]
push af
ld a, [wEndBattleTextRomBank]
ld [hLoadedROMBank], a
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
push hl
callba SaveTrainerName
@ -348,7 +348,7 @@ PrintEndBattleText::
call PrintText
pop hl
pop af
ld [hLoadedROMBank], a
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
callba FreezeEnemyTrainerSprite
jp WaitForSoundToFinish