This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rockethideout1.asm
189 lines (159 loc) · 4.57 KB
/
rockethideout1.asm
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
RocketHideout1Script:
call RocketHideout1Script_44be0
call EnableAutoTextBoxDrawing
ld hl, RocketHideout1TrainerHeader0
ld de, RocketHideout1ScriptPointers
ld a, [wRocketHideout1CurScript]
call ExecuteCurMapScriptInTable
ld [wRocketHideout1CurScript], a
ret
RocketHideout1Script_44be0:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
ret z
CheckEvent EVENT_677
jr nz, .asm_44c01
CheckEventReuseA EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
jr nz, .asm_44bf7
ld a, $54
jr .asm_44c03
.asm_44bf7
ld a, SFX_GO_INSIDE
call PlaySound
CheckEventHL EVENT_677
.asm_44c01
ld a, $e
.asm_44c03
ld [wNewTileBlockID], a
lb bc, 8, 12
predef_jump ReplaceTileBlock
RocketHideout1ScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
RocketHideout1TextPointers:
dw RocketHideout1Text1
dw RocketHideout1Text2
dw RocketHideout1Text3
dw RocketHideout1Text4
dw RocketHideout1Text5
dw PickUpItemText
dw PickUpItemText
RocketHideout1TrainerHeader0:
dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
db ($3 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0
dw RocketHideout1BattleText2 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle
dw RocketHideout1EndBattleText2 ; TextEndBattle
dw RocketHideout1EndBattleText2 ; TextEndBattle
RocketHideout1TrainerHeader1:
dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1
dw RocketHideout1BattleText3 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle
dw RocketHideout1EndBattleText3 ; TextEndBattle
dw RocketHideout1EndBattleText3 ; TextEndBattle
RocketHideout1TrainerHeader2:
dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
db ($2 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2
dw RocketHideout1BattleText4 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle
dw RocketHideout1EndBattleText4 ; TextEndBattle
dw RocketHideout1EndBattleText4 ; TextEndBattle
RocketHideout1TrainerHeader3:
dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
db ($3 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3
dw RocketHideout1BattleText5 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle
dw RocketHideout1EndBattleText5 ; TextEndBattle
dw RocketHideout1EndBattleText5 ; TextEndBattle
RocketHideout1TrainerHeader4:
dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
db ($3 << 4) ; trainer's view range
dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
dw RocketHideout1BattleText6 ; TextBeforeBattle
dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle
dw RocketHideout1EndBattleText6 ; TextEndBattle
dw RocketHideout1EndBattleText6 ; TextEndBattle
db $ff
RocketHideout1Text1:
TX_ASM
ld hl, RocketHideout1TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text2:
TX_ASM
ld hl, RocketHideout1TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text3:
TX_ASM
ld hl, RocketHideout1TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text4:
TX_ASM
ld hl, RocketHideout1TrainerHeader3
call TalkToTrainer
jp TextScriptEnd
RocketHideout1Text5:
TX_ASM
ld hl, RocketHideout1TrainerHeader4
call TalkToTrainer
jp TextScriptEnd
RocketHideout1EndBattleText6:
TX_FAR _RocketHideout1EndBattleText6
TX_ASM
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4
ld hl, RocketHideout1Text_44c9f
ret
RocketHideout1Text_44c9f:
TX_BLINK
db "@"
RocketHideout1BattleText2:
TX_FAR _RocketHideout1BattleText2
db "@"
RocketHideout1EndBattleText2:
TX_FAR _RocketHideout1EndBattleText2
db "@"
RocketHideout1AfterBattleTxt2:
TX_FAR _RocketHideout1AfterBattleTxt2
db "@"
RocketHideout1BattleText3:
TX_FAR _RocketHideout1BattleText3
db "@"
RocketHideout1EndBattleText3:
TX_FAR _RocketHideout1EndBattleText3
db "@"
RocketHideout1AfterBattleTxt3:
TX_FAR _RocketHideout1AfterBattleTxt3
db "@"
RocketHideout1BattleText4:
TX_FAR _RocketHideout1BattleText4
db "@"
RocketHideout1EndBattleText4:
TX_FAR _RocketHideout1EndBattleText4
db "@"
RocketHideout1AfterBattleTxt4:
TX_FAR _RocketHideout1AfterBattleTxt4
db "@"
RocketHideout1BattleText5:
TX_FAR _RocketHideout1BattleText5
db "@"
RocketHideout1EndBattleText5:
TX_FAR _RocketHideout1EndBattleText5
db "@"
RocketHideout1AfterBattleTxt5:
TX_FAR _RocketHideout1AfterBattleTxt5
db "@"
RocketHideout1BattleText6:
TX_FAR _RocketHideout1BattleText6
db "@"
RocketHideout1AfterBattleTxt6:
TX_FAR _RocketHideout1AfterBattleTxt6
db "@"