You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
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:
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -128,7 +128,7 @@ PlaceTradePartnerNamesAndParty:
|
||||
push de
|
||||
push hl
|
||||
ld a, c
|
||||
ld [hProduct], a
|
||||
ldh [hProduct], a
|
||||
call GetPokemonName
|
||||
pop hl
|
||||
call PlaceString
|
||||
|
Reference in New Issue
Block a user