kep-hack/scripts/PewterPokecenter.asm
Llinos Evans 9b387cab7e Expanding on Pokemon icon usage
This adds Pikachu, Cat, and "Small Bird" menu icons. The cat has a custom animation done by myself.

The Jigglypuff in the Pokemon Centre now uses the new sprite, nice 'n' pretty. Officer Jenny is also in Cerulean. The Pokemon from Melanie's house in Yellow have been put in Mr. Fuji's House, given the purpose of the house in RB is different. I think it ends up fitting very nicely.

Chansey has been given its proper sprite in Fuschia. Yellow didn't actually do this, as Chansey doesn't have a walk cycle, causing the stuff that exists to go unused. I wanted it, though, so I had Chansey just not walk and turn around. Oh, and it's in all the Pokemon Centres now. Yeah, that's a...lot of changed files.
2023-04-23 21:25:45 +01:00

106 lines
2.1 KiB
NASM

PewterPokecenter_Script:
call Serial_TryEstablishingExternallyClockedConnection
jp EnableAutoTextBoxDrawing
PewterPokecenter_TextPointers:
dw PewterHealNurseText
dw PewterPokecenterText2
dw PewterJigglypuffText
dw PewterTradeNurseText
dw GolemTrade
dw PewterPokecenterText3
PewterHealNurseText:
script_pokecenter_nurse
PewterPokecenterText2:
text_far _PewterPokecenterText2
text_end
PewterJigglypuffText:
text_asm
ld a, TRUE
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .JigglypuffText
call PrintText
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld c, 32
call DelayFrames
ld hl, JigglypuffFacingDirections
ld de, wJigglypuffFacingDirections
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
call CopyData
ld a, [wSprite03StateData1ImageIndex]
ld hl, wJigglypuffFacingDirections
.findMatchingFacingDirectionLoop
cp [hl]
inc hl
jr nz, .findMatchingFacingDirectionLoop
dec hl
push hl
ld c, 0 ; BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic
pop hl
.spinMovementLoop
ld a, [hl]
ld [wSprite03StateData1ImageIndex], a
; rotate the array
push hl
ld hl, wJigglypuffFacingDirections
ld de, wJigglypuffFacingDirections - 1
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
call CopyData
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
pop hl
ld c, 24
call DelayFrames
push hl
call IsSongPlaying
pop hl
jr c, .spinMovementLoop
; ld a, [wChannelSoundIDs]
; ld b, a
; ld a, [wChannelSoundIDs + CHAN2]
; or b
; jr nz, .spinMovementLoop
ld c, 48
call DelayFrames
call PlayDefaultMusic
jp TextScriptEnd
.JigglypuffText:
text_far _PewterJigglypuffText
text_end
JigglypuffFacingDirections:
db $30 | SPRITE_FACING_DOWN
db $30 | SPRITE_FACING_LEFT
db $30 | SPRITE_FACING_UP
db $30 | SPRITE_FACING_RIGHT
JigglypuffFacingDirectionsEnd:
PewterTradeNurseText:
script_cable_club_receptionist
GolemTrade:
text_asm
ld a, TRADE_FOR_GOLEM_A
ld [wWhichTrade], a
predef DoInGameTradeDialogue
jp TextScriptEnd
PewterPokecenterText3:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd