version 1.67 | | version 1.68 |
---|
| | |
/* | | /* |
* static char *rcsid_define_h = | | * static char *rcsid_define_h = |
* "$Id: define.h,v 1.67 2003/09/04 06:25:32 temitchell Exp $"; | | * "$Id: define.h,v 1.68 2003/09/13 05:01:33 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
Copyright (C) 2002 Mark Wedel & Crossfire Development Team | | Copyright (C) 2003 Mark Wedel & Crossfire Development Team |
Copyright (C) 1992 Frank Tore Johansen | | Copyright (C) 1992 Frank Tore Johansen |
| | |
This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify |
| | |
The authors can be reached via e-mail at crossfire-devel@real-time.com | | The authors can be reached via e-mail at crossfire-devel@real-time.com |
*/ | | */ |
| | |
| | /* This file is best viewed with a window width of about 100 character */ |
| | |
/* This file is really too large. With all the .h files | | /* This file is really too large. With all the .h files |
* around, this file should be better split between them - things | | * around, this file should be better split between them - things |
* that deal with objects should be in objects.h, things dealing | | * that deal with objects should be in objects.h, things dealing |
| | |
#define MAX(x,y) ((x)>(y)?(x):(y)) | | #define MAX(x,y) ((x)>(y)?(x):(y)) |
#endif | | #endif |
| | |
| | /* MAX3 is basically like MAX, but instead does 3 values. */ |
| | #ifndef MAX3 |
| | #define MAX3(x,y, z) (MAX(x, MAX(y,z))) |
| | #endif |
| | |
| | /* MIN3 is basically like MIN, but instead does 3 values. */ |
| | #ifndef MIN3 |
| | #define MIN3(x,y, z) (MIN(x, MIN(y,z))) |
| | #endif |
| | |
#define MAX_STAT 30 /* The maximum legal value of any stat */ | | #define MAX_STAT 30 /* The maximum legal value of any stat */ |
#define MIN_STAT 1 /* The minimum legal value of any stat */ | | #define MIN_STAT 1 /* The minimum legal value of any stat */ |
| | |
| | |
/* type 0 will be undefined and shows a non valid type information */ | | /* type 0 will be undefined and shows a non valid type information */ |
| | |
#define PLAYER 1 | | #define PLAYER 1 |
#define BULLET 2 | | /*#define BULLET 2 */ |
#define ROD 3 | | #define ROD 3 |
#define TREASURE 4 | | #define TREASURE 4 |
#define POTION 5 | | #define POTION 5 |
| | |
#define POISON 7 | | #define POISON 7 |
#define BOOK 8 | | #define BOOK 8 |
#define CLOCK 9 | | #define CLOCK 9 |
#define FBULLET 10 | | /*#define FBULLET 10 */ |
#define FBALL 11 | | /*#define FBALL 11 */ |
#define LIGHTNING 12 | | #define LIGHTNING 12 |
#define ARROW 13 | | #define ARROW 13 |
#define BOW 14 | | #define BOW 14 |
| | |
#define MAP 22 | | #define MAP 22 |
#define DOOR 23 | | #define DOOR 23 |
#define KEY 24 | | #define KEY 24 |
#define MMISSILE 25 | | /*#define MMISSILE 25 */ |
#define TIMED_GATE 26 | | #define TIMED_GATE 26 |
#define TRIGGER 27 | | #define TRIGGER 27 |
#define GRIMREAPER 28 | | #define GRIMREAPER 28 |
| | |
#define PLAYERMOVER 40 | | #define PLAYERMOVER 40 |
#define TELEPORTER 41 | | #define TELEPORTER 41 |
#define CREATOR 42 | | #define CREATOR 42 |
#define SKILL 43 /* Skills are similar to abilites, but | | #define SKILL 43 /* also see SKILL_TOOL (74) below */ |
* not related to spells. by njw@cs.city.ac.u */ | | #define EXPERIENCE 44 /* This is basically obsolete now. It used to contain */ |
#define EXPERIENCE 44 /* An experience 'object'. Needed for multi-exp/skills | | /* experience for broad skill categories. This value */ |
* hack. -b.t. thomas@astro.psu.edu */ | | /* is now automatically converteed at load time. */ |
#define EARTHWALL 45 | | #define EARTHWALL 45 |
#define GOLEM 46 | | #define GOLEM 46 |
#define BOMB 47 | | /*#define BOMB 47 */ |
#define THROWN_OBJ 48 | | #define THROWN_OBJ 48 |
#define BLINDNESS 49 | | #define BLINDNESS 49 |
#define GOD 50 | | #define GOD 50 |
| | |
/* peterm: detector is an object which notices the presense of | | #define DETECTOR 51 /* peterm: detector is an object */ |
another object and is triggered like buttons. */ | | /* which notices the presense of */ |
#define DETECTOR 51 | | /* another object and is triggered */ |
#define SPEEDBALL 52 | | /* like buttons. */ |
| | /*#define SPEEDBALL 52*/ |
#define DEAD_OBJECT 53 | | #define DEAD_OBJECT 53 |
#define DRINK 54 | | #define DRINK 54 |
#define MARKER 55 /* inserts an invisible, weightless | | #define MARKER 55 /* inserts an invisible, weightless */ |
force into a player with a specified string. */ | | /* force into a player with a specified string. */ |
#define HOLY_ALTAR 56 | | #define HOLY_ALTAR 56 |
#define PLAYER_CHANGER 57 | | #define PLAYER_CHANGER 57 |
#define BATTLEGROUND 58 /* battleground, by Andreas Vogl */ | | #define BATTLEGROUND 58 /* battleground, by Andreas Vogl */ |
| | |
#define PEACEMAKER 59 /* Object owned by a player which can convert | | #define PEACEMAKER 59 /* Object owned by a player which can convert */ |
a monster into a peaceful being incapable of attack. */ | | /* a monster into a peaceful being incapable of attack. */ |
#define GEM 60 | | #define GEM 60 |
#define FIRECHEST 61 | | /*#define FIRECHEST 61*/ /* FIRECHEST folded into FIREWALL */ |
#define FIREWALL 62 | | #define FIREWALL 62 |
#define ANVIL 63 | | #define ANVIL 63 |
#define CHECK_INV 64 /* by b.t. thomas@nomad.astro.psu.edu */ | | #define CHECK_INV 64 /* by b.t. thomas@nomad.astro.psu.edu */ |
| | |
#define SHOP_FLOOR 68 | | #define SHOP_FLOOR 68 |
#define SHOP_MAT 69 | | #define SHOP_MAT 69 |
#define RING 70 | | #define RING 70 |
| | |
#define FLOOR 71 /* this is a floor tile -> native layer 0 */ | | #define FLOOR 71 /* this is a floor tile -> native layer 0 */ |
| | |
#define FLESH 72 /* animal 'body parts' -b.t. */ | | #define FLESH 72 /* animal 'body parts' -b.t. */ |
#define INORGANIC 73 /* metals and minerals */ | | #define INORGANIC 73 /* metals and minerals */ |
| | #define SKILL_TOOL 74 /* Allows the use of a skill */ |
#define LIGHTER 75 | | #define LIGHTER 75 |
| | |
/* The trap_part, wall, light_source, misc_object, monster, and spawn_generator | | /* The trap_part, wall, light_source, misc_object, monster, and spawn_generator |
| | |
#define SPELLBOOK 85 | | #define SPELLBOOK 85 |
#define BUILDFAC 86 /* facilities for building objects */ | | #define BUILDFAC 86 /* facilities for building objects */ |
#define CLOAK 87 | | #define CLOAK 87 |
#define CONE 88 | | /*#define CONE 88 */ |
#define AURA 89 /* aura spell object */ | | /*#define AURA 89 *//* aura spell object */ |
| | |
#define SPINNER 90 | | #define SPINNER 90 |
#define GATE 91 | | #define GATE 91 |
| | |
#define CF_HANDLE 93 | | #define CF_HANDLE 93 |
#define HOLE 94 | | #define HOLE 94 |
#define TRAPDOOR 95 | | #define TRAPDOOR 95 |
#define WORD_OF_RECALL 96 | | /*#define WORD_OF_RECALL 96 */ |
#define PARAIMAGE 97 | | /*#define PARAIMAGE 97 */ |
#define SIGN 98 | | #define SIGN 98 |
#define BOOTS 99 | | #define BOOTS 99 |
#define GLOVES 100 | | #define GLOVES 100 |
| | #define SPELL 101 |
| | #define SPELL_EFFECT 102 |
#define CONVERTER 103 | | #define CONVERTER 103 |
#define BRACERS 104 | | #define BRACERS 104 |
#define POISONING 105 | | #define POISONING 105 |
| | |
#define POISONCLOUD 107 | | #define POISONCLOUD 107 |
#define FIREHOLES 108 | | #define FIREHOLES 108 |
#define WAND 109 | | #define WAND 109 |
#define ABILITY 110 | | /*#define ABILITY 110*/ |
#define SCROLL 111 | | #define SCROLL 111 |
#define DIRECTOR 112 | | #define DIRECTOR 112 |
#define GIRDLE 113 | | #define GIRDLE 113 |
#define FORCE 114 | | #define FORCE 114 |
#define POTION_EFFECT 115 /* a force, holding the effect of a potion */ | | #define POTION_EFFECT 115 /* a force, holding the effect of a potion */ |
| | |
#define CLOSE_CON 121 /* Eneq(@csd.uu.se): Id for close_container archetype. */ | | #define CLOSE_CON 121 /* Eneq(@csd.uu.se): Id for close_container archetype. */ |
#define CONTAINER 122 | | #define CONTAINER 122 |
#define ARMOUR_IMPROVER 123 | | #define ARMOUR_IMPROVER 123 |
| | |
#define SKILLSCROLL 130 /* can add a skill to player's inventory -bt.*/ | | #define SKILLSCROLL 130 /* can add a skill to player's inventory -bt.*/ |
#define DEEP_SWAMP 138 | | #define DEEP_SWAMP 138 |
#define IDENTIFY_ALTAR 139 | | #define IDENTIFY_ALTAR 139 |
#define CANCELLATION 141 | | /*#define CANCELLATION 141*/ /* not used with new spell code */ |
#define MENU 150 /* Mark Wedel (mark@pyramid.com) Shop inventories */ | | #define MENU 150 /* Mark Wedel (mark@pyramid.com) Shop inventories */ |
#define BALL_LIGHTNING 151 /* peterm: ball lightning and color spray */ | | /*#define BALL_LIGHTNING 151 */ /* peterm: ball lightning and color spray */ |
#define SWARM_SPELL 153 | | /*#define SWARM_SPELL 153*/ |
#define RUNE 154 | | #define RUNE 154 |
#define TRAP 155 | | #define TRAP 155 |
| | |
| | |
#define SIZEOFFREE2 24 | | #define SIZEOFFREE2 24 |
#define SIZEOFFREE 49 | | #define SIZEOFFREE 49 |
| | |
#define PATH_NULL 0x00000000 /* 0 */ | | |
#define PATH_PROT 0x00000001 /* 1 */ | | |
#define PATH_FIRE 0x00000002 /* 2 */ | | |
#define PATH_FROST 0x00000004 /* 4 */ | | |
#define PATH_ELEC 0x00000008 /* 8 */ | | |
#define PATH_MISSILE 0x00000010 /* 16 */ | | |
#define PATH_SELF 0x00000020 /* 32 */ | | |
#define PATH_SUMMON 0x00000040 /* 64 */ | | |
#define PATH_ABJURE 0x00000080 /* 128 */ | | |
#define PATH_RESTORE 0x00000100 /* 256 */ | | |
#define PATH_DETONATE 0x00000200 /* 512 */ | | |
#define PATH_MIND 0x00000400 /* 1024 */ | | |
#define PATH_CREATE 0x00000800 /* 2048 */ | | |
#define PATH_TELE 0x00001000 /* 4096 */ | | |
#define PATH_INFO 0x00002000 /* 8192 */ | | |
#define PATH_TRANSMUTE 0x00004000 /* 16384 */ | | |
#define PATH_TRANSFER 0x00008000 /* 32768 */ | | |
#define PATH_TURNING 0x00010000 /* 65536 */ | | |
#define PATH_WOUNDING 0x00020000 /* 131072 */ | | |
#define PATH_DEATH 0x00040000 /* 262144 */ | | |
#define PATH_LIGHT 0x00080000 /* 524288 */ | | |
| | |
#define NRSPELLPATHS 20 | | |
| | |
#define NROFREALSPELLS 206 /* Number of different spells */ | | |
| | |
#define NROFSKILLS 33 /* match to the number of elements in skills[] array */ | | |
| | |
#define NROF_SOUNDS (23 + NROFREALSPELLS) /* Number of sounds */ | | #define NROF_SOUNDS (23 + NROFREALSPELLS) /* Number of sounds */ |
| | |
/* Flag structure now changed. | | /* Flag structure now changed. |
| | |
!op->type == DOOR)) && (!QUERY_FLAG(op,FLAG_IS_A_TEMPLATE))) | | !op->type == DOOR)) && (!QUERY_FLAG(op,FLAG_IS_A_TEMPLATE))) |
| | |
#define IS_ARROW(op) \ | | #define IS_ARROW(op) \ |
(op->type==ARROW || op->type==MMISSILE || op->type==BULLET) | | (op->type==ARROW || \ |
| | (op->type==SPELL_EFFECT && \ |
| | (op->subtype == SP_BULLET || op->subtype == SP_MAGIC_MISSILE))) |
| | |
/* This return TRUE if object has still randomitems which | | /* This return TRUE if object has still randomitems which |
* could be expanded. | | * could be expanded. |
| | |
#define FLAG_IS_THROWN 17 /* Object is designed to be thrown. */ | | #define FLAG_IS_THROWN 17 /* Object is designed to be thrown. */ |
#define FLAG_AUTO_APPLY 18 /* Will be applied when created */ | | #define FLAG_AUTO_APPLY 18 /* Will be applied when created */ |
#define FLAG_TREASURE 19 /* Will generate treasure when applied */ | | #define FLAG_TREASURE 19 /* Will generate treasure when applied */ |
#define FLAG_INVIS_UNDEAD 20 /* Player is invisible to undead */ | | /*#define FLAG_INVIS_UNDEAD 20 *//* Player is invisible to undead */ |
#define FLAG_SEE_INVISIBLE 21 /* Will see invisible player */ | | #define FLAG_SEE_INVISIBLE 21 /* Will see invisible player */ |
#define FLAG_CAN_ROLL 22 /* Object can be rolled */ | | #define FLAG_CAN_ROLL 22 /* Object can be rolled */ |
#define FLAG_OVERLAY_FLOOR 23 /* Object is an overlay floor */ | | #define FLAG_OVERLAY_FLOOR 23 /* Object is an overlay floor */ |
| | |
#define FLAG_FLY_ON 26 /* As WALK_ON, but only with FLAG_FLYING */ | | #define FLAG_FLY_ON 26 /* As WALK_ON, but only with FLAG_FLYING */ |
#define FLAG_FLY_OFF 27 /* As WALK_OFF, but only with FLAG_FLYING */ | | #define FLAG_FLY_OFF 27 /* As WALK_OFF, but only with FLAG_FLYING */ |
#define FLAG_IS_USED_UP 28 /* When (--food<0) the object will exit */ | | #define FLAG_IS_USED_UP 28 /* When (--food<0) the object will exit */ |
#define FLAG_IDENTIFIED 29 /* Not implemented yet */ | | #define FLAG_IDENTIFIED 29 /* Player knows full info about item */ |
#define FLAG_REFLECTING 30 /* Object reflects from walls (lightning) */ | | #define FLAG_REFLECTING 30 /* Object reflects from walls (lightning) */ |
#define FLAG_CHANGING 31 /* Changes to other_arch when anim is done*/ | | #define FLAG_CHANGING 31 /* Changes to other_arch when anim is done*/ |
| | |
| | |
#define FLAG_BLIND 92 /* If set, object cannot see (visually) */ | | #define FLAG_BLIND 92 /* If set, object cannot see (visually) */ |
#define FLAG_SEE_IN_DARK 93 /* if set ob not effected by darkness */ | | #define FLAG_SEE_IN_DARK 93 /* if set ob not effected by darkness */ |
#define FLAG_IS_CAULDRON 94 /* container can make alchemical stuff */ | | #define FLAG_IS_CAULDRON 94 /* container can make alchemical stuff */ |
#define FLAG_DUST 95 /* item is a 'powder', effects throwing */ | | /*#define FLAG_DUST 95 *//* item is a 'powder', effects throwing */ |
| | |
/* Start of values in flags[3] */ | | /* Start of values in flags[3] */ |
#define FLAG_NO_STEAL 96 /* Item can't be stolen */ | | #define FLAG_NO_STEAL 96 /* Item can't be stolen */ |