pokered/scripts/pewterpokecenter.asm

85 lines
1.7 KiB
NASM
Raw Normal View History

PewterPokecenterScript:
2015-02-07 10:43:08 +00:00
call Serial_TryEstablishingExternallyClockedConnection
2014-05-18 18:19:10 +00:00
jp EnableAutoTextBoxDrawing
PewterPokecenterTextPointers:
dw PewterHealNurseText
2014-05-18 18:19:10 +00:00
dw PewterPokecenterText2
dw PewterJigglypuffText
dw PewterTradeNurseText
2014-05-18 18:19:10 +00:00
PewterHealNurseText:
TX_POKECENTER_NURSE
2014-05-18 18:19:10 +00:00
PewterPokecenterText2:
TX_FAR _PewterPokecenterText2
2014-05-18 18:19:10 +00:00
db "@"
PewterJigglypuffText:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld a, $1
2014-09-13 07:50:56 +00:00
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .Text
2014-05-18 18:19:10 +00:00
call PrintText
StopAllMusic
ld c, 32
2014-05-18 18:19:10 +00:00
call DelayFrames
2015-06-12 16:00:48 +00:00
ld hl, JigglypuffFacingDirections
2015-07-19 03:49:52 +00:00
ld de, wJigglypuffFacingDirections
2015-08-10 04:56:20 +00:00
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
2014-05-18 18:19:10 +00:00
call CopyData
2015-07-19 03:49:52 +00:00
ld a, [Sprite03SpriteImageIdx]
2015-07-19 03:49:52 +00:00
ld hl, wJigglypuffFacingDirections
.findMatchingFacingDirectionLoop
2014-05-18 18:19:10 +00:00
cp [hl]
inc hl
2015-07-19 03:49:52 +00:00
jr nz, .findMatchingFacingDirectionLoop
2014-05-18 18:19:10 +00:00
dec hl
push hl
ld c, BANK(Music_JigglypuffSong)
ld a, MUSIC_JIGGLYPUFF_SONG
call PlayMusic
pop hl
2015-07-19 03:49:52 +00:00
.loop
2014-05-18 18:19:10 +00:00
ld a, [hl]
ld [Sprite03SpriteImageIdx], a
2015-07-19 03:49:52 +00:00
; rotate the array
2014-05-18 18:19:10 +00:00
push hl
2015-07-19 03:49:52 +00:00
ld hl, wJigglypuffFacingDirections
ld de, wJigglypuffFacingDirections - 1
2015-08-10 04:56:20 +00:00
ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections
2014-05-18 18:19:10 +00:00
call CopyData
2015-07-19 03:49:52 +00:00
ld a, [wJigglypuffFacingDirections - 1]
ld [wJigglypuffFacingDirections + 3], a
2014-05-18 18:19:10 +00:00
pop hl
2015-07-19 03:49:52 +00:00
ld c, 24
2014-05-18 18:19:10 +00:00
call DelayFrames
2015-07-19 03:49:52 +00:00
2015-08-09 05:32:44 +00:00
ld a, [wChannelSoundIDs]
2014-05-18 18:19:10 +00:00
ld b, a
2015-08-09 05:32:44 +00:00
ld a, [wChannelSoundIDs + CH1]
2014-05-18 18:19:10 +00:00
or b
2015-07-19 03:49:52 +00:00
jr nz, .loop
ld c, 48
2014-05-18 18:19:10 +00:00
call DelayFrames
call PlayDefaultMusic
2014-05-18 18:19:10 +00:00
jp TextScriptEnd
.Text
TX_FAR _PewterJigglypuffText
2014-05-18 18:19:10 +00:00
db "@"
JigglypuffFacingDirections:
2015-06-12 16:00:48 +00:00
db $30 | SPRITE_FACING_DOWN
db $30 | SPRITE_FACING_LEFT
db $30 | SPRITE_FACING_UP
db $30 | SPRITE_FACING_RIGHT
2015-08-10 04:56:20 +00:00
JigglypuffFacingDirectionsEnd:
2014-05-18 18:19:10 +00:00
PewterTradeNurseText:
TX_CABLE_CLUB_RECEPTIONIST