summaryrefslogtreecommitdiff
path: root/home/battle.asm
diff options
context:
space:
mode:
authorlibjet <libj3t@gmail.com>2020-02-19 02:42:34 +0000
committerlibjet <libj3t@gmail.com>2020-02-19 02:42:34 +0000
commit5172056acdf4691e8d3db4563d3a1a73d7025efc (patch)
tree91a918cd62b151c993a843a388cc38ec0e51509f /home/battle.asm
parent6cbd16985aaa5408f855454c55a073d753b38d8c (diff)
Use labels instead of constants for HRAM
Diffstat (limited to 'home/battle.asm')
-rw-r--r--home/battle.asm22
1 files changed, 11 insertions, 11 deletions
diff --git a/home/battle.asm b/home/battle.asm
index a29db60f..a7f7a558 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -1,6 +1,6 @@
UserPartyAttr:: ; 3b69
push af
- ld a, [hBattleTurn]
+ ldh a, [hBattleTurn]
and a
jr nz, .asm_3b72
pop af
@@ -12,7 +12,7 @@ UserPartyAttr:: ; 3b69
OpponentPartyAttr::
push af
- ld a, [hBattleTurn]
+ ldh a, [hBattleTurn]
and a
jr z, .asm_3b7e
pop af
@@ -52,21 +52,21 @@ 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
- ld a, [hBattleTurn]
+ ldh a, [hBattleTurn]
and a
jr z, UpdateBattleMonInParty
jr UpdateEnemyMonInParty
@@ -121,7 +121,7 @@ GetBattleVarAddr:: ; 3c0b (0:3c0b)
ld a, [hli]
ld h, [hl]
ld l, a
- ld a, [hBattleTurn]
+ ldh a, [hBattleTurn]
and a
jr z, .asm_3c1d
inc hl
@@ -186,14 +186,14 @@ GetBattleVarAddr:: ; 3c0b (0:3c0b)
db $23 ; ???
FarCopyRadioText::
- 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
@@ -203,13 +203,13 @@ FarCopyRadioText::
ld bc, $28
call CopyBytes
pop af
- ld [hROMBank], a
+ ldh [hROMBank], a
ld [MBC3RomBank], a
ret
StdBattleTextBox::
GLOBAL BattleText
- ld a, [hROMBank]
+ ldh a, [hROMBank]
push af
ld a, BANK(BattleText) ; $40
rst Bankswitch