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
|
SilphCo8Script: ; 56504 (15:6504)
call SilphCo8Script_5651a
call EnableAutoTextBoxDrawing
ld hl, SilphCo8TrainerHeader0
ld de, SilphCo8ScriptPointers
ld a, [W_SILPHCO8CURSCRIPT]
call ExecuteCurMapScriptInTable
ld [W_SILPHCO8CURSCRIPT], a
ret
SilphCo8Script_5651a: ; 5651a (15:651a)
ld hl, wd126
bit 5, [hl]
res 5, [hl]
ret z
ld hl, DataTable_5653e ; $653e
call SilphCo8Script_56541
call SilphCo8Script_5656d
ld a, [wd832]
bit 0, a
ret nz
ld a, $5f
ld [wd09f], a
ld bc, $403
predef_jump ReplaceTileBlock
DataTable_5653e: ; 5653e (15:653e)
db $04,$03,$FF
SilphCo8Script_56541: ; 56541 (15:6541)
push hl
ld hl, wCardKeyDoorY
ld a, [hli]
ld b, a
ld a, [hl]
ld c, a
xor a
ld [$ffe0], a
pop hl
.asm_5654d
ld a, [hli]
cp $ff
jr z, .asm_56569
push hl
ld hl, $ffe0
inc [hl]
pop hl
cp b
jr z, .asm_5655e
inc hl
jr .asm_5654d
.asm_5655e
ld a, [hli]
cp c
jr nz, .asm_5654d
ld hl, wCardKeyDoorY
xor a
ld [hli], a
ld [hl], a
ret
.asm_56569
xor a
ld [$ffe0], a
ret
SilphCo8Script_5656d: ; 5656d (15:656d)
ld a, [$ffe0]
and a
ret z
ld hl, wd832
set 0, [hl]
ret
SilphCo8ScriptPointers: ; 56577 (15:6577)
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
SilphCo8TextPointers: ; 5657d (15:657d)
dw SilphCo8Text1
dw SilphCo8Text2
dw SilphCo8Text3
dw SilphCo8Text4
SilphCo8TrainerHeaders: ; 56585 (15:6585)
SilphCo8TrainerHeader0: ; 56585 (15:6585)
db $2 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd831 ; flag's byte
dw SilphCo8BattleText1 ; 0x65e6 TextBeforeBattle
dw SilphCo8AfterBattleText1 ; 0x65f0 TextAfterBattle
dw SilphCo8EndBattleText1 ; 0x65eb TextEndBattle
dw SilphCo8EndBattleText1 ; 0x65eb TextEndBattle
SilphCo8TrainerHeader1: ; 56591 (15:6591)
db $3 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd831 ; flag's byte
dw SilphCo8BattleText2 ; 0x65f5 TextBeforeBattle
dw SilphCo8AfterBattleText2 ; 0x65ff TextAfterBattle
dw SilphCo8EndBattleText2 ; 0x65fa TextEndBattle
dw SilphCo8EndBattleText2 ; 0x65fa TextEndBattle
SilphCo8TrainerHeader2: ; 5659d (15:659d)
db $4 ; flag's bit
db ($4 << 4) ; trainer's view range
dw wd831 ; flag's byte
dw SilphCo8BattleText3 ; 0x6604 TextBeforeBattle
dw SilphCo8AfterBattleText3 ; 0x660e TextAfterBattle
dw SilphCo8EndBattleText3 ; 0x6609 TextEndBattle
dw SilphCo8EndBattleText3 ; 0x6609 TextEndBattle
db $ff
SilphCo8Text1: ; 565aa (15:65aa)
db $08 ; asm
ld a, [wd838]
bit 7, a
ld hl, SilphCo8Text_565c3
jr nz, asm_a468f ; 0x565b3
ld hl, SilphCo8Text_565be
asm_a468f ; 0x565b8
call PrintText
jp TextScriptEnd
SilphCo8Text_565be: ; 565be (15:65be)
TX_FAR _SilphCo8Text_565be
db "@"
SilphCo8Text_565c3: ; 565c3 (15:65c3)
TX_FAR _SilphCo8Text_565c3
db "@"
SilphCo8Text2: ; 565c8 (15:65c8)
db $08 ; asm
ld hl, SilphCo8TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
SilphCo8Text3: ; 565d2 (15:65d2)
db $08 ; asm
ld hl, SilphCo8TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
SilphCo8Text4: ; 565dc (15:65dc)
db $08 ; asm
ld hl, SilphCo8TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
SilphCo8BattleText1: ; 565e6 (15:65e6)
TX_FAR _SilphCo8BattleText1
db "@"
SilphCo8EndBattleText1: ; 565eb (15:65eb)
TX_FAR _SilphCo8EndBattleText1
db "@"
SilphCo8AfterBattleText1: ; 565f0 (15:65f0)
TX_FAR _SilphCo8AfterBattleText1
db "@"
SilphCo8BattleText2: ; 565f5 (15:65f5)
TX_FAR _SilphCo8BattleText2
db "@"
SilphCo8EndBattleText2: ; 565fa (15:65fa)
TX_FAR _SilphCo8EndBattleText2
db "@"
SilphCo8AfterBattleText2: ; 565ff (15:65ff)
TX_FAR _SilphCo8AfterBattleText2
db "@"
SilphCo8BattleText3: ; 56604 (15:6604)
TX_FAR _SilphCo8BattleText3
db "@"
SilphCo8EndBattleText3: ; 56609 (15:6609)
TX_FAR _SilphCo8EndBattleText3
db "@"
SilphCo8AfterBattleText3: ; 5660e (15:660e)
TX_FAR _SilphCo8AfterBattleText3
db "@"
|