summaryrefslogtreecommitdiff
path: root/scripts/beach_house.asm
blob: d6112df7a6730e04dd342023e8b179e13caf0b73 (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
BeachHouseScript:
	call $3c29
	ret

BeachHouseTextPointers:
	dw SurfinDudeText
	dw BeachHousePikachuText
	dw BeachHouseSign1Text
	dw BeachHouseSign2Text
	dw BeachHouseSign3Text
	dw BeachHouseSign4Text

SurfinDudeText:
	TX_ASM
	ld a,[$d471]
	bit 6,a
	jr nz,.next
	ld hl,.SurfinDudeText4
	call PrintText
	jr .done
.next
	ld hl,$d492
	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,.xf226b
	ld a,1
	ld [$cc3c],a
	ld b,$3e
	ld hl,$4000
	call $3e84
	ld hl,$d492
	set 1,[hl]
	jr .done
.xf226b
	ld hl,.SurfinDudeText2
	call PrintText
.done
	jp TextScriptEnd

.SurfinDudeText1
	TX_FAR _SurfinDudeText1
	db "@"
.SurfinDudeText2
	TX_FAR _SurfinDudeText2
	db "@"
.SurfinDudeText3
	TX_FAR _SurfinDudeText3
	db "@"
.SurfinDudeText4
	TX_FAR _SurfinDudeText4
	db "@"

BeachHousePikachuText:
	TX_ASM
	ld hl,.BeachHousePikachuText
	call PrintText
	ld a,PIKACHU
	call PlayCry
	call WaitForSoundToFinish
	jp TextScriptEnd

.BeachHousePikachuText
	TX_FAR _BeachHousePikachuText
	db "@"

BeachHouseSign1Text:
	TX_ASM
	ld hl,.BeachHouseSign1Text2
	ld a,[$d471]
	bit 6,a
	jr z,.next
	ld hl,.BeachHouseSign1Text1
.next
	call PrintText
	jp TextScriptEnd

.BeachHouseSign1Text1
	TX_FAR _BeachHouseSign1Text1
	db "@"
.BeachHouseSign1Text2
	TX_FAR _BeachHouseSign1Text2
	db "@"

BeachHouseSign2Text:
	TX_ASM
	ld hl,.BeachHouseSign2Text2
	ld a,[$d471]
	bit 6,a
	jr z,.next
	ld hl,.BeachHouseSign2Text1
.next
	call PrintText
	jp TextScriptEnd

.BeachHouseSign2Text1
	TX_FAR _BeachHouseSign2Text1
	db "@"
.BeachHouseSign2Text2
	TX_FAR _BeachHouseSign2Text2
	db "@"

BeachHouseSign3Text:
	TX_ASM
	ld hl,.BeachHouseSign3Text2
	ld a,[$d471]
	bit 6,a
	jr z,.next
	ld hl,.BeachHouseSign3Text1
.next
	call PrintText
	jp TextScriptEnd

.BeachHouseSign3Text1
	TX_FAR _BeachHouseSign3Text1
	db "@"
.BeachHouseSign3Text2
	TX_FAR _BeachHouseSign3Text2
	db "@"

BeachHouseSign4Text:
	TX_ASM
	ld a,1
	ld [$cc3c],a
	ld a,[$d471]
	bit 6,a
	jr z,.xf2369

	ld hl,$d492
	bit 1,[hl]
	jr z,.next2
	ld a,0
	ld [$cc3c],a
.next2
	ld hl,.BeachHousePrinterText2
	call PrintText
	ld a,[$d492]
	bit 1,a
	jr z,.xf236f

	ld a,1
	ld [$cc3c],a
	ld hl,.BeachHousePrinterText3
	call PrintText
	call YesNoChoice
	ld a,[wCurrentMenuItem]
	and a
	jp z,$63d0 ; 0xf23d0
	call $36ec
	ld hl,$d72f
	set 6,[hl]
	xor a
	ld [$cfca],a
	ld hl,$510a
	ld b,$3a
	call $3e84
	call $3852
	ld hl,$d72f
	res 6,[hl]
	call $3dd8
	call $2f83
	call $3dc2
	call $36f8
	call $3ddb
	call $3de0
	ld a,1
	ld [$cfca],a
	jr .xf236f
.xf2369
	ld hl,.BeachHousePrinterText1
	call PrintText
.xf236f
	jp TextScriptEnd

.BeachHousePrinterText1
	TX_FAR _BeachHousePrinterText1
	db $d,"@"
.BeachHousePrinterText2
	TX_FAR _BeachHousePrinterText2
	db $d,"@"
.BeachHousePrinterText3
	TX_FAR _BeachHousePrinterText3
	db "@"
.xf2383
	TX_FAR _BeachHousePrinterText4
	db "@"