3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
16 * Global defines for the project IVAN.
17 * This file is created to decrease the need of including headers in
18 * other headers just for the sake of some silly macros, because it
19 * decreases compilation efficiency and may cause cross-including
21 * List of macros that should be gathered here:
22 * 1. all numeric defines used in multiple .cpp or .h files
23 * except those #defined in balance.h and confdef.h
24 * 2. all inline functions used in multiple .cpp or .h files
25 * and independent enough (do not require other headers)
26 * 3. class construction macros used in multiple .h files
29 #include "ivancommon.h"
34 #define IVAN_VERSION "0.666.2"
40 typedef const item citem
;
41 typedef const material cmaterial
;
42 typedef const character ccharacter
;
52 template <class type
, class base
, class prototype
>
53 class sysbase
: public base
56 typedef sysbase
<type
, base
, prototype
> mybase
;
57 static type
* Spawn(int Config
= 0, int SpecialFlags
= 0)
60 T
->Initialize(Config
, SpecialFlags
);
64 virtual ~sysbase () {}
66 static type
* Clone(const type
* T
) { return new type(*T
); }
67 virtual const prototype
* FindProtoType() const { return &ProtoType
; }
68 static const prototype ProtoType
;
71 template <class type
, class base
, class prototype
>
72 class simplesysbase
: public base
75 typedef simplesysbase
<type
, base
, prototype
> mybase
;
76 static type
* Spawn() { return new type
; }
78 virtual ~simplesysbase () {}
80 virtual const prototype
* GetProtoType() const { return &ProtoType
; }
81 static const prototype ProtoType
;
84 #define SYSTEM_SPECIALIZATIONS(name)\
85 name##prototype** name##_ProtoData;\
86 valuemap name##_CodeNameMap;\
87 int name##_ProtoSize;\
89 template<> name##prototype**& protocontainer<name>::GetProtoData()\
90 { return name##_ProtoData; }\
91 template<> valuemap& protocontainer<name>::GetCodeNameMap()\
92 { return name##_CodeNameMap; }\
93 template<> int& protocontainer<name>::GetSizeRef()\
94 { return name##_ProtoSize; }
96 #define EXTENDED_SYSTEM_SPECIALIZATIONS(name)\
97 SYSTEM_SPECIALIZATIONS(name)\
98 databasecreator<name>::databasemembermap name##_DataBaseMemberMap;\
99 template<> databasecreator<name>::databasemembermap&\
100 databasecreator<name>::GetDataBaseMemberMap()\
101 { return name##_DataBaseMemberMap; }\
102 const name##prototype name::ProtoType
104 #define DATA_BASE_VALUE(type, data) type Get##data() const { return DataBase->data; }
105 #define DATA_BASE_VALUE_WITH_PARAMETER(type, data, param) type Get##data(param) const { return DataBase->data; }
106 #define DATA_BASE_TRUTH(data) truth data() const { return DataBase->data; }
107 #define DATA_BASE_TRUTH_WITH_PARAMETER(data, param) truth data(param) const { return DataBase->data; }
109 #define HAS_HIT (game::GetGlobalConst("HAS_HIT"))
110 #define HAS_BLOCKED (game::GetGlobalConst("HAS_BLOCKED"))
111 #define HAS_DODGED (game::GetGlobalConst("HAS_DODGED"))
112 #define HAS_DIED (game::GetGlobalConst("HAS_DIED"))
113 #define DID_NO_DAMAGE (game::GetGlobalConst("DID_NO_DAMAGE"))
114 #define HAS_FAILED (game::GetGlobalConst("HAS_FAILED"))
116 #define OVER_FED_LEVEL (game::GetGlobalConst("OVER_FED_LEVEL"))
117 #define BLOATED_LEVEL (game::GetGlobalConst("BLOATED_LEVEL"))
118 #define SATIATED_LEVEL (game::GetGlobalConst("SATIATED_LEVEL"))
119 #define NOT_HUNGER_LEVEL (game::GetGlobalConst("NOT_HUNGER_LEVEL"))
120 #define HUNGER_LEVEL (game::GetGlobalConst("HUNGER_LEVEL"))
121 #define VERY_HUNGER_LEVEL (game::GetGlobalConst("VERY_HUNGER_LEVEL"))
123 #define OVER_LOADED (game::GetGlobalConst("OVER_LOADED"))
124 #define STRESSED (game::GetGlobalConst("STRESSED"))
125 #define BURDENED (game::GetGlobalConst("BURDENED"))
126 #define UNBURDENED (game::GetGlobalConst("UNBURDENED"))
128 #define STARVING (game::GetGlobalConst("STARVING"))
129 #define VERY_HUNGRY (game::GetGlobalConst("VERY_HUNGRY"))
130 #define HUNGRY (game::GetGlobalConst("HUNGRY"))
131 #define NOT_HUNGRY (game::GetGlobalConst("NOT_HUNGRY"))
132 #define SATIATED (game::GetGlobalConst("SATIATED"))
133 #define BLOATED (game::GetGlobalConst("BLOATED"))
134 #define OVER_FED (game::GetGlobalConst("OVER_FED"))
136 //WARNING! state count and state order MUST be synced with "define.dat"
139 #define POLYMORPHED (game::GetGlobalConst("POLYMORPHED"))
140 #define HASTE (game::GetGlobalConst("HASTE"))
141 #define SLOW (game::GetGlobalConst("SLOW"))
142 #define POLYMORPH_CONTROL (game::GetGlobalConst("POLYMORPH_CONTROL"))
143 #define LIFE_SAVED (game::GetGlobalConst("LIFE_SAVED"))
144 #define LYCANTHROPY (game::GetGlobalConst("LYCANTHROPY"))
145 #define INVISIBLE (game::GetGlobalConst("INVISIBLE"))
146 #define INFRA_VISION (game::GetGlobalConst("INFRA_VISION"))
147 #define ESP (game::GetGlobalConst("ESP"))
148 #define POISONED (game::GetGlobalConst("POISONED"))
149 #define TELEPORT (game::GetGlobalConst("TELEPORT"))
150 #define POLYMORPH (game::GetGlobalConst("POLYMORPH"))
151 #define TELEPORT_CONTROL (game::GetGlobalConst("TELEPORT_CONTROL"))
152 #define PANIC (game::GetGlobalConst("PANIC"))
153 #define CONFUSED (game::GetGlobalConst("CONFUSED"))
154 #define PARASITIZED (game::GetGlobalConst("PARASITIZED"))
155 #define SEARCHING (game::GetGlobalConst("SEARCHING"))
156 #define GAS_IMMUNITY (game::GetGlobalConst("GAS_IMMUNITY"))
157 #define LEVITATION (game::GetGlobalConst("LEVITATION"))
158 #define LEPROSY (game::GetGlobalConst("LEPROSY"))
159 #define HICCUPS (game::GetGlobalConst("HICCUPS"))
160 #define VAMPIRISM (game::GetGlobalConst("VAMPIRISM"))
161 #define SWIMMING (game::GetGlobalConst("SWIMMING"))
162 #define DETECTING (game::GetGlobalConst("DETECTING"))
163 #define ETHEREAL_MOVING (game::GetGlobalConst("ETHEREAL_MOVING"))
164 #define FEARLESS (game::GetGlobalConst("FEARLESS"))
165 #define POLYMORPH_LOCK (game::GetGlobalConst("POLYMORPH_LOCK"))
166 #define REGENERATION (game::GetGlobalConst("REGENERATION"))
167 #define DISEASE_IMMUNITY (game::GetGlobalConst("DISEASE_IMMUNITY"))
168 #define TELEPORT_LOCK (game::GetGlobalConst("TELEPORT_LOCK"))
171 #define THROW_ITEM_TYPES (game::GetGlobalConst("THROW_ITEM_TYPES"))
173 #define THROW_BONE (game::GetGlobalConst("THROW_BONE"))
174 #define THROW_POTION (game::GetGlobalConst("THROW_POTION"))
175 #define THROW_AXE (game::GetGlobalConst("THROW_AXE"))
176 #define THROW_GAS_GRENADE (game::GetGlobalConst("THROW_GAS_GRENADE"))
177 #define THROW_WAND (game::GetGlobalConst("THROW_WAND"))
193 #define PHYSICAL_DAMAGE (game::GetGlobalConst("PHYSICAL_DAMAGE"))
194 #define SOUND (game::GetGlobalConst("SOUND"))
195 #define ACID (game::GetGlobalConst("ACID"))
196 #define FIRE (game::GetGlobalConst("FIRE"))
197 #define ELECTRICITY (game::GetGlobalConst("ELECTRICITY"))
198 #define ENERGY (game::GetGlobalConst("ENERGY"))
199 #define POISON (game::GetGlobalConst("POISON"))
200 #define DRAIN (game::GetGlobalConst("DRAIN"))
201 #define MUSTARD_GAS_DAMAGE (game::GetGlobalConst("MUSTARD_GAS_DAMAGE"))
202 #define PSI (game::GetGlobalConst("PSI"))
203 #define THROW (game::GetGlobalConst("THROW"))
206 #define UNDEFINED (game::GetGlobalConst("UNDEFINED"))
207 #define MALE (game::GetGlobalConst("MALE"))
208 #define FEMALE (game::GetGlobalConst("FEMALE"))
209 #define TRANSSEXUAL (game::GetGlobalConst("TRANSSEXUAL"))
211 #define ALL_BODYPART_FLAGS 0x7F
213 /* The maximum bodyparts a character can have */
215 #define MAX_BODYPARTS 7
216 #define HUMANOID_BODYPARTS 7
218 #define TORSO_INDEX 0
220 #define RIGHT_ARM_INDEX 2
221 #define LEFT_ARM_INDEX 3
222 #define GROIN_INDEX 4
223 #define RIGHT_LEG_INDEX 5
224 #define LEFT_LEG_INDEX 6
226 #define NONE_INDEX MAX_BODYPARTS
228 #define DIRECTION_COMMAND_KEYS 8
229 #define EXTENDED_DIRECTION_COMMAND_KEYS 9
234 #define LIGHT_BORDER 80
251 #define ARTICLE_BIT 2
253 #define INDEFINE_BIT 4
257 #define TRANSPARENT_COLOR 0xF81F // pink
261 #define GR_GLTERRAIN 0
262 #define GR_OLTERRAIN 1
264 #define GR_CHARACTER 3
265 #define GR_HUMANOID 4
269 #define GRAPHIC_TYPES 4
271 #define GR_WTERRAIN 0
276 /* SpecialFlags for graphics system. No one knows what "ST_" means... */
279 #define ST_RIGHT_ARM 8
280 #define ST_LEFT_ARM 16
282 #define ST_RIGHT_LEG 32
283 #define ST_LEFT_LEG 40
284 #define ST_OTHER_BODYPART 48
285 #define ST_WIELDED 56
287 #define ST_LIGHTNING 128
288 #define ST_DISALLOW_R_COLORS 256
289 #define ST_FLAME_1 512
290 #define ST_FLAME_2 1024
291 #define ST_FLAME_3 2048
292 #define ST_FLAME_4 4096
293 #define ST_FLAMES (ST_FLAME_1|ST_FLAME_2|ST_FLAME_3|ST_FLAME_4)
294 #define ST_FLAME_SHIFT 9
297 #define WOBBLE_HORIZONTALLY_BIT 2
298 #define WOBBLE_VERTICALLY WOBBLE
299 #define WOBBLE_HORIZONTALLY (WOBBLE|WOBBLE_HORIZONTALLY_BIT)
300 #define WOBBLE_SPEED_SHIFT 2
301 #define WOBBLE_SPEED_RANGE (3<<WOBBLE_SPEED_SHIFT)
302 #define WOBBLE_FREQ_SHIFT 4
303 #define WOBBLE_FREQ_RANGE (3<<WOBBLE_FREQ_SHIFT)
305 cv2
SILHOUETTE_SIZE(48, 64);
307 //WARNING! keep in sync with "define.dat"!
308 #define ITEM_CATEGORIES 18
310 #define ANY_CATEGORY (game::GetGlobalConst("ANY_CATEGORY"))
311 #define HELMET (game::GetGlobalConst("HELMET"))
312 #define AMULET (game::GetGlobalConst("AMULET"))
313 #define CLOAK (game::GetGlobalConst("CLOAK"))
314 #define BODY_ARMOR (game::GetGlobalConst("BODY_ARMOR"))
315 #define WEAPON (game::GetGlobalConst("WEAPON"))
316 #define SHIELD (game::GetGlobalConst("SHIELD"))
317 #define RING (game::GetGlobalConst("RING"))
318 #define GAUNTLET (game::GetGlobalConst("GAUNTLET"))
319 #define BELT (game::GetGlobalConst("BELT"))
320 #define BOOT (game::GetGlobalConst("BOOT"))
321 #define FOOD (game::GetGlobalConst("FOOD"))
322 #define POTION (game::GetGlobalConst("POTION"))
323 #define SCROLL (game::GetGlobalConst("SCROLL"))
324 #define BOOK (game::GetGlobalConst("BOOK"))
325 #define WAND (game::GetGlobalConst("WAND"))
326 #define TOOL (game::GetGlobalConst("TOOL"))
327 #define VALUABLE (game::GetGlobalConst("VALUABLE"))
328 #define MISC (game::GetGlobalConst("MISC"))
330 #define GOOD (game::GetGlobalConst("GOOD"))
331 #define NEUTRAL (game::GetGlobalConst("NEUTRAL"))
332 #define EVIL (game::GetGlobalConst("EVIL"))
334 #define TOPPLED (game::GetGlobalConst("TOPPLED"))
338 #define CT_FRUIT (game::GetGlobalConst("CT_FRUIT"))
339 #define CT_MEAT (game::GetGlobalConst("CT_MEAT"))
340 #define CT_METAL (game::GetGlobalConst("CT_METAL"))
341 #define CT_MINERAL (game::GetGlobalConst("CT_MINERAL"))
342 #define CT_LIQUID (game::GetGlobalConst("CT_LIQUID"))
343 #define CT_BONE (game::GetGlobalConst("CT_BONE"))
344 #define CT_PROCESSED (game::GetGlobalConst("CT_PROCESSED"))
345 #define CT_MISC_ORGANIC (game::GetGlobalConst("CT_MISC_ORGANIC"))
346 #define CT_PLASTIC (game::GetGlobalConst("CT_PLASTIC"))
347 #define CT_GAS (game::GetGlobalConst("CT_GAS"))
349 /* Possible square positions for item. The first four are used for items
352 #define LEFT (game::GetGlobalConst("LEFT"))
353 #define DOWN (game::GetGlobalConst("DOWN"))
354 #define UP (game::GetGlobalConst("UP"))
355 #define RIGHT (game::GetGlobalConst("RIGHT"))
356 #define CENTER (game::GetGlobalConst("CENTER")) // item on ground
358 #define HOSTILE (game::GetGlobalConst("HOSTILE"))
359 #define UNCARING (game::GetGlobalConst("UNCARING"))
360 #define FRIEND (game::GetGlobalConst("FRIEND"))
362 #define MARTIAL_SKILL_CATEGORIES 3
363 #define WEAPON_SKILL_CATEGORIES 11
365 #define UNARMED (game::GetGlobalConst("UNARMED"))
366 #define KICK (game::GetGlobalConst("KICK"))
367 #define BITE (game::GetGlobalConst("BITE"))
368 #define UNCATEGORIZED (game::GetGlobalConst("UNCATEGORIZED"))
369 #define SMALL_SWORDS (game::GetGlobalConst("SMALL_SWORDS"))
370 #define LARGE_SWORDS (game::GetGlobalConst("LARGE_SWORDS"))
371 #define BLUNT_WEAPONS (game::GetGlobalConst("BLUNT_WEAPONS"))
372 #define AXES (game::GetGlobalConst("AXES"))
373 #define POLE_ARMS (game::GetGlobalConst("POLE_ARMS"))
374 #define WHIPS (game::GetGlobalConst("WHIPS"))
375 #define SHIELDS (game::GetGlobalConst("SHIELDS"))
377 #define LOCKED (game::GetGlobalConst("LOCKED"))
379 #define EFFECT_NOTHING (game::GetGlobalConst("EFFECT_NOTHING"))
380 #define EFFECT_POISON (game::GetGlobalConst("EFFECT_POISON"))
381 #define EFFECT_DARKNESS (game::GetGlobalConst("EFFECT_DARKNESS"))
382 #define EFFECT_OMMEL_URINE (game::GetGlobalConst("EFFECT_OMMEL_URINE"))
383 #define EFFECT_PEPSI (game::GetGlobalConst("EFFECT_PEPSI"))
384 #define EFFECT_KOBOLD_FLESH (game::GetGlobalConst("EFFECT_KOBOLD_FLESH"))
385 #define EFFECT_HEAL (game::GetGlobalConst("EFFECT_HEAL"))
386 #define EFFECT_LYCANTHROPY (game::GetGlobalConst("EFFECT_LYCANTHROPY"))
387 #define EFFECT_SCHOOL_FOOD (game::GetGlobalConst("EFFECT_SCHOOL_FOOD"))
388 #define EFFECT_ANTIDOTE (game::GetGlobalConst("EFFECT_ANTIDOTE"))
389 #define EFFECT_CONFUSE (game::GetGlobalConst("EFFECT_CONFUSE"))
390 #define EFFECT_POLYMORPH (game::GetGlobalConst("EFFECT_POLYMORPH"))
391 #define EFFECT_ESP (game::GetGlobalConst("EFFECT_ESP"))
392 #define EFFECT_SKUNK_SMELL (game::GetGlobalConst("EFFECT_SKUNK_SMELL"))
393 #define EFFECT_MAGIC_MUSHROOM (game::GetGlobalConst("EFFECT_MAGIC_MUSHROOM"))
394 #define EFFECT_TRAIN_PERCEPTION (game::GetGlobalConst("EFFECT_TRAIN_PERCEPTION"))
395 #define EFFECT_HOLY_BANANA (game::GetGlobalConst("EFFECT_HOLY_BANANA"))
396 #define EFFECT_EVIL_WONDER_STAFF_VAPOUR (game::GetGlobalConst("EFFECT_EVIL_WONDER_STAFF_VAPOUR"))
397 #define EFFECT_GOOD_WONDER_STAFF_VAPOUR (game::GetGlobalConst("EFFECT_GOOD_WONDER_STAFF_VAPOUR"))
398 #define EFFECT_PEA_SOUP (game::GetGlobalConst("EFFECT_PEA_SOUP"))
399 #define EFFECT_BLACK_UNICORN_FLESH (game::GetGlobalConst("EFFECT_BLACK_UNICORN_FLESH"))
400 #define EFFECT_GRAY_UNICORN_FLESH (game::GetGlobalConst("EFFECT_GRAY_UNICORN_FLESH"))
401 #define EFFECT_WHITE_UNICORN_FLESH (game::GetGlobalConst("EFFECT_WHITE_UNICORN_FLESH"))
402 #define EFFECT_TELEPORT_CONTROL (game::GetGlobalConst("EFFECT_TELEPORT_CONTROL"))
403 #define EFFECT_MUSHROOM (game::GetGlobalConst("EFFECT_MUSHROOM"))
404 #define EFFECT_OMMEL_CERUMEN (game::GetGlobalConst("EFFECT_OMMEL_CERUMEN"))
405 #define EFFECT_OMMEL_SWEAT (game::GetGlobalConst("EFFECT_OMMEL_SWEAT"))
406 #define EFFECT_OMMEL_TEARS (game::GetGlobalConst("EFFECT_OMMEL_TEARS"))
407 #define EFFECT_OMMEL_SNOT (game::GetGlobalConst("EFFECT_OMMEL_SNOT"))
408 #define EFFECT_OMMEL_BONE (game::GetGlobalConst("EFFECT_OMMEL_BONE"))
409 #define EFFECT_MUSTARD_GAS (game::GetGlobalConst("EFFECT_MUSTARD_GAS"))
410 #define EFFECT_MUSTARD_GAS_LIQUID (game::GetGlobalConst("EFFECT_MUSTARD_GAS_LIQUID"))
411 // new; wtf is EFFECT_PANIC?
412 #define EFFECT_PANIC (game::GetGlobalConst("EFFECT_PANIC"))
413 #define EFFECT_TELEPORT (game::GetGlobalConst("EFFECT_TELEPORT"))
414 #define EFFECT_VAMPIRISM (game::GetGlobalConst("EFFECT_VAMPIRISM"))
415 #define EFFECT_DETECTING (game::GetGlobalConst("EFFECT_DETECTING"))
416 #define EFFECT_HOLY_MANGO (game::GetGlobalConst("EFFECT_HOLY_MANGO"))
418 /* CEM = Consume End Message */
420 #define CEM_NOTHING (game::GetGlobalConst("CEM_NOTHING"))
421 #define CEM_SCHOOL_FOOD (game::GetGlobalConst("CEM_SCHOOL_FOOD"))
422 #define CEM_BONE (game::GetGlobalConst("CEM_BONE"))
423 #define CEM_FROG_FLESH (game::GetGlobalConst("CEM_FROG_FLESH"))
424 #define CEM_OMMEL (game::GetGlobalConst("CEM_OMMEL"))
425 #define CEM_PEPSI (game::GetGlobalConst("CEM_PEPSI"))
426 #define CEM_KOBOLD_FLESH (game::GetGlobalConst("CEM_KOBOLD_FLESH"))
427 #define CEM_HEALING_LIQUID (game::GetGlobalConst("CEM_HEALING_LIQUID"))
428 #define CEM_ANTIDOTE (game::GetGlobalConst("CEM_ANTIDOTE"))
429 #define CEM_ESP (game::GetGlobalConst("CEM_ESP"))
430 #define CEM_HOLY_BANANA (game::GetGlobalConst("CEM_HOLY_BANANA"))
431 #define CEM_PEA_SOUP (game::GetGlobalConst("CEM_PEA_SOUP"))
432 #define CEM_BLACK_UNICORN_FLESH (game::GetGlobalConst("CEM_BLACK_UNICORN_FLESH"))
433 #define CEM_GRAY_UNICORN_FLESH (game::GetGlobalConst("CEM_GRAY_UNICORN_FLESH"))
434 #define CEM_WHITE_UNICORN_FLESH (game::GetGlobalConst("CEM_WHITE_UNICORN_FLESH"))
435 #define CEM_OMMEL_BONE (game::GetGlobalConst("CEM_OMMEL_BONE"))
437 #define CEM_LIQUID_HORROR (game::GetGlobalConst("CEM_LIQUID_HORROR"))
438 #define CEM_HOLY_MANGO (game::GetGlobalConst("CEM_HOLY_MANGO"))
440 #define CEM_ALIEN_FLESH (game::GetGlobalConst("CEM_ALIEN_FLESH"))
442 /* HM = Hit Message */
444 #define HM_NOTHING (game::GetGlobalConst("HM_NOTHING"))
445 #define HM_SCHOOL_FOOD (game::GetGlobalConst("HM_SCHOOL_FOOD"))
446 #define HM_FROG_FLESH (game::GetGlobalConst("HM_FROG_FLESH"))
447 #define HM_OMMEL (game::GetGlobalConst("HM_OMMEL"))
448 #define HM_PEPSI (game::GetGlobalConst("HM_PEPSI"))
449 #define HM_KOBOLD_FLESH (game::GetGlobalConst("HM_KOBOLD_FLESH"))
450 #define HM_HEALING_LIQUID (game::GetGlobalConst("HM_HEALING_LIQUID"))
451 #define HM_ANTIDOTE (game::GetGlobalConst("HM_ANTIDOTE"))
452 #define HM_CONFUSE (game::GetGlobalConst("HM_CONFUSE"))
453 #define HM_HOLY_BANANA (game::GetGlobalConst("HM_HOLY_BANANA"))
454 #define HM_HOLY_MANGO (game::GetGlobalConst("HM_HOLY_MANGO"))
456 #define HM_ALIEN_FLESH (game::GetGlobalConst("HM_ALIEN_FLESH"))
458 #define UNARMED_ATTACK (game::GetGlobalConst("UNARMED_ATTACK"))
459 #define WEAPON_ATTACK (game::GetGlobalConst("WEAPON_ATTACK"))
460 #define KICK_ATTACK (game::GetGlobalConst("KICK_ATTACK"))
461 #define BITE_ATTACK (game::GetGlobalConst("BITE_ATTACK"))
462 #define THROW_ATTACK (game::GetGlobalConst("THROW_ATTACK"))
464 #define USE_ARMS (game::GetGlobalConst("USE_ARMS"))
465 #define USE_LEGS (game::GetGlobalConst("USE_LEGS"))
466 #define USE_HEAD (game::GetGlobalConst("USE_HEAD"))
468 #define ATTRIBUTES 11
469 #define BASE_ATTRIBUTES 7
473 #define INTELLIGENCE 2
479 #define ARM_STRENGTH 7
480 #define LEG_STRENGTH 8
484 #define F_ENDURANCE (1<<ENDURANCE)
485 #define F_PERCEPTION (1<<PERCEPTION)
486 #define F_INTELLIGENCE (1<<INTELLIGENCE)
487 #define F_WISDOM (1<<WISDOM)
488 #define F_WILL_POWER (1<<WILL_POWER)
489 #define F_CHARISMA (1<<CHARISMA)
490 #define F_MANA (1<<MANA)
492 #define F_ARM_STRENGTH (1<<ARM_STRENGTH)
493 #define F_LEG_STRENGTH (1<<LEG_STRENGTH)
494 #define F_DEXTERITY (1<<DEXTERITY)
495 #define F_AGILITY (1<<AGILITY)
499 #define REQUIRES_ANSWER -1
501 #define DIR_ERROR 0xFF
503 #define MAX_EQUIPMENT_SLOTS 13
505 #define HELMET_INDEX 0
506 #define AMULET_INDEX 1
507 #define CLOAK_INDEX 2
508 #define BODY_ARMOR_INDEX 3
510 #define RIGHT_WIELDED_INDEX 5
511 #define LEFT_WIELDED_INDEX 6
512 #define RIGHT_RING_INDEX 7
513 #define LEFT_RING_INDEX 8
514 #define RIGHT_GAUNTLET_INDEX 9
515 #define LEFT_GAUNTLET_INDEX 10
516 #define RIGHT_BOOT_INDEX 11
517 #define LEFT_BOOT_INDEX 12
519 #define WORLD_MAP 255
521 #define DEFAULT_TEAM 0xFF
523 /* Hard-coded teams */
524 #define PLAYER_TEAM (game::GetGlobalConst("PLAYER_TEAM"))
525 #define MONSTER_TEAM (game::GetGlobalConst("MONSTER_TEAM"))
526 #define ATTNAM_TEAM (game::GetGlobalConst("ATTNAM_TEAM"))
527 #define SUMO_TEAM (game::GetGlobalConst("SUMO_TEAM"))
528 #define VALPURUS_ANGEL_TEAM (game::GetGlobalConst("VALPURUS_ANGEL_TEAM"))
529 #define GC_SHOPKEEPER_TEAM (game::GetGlobalConst("GC_SHOPKEEPER_TEAM"))
530 #define IVAN_TEAM (game::GetGlobalConst("IVAN_TEAM"))
531 #define NEW_ATTNAM_TEAM (game::GetGlobalConst("NEW_ATTNAM_TEAM"))
532 #define COLONIST_TEAM (game::GetGlobalConst("COLONIST_TEAM"))
533 #define TOURIST_GUIDE_TEAM (game::GetGlobalConst("TOURIST_GUIDE_TEAM"))
534 #define TOURIST_TEAM (game::GetGlobalConst("TOURIST_TEAM"))
535 #define BETRAYED_TEAM (game::GetGlobalConst("BETRAYED_TEAM"))
536 #define MONDEDR_TEAM (game::GetGlobalConst("MONDEDR_TEAM"))
537 #define KHARAZ_ARAD_TEAM (game::GetGlobalConst("KHARAZ_ARAD_TEAM"))
538 #define FORESTMAN_TEAM (game::GetGlobalConst("FORESTMAN_TEAM"))
539 #define SOLICITUS_TEAM (game::GetGlobalConst("SOLICITUS_TEAM"))
540 #define MORBE_TEAM (game::GetGlobalConst("MORBE_TEAM"))
541 #define XINROCH_TOMB_ENTRY_TEAM (game::GetGlobalConst("XINROCH_TOMB_ENTRY_TEAM"))
542 #define XINROCH_TOMB_NECRO_TEAM (game::GetGlobalConst("XINROCH_TOMB_NECRO_TEAM"))
543 #define XINROCH_TOMB_KAMIKAZE_DWARF_TEAM (game::GetGlobalConst("XINROCH_TOMB_KAMIKAZE_DWARF_TEAM"))
544 #define PRISONER_TEAM (game::GetGlobalConst("PRISONER_TEAM"))
545 //#define NO_TEAM 0xFFFF
546 #define NO_TEAM (game::GetGlobalConst("NO_TEAM"))
549 #define NO_PIC_UPDATE 2
550 #define NO_EQUIPMENT_PIC_UPDATE (NO_PIC_UPDATE<<1)
551 #define NO_MATERIALS 8
552 #define NO_EQUIPMENT 16
553 #define NO_SIGNALS 32
555 #define NOT_WALKABLE (game::GetGlobalConst("NOT_WALKABLE"))
556 #define HAS_CHARACTER (game::GetGlobalConst("HAS_CHARACTER"))
557 #define IN_ROOM (game::GetGlobalConst("IN_ROOM"))
558 #define NOT_IN_ROOM (game::GetGlobalConst("NOT_IN_ROOM"))
559 #define ATTACHABLE (game::GetGlobalConst("ATTACHABLE")) /* overrides IN_ROOM */
560 #define HAS_NO_OTERRAIN (game::GetGlobalConst("HAS_NO_OTERRAIN"))
562 #define DEFAULT_ATTACHED_AREA 0xFE
563 #define DEFAULT_ATTACHED_ENTRY 0xFE
566 #define RANDOM (game::GetGlobalConst("RANDOM"))
567 #define ELPURI_CAVE (game::GetGlobalConst("ELPURI_CAVE"))
568 #define ATTNAM (game::GetGlobalConst("ATTNAM"))
569 #define NEW_ATTNAM (game::GetGlobalConst("NEW_ATTNAM"))
570 #define UNDER_WATER_TUNNEL (game::GetGlobalConst("UNDER_WATER_TUNNEL"))
571 #define MONDEDR (game::GetGlobalConst("MONDEDR"))
572 #define MUNTUO (game::GetGlobalConst("MUNTUO"))
573 #define DRAGON_TOWER (game::GetGlobalConst("DRAGON_TOWER"))
574 #define DARK_FOREST (game::GetGlobalConst("DARK_FOREST"))
575 #define XINROCH_TOMB (game::GetGlobalConst("XINROCH_TOMB"))
577 #define ALIEN_VESSEL (game::GetGlobalConst("ALIEN_VESSEL"))
579 #define KHARAZ_ARAD_SHOP (game::GetGlobalConst("KHARAZ_ARAD_SHOP"))
580 #define UNDER_WATER_TUNNEL_EXIT (game::GetGlobalConst("UNDER_WATER_TUNNEL_EXIT"))
582 //#define VESANA_LEVEL (game::GetGlobalConst("VESANA_LEVEL"))
583 //#define CRYSTAL_LEVEL (game::GetGlobalConst("CRYSTAL_LEVEL"))
584 //#define SPIDER_LEVEL (game::GetGlobalConst("SPIDER_LEVEL"))
585 //#define ENNER_BEAST_LEVEL (game::GetGlobalConst("ENNER_BEAST_LEVEL"))
586 #define ZOMBIE_LEVEL (game::GetGlobalConst("ZOMBIE_LEVEL"))
587 //#define IVAN_LEVEL (game::GetGlobalConst("IVAN_LEVEL"))
588 #define DARK_LEVEL (game::GetGlobalConst("DARK_LEVEL"))
589 #define OREE_LAIR (game::GetGlobalConst("OREE_LAIR"))
592 //#define ALIENQUEEN_LEVEL (game::GetGlobalConst("ALIENQUEEN_LEVEL"))
594 //#define DUAL_ENNER_BEAST_LEVEL (game::GetGlobalConst("DUAL_ENNER_BEAST_LEVEL"))
595 //#define NECRO_CHAMBER_LEVEL (game::GetGlobalConst("NECRO_CHAMBER_LEVEL"))
597 /* stack::DrawContents flags */
599 #define NO_SELECT 1 // only show items
600 #define NO_MULTI_SELECT 2 // select only one item
601 #define NO_SPECIAL_INFO 4 // show only name and amount
602 #define REMEMBER_SELECTED 8 // if DrawContents will be called multiple times, remember the selected item
603 #define NONE_AS_CHOICE 16 // "none" is a choice, for instance when wielding
604 #define SELECT_PAIR 32 // if NO_MULTI_SELECT is on, selects a pair if appropriate
605 #define SKIP_FIRST_IF_NO_OLD 64 // skip first list item if `hiitem` in `stack::DrawContents()` is non-empty
606 #define SELECT_MOST_RECENT 128 // select most recent picked item in `stack::DrawContents()` (with timeout)
608 #define RECTANGLE (game::GetGlobalConst("RECTANGLE"))
609 #define ROUND_CORNERS (game::GetGlobalConst("ROUND_CORNERS"))
610 #define MAZE_ROOM (game::GetGlobalConst("MAZE_ROOM"))
612 /* Gods, 0 == none */
615 #define GODS (game::GetGlobalConst("LAST_REAL_GOD"))
617 #define VALPURUS (game::GetGlobalConst("VALPURUS"))
618 #define LEGIFER (game::GetGlobalConst("LEGIFER"))
619 #define ATAVUS (game::GetGlobalConst("ATAVUS"))
620 #define DULCIS (game::GetGlobalConst("DULCIS"))
621 #define SEGES (game::GetGlobalConst("SEGES"))
622 #define SOPHOS (game::GetGlobalConst("SOPHOS"))
623 #define TERRA (game::GetGlobalConst("TERRA"))
624 #define SILVA (game::GetGlobalConst("SILVA"))
625 #define LORICATUS (game::GetGlobalConst("LORICATUS"))
626 #define MELLIS (game::GetGlobalConst("MELLIS"))
627 #define CLEPTIA (game::GetGlobalConst("CLEPTIA"))
628 #define NEFAS (game::GetGlobalConst("NEFAS"))
629 #define SCABIES (game::GetGlobalConst("SCABIES"))
630 #define INFUSCOR (game::GetGlobalConst("INFUSCOR"))
631 #define CRUENTUS (game::GetGlobalConst("CRUENTUS"))
632 #define MORTIFER (game::GetGlobalConst("MORTIFER"))
633 #define ATHEIST (game::GetGlobalConst("ATHEIST"))
634 #define SOLICITU (game::GetGlobalConst("SOLICITU"))
636 #define MAX_PRICE (2147483647)
638 #define PERMANENT 0xFFFF
644 #define BEAM_EFFECTS 13
646 #define BEAM_POLYMORPH (game::GetGlobalConst("BEAM_POLYMORPH"))
647 #define BEAM_STRIKE (game::GetGlobalConst("BEAM_STRIKE"))
648 #define BEAM_FIRE_BALL (game::GetGlobalConst("BEAM_FIRE_BALL"))
649 #define BEAM_TELEPORT (game::GetGlobalConst("BEAM_TELEPORT"))
650 #define BEAM_HASTE (game::GetGlobalConst("BEAM_HASTE"))
651 #define BEAM_SLOW (game::GetGlobalConst("BEAM_SLOW"))
652 #define BEAM_RESURRECT (game::GetGlobalConst("BEAM_RESURRECT"))
653 #define BEAM_INVISIBILITY (game::GetGlobalConst("BEAM_INVISIBILITY"))
654 #define BEAM_DUPLICATE (game::GetGlobalConst("BEAM_DUPLICATE"))
655 #define BEAM_LIGHTNING (game::GetGlobalConst("BEAM_LIGHTNING"))
656 #define BEAM_DOOR_CREATION (game::GetGlobalConst("BEAM_DOOR_CREATION"))
657 #define BEAM_ACID_RAIN (game::GetGlobalConst("BEAM_ACID_RAIN"))
658 #define BEAM_NECROMANCY (game::GetGlobalConst("BEAM_NECROMANCY"))
660 // WARNING! sync with "define.dat"
661 #define BEAM_STYLES 3
663 #define PARTICLE_BEAM (game::GetGlobalConst("PARTICLE_BEAM"))
664 #define LIGHTNING_BEAM (game::GetGlobalConst("LIGHTNING_BEAM"))
665 #define SHIELD_BEAM (game::GetGlobalConst("SHIELD_BEAM"))
668 #define RANDOM_COLOR 0x10000
670 /* Entry indices, not actual config defines */
672 //#define STAIRS_UP 100
673 //#define STAIRS_DOWN 200
674 //#define WAYPOINT_DEEPER 1100
675 //#define WAYPOINT_SHALLOWER 1200
676 //#define FOUNTAIN 0xFFFF // in confdef.h
678 #define NO_LIMIT 0xFFFF
680 #define ALL_ITEMS 0xFFFF
682 /* StateData flags */
686 #define DUR_TEMPORARY 2
687 #define DUR_PERMANENT 4
688 #define DUR_FLAGS (2|4)
689 #define SRC_FOUNTAIN 8
690 #define SRC_MUSHROOM 16
691 #define SRC_MAGIC_MUSHROOM 32
692 #define SRC_CONFUSE_READ 64
695 #define SRC_FLAGS (8|16|32|64|128|256)
696 #define RANDOMIZABLE (DUR_FLAGS|SRC_FLAGS)
699 #define SHOW_MAP_IN_TRUE_LIGHT 1
700 #define SHOW_MAP_IN_UNIFORM_LIGHT 2
702 #define DIM_LUMINANCE 0x6E6E6E
710 #define CANNIBALIZED 4
711 #define SQUARE_POSITION_BITS (16|32|64)
712 #define SQUARE_POSITION_SHIFT 4
717 #define BADLY_HURT 256
719 #define BODYPART_SPARKLE_SHIFT 9
722 #define IGNORE_BROKEN_PRICE 2
724 #define MAX_SQUARES_UNDER 16
725 #define MAX_NEIGHBOUR_SQUARES 20
727 #define N_LOCK_ID (game::GetGlobalConst("N_LOCK_ID"))
728 #define S_LOCK_ID (game::GetGlobalConst("S_LOCK_ID"))
729 #define LOCK_DELTA (game::GetGlobalConst("LOCK_DELTA"))
731 #define LOCK_BITS 0xFC00
733 #define BROKEN_LOCK (game::GetGlobalConst("BROKEN_LOCK"))
735 /* Normal lock types, which can be randomized */
737 #define ROUND_LOCK (game::GetGlobalConst("ROUND_LOCK"))
738 #define SQUARE_LOCK (game::GetGlobalConst("SQUARE_LOCK"))
739 #define TRIANGULAR_LOCK (game::GetGlobalConst("TRIANGULAR_LOCK"))
741 /* Special lock types, which must be generated in the script */
743 #define HEXAGONAL_LOCK (game::GetGlobalConst("HEXAGONAL_LOCK"))
744 #define OCTAGONAL_LOCK (game::GetGlobalConst("OCTAGONAL_LOCK"))
745 #define HEART_SHAPED_LOCK (game::GetGlobalConst("HEART_SHAPED_LOCK"))
746 #define PENTAGONAL_LOCK (game::GetGlobalConst("PENTAGONAL_LOCK"))
748 #define DESERT (game::GetGlobalConst("DESERT"))
749 #define JUNGLE (game::GetGlobalConst("JUNGLE"))
750 #define STEPPE (game::GetGlobalConst("STEPPE"))
751 #define LEAFY_FOREST (game::GetGlobalConst("LEAFY_FOREST"))
752 #define EVERGREEN_FOREST (game::GetGlobalConst("EVERGREEN_FOREST"))
753 #define TUNDRA (game::GetGlobalConst("TUNDRA"))
754 #define GLACIER (game::GetGlobalConst("GLACIER"))
756 #define NO_MOVE (game::GetGlobalConst("NO_MOVE"))
757 #define WALK (game::GetGlobalConst("WALK"))
758 #define SWIM (game::GetGlobalConst("SWIM"))
759 #define FLY (game::GetGlobalConst("FLY"))
760 #define ETHEREAL (game::GetGlobalConst("ETHEREAL"))
761 #define ANY_MOVE (game::GetGlobalConst("ANY_MOVE"))
763 #define KEY_UP_INDEX 1
764 #define KEY_LEFT_INDEX 3
765 #define KEY_RIGHT_INDEX 4
766 #define KEY_DOWN_INDEX 6
773 #define CHARACTER_SLOT 2
776 #define NOT_RUSTED (game::GetGlobalConst("NOT_RUSTED"))
777 #define SLIGHTLY_RUSTED (game::GetGlobalConst("SLIGHTLY_RUSTED"))
778 #define RUSTED (game::GetGlobalConst("RUSTED"))
779 #define VERY_RUSTED (game::GetGlobalConst("VERY_RUSTED"))
781 #define HUMAN_BODY_ARMOR_PIXELS 68
783 #define ARMOR_OUTLINE_PRIORITY ((7<<4)+7)
784 #define CLOAK_PRIORITY ((8<<4)+7)
786 #define BODY_ARMOR_PARTS 6
788 #define SUMO_ROOM_POS v2(25, 35)
789 #define SUMO_ARENA_POS v2(19, 12)
791 #define MAX_RAIN_DROPS 32
795 #define DISQUALIFIED 2
797 #define EMITTER_IDENTIFIER_BITS 0xFFFF
798 #define EMITTER_SQUARE_PART_BITS 0xF000000
799 #define EMITTER_SHADOW_BITS 0xF0000000
800 #define EMITTER_SQUARE_PART_SHIFT 24
801 #define EMITTER_SHADOW_SHIFT 28
803 #define RE_SUN_EMITATED 0x200000
804 #define ID_X_COORDINATE 0x400000
805 #define ID_BEGIN 0x800000
807 #define FORCE_ADD 0x400000
808 #define SECONDARY_SUN_LIGHT 0x800000
810 /* square & lsquare flags */
812 #define ALLOW_EMITATION_CONTINUE 1
813 #define FREEZED 2 /* also a stack flag */
815 #define NEW_DRAW_REQUEST 8
816 #define STRONG_BIT 16
817 #define STRONG_NEW_DRAW_REQUEST (NEW_DRAW_REQUEST|STRONG_BIT)
818 #define DESCRIPTION_CHANGE 32
819 #define MEMORIZED_UPDATE_REQUEST 128
820 #define IN_SQUARE_STACK 256
821 #define CHECK_SUN_LIGHT_NEEDED 512
822 #define IS_TRANSPARENT 1024
823 #define PERFECTLY_QUADRI_HANDLED 2048
825 /* Slows down protosystem::BalancedCreateItem() but makes it produce more
828 #define BALANCED_CREATE_ITEM_ITERATIONS 100
830 #define CONFIG_TABLE_SIZE 256
832 #define SPARKLE_POS_X_ERROR 128
838 #define TORSO_MAIN_COLOR 16
839 #define BELT_COLOR 32
840 #define BOOT_COLOR 64
841 #define TORSO_SPECIAL_COLOR 128
842 #define ARM_MAIN_COLOR 256
843 #define GAUNTLET_COLOR 512
844 #define ARM_SPECIAL_COLOR 1024
845 #define LEG_MAIN_COLOR 2048
846 #define LEG_SPECIAL_COLOR 4096
847 #define CLOTH_COLOR (CAP_COLOR\
853 /* contentscript<character> flags */
855 #define IS_LEADER (game::GetGlobalConst("IS_LEADER"))
856 #define IS_MASTER (game::GetGlobalConst("IS_MASTER"))
860 /* If set, all items are always considered visible, so CanBeSeenBy calls
865 /* All costly updates (like emitation's) are avoided if this is set.
866 Allows much faster removing and adding items, but make sure the stack is
867 returned to the original state (excluding item order) before switching
868 this off. Note: also an lsquare flag */
872 /* End stack Flags */
874 #define SUN_BEAM_DIRECTIONS 48
876 /* Square part flags */
878 #define SP_TOP_LEFT 1
879 #define SP_TOP_RIGHT 2
880 #define SP_BOTTOM_LEFT 4
881 #define SP_BOTTOM_RIGHT 8
882 #define SP_TOP (SP_TOP_LEFT|SP_TOP_RIGHT)
883 #define SP_LEFT (SP_TOP_LEFT|SP_BOTTOM_LEFT)
884 #define SP_RIGHT (SP_TOP_RIGHT|SP_BOTTOM_RIGHT)
885 #define SP_BOTTOM (SP_BOTTOM_LEFT|SP_BOTTOM_RIGHT)
887 #define CONDITION_COLORS 5
889 #define NATURAL_MATERIAL_FORM 0x7FFF
891 #define EXP_DIVISOR 2e-8
892 #define EXP_MULTIPLIER 5e+7
894 #define MAX_EXP 5e+10
896 #define HAS_BEEN_GENERATED 1
897 #define HAS_BEEN_SEEN 2
899 #define DEPENDS_ON_ATTRIBUTES 0xFFFF
901 /* Tiredness states */
907 #define DEFAULT_GENERATION_DANGER 0.05
908 #define ANGEL_GENERATION_DANGER 0.10
910 /* Duplication flags */
912 #define MIRROR_IMAGE 1
913 #define IGNORE_PROHIBITIONS 2
914 #define CHANGE_TEAM 4
915 #define LE_BASE_SHIFT 3
916 #define LE_BASE_RANGE 0x7FFF
917 #define LE_RAND_SHIFT 18
918 #define LE_RAND_RANGE 0x3FFF
922 #define IN_DND_MODE 1
923 #define TERMINATING 2
927 #define HAS_BODY_ARMOR_PICTURES 1
928 #define FLUID_INSIDE 2
930 #define COMMAND_FLAGS 4
931 #define ALL_COMMAND_FLAGS (1|2|4|8)
933 #define FOLLOW_LEADER 1
934 #define FLEE_FROM_ENEMIES 2
935 #define DONT_CHANGE_EQUIPMENT 4
936 #define DONT_CONSUME_ANYTHING_VALUABLE 8
938 #define CHAT_MENU_ENTRIES 5
939 #define ALL_MANAGEMENT_FLAGS (1|2|4|8|16)
941 #define CHANGE_EQUIPMENT 1
944 #define ISSUE_COMMANDS 8
947 #define NO_PARAMETERS 0xFF
949 #define CURSOR_TYPES 4
951 #define DARK_CURSOR 0
953 #define BLUE_CURSOR 2
954 #define YELLOW_CURSOR 3
955 #define CURSOR_FLASH 0x2000
956 #define CURSOR_TARGET 0x4000
957 #define CURSOR_BIG 0x8000
958 #define CURSOR_FLAGS (CURSOR_BIG|CURSOR_FLASH|CURSOR_TARGET)
960 #define GRAY_FRACTAL 0
961 #define RED_FRACTAL 1
962 #define GREEN_FRACTAL 2
963 #define BLUE_FRACTAL 3
964 #define YELLOW_FRACTAL 4
966 #define DAMAGE_TYPES 3
972 #define SILHOUETTE_TYPES 2
974 #define SILHOUETTE_NORMAL 0
975 #define SILHOUETTE_INTER_LACED 1
978 #define HAS_CAUSED_PANIC 2
980 /* MaxHP calculation flags */
982 #define MAY_CHANGE_HPS 1
983 #define CHECK_USABILITY 2
985 #define ITEM_TRAP 0x8000
986 #define FLUID_TRAP 0x10000
991 #define FORCE_DEATH 2
992 #define DISALLOW_CORPSE 4
993 #define DISALLOW_MSG 8
994 #define IGNORE_UNCONSCIOUSNESS 16
995 #define IGNORE_TRAPS 32
996 #define FORBID_REINCARNATION 64
998 /* character flags */
1001 #define C_INITIALIZING 8
1002 #define C_POLYMORPHED 16
1003 #define C_IN_NO_MSG_MODE 32
1004 #define C_PICTURE_UPDATES_FORBIDDEN 64
1006 /*************************/
1007 /* Common DataBase flags */
1008 /*************************/
1011 #define IS_ABSTRACT (game::GetGlobalConst("IS_ABSTRACT"))
1012 #define HAS_SECONDARY_MATERIAL (game::GetGlobalConst("HAS_SECONDARY_MATERIAL"))
1013 #define CREATE_DIVINE_CONFIGURATIONS (game::GetGlobalConst("CREATE_DIVINE_CONFIGURATIONS"))
1014 #define CAN_BE_WISHED (game::GetGlobalConst("CAN_BE_WISHED"))
1015 #define CAN_BE_DESTROYED (game::GetGlobalConst("CAN_BE_DESTROYED"))
1016 #define IS_VALUABLE (game::GetGlobalConst("IS_VALUABLE"))
1017 #define CAN_BE_MIRRORED (game::GetGlobalConst("CAN_BE_MIRRORED"))
1020 #define USE_AN (game::GetGlobalConst("USE_AN"))
1021 #define USE_ADJECTIVE_AN (game::GetGlobalConst("USE_ADJECTIVE_AN"))
1022 #define NO_ARTICLE (game::GetGlobalConst("NO_ARTICLE")) /* for instance "Petrus's wive number 4" */
1023 #define FORCE_THE (game::GetGlobalConst("FORCE_THE"))
1024 #define SHOW_MATERIAL (game::GetGlobalConst("SHOW_MATERIAL")) /* only works for terrains */
1026 /* Spatial Flags (unused for now) */
1027 #define MF_OBJECT 256
1028 #define MF_FLOOR 512
1029 #define MF_CEIL 1024
1030 #define MF_WALL 2048
1031 #define MF_ONFLOOR 4096
1032 #define MF_LOWWALL 8192
1033 #define MF_TABLE 16384
1034 #define MF_WINDOW 128
1038 /****************************/
1039 /* Character DataBase flags */
1040 /****************************/
1050 #define SPILLS_BLOOD
1052 #define USES_NUTRITION
1053 #define ALWAYS_USE_MATERIAL_ATTRIBUTES
1055 #define IS_EXTRA_FRAGILE
1062 #define CAN_USE_EQUIPMENT
1073 /* CopyrightFlags */
1076 #define CAN_BE_GENERATED
1077 #define CAN_BE_NAMED
1082 #define BODY_PARTS_DISAPPEAR_WHEN_SEVERED
1083 #define DESTROYS_WALLS
1084 #define BITE_CAPTURES_BODY_PART
1089 #define IMMUNITY_POLYMORPH
1090 #define IMMUNITY_CHARM
1091 #define IMMUNITY_CLONING
1092 #define IMMUNITY_CONFUSE
1093 #define IMMUNITY_LEPROSY
1094 #define IMMUNITY_ITEM_TELEPORT
1095 #define IMMUNITY_STICKINESS
1096 #define IMMUNITY_CHOKING
1097 #define IMMUNITY_UNCONSCIOUSNESS
1101 #define CREATE_GOLEM_MATERIAL_CONFIGURATIONS 2
1102 #define IGNORE_DANGER 4
1103 #define AUTOMATICALLY_SEEN 8
1104 #define WILL_CARRY_ITEMS 16
1105 #define IS_EXTRA_COWARD 32
1107 /***********************/
1108 /* Item DataBase flags */
1109 /***********************/
1113 /* AttributeAffectFlags */
1115 /* GenerationFlags*/
1116 #define CREATE_LOCK_CONFIGURATIONS 2
1117 #define CAN_BE_AUTO_INITIALIZED 4 /* used only in WMode */
1118 #define CAN_BE_GENERATED_IN_CONTAINER 8
1119 #define CAN_BE_SPAWNED_BY_POLYMORPH 16
1121 /* InteractionFlags */
1123 #define MATERIAL_CAN_BE_CHANGED
1124 #define CAN_BE_POLYMORPHED
1125 #define CAN_BE_CLONED
1126 #define CAN_BE_ENCHANTED
1127 #define CAN_BE_BROKEN
1128 #define AFFECTS_CARRYING_CAPACITY
1133 #define IS_QUEST_ITEM
1134 #define CAN_BE_USED_BY_SMITH
1135 #define IS_KAMIKAZE_WEAPON
1136 #define IS_TWO_HANDED
1137 #define IS_GOOD_WITH_PLANTS
1142 #define HANDLE_IN_PAIRS
1143 #define PRICE_IS_PROPORTIONAL_TO_ENCHANTMENT
1144 #define FLEXIBILITY_IS_ESSENTIAL
1145 #define HAS_NORMAL_PICTURE_DIRECTION
1146 #define CAN_BE_PILED
1147 #define CAN_BE_PICKED_UP
1151 /**************************/
1152 /* Terrain DataBase flags */
1153 /**************************/
1158 /* OLTerrainFlags */
1159 #define CREATE_LOCK_CONFIGURATIONS 2
1160 #define CREATE_WINDOW_CONFIGURATIONS 4
1164 #define USE_BORDER_TILES
1165 #define IS_ALWAYS_TRANSPARENT
1166 #define SHOW_THINGS_UNDER
1167 #define IS_SAFE_TO_CREATE_DOOR
1170 /***************************/
1171 /* Material DataBase flags */
1172 /***************************/
1175 /* NameFlags (only USE_AN) */
1178 #define IS_METAL (game::GetGlobalConst("IS_METAL"))
1179 #define IS_BLOOD (game::GetGlobalConst("IS_BLOOD"))
1180 #define CAN_BE_TAILORED (game::GetGlobalConst("CAN_BE_TAILORED"))
1181 #define IS_SPARKLING (game::GetGlobalConst("IS_SPARKLING"))
1182 #define IS_SCARY (game::GetGlobalConst("IS_SCARY"))
1183 #define IS_GOLEM_MATERIAL (game::GetGlobalConst("IS_GOLEM_MATERIAL"))
1184 #define IS_BEVERAGE (game::GetGlobalConst("IS_BEVERAGE"))
1187 #define IS_ALIVE (game::GetGlobalConst("IS_ALIVE"))
1188 #define IS_WARM (game::GetGlobalConst("IS_WARM"))
1189 #define CAN_HAVE_PARASITE (game::GetGlobalConst("CAN_HAVE_PARASITE"))
1190 #define USE_MATERIAL_ATTRIBUTES (game::GetGlobalConst("USE_MATERIAL_ATTRIBUTES"))
1191 #define CAN_REGENERATE (game::GetGlobalConst("CAN_REGENERATE"))
1192 #define IS_WARM_BLOODED (game::GetGlobalConst("IS_WARM_BLOODED"))
1194 /* InteractionFlags */
1195 #define CAN_BURN (game::GetGlobalConst("CAN_BURN"))
1196 #define CAN_EXPLODE (game::GetGlobalConst("CAN_EXPLODE"))
1197 #define CAN_DISSOLVE (game::GetGlobalConst("CAN_DISSOLVE"))
1198 #define AFFECT_INSIDE (game::GetGlobalConst("AFFECT_INSIDE"))
1199 #define EFFECT_IS_GOOD (game::GetGlobalConst("EFFECT_IS_GOOD"))
1200 #define IS_AFFECTED_BY_MUSTARD_GAS (game::GetGlobalConst("IS_AFFECTED_BY_MUSTARD_GAS"))
1202 /*************************/
1203 /* End of DataBase flags */
1204 /*************************/
1206 #define TILE_SIZE 16
1207 cv2
TILE_V2(TILE_SIZE
, TILE_SIZE
);
1209 #define SQUARE_INDEX_MASK 0xFFFF
1210 #define ALLOW_ANIMATE 0x10000
1211 #define ALLOW_ALPHA 0x20000
1215 #define TALENT_STRONG 0
1216 #define TALENT_FAST_N_ACCURATE 1
1217 #define TALENT_HEALTHY 2
1218 #define TALENT_CLEVER 3
1220 #define BORDER_PARTNER_ANIMATED (16<<24)
1224 #define NO_MONSTER_GENERATION 1
1226 #define NO_TAMING -1
1228 #define SADIST_HIT 1
1230 #define EQUIPMENT_DATAS 13
1232 #define SPECIAL_CONFIGURATION_GENERATION_LEVELS 2