ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/object.h
(Generate patch)

Comparing deliantra/server/include/object.h (file contents):
Revision 1.11 by root, Tue Aug 29 05:03:55 2006 UTC vs.
Revision 1.12 by root, Tue Aug 29 08:01:36 2006 UTC

1/* 1/*
2 * static char *rcsid_object_h = 2 * static char *rcsid_object_h =
3 * "$Id: object.h,v 1.11 2006/08/29 05:03:55 root Exp $"; 3 * "$Id: object.h,v 1.12 2006/08/29 08:01:36 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
108 struct pl *contr; /* Pointer to the player which control this object */ 108 struct pl *contr; /* Pointer to the player which control this object */
109 struct object *next; /* Pointer to the next object in the free/used list */ 109 struct object *next; /* Pointer to the next object in the free/used list */
110 struct object *prev; /* Pointer to the previous object in the free/used list*/ 110 struct object *prev; /* Pointer to the previous object in the free/used list*/
111 struct object *active_next; /* Next & previous object in the 'active' */ 111 struct object *active_next; /* Next & previous object in the 'active' */
112 struct object *active_prev; /* List. This is used in process_events */ 112 struct object *active_prev; /* List. This is used in process_events */
113 /* so that the entire object list does not */ 113 /* so that the entire object list does not */
114 /* need to be gone through. */ 114 /* need to be gone through. */
115 struct object *below; /* Pointer to the object stacked below this one */ 115 struct object *below; /* Pointer to the object stacked below this one */
116 struct object *above; /* Pointer to the object stacked above this one */ 116 struct object *above; /* Pointer to the object stacked above this one */
117 /* Note: stacked in the *same* environment*/ 117 /* Note: stacked in the *same* environment*/
118 struct object *inv; /* Pointer to the first object in the inventory */ 118 struct object *inv; /* Pointer to the first object in the inventory */
119 struct object *container; /* Current container being used. I think this 119 struct object *container; /* Current container being used. I think this
120 * is only used by the player right now. 120 * is only used by the player right now.
121 */ 121 */
122 struct object *env; /* Pointer to the object which is the environment. 122 struct object *env; /* Pointer to the object which is the environment.
123 * This is typically the container that the object is in. 123 * This is typically the container that the object is in.
124 */ 124 */
125 struct object *more; /* Pointer to the rest of a large body of objects */ 125 struct object *more; /* Pointer to the rest of a large body of objects */
126 struct object *head; /* Points to the main object of a large body */ 126 struct object *head; /* Points to the main object of a large body */
127 struct mapstruct *map; /* Pointer to the map in which this object is present */ 127 struct mapstruct *map; /* Pointer to the map in which this object is present */
128 128
129 tag_t count; /* Unique object number for this object */ 129 tag_t count; /* Unique object number for this object */
140 const char *name; /* The name of the object, obviously... */ 140 const char *name; /* The name of the object, obviously... */
141 const char *name_pl; /* The plural name of the object */ 141 const char *name_pl; /* The plural name of the object */
142 const char *title; /* Of foo, etc */ 142 const char *title; /* Of foo, etc */
143 const char *race; /* human, goblin, dragon, etc */ 143 const char *race; /* human, goblin, dragon, etc */
144 const char *slaying; /* Which race to do double damage to */ 144 const char *slaying; /* Which race to do double damage to */
145 /* If this is an exit, this is the filename */ 145 /* If this is an exit, this is the filename */
146 const char *skill; /* Name of the skill this object uses/grants */ 146 const char *skill; /* Name of the skill this object uses/grants */
147 const char *msg; /* If this is a book/sign/magic mouth/etc */ 147 const char *msg; /* If this is a book/sign/magic mouth/etc */
148 const char *lore; /* Obscure information about this object, */ 148 const char *lore; /* Obscure information about this object, */
149 /* To get put into books and the like. */ 149 /* To get put into books and the like. */
150 150
151 sint16 x,y; /* Position in the map for this object */ 151 sint16 x,y; /* Position in the map for this object */
152 sint16 ox,oy; /* For debugging: Where it was last inserted */ 152 sint16 ox,oy; /* For debugging: Where it was last inserted */
153 float speed; /* The overall speed of this object */ 153 float speed; /* The overall speed of this object */
154 float speed_left; /* How much speed is left to spend this round */ 154 float speed_left; /* How much speed is left to spend this round */
192 struct object *current_weapon; /* Pointer to the weapon currently used */ 192 struct object *current_weapon; /* Pointer to the weapon currently used */
193 uint32 weapontype; /* type of weapon */ 193 uint32 weapontype; /* type of weapon */
194 uint32 tooltype; /* type of tool or build facility */ 194 uint32 tooltype; /* type of tool or build facility */
195 sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */ 195 sint8 body_info[NUM_BODY_LOCATIONS]; /* body info as loaded from the file */
196 sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */ 196 sint8 body_used[NUM_BODY_LOCATIONS]; /* Calculated value based on items equipped */
197 /* See the doc/Developers/objects for more info about body locations */ 197 /* See the doc/Developers/objects for more info about body locations */
198 198
199 /* Following mostly refers to fields only used for monsters */ 199 /* Following mostly refers to fields only used for monsters */
200 struct object *owner; /* Pointer to the object which controls this one */ 200 struct object *owner; /* Pointer to the object which controls this one */
201 /* Owner should not be referred to directly - */ 201 /* Owner should not be referred to directly - */
202 /* get_owner should be used instead. */ 202 /* get_owner should be used instead. */
203 tag_t ownercount; /* What count the owner had (in case owner */ 203 tag_t ownercount; /* What count the owner had (in case owner */
204 /* has been freed) */ 204 /* has been freed) */
205 struct object *enemy; /* Monster/player to follow even if not closest */ 205 struct object *enemy; /* Monster/player to follow even if not closest */
206 struct object *attacked_by; /* This object start to attack us! only player & monster */ 206 struct object *attacked_by; /* This object start to attack us! only player & monster */
207 tag_t attacked_by_count; /* the tag of attacker, so we can be sure */ 207 tag_t attacked_by_count; /* the tag of attacker, so we can be sure */
208 struct treasureliststruct *randomitems; /* Items to be generated */ 208 struct treasureliststruct *randomitems; /* Items to be generated */
209 uint16 run_away; /* Monster runs away if it's hp goes below this percentage. */ 209 uint16 run_away; /* Monster runs away if it's hp goes below this percentage. */
214 sint32 move_status; /* What stage in attack mode */ 214 sint32 move_status; /* What stage in attack mode */
215 uint16 attack_movement;/* What kind of attack movement */ 215 uint16 attack_movement;/* What kind of attack movement */
216 uint8 will_apply; /* See crossfire.doc */ 216 uint8 will_apply; /* See crossfire.doc */
217 struct object *spellitem; /* Spell ability monster is choosing to use */ 217 struct object *spellitem; /* Spell ability monster is choosing to use */
218 double expmul; /* needed experience = (calc_exp*expmul) - means some */ 218 double expmul; /* needed experience = (calc_exp*expmul) - means some */
219 /* races/classes can need less/more exp to gain levels */ 219 /* races/classes can need less/more exp to gain levels */
220 220
221 /* Spell related information, may be useful elsewhere 221 /* Spell related information, may be useful elsewhere
222 * Note that other fields are used - these files are basically 222 * Note that other fields are used - these files are basically
223 * only used in spells. 223 * only used in spells.
224 */ 224 */
233 uint8 range_modifier; /* How going up in level effects range */ 233 uint8 range_modifier; /* How going up in level effects range */
234 234
235 /* Following are values used by any object */ 235 /* Following are values used by any object */
236 struct archt *arch; /* Pointer to archetype */ 236 struct archt *arch; /* Pointer to archetype */
237 struct archt *other_arch; /* Pointer used for various things - mostly used for what */ 237 struct archt *other_arch; /* Pointer used for various things - mostly used for what */
238 /* this objects turns into or what this object creates */ 238 /* this objects turns into or what this object creates */
239 uint32 flags[4]; /* various flags */ 239 uint32 flags[4]; /* various flags */
240 uint16 animation_id; /* An index into the animation array */ 240 uint16 animation_id; /* An index into the animation array */
241 uint8 anim_speed; /* ticks between animation-frames */ 241 uint8 anim_speed; /* ticks between animation-frames */
242 uint8 last_anim; /* last sequence used to draw face */ 242 uint8 last_anim; /* last sequence used to draw face */
243 sint32 elevation; /* elevation of this terrain - not currently used */ 243 sint32 elevation; /* elevation of this terrain - not currently used */
295 struct archt *head; /* The main part of a linked object */ 295 struct archt *head; /* The main part of a linked object */
296 struct archt *more; /* Next part of a linked object */ 296 struct archt *more; /* Next part of a linked object */
297 object clone; /* An object from which to do copy_object() */ 297 object clone; /* An object from which to do copy_object() */
298 uint32 editable; /* editable flags (mainly for editor) */ 298 uint32 editable; /* editable flags (mainly for editor) */
299 sint8 tail_x, tail_y; /* Where the lower right most portion of the object is 299 sint8 tail_x, tail_y; /* Where the lower right most portion of the object is
300 * in comparison to the head. 300 * in comparison to the head.
301 */ 301 */
302} archetype; 302} archetype;
303 303
304extern object *objects; 304extern object *objects;
305extern object *active_objects; 305extern object *active_objects;
306extern object *free_objects; 306extern object *free_objects;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines