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:
@@ -654,9 +654,9 @@ Hatch_UpdateFrontpicBGMapCenter:
|
||||
pop bc
|
||||
pop hl
|
||||
ld a, b
|
||||
ld [hBGMapAddress + 1], a
|
||||
ldh [hBGMapAddress + 1], a
|
||||
ld a, c
|
||||
ld [hGraphicStartTile], a
|
||||
ldh [hGraphicStartTile], a
|
||||
lb bc, 7, 7
|
||||
predef PlaceGraphic
|
||||
pop af
|
||||
@@ -708,7 +708,7 @@ EggHatch_AnimationSequence:
|
||||
call DelayFrames
|
||||
xor a
|
||||
ld [wFrameCounter], a
|
||||
ld a, [hSCX]
|
||||
ldh a, [hSCX]
|
||||
ld b, a
|
||||
.outerloop
|
||||
ld hl, wFrameCounter
|
||||
@@ -720,14 +720,14 @@ EggHatch_AnimationSequence:
|
||||
.loop
|
||||
; wobble e times
|
||||
ld a, 2
|
||||
ld [hSCX], a
|
||||
ldh [hSCX], a
|
||||
ld a, -2
|
||||
ld [wGlobalAnimXOffset], a
|
||||
call EggHatch_DoAnimFrame
|
||||
ld c, 2
|
||||
call DelayFrames
|
||||
ld a, -2
|
||||
ld [hSCX], a
|
||||
ldh [hSCX], a
|
||||
ld a, 2
|
||||
ld [wGlobalAnimXOffset], a
|
||||
call EggHatch_DoAnimFrame
|
||||
@@ -744,7 +744,7 @@ EggHatch_AnimationSequence:
|
||||
ld de, SFX_EGG_HATCH
|
||||
call PlaySFX
|
||||
xor a
|
||||
ld [hSCX], a
|
||||
ldh [hSCX], a
|
||||
ld [wGlobalAnimXOffset], a
|
||||
call ClearSprites
|
||||
call Hatch_InitShellFragments
|
||||
|
||||
Reference in New Issue
Block a user