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

File diff suppressed because it is too large Load Diff

View File

@@ -185,10 +185,10 @@ LinkTradeMenu:
.GetJoypad:
push bc
push af
ld a, [hJoyLast]
ldh a, [hJoyLast]
and D_PAD
ld b, a
ld a, [hJoyPressed]
ldh a, [hJoyPressed]
and BUTTONS
or b
ld b, a
@@ -201,11 +201,11 @@ LinkTradeMenu:
.MenuAction:
ld hl, w2DMenuFlags2
res 7, [hl]
ld a, [hBGMapMode]
ldh a, [hBGMapMode]
push af
call .loop
pop af
ld [hBGMapMode], a
ldh [hBGMapMode], a
ret
.loop
@@ -228,15 +228,15 @@ LinkTradeMenu:
ret
.UpdateBGMapAndOAM:
ld a, [hOAMUpdate]
ldh a, [hOAMUpdate]
push af
ld a, $1
ld [hOAMUpdate], a
ldh [hOAMUpdate], a
call WaitBGMap
pop af
ld [hOAMUpdate], a
ldh [hOAMUpdate], a
xor a
ld [hBGMapMode], a
ldh [hBGMapMode], a
ret
.loop2

File diff suppressed because it is too large Load Diff

View File

@@ -128,7 +128,7 @@ PlaceTradePartnerNamesAndParty:
push de
push hl
ld a, c
ld [hProduct], a
ldh [hProduct], a
call GetPokemonName
pop hl
call PlaceString