ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/preprocess
Revision: 1.29
Committed: Fri May 18 19:46:22 2007 UTC (17 years ago) by root
Branch: MAIN
Changes since 1.28: +1 -0 lines
Log Message:
new speed management:
- weapon speed and object speed is now completekly decoupled for players.
- both can be used at the same time, or indeepndent, when running or firing.
- still only one command per object speed can be issued.

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 body_shield
48 body_combat
49 can_apply
50 can_cast_spell
51 can_roll
52 can_see_in_dark
53 can_use_armour
54 can_use_bow
55 can_use_horn
56 can_use_range
57 can_use_ring
58 can_use_rod
59 can_use_scroll
60 can_use_shield
61 can_use_skill
62 can_use_wand
63 can_use_weapon
64 carrying
65 casting_time
66 cha
67 changing
68 client_type
69 con
70 confused
71 connected
72 container
73 cursed
74 custom_name
75 dam
76 dam_modifier
77 damned
78 destroy_on_death
79 dex
80 direction
81 duration
82 duration_modifier
83 editable
84 editor_folder
85 elevation
86 end
87 endlore
88 endmsg
89 exp
90 expmul
91 face
92 food
93 friendly
94 gen_sp_armour
95 generator
96 glow_radius
97 grace
98 has_ready_bow
99 has_ready_scroll
100 has_ready_skill
101 has_ready_weapon
102 has_ready_range
103 hitback
104 hp
105 identified
106 immune
107 inherit
108 int
109 inv_locked
110 invisible
111 is_animated
112 is_blind
113 is_buildable
114 is_cauldron
115 is_dust
116 is_floor
117 is_hilly
118 is_lightable
119 is_thrown
120 is_turnable
121 is_used_up
122 is_water
123 is_wooded
124 item_power
125 known_cursed
126 known_magical
127 last_eat
128 last_grace
129 last_heal
130 last_sp
131 level
132 lifesave
133 lore
134 luck
135 magic
136 make_invisible
137 material
138 materialname
139 maxgrace
140 maxhp
141 maxsp
142 monster
143 more
144 move_allow
145 move_block
146 move_off
147 move_on
148 move_slow
149 move_slow_penalty
150 move_state
151 move_type
152 msg
153 name
154 name_pl
155 neutral
156 no_attack
157 no_damage
158 no_drop
159 no_fix_player
160 no_magic
161 no_pick
162 no_skill_ident
163 no_steal
164 no_strength
165 nrof
166 obj_original
167 object
168 oid
169 one_hit
170 only_attack
171 other_arch
172 overlay_floor
173 path_attuned
174 path_denied
175 path_repelled
176 perm_exp
177 pick_up
178 player_sold
179 pow
180 precious
181 protected
182 race
183 random_move
184 random_movement
185 randomitems
186 range
187 range_modifier
188 reflect_missile
189 reflect_spell
190 reflecting
191 resist_acid
192 resist_blind
193 resist_cancellation
194 resist_chaos
195 resist_cold
196 resist_confusion
197 resist_counterspell
198 resist_death
199 resist_deplete
200 resist_disease
201 resist_drain
202 resist_electricity
203 resist_fear
204 resist_fire
205 resist_ghosthit
206 resist_godpower
207 resist_holyword
208 resist_internal
209 resist_life_stealing
210 resist_magic
211 resist_paralyze
212 resist_physical
213 resist_poison
214 resist_slow
215 resist_turn_undead
216 resist_weaponmagic
217 run_away
218 scared
219 see_anywhere
220 see_invisible
221 skill
222 slaying
223 sleep
224 slow_move
225 smoothlevel
226 sp
227 speed
228 speed_left
229 splitting
230 stand_still
231 startequip
232 state
233 stealth
234 str
235 subtype
236 tear_down
237 title
238 tooltype
239 treasure_env
240 type
241 unaggressive
242 undead
243 unique
244 unpaid
245 use_content_on_gen
246 uuid
247 value
248 vulnerable
249 wc
250 weapontype
251 weight
252 will_apply
253 wis
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 weapon_sp_left
313 lev_array
314 endplst
315
316 visibility
317 magicmap
318
319 match
320 parent
321 longname
322 jail_map
323 jail_x
324 jail_y
325 fallback
326 nomore
327
328 chance
329 mods
330 diff
331 saves
332 description
333 density
334 damage
335
336 anim
337 mina
338 facings
339 player
340
341 allowed
342 keycode
343 trans
344 yield
345 ingred
346 cauldron
347
348 Str
349 Dex
350 Con
351 Wis
352 Cha
353 Int
354 Pow
355
356 treasure
357 treasureone
358 list
359 change_name
360 change_title
361 change_slaying
362 yes
363 no
364 );
365
366 open GPERF, "|-", "exec $ARG{GPERF} -m50 >kw_hash.h"
367 or die "$ARGV{GPERF}: $!";
368
369 print GPERF <<EOF;
370 %language=C++
371 %enum
372 %define class-name kw_lex
373 %define lookup-function-name match
374 %struct-type
375 %compare-strncmp
376 %delimiters=,
377 struct keyword_idx { const char *name; enum keyword index; };
378 %%
379 EOF
380
381 for (@kw) {
382 printf GPERF "%s,%s\n", $_, "KW_$_";
383 }
384
385 print GPERF <<EOF;
386 %%
387 extern const char *const keyword_str [] = {
388 "<EOF>",
389 "<ERROR>",
390 EOF
391
392 for (@kw) {
393 printf GPERF " \"%s\",\n", $_;
394 }
395
396 print GPERF "};\n";
397
398 printf GPERF "\nextern const unsigned char keyword_len [] = { 5, 7, %s };\n\n",
399 join ", ", map length, @kw;
400
401 close GPERF
402 or die "$ARG{GPERF}: failed to run";
403
404 open KW, ">", "keyword.h";
405
406 print KW <<EOF;
407 #ifndef KW_H__
408 #define KW_H__
409
410 enum keyword {
411 KW_NULL = 0,
412 KW_EOF = 0,
413 KW_ERROR,
414 EOF
415
416 for (@kw) {
417 printf KW " %s,\n", "KW_$_",
418 }
419
420 print KW <<EOF;
421 NUM_KEYWORD,
422 };
423
424 extern const char *const keyword_str [];
425 extern const unsigned char keyword_len [];
426
427 EOF
428
429 printf KW "#define MAX_KEYWORD_LEN %d\n", List::Util::max map length, @kw;
430
431 print KW <<EOF;
432
433 #endif
434
435 EOF
436