1 | #!/opt/bin/perl |
1 | #!/opt/bin/perl |
2 | |
|
|
3 | # |
2 | # |
4 | # This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | # This file is part of Deliantra, the Roguelike Realtime MMORPG. |
5 | # |
4 | # |
6 | # Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | # Copyright (©) 2005,2006,2007,2008,2009,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
7 | # |
6 | # |
8 | # Deliantra is free software: you can redistribute it and/or modify it under |
7 | # Deliantra is free software: you can redistribute it and/or modify it under |
9 | # the terms of the Affero GNU General Public License as published by the |
8 | # the terms of the Affero GNU General Public License as published by the |
10 | # Free Software Foundation, either version 3 of the License, or (at your |
9 | # Free Software Foundation, either version 3 of the License, or (at your |
11 | # option) any later version. |
10 | # option) any later version. |
12 | # |
11 | # |
13 | # This program is distributed in the hope that it will be useful, |
12 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. |
15 | # GNU General Public License for more details. |
17 | # |
16 | # |
18 | # You should have received a copy of the Affero GNU General Public License |
17 | # You should have received a copy of the Affero GNU General Public License |
19 | # and the GNU General Public License along with this program. If not, see |
18 | # and the GNU General Public License along with this program. If not, see |
20 | # <http://www.gnu.org/licenses/>. |
19 | # <http://www.gnu.org/licenses/>. |
21 | # |
20 | # |
22 | # The authors can be reached via e-mail to <support@deliantra.net> |
21 | # The authors can be reached via e-mail to <support@deliantra.net> |
23 | # |
22 | # |
24 | |
23 | |
25 | my %ARG = @ARGV; |
24 | my %ARG = @ARGV; |
26 | |
25 | |
27 | use List::Util; |
26 | use List::Util; |
28 | |
27 | |
29 | # todo: gather dynamically |
28 | # todo: gather dynamically |
30 | my @kw = qw( |
29 | my @kw = qw( |
31 | no_pass |
|
|
32 | walk_on |
|
|
33 | walk_off |
|
|
34 | fly_on |
|
|
35 | fly_off |
|
|
36 | flying |
|
|
37 | |
|
|
38 | gender |
30 | gender |
39 | hintmode |
31 | hintmode |
40 | attack_skill |
32 | attack_skill |
41 | ranged_skill |
33 | ranged_skill |
42 | |
34 | |
… | |
… | |
136 | is_blind |
128 | is_blind |
137 | is_buildable |
129 | is_buildable |
138 | is_cauldron |
130 | is_cauldron |
139 | is_dust |
131 | is_dust |
140 | is_floor |
132 | is_floor |
|
|
133 | is_transparent_floor |
141 | is_hilly |
134 | is_hilly |
142 | is_lightable |
135 | is_lightable |
143 | is_thrown |
136 | is_thrown |
144 | is_turnable |
137 | is_turnable |
145 | is_used_up |
138 | is_used_up |
… | |
… | |
201 | pick_up |
194 | pick_up |
202 | player_sold |
195 | player_sold |
203 | pow |
196 | pow |
204 | precious |
197 | precious |
205 | protected |
198 | protected |
|
|
199 | is_quad |
206 | race |
200 | race |
207 | random_move |
201 | random_move |
208 | random_movement |
202 | random_movement |
209 | random_speed |
203 | random_speed |
210 | randomitems |
204 | randomitems |
… | |
… | |
307 | outdoor |
301 | outdoor |
308 | tile_path_1 |
302 | tile_path_1 |
309 | tile_path_2 |
303 | tile_path_2 |
310 | tile_path_3 |
304 | tile_path_3 |
311 | tile_path_4 |
305 | tile_path_4 |
|
|
306 | tile_path_5 |
|
|
307 | tile_path_6 |
312 | |
308 | |
313 | file_format_version |
309 | file_format_version |
314 | |
310 | |
315 | map |
311 | map |
316 | savebed_map |
312 | savebed_map |
… | |
… | |
342 | longname |
338 | longname |
343 | jail_map |
339 | jail_map |
344 | jail_x |
340 | jail_x |
345 | jail_y |
341 | jail_y |
346 | portal_map |
342 | portal_map |
347 | portal_x |
|
|
348 | portal_y |
|
|
349 | fallback |
343 | fallback |
350 | nomore |
344 | nomore |
351 | |
345 | |
352 | chance |
346 | chance |
353 | mods |
347 | mods |
… | |
… | |
385 | change_slaying |
379 | change_slaying |
386 | yes |
380 | yes |
387 | no |
381 | no |
388 | |
382 | |
389 | max_level |
383 | max_level |
|
|
384 | |
|
|
385 | authour |
|
|
386 | size |
|
|
387 | index |
390 | ); |
388 | ); |
391 | |
389 | |
392 | open GPERF, "|-", "exec $ARG{GPERF} -m50 >kw_hash.h" |
390 | open GPERF, "|-", "exec $ARG{GPERF} -m50 >include/kw_hash.h" |
393 | or die "$ARGV{GPERF}: $!"; |
391 | or die "$ARGV{GPERF}: $!"; |
394 | |
392 | |
395 | print GPERF <<EOF; |
393 | print GPERF <<EOF; |
396 | %language=C++ |
394 | %language=C++ |
397 | %enum |
395 | %enum |
… | |
… | |
425 | join ", ", map length, @kw; |
423 | join ", ", map length, @kw; |
426 | |
424 | |
427 | close GPERF |
425 | close GPERF |
428 | or die "$ARG{GPERF}: failed to run"; |
426 | or die "$ARG{GPERF}: failed to run"; |
429 | |
427 | |
430 | open KW, ">", "keyword.h"; |
428 | open KW, ">", "include/keyword.h"; |
431 | |
429 | |
432 | print KW <<EOF; |
430 | print KW <<EOF; |
433 | // |
431 | // |
434 | // AUTOGENERATED: this is a generated file |
432 | // AUTOGENERATED: this is a generated file |
435 | // edit include/genkeywords instead |
433 | // edit include/genkeywords instead |