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.115 by root, Thu May 3 10:39:46 2007 UTC vs.
Revision 1.117 by root, Mon May 7 04:21:11 2007 UTC

30#include "cfperl.h" 30#include "cfperl.h"
31#include "shstr.h" 31#include "shstr.h"
32 32
33typedef int tag_t; 33typedef int tag_t;
34 34
35#define NUM_BODY_LOCATIONS 12 35#define NUM_BODY_LOCATIONS 14
36#define BODY_ARMS 1 36#define BODY_ARMS 1
37 37
38/* See common/item.c */ 38/* See common/item.c */
39 39
40typedef struct Body_Locations 40typedef struct Body_Locations
90/* However, if you're keeping a pointer of some sort, you probably 90/* However, if you're keeping a pointer of some sort, you probably
91 * don't just want it copied, so you'll need to add to common/object.C, 91 * don't just want it copied, so you'll need to add to common/object.C,
92 * e.g. ->copy_to () 92 * e.g. ->copy_to ()
93 */ 93 */
94 94
95struct body_slot
96{
97 signed char info:4; /* body info as loaded from the file */
98 signed char used:4; /* Calculated value based on items equipped */
99};
100
95INTERFACE_CLASS (object) 101INTERFACE_CLASS (object)
96// these are being copied 102// these are being copied
97struct object_copy : attachable 103struct object_copy : attachable
98{ 104{
99 typedef bitset<NUM_FLAGS> flags_t; 105 typedef bitset<NUM_FLAGS> flags_t;
100 106
101 sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */ 107 sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */
108
109 uint8 ACC (RW, type); /* PLAYER, BULLET, etc. See define.h */
110 uint8 ACC (RW, subtype); /* subtype of object */
102 sint8 ACC (RW, direction); /* Means the object is moving that way. */ 111 sint8 ACC (RW, direction); /* Means the object is moving that way. */
103 sint8 ACC (RW, facing); /* Object is oriented/facing that way. */ 112 sint8 ACC (RW, facing); /* Object is oriented/facing that way. */
113
104 shstr ACC (RW, name); /* The name of the object, obviously... */ 114 shstr ACC (RW, name); /* The name of the object, obviously... */
105 shstr ACC (RW, name_pl); /* The plural name of the object */ 115 shstr ACC (RW, name_pl); /* The plural name of the object */
106 shstr ACC (RW, title); /* Of foo, etc */ 116 shstr ACC (RW, title); /* Of foo, etc */
107 shstr ACC (RW, race); /* human, goblin, dragon, etc */ 117 shstr ACC (RW, race); /* human, goblin, dragon, etc */
108 shstr ACC (RW, slaying); /* Which race to do double damage to */ 118 shstr ACC (RW, slaying); /* Which race to do double damage to */
127 float ACC (RW, speed); /* The overall speed of this object */ 137 float ACC (RW, speed); /* The overall speed of this object */
128 float ACC (RW, speed_left); /* How much speed is left to spend this round */ 138 float ACC (RW, speed_left); /* How much speed is left to spend this round */
129 uint32 ACC (RW, nrof); /* How many of the objects */ 139 uint32 ACC (RW, nrof); /* How many of the objects */
130 140
131 /* This next big block are basically used for monsters and equipment */ 141 /* This next big block are basically used for monsters and equipment */
132 uint8 ACC (RW, type); /* PLAYER, BULLET, etc. See define.h */
133 uint8 ACC (RW, subtype); /* subtype of object */
134 uint16 ACC (RW, client_type); /* Public type information. see doc/Developers/objects */ 142 uint16 ACC (RW, client_type); /* Public type information. see doc/Developers/objects */
143
135 sint16 ACC (RW, resist[NROFATTACKS]); /* Resistance adjustments for attacks */ 144 sint16 ACC (RW, resist[NROFATTACKS]); /* Resistance adjustments for attacks */
136 uint32 ACC (RW, attacktype); /* Bitmask of attacks this object does */ 145 uint32 ACC (RW, attacktype); /* Bitmask of attacks this object does */
137 uint32 ACC (RW, path_attuned);/* Paths the object is attuned to */ 146 uint32 ACC (RW, path_attuned);/* Paths the object is attuned to */
138 uint32 ACC (RW, path_repelled); /* Paths the object is repelled from */ 147 uint32 ACC (RW, path_repelled); /* Paths the object is repelled from */
139 uint32 ACC (RW, path_denied); /* Paths the object is denied access to */ 148 uint32 ACC (RW, path_denied); /* Paths the object is denied access to */
158 sint32 ACC (RW, weight_limit);/* Weight-limit of object */ 167 sint32 ACC (RW, weight_limit);/* Weight-limit of object */
159 sint32 ACC (RW, carrying); /* How much weight this object contains */ 168 sint32 ACC (RW, carrying); /* How much weight this object contains */
160 sint64 ACC (RW, perm_exp); /* Permanent exp */ 169 sint64 ACC (RW, perm_exp); /* Permanent exp */
161 uint32 ACC (RW, weapontype); /* type of weapon */ 170 uint32 ACC (RW, weapontype); /* type of weapon */
162 uint32 ACC (RW, tooltype); /* type of tool or build facility */ 171 uint32 ACC (RW, tooltype); /* type of tool or build facility */
163 sint8 ACC (RW, body_info[NUM_BODY_LOCATIONS]); /* body info as loaded from the file */ 172 body_slot slot [NUM_BODY_LOCATIONS];
164 sint8 ACC (RW, body_used[NUM_BODY_LOCATIONS]); /* Calculated value based on items equipped */
165 faceidx ACC (RW, face); /* Face with colors */ 173 faceidx ACC (RW, face); /* Face with colors */
166 living ACC (RO, stats); /* Str, Con, Dex, etc */ 174 living ACC (RO, stats); /* Str, Con, Dex, etc */
167 /* See the pod/objects.pod for more info about body locations */ 175 /* See the pod/objects.pod for more info about body locations */
168 176
169 /* Following mostly refers to fields only used for monsters */ 177 /* Following mostly refers to fields only used for monsters */
180 * Note that other fields are used - these files are basically 188 * Note that other fields are used - these files are basically
181 * only used in spells. 189 * only used in spells.
182 */ 190 */
183 sint16 ACC (RW, duration); /* How long the spell lasts */ 191 sint16 ACC (RW, duration); /* How long the spell lasts */
184 sint16 ACC (RW, casting_time);/* time left before spell goes off */ 192 sint16 ACC (RW, casting_time);/* time left before spell goes off */
193
185 uint16 ACC (RW, start_holding); 194 uint16 ACC (RW, start_holding);
186 uint8 ACC (RW, duration_modifier); /* how level modifies duration */ 195 uint8 ACC (RW, duration_modifier); /* how level modifies duration */
187 uint8 ACC (RW, dam_modifier); /* How going up in level effects damage */ 196 uint8 ACC (RW, dam_modifier); /* How going up in level effects damage */
197
188 sint8 ACC (RW, range); /* Range of the spell */ 198 sint8 ACC (RW, range); /* Range of the spell */
189 uint8 ACC (RW, range_modifier); /* How going up in level effects range */ 199 uint8 ACC (RW, range_modifier); /* How going up in level effects range */
190
191 MoveType ACC (RW, move_type); /* Type of movement this object uses */ 200 MoveType ACC (RW, move_type); /* Type of movement this object uses */
192 MoveType ACC (RW, move_block);/* What movement types this blocks */ 201 MoveType ACC (RW, move_block);/* What movement types this blocks */
202
193 MoveType ACC (RW, move_allow);/* What movement types explicitly allowd */ 203 MoveType ACC (RW, move_allow);/* What movement types explicitly allowd */
194 MoveType ACC (RW, move_on); /* Move types affected moving on to this space */ 204 MoveType ACC (RW, move_on); /* Move types affected moving on to this space */
195 MoveType ACC (RW, move_off); /* Move types affected moving off this space */ 205 MoveType ACC (RW, move_off); /* Move types affected moving off this space */
196 MoveType ACC (RW, move_slow); /* Movement types this slows down */ 206 MoveType ACC (RW, move_slow); /* Movement types this slows down */
207
197 float ACC (RW, move_slow_penalty); /* How much this slows down the object */ 208 float ACC (RW, move_slow_penalty); /* How much this slows down the object */
198 209
199 char *ACC (RW, spellarg); 210 char *ACC (RW, spellarg);
200 211
201 /* Following are values used by any object */ 212 /* Following are values used by any object */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines