diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2018-08-25 22:23:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-25 22:23:45 -0400 |
commit | 3eacab563d0e1ab5557c2443556a7a5e58d14cad (patch) | |
tree | 3d747166409fdc94f0fd1aa760693a7ee5bd2156 /engine/battle/ai/items.asm | |
parent | 89681d231611938a791f4256e602c88c2f9aa3e1 (diff) | |
parent | b2adcd6d6ff91efc764a6ecc65147be7b9cda9e8 (diff) |
Merge pull request #555 from Rangi42/ldh
Use real labels for HRAM instead of constants, and the ldh instruction
Diffstat (limited to 'engine/battle/ai/items.asm')
-rw-r--r-- | engine/battle/ai/items.asm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm index 28dfb1010..b3f40cd34 100644 --- a/engine/battle/ai/items.asm +++ b/engine/battle/ai/items.asm @@ -520,7 +520,7 @@ AIUpdateHUD: call UpdateEnemyMonInParty farcall UpdateEnemyHUD ld a, $1 - ld [hBGMapMode], a + ldh [hBGMapMode], a ld hl, wEnemyItemState dec [hl] scf @@ -671,7 +671,7 @@ AI_Switch: ld hl, wEnemySubStatus4 res SUBSTATUS_RAGE, [hl] xor a - ld [hBattleTurn], a + ldh [hBattleTurn], a callfar PursuitSwitch push af @@ -755,17 +755,17 @@ EnemyUsedDireHit: jp PrintText_UsedItemOn_AND_AIUpdateHUD Function3851e: ; This appears to be unused - ld [hDivisor], a + ldh [hDivisor], a ld hl, wEnemyMonMaxHP ld a, [hli] - ld [hDividend], a + ldh [hDividend], a ld a, [hl] - ld [hDividend + 1], a + ldh [hDividend + 1], a ld b, 2 call Divide - ld a, [hQuotient + 2] + ldh a, [hQuotient + 2] ld c, a - ld a, [hQuotient + 1] + ldh a, [hQuotient + 1] ld b, a ld hl, wEnemyMonHP + 1 ld a, [hld] |