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.26 by root, Thu May 3 09:26:45 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(
8 walk_on 10 walk_on
9 walk_off 11 walk_off
10 fly_on 12 fly_on
11 fly_off 13 fly_off
12 flying 14 flying
15
16 attack_skill
17 ranged_skill
13 18
14 ac 19 ac
15 activate_on_push 20 activate_on_push
16 activate_on_release 21 activate_on_release
17 alive 22 alive
66 cursed 71 cursed
67 custom_name 72 custom_name
68 dam 73 dam
69 dam_modifier 74 dam_modifier
70 damned 75 damned
76 destroy_on_death
71 dex 77 dex
72 direction 78 direction
73 duration 79 duration
74 duration_modifier 80 duration_modifier
75 editable 81 editable
86 gen_sp_armour 92 gen_sp_armour
87 generator 93 generator
88 glow_radius 94 glow_radius
89 grace 95 grace
90 has_ready_bow 96 has_ready_bow
91 has_ready_horn
92 has_ready_rod
93 has_ready_scroll 97 has_ready_scroll
94 has_ready_skill 98 has_ready_skill
95 has_ready_wand
96 has_ready_weapon 99 has_ready_weapon
97 has_ready_range 100 has_ready_range
98 hitback 101 hitback
99 hp 102 hp
100 identified 103 identified
101 immune 104 immune
105 inherit
102 int 106 int
103 inv_locked 107 inv_locked
104 invisible 108 invisible
105 is_animated 109 is_animated
106 is_blind 110 is_blind
155 no_pick 159 no_pick
156 no_skill_ident 160 no_skill_ident
157 no_steal 161 no_steal
158 no_strength 162 no_strength
159 nrof 163 nrof
164 obj_original
160 object 165 object
161 oid 166 oid
162 one_hit 167 one_hit
163 only_attack 168 only_attack
164 other_arch 169 other_arch
168 path_repelled 173 path_repelled
169 perm_exp 174 perm_exp
170 pick_up 175 pick_up
171 player_sold 176 player_sold
172 pow 177 pow
178 precious
173 protected 179 protected
174 race 180 race
175 random_move 181 random_move
176 random_movement 182 random_movement
177 randomitems 183 randomitems
226 str 232 str
227 subtype 233 subtype
228 tear_down 234 tear_down
229 title 235 title
230 tooltype 236 tooltype
231 treasure 237 treasure_env
232 type 238 type
233 unaggressive 239 unaggressive
234 undead 240 undead
235 unique 241 unique
236 unpaid 242 unpaid
247 wiz 253 wiz
248 x 254 x
249 xrays 255 xrays
250 y 256 y
251 257
252 Object 258 maplore
259 endmaplore
260 enter_x
261 enter_y
262 width
263 height
264 reset_timeout
265 reset_time
266 swap_time
267 difficulty
268 darkness
269 fixed_resettime
270 per_player
271 per_party
272 region
273 shopitems
274 shopgreed
275 shopmin
276 shopmax
277 shoprace
278 outdoor
279 tile_path_1
280 tile_path_2
281 tile_path_3
282 tile_path_4
283
284 file_format_version
285
286 temp
287 pressure
288 humid
289 windspeed
290 winddir
291 sky
292
293 map
294 savebed_map
295 bed_x
296 bed_y
297 password
298 bowtype
299 petmode
300 gen_hp
301 gen_sp
302 gen_grace
303 listening
304 peaceful
305 digestion
306 pickup
307 outputs_sync
308 outputs_count
309 usekeys
310 unapply
311 weapon_sp
312 lev_array
313 endplst
314
315 visibility
316 magicmap
317
318 match
319 parent
320 longname
321 jail_map
322 jail_x
323 jail_y
324 fallback
325 nomore
326
327 chance
328 mods
329 diff
330 saves
331 description
332 density
333 damage
334
335 anim
336 mina
337 facings
338 player
339
340 allowed
341 keycode
342 trans
343 yield
344 ingred
345 cauldron
346
253 Str 347 Str
254 Dex 348 Dex
255 Con 349 Con
256 Wis 350 Wis
257 Cha 351 Cha
258 Int 352 Int
259 Pow 353 Pow
260 More 354
355 treasure
356 treasureone
357 list
358 change_name
359 change_title
360 change_slaying
361 yes
362 no
261); 363);
262 364
263open GPERF, "|-", "gperf -m50 >kw_hash.h" 365open GPERF, "|-", "exec $ARG{GPERF} -m50 >kw_hash.h"
264 or die "gperf: $!"; 366 or die "$ARGV{GPERF}: $!";
265 367
266print GPERF <<EOF; 368print GPERF <<EOF;
267%language=C++ 369%language=C++
268%enum 370%enum
269%define class-name kw_lex 371%define class-name kw_lex
293print GPERF "};\n"; 395print GPERF "};\n";
294 396
295printf GPERF "\nextern const unsigned char keyword_len [] = { 5, 7, %s };\n\n", 397printf GPERF "\nextern const unsigned char keyword_len [] = { 5, 7, %s };\n\n",
296 join ", ", map length, @kw; 398 join ", ", map length, @kw;
297 399
400close GPERF
401 or die "$ARG{GPERF}: failed to run";
402
298open KW, ">", "keyword.h"; 403open KW, ">", "keyword.h";
299 404
300print KW <<EOF; 405print KW <<EOF;
301#ifndef KW_H__ 406#ifndef KW_H__
302#define KW_H__ 407#define KW_H__

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines