less shake in intro, shake while clearing
This commit is contained in:
@@ -410,8 +410,48 @@ Clear:
|
||||
|
||||
; render cleared buffer
|
||||
call StartRender
|
||||
|
||||
; disable sprites
|
||||
HaltAndClearInterrupts
|
||||
ldh a, [rLCDC]
|
||||
and a, ~LCDCF_OBJON
|
||||
ldh [rLCDC], a
|
||||
|
||||
; shake background
|
||||
ld d, HIGH(Random)
|
||||
ld e, LOW(Random)
|
||||
ld b, 16
|
||||
.shake
|
||||
HaltAndClearInterrupts
|
||||
ld a, [de]
|
||||
ldh [rSCX], a
|
||||
|
||||
inc e
|
||||
ld a, e
|
||||
and a, $7
|
||||
ld e, a
|
||||
|
||||
ld a, [de]
|
||||
ldh [rSCY], a
|
||||
|
||||
inc e
|
||||
ld a, e
|
||||
and a, $7
|
||||
ld e, a
|
||||
|
||||
dec b
|
||||
jr nz, .shake
|
||||
|
||||
call WaitRender
|
||||
|
||||
; reset scrolling and enable sprites again
|
||||
xor a
|
||||
ldh [rSCX], a
|
||||
ldh [rSCY], a
|
||||
ldh a, [rLCDC]
|
||||
or a, LCDCF_OBJON
|
||||
ldh [rLCDC], a
|
||||
|
||||
; reset video pointer
|
||||
ld hl, Video
|
||||
ld a, [hl+]
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
INCLUDE "hardware.inc"
|
||||
INCLUDE "utils.inc"
|
||||
|
||||
EXPORT Random, RandomEnd
|
||||
SECTION "Random", ROM0, ALIGN[4]
|
||||
Random:
|
||||
db -1, 1, 2, -1, 4, 3, -2, -1, -4, 3, -1, 5, 2
|
||||
db -1, 1, 2, -1, 2, 0, -2, -1, -2, 3, -1, -2, 2
|
||||
RandomEnd:
|
||||
|
||||
EXPORT ScrollNintendoOut
|
||||
|
||||
Reference in New Issue
Block a user