mirror of
https://github.com/pret/pokered.git
synced 2024-10-22 22:55:31 +00:00
d001ced41b
This introduces `def_script_pointers`, `def_text_pointers`, and `object_const_def` macros, and applies them to all maps. Most other map labels have also been identified.
87 lines
2 KiB
NASM
87 lines
2 KiB
NASM
PewterPokecenter_Script:
|
|
call Serial_TryEstablishingExternallyClockedConnection
|
|
jp EnableAutoTextBoxDrawing
|
|
|
|
PewterPokecenter_TextPointers:
|
|
def_text_pointers
|
|
dw_const PewterPokecenterNurseText, TEXT_PEWTERPOKECENTER_NURSE
|
|
dw_const PewterPokecenterGentlemanText, TEXT_PEWTERPOKECENTER_GENTLEMAN
|
|
dw_const PewterPokecenterJigglypuffText, TEXT_PEWTERPOKECENTER_JIGGLYPUFF
|
|
dw_const PewterPokecenterLinkReceptionistText, TEXT_PEWTERPOKECENTER_LINK_RECEPTIONIST
|
|
|
|
PewterPokecenterNurseText:
|
|
script_pokecenter_nurse
|
|
|
|
PewterPokecenterGentlemanText:
|
|
text_far _PewterPokecenterGentlemanText
|
|
text_end
|
|
|
|
PewterPokecenterJigglypuffText:
|
|
text_asm
|
|
ld a, TRUE
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
|
ld hl, .Text
|
|
call PrintText
|
|
|
|
ld a, SFX_STOP_ALL_MUSIC
|
|
call PlaySound
|
|
ld c, 32
|
|
call DelayFrames
|
|
|
|
ld hl, .FacingDirections
|
|
ld de, wJigglypuffFacingDirections
|
|
ld bc, .FacingDirectionsEnd - .FacingDirections
|
|
call CopyData
|
|
|
|
ld a, [wSprite03StateData1ImageIndex]
|
|
ld hl, wJigglypuffFacingDirections
|
|
.findMatchingFacingDirectionLoop
|
|
cp [hl]
|
|
inc hl
|
|
jr nz, .findMatchingFacingDirectionLoop
|
|
dec hl
|
|
|
|
push hl
|
|
ld c, 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, .FacingDirectionsEnd - .FacingDirections
|
|
call CopyData
|
|
ld a, [wJigglypuffFacingDirections - 1]
|
|
ld [wJigglypuffFacingDirections + 3], a
|
|
pop hl
|
|
ld c, 24
|
|
call DelayFrames
|
|
ld a, [wChannelSoundIDs]
|
|
ld b, a
|
|
ld a, [wChannelSoundIDs + CHAN2]
|
|
or b
|
|
jr nz, .spinMovementLoop
|
|
|
|
ld c, 48
|
|
call DelayFrames
|
|
call PlayDefaultMusic
|
|
jp TextScriptEnd
|
|
|
|
.Text:
|
|
text_far _PewterPokecenterJigglypuffText
|
|
text_end
|
|
|
|
.FacingDirections:
|
|
db $30 | SPRITE_FACING_DOWN
|
|
db $30 | SPRITE_FACING_LEFT
|
|
db $30 | SPRITE_FACING_UP
|
|
db $30 | SPRITE_FACING_RIGHT
|
|
.FacingDirectionsEnd:
|
|
|
|
PewterPokecenterLinkReceptionistText:
|
|
script_cable_club_receptionist
|