ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/preprocess
(Generate patch)

Comparing deliantra/server/include/preprocess (file contents):
Revision 1.7 by root, Thu Sep 21 00:05:25 2006 UTC vs.
Revision 1.13 by root, Mon Jan 8 12:45:10 2007 UTC

1#!/opt/bin/perl 1#!/opt/bin/perl
2
3my %ARG = @ARGV;
2 4
3use List::Util; 5use List::Util;
4 6
5# todo: gather dynamically 7# todo: gather dynamically
6my @kw = qw( 8my @kw = qw(
66 cursed 68 cursed
67 custom_name 69 custom_name
68 dam 70 dam
69 dam_modifier 71 dam_modifier
70 damned 72 damned
73 destroy_on_death
71 dex 74 dex
72 direction 75 direction
73 duration 76 duration
74 duration_modifier 77 duration_modifier
75 editable 78 editable
155 no_pick 158 no_pick
156 no_skill_ident 159 no_skill_ident
157 no_steal 160 no_steal
158 no_strength 161 no_strength
159 nrof 162 nrof
163 obj_original
160 object 164 object
161 oid 165 oid
162 one_hit 166 one_hit
163 only_attack 167 only_attack
164 other_arch 168 other_arch
256 Wis 260 Wis
257 Cha 261 Cha
258 Int 262 Int
259 Pow 263 Pow
260 More 264 More
265
266 maplore
267 endmaplore
268 enter_x
269 enter_y
270 width
271 height
272 reset_timeout
273 reset_time
274 swap_time
275 difficulty
276 darkness
277 fixed_resettime
278 per_player
279 per_party
280 region
281 shopitems
282 shopgreed
283 shopmin
284 shopmax
285 shoprace
286 outdoor
287 tile_path_1
288 tile_path_2
289 tile_path_3
290 tile_path_4
291
292 file_format_version
293
294 temp
295 pressure
296 humid
297 windspeed
298 winddir
299 sky
300
301 map
302 savebed_map
303 bed_x
304 bed_y
305 password
306 shoottype
307 bowtype
308 petmode
309 gen_hp
310 gen_sp
311 gen_grace
312 listening
313 peaceful
314 digestion
315 pickup
316 outputs_sync
317 outputs_count
318 usekeys
319 unapply
320 weapon_sp
321 lev_array
322 endplst
261); 323);
262 324
263open GPERF, "|-", "gperf -m50 >kw_hash.h" 325open GPERF, "|-", "exec $ARG{GPERF} -m50 >kw_hash.h"
264 or die "gperf: $!"; 326 or die "$ARGV{GPERF}: $!";
265 327
266print GPERF <<EOF; 328print GPERF <<EOF;
267%language=C++ 329%language=C++
268%enum 330%enum
269%define class-name kw_lex 331%define class-name kw_lex
293print GPERF "};\n"; 355print GPERF "};\n";
294 356
295printf GPERF "\nextern const unsigned char keyword_len [] = { 5, 7, %s };\n\n", 357printf GPERF "\nextern const unsigned char keyword_len [] = { 5, 7, %s };\n\n",
296 join ", ", map length, @kw; 358 join ", ", map length, @kw;
297 359
360close GPERF
361 or die "$ARG{GPERF}: failed to run";
362
298open KW, ">", "keyword.h"; 363open KW, ">", "keyword.h";
299 364
300print KW <<EOF; 365print KW <<EOF;
301#ifndef KW_H__ 366#ifndef KW_H__
302#define KW_H__ 367#define KW_H__

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines