This commit is contained in:
dannye 2019-04-13 17:21:23 -05:00
commit b1108ba91e
1427 changed files with 13219 additions and 8377 deletions

83
scripts/PewterPokecenter.asm Executable file
View file

@ -0,0 +1,83 @@
PewterPokecenter_Script:
call Serial_TryEstablishingExternallyClockedConnection
jp EnableAutoTextBoxDrawing
PewterPokecenter_TextPointers:
dw PewterHealNurseText
dw PewterPokecenterText2
dw PewterJigglypuffText
dw PewterTradeNurseText
PewterHealNurseText:
TX_POKECENTER_NURSE
PewterPokecenterText2:
TX_FAR _PewterPokecenterText2
db "@"
PewterJigglypuffText:
TX_ASM
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .Text
call PrintText
StopAllMusic
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
.loop
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, .loop
ld c, 48
call DelayFrames
call PlayDefaultMusic
jp TextScriptEnd
.Text
TX_FAR _PewterJigglypuffText
db "@"
JigglypuffFacingDirections:
db $30 | SPRITE_FACING_DOWN
db $30 | SPRITE_FACING_LEFT
db $30 | SPRITE_FACING_UP
db $30 | SPRITE_FACING_RIGHT
JigglypuffFacingDirectionsEnd:
PewterTradeNurseText:
TX_CABLE_CLUB_RECEPTIONIST