This repository was archived by the owner on Nov 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
258 lines (237 loc) · 33.2 KB
/
main.lua
File metadata and controls
258 lines (237 loc) · 33.2 KB
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
local bolt = require("bolt")
bolt.checkversion(1, 0)
-- load all images and store them in the "bolt" table, specifically bolt.images.
-- this is for convenience as the bolt table is passed around pretty much everywhere,
-- so we still only have to pass around 1 table instead of 2.
-- making this an inline function and calling it means the locals don't stay in memory
-- longer than we need them to.
_ = (function (bolt)
local imagenames = { "accel", "arrow", "dig", "digits", "letters", "marker", "markeractive", "markerinactive", "speech" }
local images = { tp = {} }
bolt.images = images
for _, name in ipairs(imagenames) do
local s, w, h = bolt.createsurfacefrompng(string.format("images.%s", name))
images[name] = { surface = s, w = w, h = h }
end
end)(bolt)
local scans = require("scan.main").get(bolt)
local compasses = require("compass.main").get(bolt)
local knots = require("knot.main").get(bolt)
local static = require("static.main").get(bolt)
local map = require("map").get(bolt)
local sliders = require("slider.main").get(bolt)
local lockbox = require("lockbox.main").get(bolt)
local lockboxdecoder = require("lockbox.recognise")
local towers = require("towers.main").get(bolt)
local towersdecoder = require("towers.decoder")
local puzzleboxbackgroundpixels = "\x9b\x9b\x9b\xff\x9b\x9b\x9b\xff\xa3\xa3\xa3\xff\xb2\xb2\xb2\xff\xab\xab\xab\xff\x9b\x9b\x9b\xff\x9b\x9b\x9b\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\x9b\x9b\x9b\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\x9b\x9b\x9b\xff\x9b\x9b\x9b\xff\xb2\xb2\xb2\xff\xab\xab\xab\xff\xb2\xb2\xb2\xff\xab\xab\xab\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xab\xab\xab\xff\xb2\xb2\xb2\xff\xb2\xb2\xb2\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xab\xab\xab\xff\xab\xab\xab\xff\xab\xab\xab\xff\xab\xab\xab\xff\xab\xab\xab\xff\xab\xab\xab\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xa8\xa7\xa8\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\x9b\x9b\x9b\xff\x93\x93\x93\xff\x9b\x9b\x9b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x84\x84\x84\xff\x84\x84\x84\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x84\x84\x84\xff\x84\x84\x84\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x84\x84\x84\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\xa3\xa3\xa3\xff\x9b\x9b\x9b\xff\x9b\x9b\x9b\xff\x93\x93\x93\xff\x9b\x9b\x9b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x84\x84\x84\xff\x8b\x8b\x8b\xff\x9b\x9b\x9b\xff\x93\x93\x93\xff\x93\x93\x93\xff\x8b\x8b\x8b\xff\x8b\x8b\x8b\xff\x93\x93\x93\xff\x9b\x9b\x9b\xff\x9b\x9b\x9b\xff\x93\x93\x93\xff\x9b\x9b\x9b\xff\x9b\x9b\x9b\xff\xa3\xa3\xa3\xff\xab\xab\xab\xff\xa3\xa3\xa3\xff\xa3\xa3\xa3\xff\xa8\xa7\xa8\xff\xab\xab\xab\xff\xab\xab\xab\xff\xb2\xb2\xb2\xff\xb2\xb2\xb2\xff\xb2\xb2\xb2\xff\xb2\xb2\xb2\xff\xbb\xba\xbb\xff\xbb\xba\xbb\xff\xc2\xc2\xc2\xff\xb2\xb2\xb2\xff\x9b\x9b\x9b\xff\xa3\xa3\xa3\xff\x9b\x9b\x9b\xff"
local scrollbackgroundpixels = "\x0a\x0c\x0f\xff\x04\x0e\x15\xff\x0e\x15\x1c\xff\x75\x57\x39\xff\x7d\x5c\x3c\xff\x8b\x6a\x48\xff\x95\x72\x4f\xff\xa5\x82\x5c\xff\xae\x8b\x63\xff\xac\x8b\x63\xff\xad\x8b\x61\xff\x9f\x7f\x58\xff\x74\x5f\x3e\xff\x73\x5d\x3d\xff\x81\x6c\x4a\xff\x83\x6d\x4b\xff\x85\x71\x4d\xff\x91\x7b\x57\xff\x98\x7f\x5b\xff\x9d\x84\x5c\xff\xa8\x8b\x61\xff\xb2\x90\x65\xff\xb5\x93\x68\xff\xbb\x98\x6c\xff\xbf\x9d\x6f\xff\xc2\xa0\x71\xff\xc4\xa2\x71\xff\xc6\xa2\x70\xff\xc8\xa4\x71\xff\xcc\xa9\x76\xff\xce\xa9\x76\xff\xd1\xaf\x7f\xff\xd2\xb2\x82\xff\xd3\xb1\x7e\xff\xd6\xb3\x83\xff\xd9\xb7\x88\xff\xd9\xb8\x87\xff\xd9\xb7\x86\xff\xd9\xb8\x86\xff\xdb\xb9\x87\xff\xdb\xb9\x87\xff\xdc\xbd\x8b\xff\xdc\xbc\x89\xff\xdd\xbd\x8c\xff\xdd\xbe\x8b\xff\xdc\xba\x88\xff\xdb\xb9\x85\xff\xdc\xbd\x8a\xff\xdd\xbe\x8b\xff\xdd\xc0\x8e\xff\xdf\xc0\x90\xff\xe0\xc1\x91\xff\xe0\xc2\x91\xff\xdf\xc2\x91\xff\xdf\xc1\x91\xff\xdf\xc0\x91\xff\xde\xbe\x8d\xff\xdf\xc1\x90\xff\xdf\xc1\x90\xff\xe0\xc2\x91\xff\xe0\xc2\x90\xff\xe0\xc1\x90\xff\xe0\xc1\x91\xff\xe0\xc1\x91\xff\xdf\xc0\x90\xff\xdf\xc0\x8f\xff\xe0\xc0\x90\xff\xe0\xc2\x94\xff\xe1\xc1\x95\xff\xe0\xc1\x92\xff\xe0\xc0\x92\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe0\xc0\x92\xff\xe1\xc1\x93\xff\xe1\xc0\x92\xff\xe0\xc0\x92\xff\xe0\xbf\x92\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe1\xc0\x91\xff\xe0\xc0\x91\xff\xe0\xc0\x91\xff\xe0\xc0\x90\xff\xe0\xc0\x91\xff\xe0\xbf\x91\xff\xe1\xc0\x92\xff\xe0\xc0\x92\xff\xe0\xc0\x91\xff\xe0\xc0\x91\xff\xe0\xbf\x90\xff\xe0\xbf\x90\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xe0\xbf\x91\xff\xdf\xbe\x90\xff\xdf\xbe\x8f\xff\xdf\xbe\x8e\xff\xdf\xbe\x8e\xff\xe0\xbe\x91\xff\xdf\xbe\x8f\xff\xe0\xbe\x90\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe1\xc0\x93\xff\xe0\xbf\x90\xff\xe0\xbf\x91\xff\xe1\xc1\x93\xff\xe2\xc1\x93\xff\xe3\xc3\x94\xff\xe2\xc2\x94\xff\xe3\xc4\x95\xff\xe5\xc5\x97\xff\xe4\xc5\x97\xff\xe4\xc5\x96\xff\xe3\xc3\x95\xff\xe2\xc1\x94\xff\xe2\xc0\x8f\xff\xe2\xc2\x93\xff\xe1\xc0\x93\xff\xe2\xc2\x95\xff\xe2\xc3\x94\xff\xe3\xc2\x94\xff\xe2\xc1\x93\xff\xe2\xc1\x93\xff\xe1\xc0\x92\xff\xe1\xc1\x92\xff\xe1\xc0\x93\xff\xe1\xc0\x91\xff\xe1\xc0\x91\xff\xe1\xc0\x92\xff\xe1\xc0\x93\xff\xe1\xc0\x92\xff\xe1\xbf\x92\xff\xe0\xbe\x91\xff\xe0\xbe\x92\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe0\xbe\x91\xff\xe1\xbe\x91\xff\xe1\xbf\x91\xff\xe1\xbf\x92\xff\xe3\xc1\x92\xff\xe4\xc4\x93\xff\xe5\xc6\x95\xff\xe5\xc6\x94\xff\xe7\xc8\x97\xff\xe6\xc8\x96\xff\xe5\xc7\x95\xff\xe4\xc6\x95\xff\xe5\xc7\x95\xff\xe5\xc7\x96\xff\xe5\xc5\x94\xff\xe5\xc6\x93\xff\xe5\xc6\x92\xff\xe5\xc5\x92\xff\xe5\xc5\x92\xff\xe5\xc6\x92\xff\xe6\xc9\x94\xff\xe7\xc9\x95\xff\xe9\xca\x98\xff\xe9\xca\x98\xff\xe7\xca\x97\xff\xe8\xca\x9a\xff\xe8\xca\x9a\xff\xe6\xc8\x98\xff\xe6\xca\x98\xff\xe8\xcc\x99\xff\xe8\xce\x9b\xff\xe8\xcd\x9c\xff\xe7\xcd\x9b\xff\xe8\xcd\x9b\xff\xe7\xcb\x99\xff\xe5\xc8\x95\xff\xe4\xc6\x91\xff\xe3\xc6\x91\xff\xe1\xc5\x91\xff\xe3\xc6\x93\xff\xe2\xc4\x92\xff\xe3\xc5\x8f\xff\xe3\xc6\x8f\xff\xe4\xc5\x8e\xff\xe3\xc5\x90\xff\xe4\xc5\x90\xff\xe3\xc5\x8f\xff\xe6\xc7\x94\xff\xe7\xc7\x95\xff\xe7\xc7\x96\xff\xe7\xc7\x96\xff\xe5\xc5\x90\xff\xe4\xc5\x91\xff\xe4\xc4\x8e\xff\xe5\xc6\x94\xff\xe5\xc7\x96\xff\xe4\xc6\x96\xff\xe2\xc3\x92\xff\xe3\xc3\x90\xff\xe3\xc2\x91\xff\xe4\xc2\x92\xff\xe4\xc2\x8f\xff\xe6\xc3\x92\xff\xe6\xc3\x8f\xff\xe6\xc5\x93\xff\xe8\xca\x96\xff\xe9\xcb\x99\xff\xe9\xc8\x95\xff\xe9\xc9\x95\xff\xe9\xc9\x94\xff\xeb\xca\x96\xff\xeb\xcb\x99\xff\xea\xca\x98\xff\xe9\xc9\x97\xff\xe8\xc7\x96\xff\xe9\xc8\x98\xff\xe8\xc5\x95\xff\xe6\xc3\x91\xff\xe6\xc3\x92\xff\xe6\xc4\x95\xff\xe7\xc4\x94\xff\xe6\xc5\x96\xff\xe8\xc7\x99\xff\xe6\xc5\x97\xff\xe6\xc6\x99\xff\xe7\xc8\x9a\xff\xe7\xc9\x9c\xff\xe8\xc9\x9c\xff\xe8\xc8\x9b\xff\xea\xc9\x9c\xff\xe8\xc6\x99\xff\xe8\xc2\x94\xff\xe7\xc2\x94\xff\xe8\xc2\x92\xff\xe7\xc3\x95\xff\xe7\xc4\x94\xff\xe7\xc4\x95\xff\xe8\xc7\x98\xff\xe7\xc8\x98\xff\xe7\xc7\x98\xff\xe6\xc6\x94\xff\xe7\xc7\x94\xff\xe7\xc7\x94\xff\xe7\xc8\x97\xff\xe8\xc6\x95\xff\xe9\xc6\x96\xff\xe8\xc2\x93\xff\xe7\xbf\x91\xff\xe5\xbe\x91\xff\xe3\xbe\x93\xff\xe3\xbc\x90\xff\xe2\xbc\x91\xff\xe2\xbc\x90\xff\xe3\xbd\x91\xff\xe2\xbd\x91\xff\xe0\xba\x8f\xff\xe1\xbc\x90\xff\xe1\xbe\x93\xff\xdf\xc0\x96\xff\xdf\xc0\x96\xff\xe0\xc3\x97\xff\xe1\xc2\x95\xff\xe1\xc2\x96\xff\xde\xbf\x93\xff\xdf\xbe\x91\xff\xdf\xbe\x8f\xff\xdf\xbf\x90\xff\xdf\xbe\x8f\xff\xdf\xbd\x8b\xff\xe0\xbe\x8e\xff\xdf\xc0\x91\xff\xe1\xc2\x95\xff\xe0\xc1\x92\xff\xe0\xc2\x91\xff\xe1\xc2\x94\xff\xe2\xc3\x92\xff\xe2\xc1\x8f\xff\xe2\xc1\x91\xff\xe3\xc3\x94\xff\xe6\xc6\x98\xff\xe7\xc7\x9d\xff\xe7\xc6\x9a\xff\xe5\xc5\x9a\xff\xe4\xc3\x98\xff\xe5\xc5\x99\xff\xe2\xc2\x95\xff\xe2\xc2\x96\xff\xe0\xbf\x93\xff\xe1\xbf\x92\xff\xe2\xc1\x95\xff\xe1\xc1\x94\xff\xe3\xc4\x95\xff\xe3\xc5\x94\xff\xe1\xc2\x8f\xff\xe0\xc2\x8e\xff\xde\xc0\x8a\xff\xe0\xc5\x91\xff\xdf\xc2\x8e\xff\xdf\xc4\x90\xff\xe0\xc5\x92\xff\xe0\xc5\x93\xff\xdf\xc3\x90\xff\xdf\xc3\x90\xff\xdd\xc1\x8e\xff\xde\xc2\x90\xff\xe0\xc5\x96\xff\xe0\xc5\x98\xff\xdf\xc2\x95\xff\xe2\xc6\x9a\xff\xe1\xc3\x95\xff\xe0\xc2\x94\xff\xe1\xc3\x91\xff\xe0\xc1\x91\xff\xe0\xc4\x92\xff\xe0\xc3\x92\xff\xe0\xc2\x91\xff\xe0\xc2\x8f\xff\xe0\xc3\x92\xff\xdf\xc2\x90\xff\xde\xc2\x90\xff\xde\xc1\x8e\xff\xdd\xbf\x8c\xff\xdd\xbf\x8c\xff\xe0\xc2\x90\xff\xe2\xc3\x92\xff\xe3\xc3\x94\xff\xe1\xc1\x91\xff\xe3\xc2\x92\xff\xe2\xc0\x90\xff\xe4\xc4\x94\xff\xe4\xc3\x94\xff\xe4\xc5\x97\xff\xe3\xc4\x95\xff\xe4\xc5\x95\xff\xe4\xc4\x94\xff\xe4\xc1\x90\xff\xe3\xc0\x90\xff\xe2\xbf\x8e\xff\xe0\xbe\x8d\xff\xe0\xbd\x89\xff\xe1\xc1\x8f\xff\xe2\xbf\x90\xff\xe3\xc2\x91\xff\xe2\xc2\x92\xff\xe4\xc6\x97\xff\xe3\xc6\x97\xff\xe3\xc6\x97\xff\xe1\xc0\x91\xff\xe1\xbf\x90\xff\xe1\xbe\x90\xff\xe2\xc0\x91\xff\xe4\xc1\x94\xff\xe3\xc0\x91\xff\xe3\xc1\x94\xff\xe2\xc2\x95\xff\xe2\xc2\x97\xff\xe3\xc2\x96\xff\xe2\xc3\x99\xff\xe2\xc4\x97\xff\xe3\xc4\x97\xff\xe2\xc2\x94\xff\xe2\xc4\x97\xff\xe4\xc7\x9a\xff\xe5\xc6\x99\xff\xe5\xc6\x97\xff\xe6\xc7\x99\xff\xe5\xc5\x95\xff\xe5\xc5\x94\xff\xe5\xc4\x94\xff\xe4\xc4\x94\xff\xe4\xc4\x93\xff\xe5\xc5\x94\xff\xe4\xc4\x95\xff\xe4\xc3\x94\xff\xe5\xc5\x96\xff\xe4\xc6\x96\xff\xe5\xc7\x96\xff\xe5\xc6\x94\xff\xe6\xc6\x96\xff\xe6\xc6\x97\xff\xe6\xc5\x96\xff\xe6\xc6\x96\xff\xe8\xc6\x97\xff\xe7\xc3\x96\xff\xe7\xc3\x96\xff\xe7\xc3\x96\xff\xe8\xc3\x95\xff\xe9\xc5\x95\xff\xe9\xc5\x96\xff\xe9\xc3\x93\xff\xe8\xc7\x96\xff\xe7\xc8\x98\xff\xe8\xc9\x9b\xff\xe8\xc8\x97\xff\xe7\xc7\x94\xff\xe7\xc8\x94\xff\xe8\xc8\x95\xff\xe8\xc6\x94\xff\xe9\xc5\x96\xff\xe8\xc1\x92\xff\xe8\xc1\x93\xff\xe6\xbf\x91\xff\xe3\xbd\x90\xff\xe3\xbe\x93\xff\xe2\xbd\x92\xff\xe1\xbb\x90\xff\xe0\xba\x8e\xff\xe0\xbc\x91\xff\xe1\xbc\x91\xff\xe1\xbb\x90\xff\xe1\xbd\x91\xff\xe1\xbf\x93\xff\xe0\xc1\x96\xff\xe1\xc3\x97\xff\xe1\xc3\x96\xff\xe2\xc3\x96\xff\xe1\xc2\x94\xff\xe0\xc0\x92\xff\xe1\xc2\x94\xff\xe2\xc3\x95\xff\xe1\xc2\x92\xff\xe0\xc1\x91\xff\xe2\xc3\x93\xff\xe3\xc6\x95\xff\xe1\xc4\x91\xff\xe1\xc3\x92\xff\xe2\xc2\x93\xff\xe3\xc2\x95\xff\xe4\xc3\x95\xff\xe3\xc3\x94\xff\xe4\xc6\x95\xff\xe3\xc4\x94\xff\xe1\xc1\x91\xff\xde\xbe\x8f\xff\xdd\xbd\x8c\xff\xda\xb8\x87\xff\xd9\xb9\x8a\xff\xd8\xb8\x88\xff\xd7\xb5\x87\xff\xd8\xb7\x86\xff\xd6\xb4\x84\xff\xd4\xb3\x82\xff\xd3\xb1\x80\xff\xd4\xb3\x83\xff\xd5\xb6\x87\xff\xd6\xb8\x88\xff\xd2\xb4\x83\xff\xd1\xb2\x82\xff\xd0\xb2\x81\xff\xd0\xb1\x81\xff\xcf\xb1\x80\xff\xcc\xac\x7c\xff\xc8\xa7\x77\xff\xc7\xa6\x76\xff\xc8\xa7\x77\xff\xc9\xa9\x7a\xff\xca\xaa\x79\xff\xcb\xaa\x78\xff\xcb\xa9\x76\xff\xcd\xab\x7b\xff\xce\xad\x7a\xff\xcd\xac\x7a\xff\xcf\xae\x7c\xff\xcc\xa9\x78\xff\xc9\xa5\x74\xff\xc8\xa4\x73\xff\xc5\xa4\x73\xff\xc3\xa1\x71\xff\xc2\xa0\x72\xff\xb8\x97\x6a\xff\xa5\x89\x5d\xff\x96\x7d\x56\xff\x88\x71\x4c\xff\x7a\x63\x42\xff\x70\x5a\x3a\xff\x74\x5b\x3b\xff\x77\x5f\x3e\xff\x75\x5e\x3c\xff\x87\x6b\x46\xff\x9c\x79\x52\xff\xa2\x7d\x54\xff\x92\x6c\x47\xff\x7f\x5d\x3a\xff\x7c\x5b\x39\xff\x6f\x55\x39\xff\x08\x14\x19\xff\x04\x0a\x0f\xff\x08\x0f\x13\xff"
local sliderresetbuttonrow11 = "\x8b\x56\x0e\x00\x8b\x56\x0e\x1e\x8b\x56\x0e\x2b\x8b\x56\x0e\x2d\x8b\x56\x0e\x0d\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\x8b\x56\x0e\x00\xaa\x73\x0a\x44\xb6\x82\x09\xeb\xb6\x82\x09\xeb\xb6\x82\x09\xa8\x8b\x56\x0e\x00"
-- The i on the information icon that appears on tower puzzles
local info_i = {
[1] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[2] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[3] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[4] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[5] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[6] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x05\x00\x00\x01\x0f\x00\x00\x01\x10\x00\x00\x01\x07\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[7] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x09\x0d\x0a\x05\x2b\x8c\x6a\x24\x8e\x8c\x73\x31\x96\x23\x1b\x0e\x37\x00\x00\x01\x0b\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[8] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x1c\xa7\x82\x31\xc2\xd2\xa7\x46\xff\xd2\xa7\x46\xff\xb6\x8e\x35\xdb\x00\x00\x01\x22\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[9] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x28\xc9\x9c\x39\xef\xd2\xa7\x46\xff\xd2\xa7\x46\xff\xd2\xa7\x46\xfe\x00\x00\x01\x2e\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[10] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x1b\xa7\x82\x31\xbc\xd2\xa7\x46\xff\xd2\xa7\x46\xff\xb6\x8e\x35\xd2\x00\x00\x01\x21\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[11] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x02\x00\x00\x01\x10\x00\x00\x01\x34\x78\x5c\x21\x86\x78\x5c\x21\x86\x0d\x0a\x05\x2d\x00\x00\x01\x0a\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[12] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x03\x00\x00\x01\x11\x00\x00\x01\x2b\x50\x3c\x17\x61\x78\x5c\x21\x87\x40\x30\x1c\x5a\x00\x00\x01\x22\x00\x00\x01\x08\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[13] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x06\x00\x00\x01\x20\x60\x4a\x1a\x75\xb6\x8e\x35\xe4\xc9\x9c\x39\xff\xc9\x9c\x39\xff\xc9\x9c\x39\xfb\x60\x4a\x1a\x64\x00\x00\x01\x0b\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[14] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x09\x00\x00\x01\x29\x8c\x6a\x24\xa3\xc9\x9c\x39\xf8\xa7\x82\x31\xe4\xc9\x9c\x39\xff\xc9\x9c\x39\xff\xc9\x9c\x39\xff\x8c\x6a\x24\xa9\x00\x00\x01\x14\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[15] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x0a\x0d\x0a\x05\x30\xa8\x7c\x24\xc0\xc3\x91\x2c\xf2\x50\x3c\x17\x7f\x60\x4a\x1a\xa3\xc9\x9c\x39\xff\xc9\x9c\x39\xff\xc9\x9c\x39\xff\x78\x5c\x21\x8e\x00\x00\x01\x10\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[16] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x04\x0d\x0a\x05\x28\xa7\x82\x31\xc7\xb6\x8e\x35\xe5\x40\x30\x1c\x57\x00\x00\x01\x36\x8c\x6a\x24\xca\xc9\x9c\x39\xff\xc9\x9c\x39\xff\xc3\x91\x2c\xfc\x18\x13\x0b\x47\x00\x00\x01\x06\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[17] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x07\x78\x5c\x21\x5c\xa7\x82\x31\xca\x23\x1b\x0e\x41\x00\x00\x01\x13\x00\x00\x01\x36\xb6\x8e\x35\xf4\xc3\x91\x2c\xff\xc3\x91\x2c\xff\xa8\x7c\x24\xde\x00\x00\x01\x28\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[18] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x03\x00\x00\x01\x10\x00\x00\x01\x17\x00\x00\x01\x0b\x00\x00\x01\x0d\x50\x3c\x17\x71\xc3\x91\x2c\xff\xc3\x91\x2c\xff\xc3\x91\x2c\xff\x8c\x6a\x24\xa7\x00\x00\x01\x17\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[19] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x1b\x8c\x6a\x24\xb8\xc3\x91\x2c\xff\xc3\x91\x2c\xff\xc3\x91\x2c\xff\x33\x26\x07\x5c\x00\x00\x01\x09\x00\x00\x01\x03\x00\x00\x01\x04\x00\x00\x01\x03\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[20] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x02\x00\x00\x01\x2e\xa8\x7c\x24\xe9\xc3\x91\x2c\xff\xc3\x91\x2c\xff\xb9\x85\x20\xeb\x00\x00\x01\x2e\x00\x00\x01\x0a\x00\x00\x01\x1c\x60\x4a\x1a\x41\x00\x00\x01\x0a\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[21] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x09\x33\x26\x07\x5b\xc3\x91\x2c\xff\xc3\x91\x2c\xff\xc3\x91\x2c\xff\x8c\x6a\x24\xbb\x00\x00\x01\x25\x00\x00\x01\x2e\x9f\x72\x1b\xb7\x8c\x6a\x24\x8f\x00\x00\x01\x0f\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[22] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x16\x78\x5c\x21\xa4\xc3\x91\x2c\xff\xc3\x91\x2c\xff\xc3\x91\x2c\xff\x50\x3c\x17\x7c\x00\x00\x01\x3b\x9f\x72\x1b\xc0\xb9\x85\x20\xe8\x33\x26\x07\x45\x00\x00\x01\x09\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[23] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x28\x9f\x72\x1b\xdc\xb9\x85\x20\xff\xb9\x85\x20\xff\xb9\x85\x20\xf8\x00\x00\x01\x6c\x9f\x72\x1b\xc4\xb9\x85\x20\xea\x33\x26\x07\x54\x00\x00\x01\x11\x00\x00\x01\x02\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[24] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x01\x0d\x0a\x05\x39\xb9\x85\x20\xfc\xb9\x85\x20\xff\xb9\x85\x20\xff\xa8\x7c\x24\xf6\x9f\x72\x1b\xe4\xa8\x7c\x24\xe5\x33\x26\x07\x51\x00\x00\x01\x11\x00\x00\x01\x02\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[25] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x01\x0d\x0a\x05\x34\xb9\x85\x20\xfa\xb9\x85\x20\xff\xb9\x85\x20\xff\xb9\x85\x20\xff\x9f\x72\x1b\xdc\x23\x1b\x0e\x48\x00\x00\x01\x10\x00\x00\x01\x02\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[26] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x16\x71\x54\x05\x82\x9f\x72\x1b\xe4\x9f\x72\x1b\xe3\x71\x54\x05\x9d\x00\x00\x01\x30\x00\x00\x01\x0c\x00\x00\x01\x01\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[27] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x04\x00\x00\x01\x13\x00\x00\x01\x24\x00\x00\x01\x25\x00\x00\x01\x15\x00\x00\x01\x05\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[28] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[29] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[30] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[31] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
[32] = '\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x00',
}
local validitygraceperiod = 300000 -- half a game tick
local lastvalid
local currentobject = nil
local lastrenderscroll = false
local lastrendercompasspoint = false
local nextbigiconismap = false
local tilefactor = 512
local mx, _, mz = bolt.playerposition():get()
local m = map.create(mx / tilefactor, mz / tilefactor, 0)
local function setobject (obj)
lastvalid = bolt.time()
currentobject = obj
m.tp = nil
m.tpinfo = nil
if obj.x and obj.y then
m:update(obj.x, obj.y, obj.level)
end
end
local function setobjectstatic (obj)
lastvalid = bolt.time()
currentobject = obj
local x = nil
local z = nil
local level = obj.level or 0
if obj.mapx ~= nil then
x = obj.mapx
z = obj.mapy
elseif obj.x ~= nil then
x = obj.x
z = obj.y
elseif obj.x1 ~= nil then
x = (obj.x1 + obj.x2) / 2
z = (obj.y1 + obj.y2) / 2
else
m.points = nil
end
if x ~= nil then
m.points = { { x = x, z = z } }
m:update(x, z, level)
end
m.lines = nil
m.tp = obj.tp
m.tpinfo = obj.tpinfo
m:redraw()
end
bolt.onrendericon(function (event)
if currentobject and currentobject.onrendericon then
currentobject:onrendericon(event)
end
end)
bolt.onrenderbigicon(function (event)
if currentobject then
if currentobject.onrenderbigicon then
currentobject:onrenderbigicon(event)
end
if not currentobject.static then
return
end
end
if nextbigiconismap then
nextbigiconismap = false
local object = static:trycreatefrombigicon(event)
if object ~= nil and object ~= currentobject then
setobjectstatic(object)
end
end
if not lastrenderscroll and event:modelcount() == 1 and event:modelvertexcount(1) == 552 then
-- the scroll object shown in the "minigames" UI element for some clue types
local x0, y0, z0 = event:modelvertexpoint(1, 1):get()
if x0 == -317 and y0 == 220 and z0 == 611 then
lastrenderscroll = true
end
elseif lastrenderscroll and event:modelcount() == 1 and event:modelvertexcount(1) == 93 then
-- compass point, drawn usually immediately after the scroll object above
lastrendercompasspoint = true
lastrenderscroll = false
elseif lastrendercompasspoint and event:modelcount() == 1 and event:modelvertexcount(1) == 42 then
-- compass clue arrow
lastrendercompasspoint = false
local c = compasses.create(bolt, function () m:redraw() end)
setobject(c)
m.points = c.pointlist
m.lines = c.scanpoints
m:redraw()
end
end)
bolt.onrender2d(function (event)
if currentobject and currentobject.onrender2d then
currentobject:onrender2d(event)
end
if lastrenderscroll then
-- text on top of a scroll object in the UI
local object = scans.trycreate(bolt, event)
if object then setobject(object) end
lastrenderscroll = false
return
end
if currentobject and not currentobject.static then return end
local vertexcount = event:vertexcount()
local verticesperimage = event:verticesperimage()
for i = 1, vertexcount, verticesperimage do
local ax, ay, aw, ah, _, _ = event:vertexatlasdetails(i)
if aw == 128 and ah == 128 and vertexcount >= i + 11 and event:texturecompare(ax, ay, puzzleboxbackgroundpixels) then
-- puzzle box background
local x2, y2 = event:vertexxy(i)
local x, y = event:vertexxy(i + 2)
if vertexcount >= i + (2 * verticesperimage) - 1 and knots.vertexisknotarrow(event, i + verticesperimage) then
setobject(knots.create(event, i + verticesperimage, x, y, x2, y2))
break
end
break
elseif ah == 20 and aw == 20 and event:texturecompare(ax, ay + 11, sliderresetbuttonrow11) then
setobject(sliders.create(event, 1))
break
elseif aw == 32 and ah == 32 and lockboxdecoder.get(event, ax, ay, aw * 4) then
setobject(lockbox.create(event, i))
break
elseif ah == 32 and aw == 32 then
local matches = true
for i = 1, 32 do
if not event:texturecompare(ax, ay + i - 1, info_i[i]) then
matches = false
end
end
if matches then
setobject(towers.create(event, i))
end
break
elseif aw == 496 and ah == 293 and event:texturecompare(ax, ay + 100, scrollbackgroundpixels) then
-- standard clue scroll background
local object = static:trycreatefromtext(event, i)
if object ~= nil and object ~= currentobject then
setobjectstatic(object)
else
nextbigiconismap = true
end
end
end
end)
bolt.onrender3d(function (event)
if currentobject and currentobject.onrender3d then
currentobject:onrender3d(event)
end
end)
bolt.onminimapterrain(function (event)
if currentobject and currentobject.onminimapterrain then
currentobject:onminimapterrain(event)
end
end)
bolt.onrendergameview(function (event)
if currentobject and currentobject.onrendergameview then
currentobject:onrendergameview(event)
end
end)
bolt.onswapbuffers(function (event)
m:onswapbuffers()
lastrenderscroll = false
lastrendercompasspoint = false
nextbigiconismap = false
if not currentobject then return end
if currentobject.onswapbuffers then
currentobject:onswapbuffers(event)
end
local t = bolt.time()
if currentobject:valid() then
lastvalid = t
elseif t > (lastvalid + validitygraceperiod) then
currentobject = nil
m.points = nil
m.lines = nil
m:redraw()
end
end)