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

@@ -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