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

@@ -424,15 +424,15 @@ Function4aad3:
ld c, a
xor a
ld [hObjectStructIndexBuffer], a
ldh [hObjectStructIndexBuffer], a
.loop
push bc
push hl
ld e, MONICON_PARTYMENU
farcall LoadMenuMonIcon
ld a, [hObjectStructIndexBuffer]
ldh a, [hObjectStructIndexBuffer]
inc a
ld [hObjectStructIndexBuffer], a
ldh [hObjectStructIndexBuffer], a
pop hl
pop bc
dec c
@@ -686,7 +686,7 @@ Function4ac58:
.asm_4ac96
ld a, $1
ld [hBGMapMode], a
ldh [hBGMapMode], a
call Function4acaa
call ExitMenu
and a
@@ -728,7 +728,7 @@ Function4acaa:
call StaticMenuJoypad
ld de, SFX_READ_TEXT_2
call PlaySFX
ld a, [hJoyPressed]
ldh a, [hJoyPressed]
bit 0, a
jr nz, .asm_4acf4
bit 1, a