2016-06-12 00:24:04 +00:00
|
|
|
ShakeElevator:
|
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
|
2015-07-22 14:57:31 +00:00
|
|
|
ld c, BANK(SFX_Collision_1)
|
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
|
2015-07-22 14:57:31 +00:00
|
|
|
ld c, BANK(SFX_Safari_Zone_PA)
|
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
|
2019-07-28 04:21:39 +00:00
|
|
|
ld a, [wChannelSoundIDs + Ch5]
|
2016-06-12 04:30:05 +00:00
|
|
|
cp SFX_SAFARI_ZONE_PA
|
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
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
ShakeElevatorRedrawRow:
|
2015-07-19 05:34:11 +00:00
|
|
|
; 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
|
2016-06-12 04:30:05 +00:00
|
|
|
or vBGMap0 / $100
|
2014-05-22 22:13:20 +00:00
|
|
|
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
|