Use labels instead of constants for HRAM

Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
This commit is contained in:
Rangi
2018-08-25 14:28:22 -04:00
parent 376c64468b
commit eb1e3636bb
243 changed files with 4706 additions and 4661 deletions

View File

@@ -7,7 +7,7 @@ BattleCommand_StoreEnergy:
ret z
ld hl, wPlayerRolloutCount
ld a, [hBattleTurn]
ldh a, [hBattleTurn]
and a
jr z, .check_still_storing_energy
ld hl, wEnemyRolloutCount
@@ -28,7 +28,7 @@ BattleCommand_StoreEnergy:
ld [hl], a
ld hl, wPlayerDamageTaken + 1
ld de, wPlayerCharging ; player
ld a, [hBattleTurn]
ldh a, [hBattleTurn]
and a
jr z, .player
ld hl, wEnemyDamageTaken + 1
@@ -74,7 +74,7 @@ BattleCommand_UnleashEnergy:
ld de, wPlayerDamageTaken
ld bc, wPlayerRolloutCount
ld a, [hBattleTurn]
ldh a, [hBattleTurn]
and a
jr z, .got_damage
ld de, wEnemyDamageTaken