ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/preprocess
Revision: 1.26
Committed: Thu May 3 09:26:45 2007 UTC (17 years, 1 month ago) by root
Branch: MAIN
Changes since 1.25: +0 -3 lines
Log Message:
only allow one range weapon to be applied at any one time, some dynbuf fixes

File Contents

# Content
1 #!/opt/bin/perl
2
3 my %ARG = @ARGV;
4
5 use List::Util;
6
7 # todo: gather dynamically
8 my @kw = qw(
9 no_pass
10 walk_on
11 walk_off
12 fly_on
13 fly_off
14 flying
15
16 attack_skill
17 ranged_skill
18
19 ac
20 activate_on_push
21 activate_on_release
22 alive
23 anim_speed
24 animation
25 applied
26 arch
27 armour
28 attach
29 attack_movement
30 attacktype
31 auto_apply
32 been_applied
33 berserk
34 blocksview
35 body_range
36 body_arm
37 body_torso
38 body_head
39 body_neck
40 body_skill
41 body_finger
42 body_shoulder
43 body_foot
44 body_hand
45 body_wrist
46 body_waist
47 can_apply
48 can_cast_spell
49 can_roll
50 can_see_in_dark
51 can_use_armour
52 can_use_bow
53 can_use_horn
54 can_use_range
55 can_use_ring
56 can_use_rod
57 can_use_scroll
58 can_use_shield
59 can_use_skill
60 can_use_wand
61 can_use_weapon
62 carrying
63 casting_time
64 cha
65 changing
66 client_type
67 con
68 confused
69 connected
70 container
71 cursed
72 custom_name
73 dam
74 dam_modifier
75 damned
76 destroy_on_death
77 dex
78 direction
79 duration
80 duration_modifier
81 editable
82 editor_folder
83 elevation
84 end
85 endlore
86 endmsg
87 exp
88 expmul
89 face
90 food
91 friendly
92 gen_sp_armour
93 generator
94 glow_radius
95 grace
96 has_ready_bow
97 has_ready_scroll
98 has_ready_skill
99 has_ready_weapon
100 has_ready_range
101 hitback
102 hp
103 identified
104 immune
105 inherit
106 int
107 inv_locked
108 invisible
109 is_animated
110 is_blind
111 is_buildable
112 is_cauldron
113 is_dust
114 is_floor
115 is_hilly
116 is_lightable
117 is_thrown
118 is_turnable
119 is_used_up
120 is_water
121 is_wooded
122 item_power
123 known_cursed
124 known_magical
125 last_eat
126 last_grace
127 last_heal
128 last_sp
129 level
130 lifesave
131 lore
132 luck
133 magic
134 make_invisible
135 material
136 materialname
137 maxgrace
138 maxhp
139 maxsp
140 monster
141 more
142 move_allow
143 move_block
144 move_off
145 move_on
146 move_slow
147 move_slow_penalty
148 move_state
149 move_type
150 msg
151 name
152 name_pl
153 neutral
154 no_attack
155 no_damage
156 no_drop
157 no_fix_player
158 no_magic
159 no_pick
160 no_skill_ident
161 no_steal
162 no_strength
163 nrof
164 obj_original
165 object
166 oid
167 one_hit
168 only_attack
169 other_arch
170 overlay_floor
171 path_attuned
172 path_denied
173 path_repelled
174 perm_exp
175 pick_up
176 player_sold
177 pow
178 precious
179 protected
180 race
181 random_move
182 random_movement
183 randomitems
184 range
185 range_modifier
186 reflect_missile
187 reflect_spell
188 reflecting
189 resist_acid
190 resist_blind
191 resist_cancellation
192 resist_chaos
193 resist_cold
194 resist_confusion
195 resist_counterspell
196 resist_death
197 resist_deplete
198 resist_disease
199 resist_drain
200 resist_electricity
201 resist_fear
202 resist_fire
203 resist_ghosthit
204 resist_godpower
205 resist_holyword
206 resist_internal
207 resist_life_stealing
208 resist_magic
209 resist_paralyze
210 resist_physical
211 resist_poison
212 resist_slow
213 resist_turn_undead
214 resist_weaponmagic
215 run_away
216 scared
217 see_anywhere
218 see_invisible
219 skill
220 slaying
221 sleep
222 slow_move
223 smoothlevel
224 sp
225 speed
226 speed_left
227 splitting
228 stand_still
229 startequip
230 state
231 stealth
232 str
233 subtype
234 tear_down
235 title
236 tooltype
237 treasure_env
238 type
239 unaggressive
240 undead
241 unique
242 unpaid
243 use_content_on_gen
244 uuid
245 value
246 vulnerable
247 was_wiz
248 wc
249 weapontype
250 weight
251 will_apply
252 wis
253 wiz
254 x
255 xrays
256 y
257
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
347 Str
348 Dex
349 Con
350 Wis
351 Cha
352 Int
353 Pow
354
355 treasure
356 treasureone
357 list
358 change_name
359 change_title
360 change_slaying
361 yes
362 no
363 );
364
365 open GPERF, "|-", "exec $ARG{GPERF} -m50 >kw_hash.h"
366 or die "$ARGV{GPERF}: $!";
367
368 print GPERF <<EOF;
369 %language=C++
370 %enum
371 %define class-name kw_lex
372 %define lookup-function-name match
373 %struct-type
374 %compare-strncmp
375 %delimiters=,
376 struct keyword_idx { const char *name; enum keyword index; };
377 %%
378 EOF
379
380 for (@kw) {
381 printf GPERF "%s,%s\n", $_, "KW_$_";
382 }
383
384 print GPERF <<EOF;
385 %%
386 extern const char *const keyword_str [] = {
387 "<EOF>",
388 "<ERROR>",
389 EOF
390
391 for (@kw) {
392 printf GPERF " \"%s\",\n", $_;
393 }
394
395 print GPERF "};\n";
396
397 printf GPERF "\nextern const unsigned char keyword_len [] = { 5, 7, %s };\n\n",
398 join ", ", map length, @kw;
399
400 close GPERF
401 or die "$ARG{GPERF}: failed to run";
402
403 open KW, ">", "keyword.h";
404
405 print KW <<EOF;
406 #ifndef KW_H__
407 #define KW_H__
408
409 enum keyword {
410 KW_NULL = 0,
411 KW_EOF = 0,
412 KW_ERROR,
413 EOF
414
415 for (@kw) {
416 printf KW " %s,\n", "KW_$_",
417 }
418
419 print KW <<EOF;
420 NUM_KEYWORD,
421 };
422
423 extern const char *const keyword_str [];
424 extern const unsigned char keyword_len [];
425
426 EOF
427
428 printf KW "#define MAX_KEYWORD_LEN %d\n", List::Util::max map length, @kw;
429
430 print KW <<EOF;
431
432 #endif
433
434 EOF
435