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

@@ -167,7 +167,7 @@ Slots_GetPals:
ld a, %11100100
call DmgToCgbBGPals
lb de, %11100100, %11100100
ld a, [hCGB]
ldh a, [hCGB]
and a
jr nz, .cgb
lb de, %11000000, %11100100
@@ -214,7 +214,7 @@ SlotsLoop:
ld a, [wTextDelayFrames]
and $7
ret nz
ld a, [rBGP]
ldh a, [rBGP]
xor %00001100
call DmgToCgbBGPals
ret
@@ -343,7 +343,7 @@ SlotsAction_WaitStart:
.proceed
call SlotsAction_Next
xor a
ld [hJoypadSum], a
ldh [hJoypadSum], a
ret
SlotsAction_WaitReel1:
@@ -365,7 +365,7 @@ SlotsAction_WaitStopReel1:
call Slots_LoadReelState
call SlotsAction_Next
xor a
ld [hJoypadSum], a
ldh [hJoypadSum], a
SlotsAction_WaitReel2:
ld hl, hJoypadSum
ld a, [hl]
@@ -385,7 +385,7 @@ SlotsAction_WaitStopReel2:
call Slots_LoadReelState
call SlotsAction_Next
xor a
ld [hJoypadSum], a
ldh [hJoypadSum], a
SlotsAction_WaitReel3:
ld hl, hJoypadSum
ld a, [hl]
@@ -405,7 +405,7 @@ SlotsAction_WaitStopReel3:
call Slots_LoadReelState
call SlotsAction_Next
xor a
ld [hJoypadSum], a
ldh [hJoypadSum], a
ret
SlotsAction_FlashIfWin:
@@ -429,7 +429,7 @@ SlotsAction_FlashScreen:
srl a
ret z
ld a, [rOBP0]
ldh a, [rOBP0]
xor $ff
ld e, a
ld d, a
@@ -2042,7 +2042,7 @@ Slots_AnimateGolem:
xor $ff
inc a
ld [hl], a
ld [hSCY], a
ldh [hSCY], a
ret
.restart
@@ -2050,7 +2050,7 @@ Slots_AnimateGolem:
add hl, bc
xor a
ld [hl], a
ld [hSCY], a
ldh [hSCY], a
ret
Slots_AnimateChansey: