You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user