1 | #!/opt/bin/perl |
1 | #!/opt/bin/perl |
|
|
2 | # |
|
|
3 | # This file is part of Deliantra, the Roguelike Realtime MMORPG. |
|
|
4 | # |
|
|
5 | # Copyright (©) 2005,2006,2007,2008,2009,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
|
|
6 | # |
|
|
7 | # Deliantra is free software: you can redistribute it and/or modify it under |
|
|
8 | # the terms of the Affero GNU General Public License as published by the |
|
|
9 | # Free Software Foundation, either version 3 of the License, or (at your |
|
|
10 | # option) any later version. |
|
|
11 | # |
|
|
12 | # This program is distributed in the hope that it will be useful, |
|
|
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
15 | # GNU General Public License for more details. |
|
|
16 | # |
|
|
17 | # You should have received a copy of the Affero GNU General Public License |
|
|
18 | # and the GNU General Public License along with this program. If not, see |
|
|
19 | # <http://www.gnu.org/licenses/>. |
|
|
20 | # |
|
|
21 | # The authors can be reached via e-mail to <support@deliantra.net> |
|
|
22 | # |
2 | |
23 | |
3 | my %ARG = @ARGV; |
24 | my %ARG = @ARGV; |
4 | |
25 | |
5 | use List::Util; |
26 | use List::Util; |
6 | |
27 | |
7 | # todo: gather dynamically |
28 | # todo: gather dynamically |
8 | my @kw = qw( |
29 | my @kw = qw( |
9 | no_pass |
|
|
10 | walk_on |
|
|
11 | walk_off |
|
|
12 | fly_on |
|
|
13 | fly_off |
|
|
14 | flying |
|
|
15 | |
|
|
16 | gender |
30 | gender |
|
|
31 | hintmode |
17 | attack_skill |
32 | attack_skill |
18 | ranged_skill |
33 | ranged_skill |
19 | |
34 | |
20 | ac |
35 | ac |
21 | activate_on_push |
36 | activate_on_push |
… | |
… | |
113 | is_blind |
128 | is_blind |
114 | is_buildable |
129 | is_buildable |
115 | is_cauldron |
130 | is_cauldron |
116 | is_dust |
131 | is_dust |
117 | is_floor |
132 | is_floor |
|
|
133 | is_transparent_floor |
118 | is_hilly |
134 | is_hilly |
119 | is_lightable |
135 | is_lightable |
120 | is_thrown |
136 | is_thrown |
121 | is_turnable |
137 | is_turnable |
122 | is_used_up |
138 | is_used_up |
… | |
… | |
155 | name_pl |
171 | name_pl |
156 | neutral |
172 | neutral |
157 | no_attack |
173 | no_attack |
158 | no_damage |
174 | no_damage |
159 | no_drop |
175 | no_drop |
160 | no_fix_player |
|
|
161 | no_magic |
176 | no_magic |
162 | no_pick |
177 | no_pick |
163 | no_skill_ident |
178 | no_skill_ident |
164 | no_steal |
179 | no_steal |
165 | no_strength |
180 | no_strength |
… | |
… | |
169 | oid |
184 | oid |
170 | one_hit |
185 | one_hit |
171 | only_attack |
186 | only_attack |
172 | other_arch |
187 | other_arch |
173 | overlay_floor |
188 | overlay_floor |
|
|
189 | owner |
174 | path_attuned |
190 | path_attuned |
175 | path_denied |
191 | path_denied |
176 | path_repelled |
192 | path_repelled |
177 | perm_exp |
193 | perm_exp |
178 | pick_up |
194 | pick_up |
179 | player_sold |
195 | player_sold |
180 | pow |
196 | pow |
181 | precious |
197 | precious |
182 | protected |
198 | protected |
|
|
199 | is_quad |
183 | race |
200 | race |
184 | random_move |
201 | random_move |
185 | random_movement |
202 | random_movement |
|
|
203 | random_speed |
186 | randomitems |
204 | randomitems |
187 | range |
205 | range |
188 | range_modifier |
206 | range_modifier |
189 | reflect_missile |
207 | reflect_missile |
190 | reflect_spell |
208 | reflect_spell |
… | |
… | |
221 | see_invisible |
239 | see_invisible |
222 | skill |
240 | skill |
223 | slaying |
241 | slaying |
224 | sleep |
242 | sleep |
225 | slow_move |
243 | slow_move |
|
|
244 | sound |
|
|
245 | sound_destroy |
226 | smoothlevel |
246 | smoothlevel |
227 | sp |
247 | sp |
228 | speed |
248 | speed |
229 | speed_left |
249 | speed_left |
|
|
250 | sl |
230 | splitting |
251 | splitting |
231 | stand_still |
252 | stand_still |
232 | startequip |
253 | startequip |
233 | state |
254 | state |
234 | stealth |
255 | stealth |
235 | str |
256 | str |
236 | subtype |
257 | subtype |
|
|
258 | tag |
237 | tear_down |
259 | tear_down |
238 | title |
260 | title |
239 | tooltype |
|
|
240 | treasure_env |
261 | treasure_env |
241 | type |
262 | type |
242 | unaggressive |
263 | unaggressive |
243 | undead |
264 | undead |
244 | unique |
265 | unique |
… | |
… | |
280 | outdoor |
301 | outdoor |
281 | tile_path_1 |
302 | tile_path_1 |
282 | tile_path_2 |
303 | tile_path_2 |
283 | tile_path_3 |
304 | tile_path_3 |
284 | tile_path_4 |
305 | tile_path_4 |
|
|
306 | tile_path_5 |
|
|
307 | tile_path_6 |
285 | |
308 | |
286 | file_format_version |
309 | file_format_version |
287 | |
|
|
288 | temp |
|
|
289 | pressure |
|
|
290 | humid |
|
|
291 | windspeed |
|
|
292 | winddir |
|
|
293 | sky |
|
|
294 | |
310 | |
295 | map |
311 | map |
296 | savebed_map |
312 | savebed_map |
297 | bed_x |
313 | bed_x |
298 | bed_y |
314 | bed_y |
… | |
… | |
322 | longname |
338 | longname |
323 | jail_map |
339 | jail_map |
324 | jail_x |
340 | jail_x |
325 | jail_y |
341 | jail_y |
326 | portal_map |
342 | portal_map |
327 | portal_x |
|
|
328 | portal_y |
|
|
329 | fallback |
343 | fallback |
330 | nomore |
344 | nomore |
331 | |
345 | |
332 | chance |
346 | chance |
333 | mods |
347 | mods |
… | |
… | |
363 | change_name |
377 | change_name |
364 | change_title |
378 | change_title |
365 | change_slaying |
379 | change_slaying |
366 | yes |
380 | yes |
367 | no |
381 | no |
|
|
382 | |
|
|
383 | max_level |
|
|
384 | |
|
|
385 | authour |
|
|
386 | size |
|
|
387 | index |
368 | ); |
388 | ); |
369 | |
389 | |
370 | open GPERF, "|-", "exec $ARG{GPERF} -m50 >kw_hash.h" |
390 | open GPERF, "|-", "exec $ARG{GPERF} -m50 >include/kw_hash.h" |
371 | or die "$ARGV{GPERF}: $!"; |
391 | or die "$ARGV{GPERF}: $!"; |
372 | |
392 | |
373 | print GPERF <<EOF; |
393 | print GPERF <<EOF; |
374 | %language=C++ |
394 | %language=C++ |
375 | %enum |
395 | %enum |
… | |
… | |
403 | join ", ", map length, @kw; |
423 | join ", ", map length, @kw; |
404 | |
424 | |
405 | close GPERF |
425 | close GPERF |
406 | or die "$ARG{GPERF}: failed to run"; |
426 | or die "$ARG{GPERF}: failed to run"; |
407 | |
427 | |
408 | open KW, ">", "keyword.h"; |
428 | open KW, ">", "include/keyword.h"; |
409 | |
429 | |
410 | print KW <<EOF; |
430 | print KW <<EOF; |
411 | // |
431 | // |
412 | // AUTOGENERATED: this is a generated file |
432 | // AUTOGENERATED: this is a generated file |
413 | // edit include/genkeywords instead |
433 | // edit include/genkeywords instead |