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

@@ -51,7 +51,7 @@ LoadMenuMonIcon:
.GetPartyMonItemGFX:
push bc
ld a, [hObjectStructIndexBuffer]
ldh a, [hObjectStructIndexBuffer]
ld hl, wPartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
@@ -125,7 +125,7 @@ PartyMenu_InitAnimatedMonIcon:
.SpawnItemIcon:
push bc
ld a, [hObjectStructIndexBuffer]
ldh a, [hObjectStructIndexBuffer]
ld hl, wPartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
@@ -154,7 +154,7 @@ PartyMenu_InitAnimatedMonIcon:
InitPartyMenuIcon:
ld a, [wCurIconTile]
push af
ld a, [hObjectStructIndexBuffer]
ldh a, [hObjectStructIndexBuffer]
ld hl, wPartySpecies
ld e, a
ld d, 0
@@ -163,7 +163,7 @@ InitPartyMenuIcon:
call ReadMonMenuIcon
ld [wCurIcon], a
call GetMemIconGFX
ld a, [hObjectStructIndexBuffer]
ldh a, [hObjectStructIndexBuffer]
; y coord
add a
add a
@@ -184,7 +184,7 @@ InitPartyMenuIcon:
SetPartyMonIconAnimSpeed:
push bc
ld a, [hObjectStructIndexBuffer]
ldh a, [hObjectStructIndexBuffer]
ld b, a
call .getspeed
ld a, b