summaryrefslogtreecommitdiff
path: root/scripts/SummerBeachHouse.asm
blob: f31c04fea8f9134d45c27cd91b2ba79230fd06ae (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
SummerBeachHouse_Script:
	call EnableAutoTextBoxDrawing
	ret

SummerBeachHouse_TextPointers:
	dw SurfinDudeText
	dw SummerBeachHousePikachuText
	dw SummerBeachHouseSign1Text
	dw SummerBeachHouseSign2Text
	dw SummerBeachHouseSign3Text
	dw SummerBeachHouseSign4Text

SurfinDudeText:
	text_asm
	ld a, [wd472]
	vc_patch MiniGame
IF DEF (_YELLOW_VC)
	bit 7, a
ELSE
	bit 6, a
ENDC
	vc_patch_end
	jr nz, .next
	ld hl, .SurfinDudeText4
	call PrintText
	jr .done
.next
	ld hl, wd492
	bit 0, [hl]
	set 0, [hl]
	jr nz, .next2
	ld hl, .SurfinDudeText1
	jr .next3
.next2
	ld hl, .SurfinDudeText3
.next3
	call PrintText
	call YesNoChoice
	ld a, [wCurrentMenuItem]
	and a
	jr nz, .asm_f226b
	ld a, 1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	farcall SurfingPikachuMinigame
	ld hl, wd492
	set 1, [hl]
	jr .done
.asm_f226b
	ld hl, .SurfinDudeText2
	call PrintText
.done
	jp TextScriptEnd

.SurfinDudeText1
	text_far _SurfinDudeText1
	text_end
.SurfinDudeText2
	text_far _SurfinDudeText2
	text_end
.SurfinDudeText3
	text_far _SurfinDudeText3
	text_end
.SurfinDudeText4
	text_far _SurfinDudeText4
	text_end

SummerBeachHousePikachuText:
	text_asm
	ld hl, .SummerBeachHousePikachuText
	call PrintText
	ld a, PIKACHU
	call PlayCry
	call WaitForSoundToFinish
	jp TextScriptEnd

.SummerBeachHousePikachuText
	text_far _SummerBeachHousePikachuText
	text_end

SummerBeachHouseSign1Text:
	text_asm
	ld hl, .SummerBeachHouseSign1Text2
	ld a, [wd472]
	bit 6, a
	jr z, .next
	ld hl, .SummerBeachHouseSign1Text1
.next
	call PrintText
	jp TextScriptEnd

.SummerBeachHouseSign1Text1
	text_far _SummerBeachHouseSign1Text1
	text_end
.SummerBeachHouseSign1Text2
	text_far _SummerBeachHouseSign1Text2
	text_end

SummerBeachHouseSign2Text:
	text_asm
	ld hl, .SummerBeachHouseSign2Text2
	ld a, [wd472]
	bit 6, a
	jr z, .next
	ld hl, .SummerBeachHouseSign2Text1
.next
	call PrintText
	jp TextScriptEnd

.SummerBeachHouseSign2Text1
	text_far _SummerBeachHouseSign2Text1
	text_end
.SummerBeachHouseSign2Text2
	text_far _SummerBeachHouseSign2Text2
	text_end

SummerBeachHouseSign3Text:
	text_asm
	ld hl, .SummerBeachHouseSign3Text2
	ld a, [wd472]
	bit 6, a
	jr z, .next
	ld hl, .SummerBeachHouseSign3Text1
.next
	call PrintText
	jp TextScriptEnd

.SummerBeachHouseSign3Text1
	text_far _SummerBeachHouseSign3Text1
	text_end
.SummerBeachHouseSign3Text2
	text_far _SummerBeachHouseSign3Text2
	text_end

SummerBeachHouseSign4Text:
	text_asm
	ld a, 1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	ld a, [wd472]
	vc_patch MiniGameHighScorePC
IF DEF(_YELLOW_VC)
	bit 7, a
ELSE
	bit 6, a
ENDC
	vc_patch_end
	jr z, .asm_f2369

	ld hl, wd492
	bit 1, [hl]
	jr z, .next2
	ld a, 0
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
.next2
	ld hl, .SummerBeachHousePrinterText2
	call PrintText
	ld a, [wd492]
	bit 1, a
	jr z, .asm_f236f

	ld a, 1
	ld [wDoNotWaitForButtonPressAfterDisplayingText], a
	ld hl, .SummerBeachHousePrinterText3
	call PrintText
	call YesNoChoice
	ld a, [wCurrentMenuItem]
	and a
	jp z, Func_f23d0
	call SaveScreenTilesToBuffer2
	ld hl, wd730
	set 6, [hl]
	xor a
	ld [wUpdateSpritesEnabled], a
	callfar Printer_PrepareSurfingMinigameHighScoreTileMap
	call WaitForTextScrollButtonPress
	ld hl, wd730
	res 6, [hl]
	call GBPalWhiteOutWithDelay3
	call ReloadTilesetTilePatterns
	call RestoreScreenTilesAndReloadTilePatterns
	call LoadScreenTilesFromBuffer2
	call Delay3
	call GBPalNormal
	ld a, 1
	ld [wUpdateSpritesEnabled], a
	jr .asm_f236f
.asm_f2369
	ld hl, .SummerBeachHousePrinterText1
	call PrintText
.asm_f236f
	jp TextScriptEnd

.SummerBeachHousePrinterText1
	text_far _SummerBeachHousePrinterText1
	text_waitbutton
	text_end

.SummerBeachHousePrinterText2
	text_far _SummerBeachHousePrinterText2
	text_waitbutton
	text_end

.SummerBeachHousePrinterText3
	text_far _SummerBeachHousePrinterText3
	text_end

.SummerBeachHousePrinterText4
	text_far _SummerBeachHousePrinterText4
	text_end