kep-hack/engine/overworld/elevator.asm
Martha Schilling 508a4e790e The Big One.
Whoa, this one's been in the making for a while now. This one has been my attempt to fix as much as I could within a little over a month. Here's what I've got for you.

- Fixed a bug in Silph Gauntlet where the trainers would not see you unless you spoke to them

- Removed the unnecessary Gawarhed and Wugtrio static encounters. In what was once Gawarhed's place is a Rare Candy.

- Implemented a working ferry system (huge thanks to Red++) that allows travelling to Faraway Island and Citrine City with the right tickets. Currently both maps use a copy of the SS Anne, which may be revised later.

- Bittybat, Magnetite and Burgela have been removed to fix a Pokedex bug where entries wouldn't display correctly if the total number wasn't a multiple of 8.

- Fixed a bug where fishing up a Wiglett and Wugtrio would play the trainer battle and Champion battle themes respectively

- Restructured the Pokedex a little. Don't worry, Lickitung's still number 108!

- All references to betamon in the disassembly have had their names updated to match the new Ogasawara ones

- Removed Blastyke as a Game Corner prize, replacing it with Squeamata.

- Garnet Cavern is now properly listed as a dungeon map

- Fixed an issue where trying to leave Bill's House after entering the garden would put you back in the garden

- Moved Silph Gauntlet's Beauty down 1 floor to make the number of trainers on each floor more consistent

- Finished Gauntlet 6F except for the trainer text (PvK please help)

- Gavillain's stats updated to match KEP 1.4 on the Showdown server. It's now a Dragon/Electric type with less Ice coverage.

- Fixed Clefable's and Wigglytuff's starting movesets from an earlier commit

- Fixed an ABSOLUTELY HORRIBLE, EGREGIOUSLY FRUSTRATING BUG that caused the Pokedex's seen counter to rarely update. This is what caused this commit to be delayed for so long. No joke.

- New sprites, courtesy of Albatross, for Sylveon's back sprite, Alolan Marowak, Alolan Muk, Galarian Weezing and Magnezone!

- Fixed a bug preventing the trade for Haunter from being accessed.
2023-09-19 23:34:25 +01:00

113 lines
1.9 KiB
NASM

ShakeElevator::
ld de, -$20
call ShakeElevatorRedrawRow
ld de, SCREEN_HEIGHT * $20
call ShakeElevatorRedrawRow
call Delay3
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ldh a, [hSCY]
ld d, a
ld e, $1
ld b, 100
.shakeLoop ; scroll the BG up and down and play a sound effect
ld a, e
xor $fe
ld e, a
add d
ldh [hSCY], a
push bc
ld c, 0 ; BANK(SFX_Collision_1)
ld a, SFX_COLLISION
call PlaySound
pop bc
ld c, 2
call DelayFrames
dec b
jr nz, .shakeLoop
ld a, d
ldh [hSCY], a
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld c, 0 ; BANK(SFX_Safari_Zone_PA)
ld a, SFX_SAFARI_ZONE_PA
call PlaySound
;.musicLoop
; ld a, [wChannelSoundIDs + CHAN5]
; cp SFX_SAFARI_ZONE_PA
; jr z, .musicLoop
call UpdateSprites
jp PlayDefaultMusic
ShakeElevatorFerry::
ld de, -$20
call ShakeElevatorRedrawRow
ld de, SCREEN_HEIGHT * $20
call ShakeElevatorRedrawRow
call Delay3
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ldh a, [hSCY]
ld d, a
ld e, $1
ld b, 100
.shakeLoop ; scroll the BG up and down and play a sound effect
ld a, e
xor $fe
ld e, a
add d
ldh [hSCY], a
push bc
ld c, 0 ; BANK(SFX_Collision_1)
ld a, SFX_COLLISION
call PlaySound
pop bc
ld c, 2
call DelayFrames
dec b
jr nz, .shakeLoop
ld a, d
ldh [hSCY], a
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld c, 0 ; BANK(SFX_SS_Anne_Horn)
ld a, SFX_SS_ANNE_HORN
call PlaySound
;.musicLoop
; ld a, [wChannelSoundIDs + CHAN5]
; cp SFX_SAFARI_ZONE_PA
; jr z, .musicLoop
call UpdateSprites
jp PlayDefaultMusic
ShakeElevatorRedrawRow:
; 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.
ld hl, wMapViewVRAMPointer + 1
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 HIGH(vBGMap0)
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