2014-05-22 22:13:20 +00:00
|
|
|
ShakeElevator: ; 7bf15 (1e:7f15)
|
2015-07-19 05:34:11 +00:00
|
|
|
ld de, -$20
|
|
|
|
call ShakeElevatorRedrawRow
|
|
|
|
ld de, SCREEN_HEIGHT * $20
|
|
|
|
call ShakeElevatorRedrawRow
|
2014-05-22 22:13:20 +00:00
|
|
|
call Delay3
|
|
|
|
ld a, $ff
|
|
|
|
call PlaySound
|
2015-02-07 10:43:08 +00:00
|
|
|
ld a, [hSCY]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld d, a
|
|
|
|
ld e, $1
|
2015-07-03 19:37:53 +00:00
|
|
|
ld b, 100
|
2015-07-19 05:34:11 +00:00
|
|
|
.shakeLoop ; scroll the BG up and down and play a sound effect
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, e
|
|
|
|
xor $fe
|
|
|
|
ld e, a
|
|
|
|
add d
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCY], a
|
2014-05-22 22:13:20 +00:00
|
|
|
push bc
|
|
|
|
ld c, BANK(SFX_02_5b)
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_COLLISION
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlayMusic
|
|
|
|
pop bc
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 2
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
|
|
|
dec b
|
2015-07-19 05:34:11 +00:00
|
|
|
jr nz, .shakeLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, d
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCY], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $ff
|
|
|
|
call PlaySound
|
|
|
|
ld c, BANK(SFX_02_5f)
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_SAFARI_ZONE_PA
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlayMusic
|
2015-07-19 05:34:11 +00:00
|
|
|
.musicLoop
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wc02a]
|
2014-05-22 22:13:20 +00:00
|
|
|
cp $b9
|
2015-07-19 05:34:11 +00:00
|
|
|
jr z, .musicLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
call UpdateSprites
|
2014-09-10 03:55:19 +00:00
|
|
|
jp PlayDefaultMusic
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2015-07-19 05:34:11 +00:00
|
|
|
ShakeElevatorRedrawRow: ; 7bf64 (1e:7f64)
|
|
|
|
; This function is used to redraw certain portions of the screen, but it does
|
|
|
|
; not appear to ever result in any visible effect, so this function seems to
|
|
|
|
; be pointless.
|
2014-09-14 18:29:18 +00:00
|
|
|
ld hl, wMapViewVRAMPointer + 1
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hld]
|
|
|
|
push af
|
|
|
|
ld a, [hl]
|
|
|
|
push af
|
|
|
|
push hl
|
|
|
|
push hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
add hl, de
|
|
|
|
ld a, h
|
|
|
|
and $3
|
|
|
|
or $98
|
|
|
|
ld d, a
|
|
|
|
ld a, l
|
|
|
|
pop hl
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], d
|
|
|
|
call ScheduleNorthRowRedraw
|
|
|
|
pop hl
|
|
|
|
pop af
|
|
|
|
ld [hli], a
|
|
|
|
pop af
|
|
|
|
ld [hl], a
|
|
|
|
jp Delay3
|