diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-06 19:03:05 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-06 19:03:05 -0400 |
commit | 772fcc7588a4e1fbe146a02b429cf64282c81dcb (patch) | |
tree | f491fa1d38e37ab10534b3f18422e0149ad0deca /home/trainers.asm | |
parent | c480632d5494d04f7f5f0298a31877a2293b564e (diff) |
Specify the ldh instruction, don't turn ld into ldh
Diffstat (limited to 'home/trainers.asm')
-rw-r--r-- | home/trainers.asm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/home/trainers.asm b/home/trainers.asm index 22601db8..66108af6 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -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 |