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 /home/battle.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 'home/battle.asm')
-rw-r--r-- | home/battle.asm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/home/battle.asm b/home/battle.asm index e88adef02..407ef44c8 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -1,6 +1,6 @@ UserPartyAttr:: push af - ld a, [hBattleTurn] + ldh a, [hBattleTurn] and a jr nz, .ot pop af @@ -11,7 +11,7 @@ UserPartyAttr:: OpponentPartyAttr:: push af - ld a, [hBattleTurn] + ldh a, [hBattleTurn] and a jr z, .ot pop af @@ -52,22 +52,22 @@ ResetDamage:: SetPlayerTurn:: xor a - ld [hBattleTurn], a + ldh [hBattleTurn], a ret SetEnemyTurn:: ld a, 1 - ld [hBattleTurn], a + ldh [hBattleTurn], a ret UpdateOpponentInParty:: - ld a, [hBattleTurn] + ldh a, [hBattleTurn] and a jr z, UpdateEnemyMonInParty jr UpdateBattleMonInParty UpdateUserInParty:: - ld a, [hBattleTurn] + ldh a, [hBattleTurn] and a jr z, UpdateBattleMonInParty jr UpdateEnemyMonInParty @@ -120,14 +120,14 @@ INCLUDE "home/battle_vars.asm" FarCopyRadioText:: inc hl - ld a, [hROMBank] + ldh a, [hROMBank] push af ld a, [hli] ld e, a ld a, [hli] ld d, a ld a, [hli] - ld [hROMBank], a + ldh [hROMBank], a ld [MBC3RomBank], a ld a, e ld l, a @@ -137,7 +137,7 @@ FarCopyRadioText:: ld bc, 2 * SCREEN_WIDTH call CopyBytes pop af - ld [hROMBank], a + ldh [hROMBank], a ld [MBC3RomBank], a ret @@ -169,7 +169,7 @@ BattleTextBox:: StdBattleTextBox:: ; Open a textbox and print battle text at 20:hl. - ld a, [hROMBank] + ldh a, [hROMBank] push af ld a, BANK(BattleText) |