summaryrefslogtreecommitdiff
path: root/scripts/pewterpokecenter2.asm
blob: c884ad658cae91a2913ecc0da26bb1f500b5929c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Func_f1d98:
	ld hl, PewterPokecenterText_f1d9f
	call PrintText
	ret

PewterPokecenterText_f1d9f:
	TX_FAR _PewterPokecenterText2
	db "@"

Func_f1da4:
	ld a, $1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	ld hl, PewterPokecenterText_f1e19
	call PrintText
	call StopAllMusic
	ld c, 32
	call DelayFrames
	ld hl, JigglypuffSpinData
	ld de, wJigglypuffFacingDirections
	ld bc, JigglypuffSpinDataEnd - JigglypuffSpinData
	call CopyData
	ld a, [wSpriteStateData1 + 3 * $10 + 2]
	ld hl, wJigglypuffFacingDirections
.asm_f1dc9
	cp [hl]
	inc hl
	jr nz, .asm_f1dc9
	dec hl
	push hl
	ld c, BANK(Music_JigglypuffSong)
	ld a, MUSIC_JIGGLYPUFF_SONG
	call PlayMusic
	pop hl
.asm_f1dd7
	ld a, [hl]
	ld [wSpriteStateData1 + 3 * $10 + 2], a
	push hl
	ld hl, wJigglypuffFacingDirections
	ld de, wJigglypuffFacingDirections2
	ld bc, JigglypuffSpinDataEnd - JigglypuffSpinData
	call CopyData
	ld a, [wJigglypuffFacingDirections2]
	ld [wcd42], a
	pop hl
	ld c, 24
	call DelayFrames
	ld a, [wChannelSoundIDs]
	ld b, a
	ld a, [wChannelSoundIDs + 1]
	or b
	jr nz, .asm_f1dd7
	ld c, 48
	call DelayFrames
	call PlayDefaultMusic
	ld a, [wd472]
	bit 7, a
	ret z
	callab Func_fce73
	ret c
	call DisablePikachuFollowingPlayer
	ret

PewterPokecenterText_f1e19:
	TX_FAR _PewterPokecenterText5
	db "@"

JigglypuffSpinData:
	db $40 | SPRITE_FACING_DOWN
	db $40 | SPRITE_FACING_LEFT
	db $40 | SPRITE_FACING_UP
	db $40 | SPRITE_FACING_RIGHT
JigglypuffSpinDataEnd: