Atrinik Server  4.0
object.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef OBJECT_H
31 #define OBJECT_H
32 
33 #include <decls.h>
34 #include <attack.h>
35 
40 #define WEIGHT(op) (!op->nrof || op->type == CONTAINER ? op->weight + op->carrying : op->weight)
41 
42 #define WEIGHT_NROF(op, nrof) (MAX(1, nrof) * op->weight + op->carrying)
43 
48 #define MOVE_APPLY_DEFAULT 0
49 #define MOVE_APPLY_WALK_ON 1
50 #define MOVE_APPLY_FLY_ON 2
51 #define MOVE_APPLY_WALK_OFF 4
52 #define MOVE_APPLY_FLY_OFF 8
53 
54 #define MOVE_APPLY_MOVE 16
55 
62 #define MOVE_APPLY_VANISHED 32
63 
64 #define MOVE_APPLY_SAVING 64
65 
71 #define CHECK_WALK_OK 0
72 #define CHECK_WALK_DESTROYED 1
73 #define CHECK_WALK_MOVED 2
74 
80 typedef struct key_value {
82  shstr *key;
83 
85  shstr *value;
86 
88  struct key_value *next;
89 } key_value_t;
90 
94 struct obj {
95  /* These variables are not changed by object_copy(): */
96 
103  struct obj *active_next;
104 
111  struct obj *active_prev;
112 
114  struct obj *below;
115 
120  struct obj *above;
121 
123  struct obj *inv;
124 
130  struct obj *env;
131 
133  struct obj *more;
134 
136  struct obj *head;
137 
139  struct mapdef *map;
140 
142  tag_t count;
143 
150 
157  uint32_t carrying;
158 
161 
162  /* These get an extra add_refcount(), after having been copied by memcpy().
163  * All fields below this point are automatically copied by memcpy. If
164  * adding something that needs a refcount updated, make sure you modify
165  * object_copy() to do so. */
166 
168  const char *name;
169 
171  const char *title;
172 
174  const char *race;
175 
180  const char *slaying;
181 
183  const char *msg;
184 
187  shstr *artifact;
188 
190  shstr *custom_name;
191 
193  shstr *glow;
194 
196  struct obj *enemy;
197 
199  struct obj *attacked_by;
200 
207  struct obj *owner;
208 
210  struct obj *chosen_skill;
211 
213  struct obj *exp_obj;
214 
216  tag_t enemy_count;
217 
219  tag_t ownercount;
220 
223 
225  struct archetype *arch;
226 
229 
232 
235 
238 
240  int64_t value;
241 
243  uint32_t event_flags;
244 
246  uint32_t weight;
247 
252  uint32_t weight_limit;
253 
255  uint32_t path_attuned;
256 
258  uint32_t path_repelled;
259 
261  uint32_t path_denied;
262 
264  uint32_t nrof;
265 
267  uint32_t update_tag;
268 
270  uint32_t flags[NUM_FLAGS_32];
271 
273  int16_t x;
274 
276  int16_t y;
277 
286  int16_t z;
287 
290 
292  int16_t last_damage;
293 
298  uint16_t terrain_type;
299 
301  uint16_t terrain_flag;
302 
304  uint16_t material;
305 
307  int16_t material_real;
308 
310  int16_t last_heal;
311 
313  int16_t last_sp;
314 
316  int16_t last_grace;
317 
319  int16_t last_eat;
320 
322  uint16_t animation_id;
323 
326 
332  int16_t align;
333 
335  int16_t rotate;
336 
338  int8_t glow_radius;
339 
341  int8_t magic;
342 
344  uint8_t state;
345 
347  int8_t level;
348 
350  int8_t direction;
351 
357  uint8_t quick_pos;
358 
360  uint8_t type;
361 
363  uint8_t sub_type;
364 
366  uint8_t item_quality;
367 
369  uint8_t item_condition;
370 
372  uint8_t item_race;
373 
375  uint8_t item_level;
376 
378  uint8_t item_skill;
379 
381  int8_t move_status;
382 
384  uint8_t move_type;
385 
388 
390  uint8_t anim_flags;
391 
393  uint8_t anim_speed;
394 
396  uint8_t last_anim;
397 
399  uint8_t behavior;
400 
402  uint8_t run_away;
403 
405  uint8_t layer;
406 
408  uint8_t sub_layer;
409 
411  uint8_t quickslot;
412 
416  uint8_t block;
417 
421  uint8_t absorb;
422 
436  uint8_t attack[NROFATTACKS];
437 
440 
442  int8_t item_power;
443 
451  int16_t zoom_x;
452 
460  int16_t zoom_y;
461 
463  uint8_t alpha;
464 
466  uint8_t glow_speed;
467 
469  double speed;
470 
472  double speed_left;
473 
475  double weapon_speed;
476 
479 
482 
485 };
486 
488 struct oblnk {
489 
491  union {
493  struct oblnk *link;
494 
496  object *ob;
497  } objlink;
498 
500  struct oblnk *next;
501 
503  struct oblnk *prev;
504 
506  tag_t id;
507 
509  long value;
510 };
511 
512 #define free_objectlink_simple(_chunk_) mempool_return(pool_objectlink, (_chunk_));
513 
514 #define CONTR(ob) ((player *) ((ob)->custom_attrset))
515 
516 /* This returns TRUE if the object is something that
517  * should be displayed in the look window */
518 #define LOOK_OBJ(_ob) (!IS_SYS_INVISIBLE(_ob) && _ob->type != PLAYER)
519 
528 #define UP_OBJ_INSERT 1
529 
530 #define UP_OBJ_REMOVE 2
531 
535 #define UP_OBJ_FLAGS 3
536 
537 #define UP_OBJ_FACE 4
538 
539 #define UP_OBJ_FLAGFACE 5
540 
541 #define UP_OBJ_ALL 6
542 
548 #define OBJECT_VALID(_ob_, _count_) ((_ob_) && (_ob_)->count == ((tag_t) _count_) && !QUERY_FLAG((_ob_), FLAG_REMOVED) && !OBJECT_FREE(_ob_))
549 
551 #define OBJECT_ACTIVE(_ob_) (!QUERY_FLAG((_ob_), FLAG_REMOVED) && !OBJECT_FREE(_ob_))
552 
554 #define OBJECT_FREE(_ob_) ((_ob_)->count == 0)
555 
564 #define INS_NO_MERGE 1
565 
570 #define INS_NO_WALK_ON 2
571 
575 #define INS_FALL_THROUGH 4
576 
585 #define REMOVE_NO_WEIGHT 1
586 
589 #define REMOVE_NO_WALK_OFF 2
590 
600 #define BEHAVIOR_SPELL_FRIENDLY 0x01
601 
604 #define BEHAVIOR_OPEN_DOORS 0x02
605 
608 #define BEHAVIOR_STEALTH 0x04
609 
612 #define BEHAVIOR_EXITS 0x08
613 
616 #define BEHAVIOR_SECRET_PASSAGES 0x10
617 
620 #define BEHAVIOR_GUARD 0x20
621 
624 #define decrease_ob(xyz) object_decrease(xyz, 1)
625 
631 #define GENDER_NEUTER 0
632 
633 #define GENDER_MALE 1
634 
635 #define GENDER_FEMALE 2
636 
637 #define GENDER_HERMAPHRODITE 3
638 
639 #define GENDER_MAX 4
640 
646 #define CORPSE_INFRAVISION_PERCENT 75
647 
657 #define HEAD(op) ((op)->head ? (op)->head : (op))
658 
662 typedef struct magic_mirror_struct {
664  struct mapdef *map;
665 
667  int16_t x;
668 
670  int16_t y;
672 
678 #define MMIRROR(ob) ((magic_mirror_struct *) ((ob)->custom_attrset))
679 
683 #define OBJECT_CAN_TALK(ob) ((ob)->type == MONSTER && ((ob)->msg || \
684  HAS_EVENT((ob), EVENT_SAY)) && !OBJECT_VALID((ob)->enemy, \
685  (ob)->enemy_count))
686 
690 #define OBJECT_CURSED(ob) (QUERY_FLAG((ob), FLAG_CURSED) || QUERY_FLAG((ob), FLAG_DAMNED))
691 
695 #define OBJ_DESTROYED_BEGIN(_op) \
696  do { \
697  tag_t __tag_ ## _op = (_op)->count;
698 
701 #define OBJ_DESTROYED(_op) (!OBJECT_VALID((_op), __tag_ ## _op))
702 
705 #define OBJ_DESTROYED_END() \
706  } while (0)
707 
716 #define OBJECT_DESTROYED(obj, tag) \
717  (OBJECT_FREE(obj) || (obj)->count != (tag))
718 
740 #define _OBJECTS_DESTROYED_DEFINE(obj) \
741  HARD_ASSERT(!OBJECT_FREE(obj)); \
742  tag_t __tag_##obj = obj->count;
743 
746 #define _OBJECTS_DESTROYED(obj) \
747  (OBJECT_DESTROYED(obj, __tag_##obj))
748 
751 #define _OBJECTS_DESTROYED_ANY(obj) \
752  _OBJECTS_DESTROYED(obj) ||
753 
756 #define _OBJECTS_DESTROYED_ALL(obj) \
757  _OBJECTS_DESTROYED(obj) &&
758 
765 #define OBJECTS_DESTROYED_BEGIN(...) \
766  do { \
767  FOR_EACH(_OBJECTS_DESTROYED_DEFINE, __VA_ARGS__)
768 
782 #define OBJECTS_DESTROYED_ANY(...) \
783  (FOR_EACH(_OBJECTS_DESTROYED_ANY, __VA_ARGS__) 0)
784 
798 #define OBJECTS_DESTROYED_ALL(...) \
799  (FOR_EACH(_OBJECTS_DESTROYED_ALL, __VA_ARGS__) 1)
800 
811 #define OBJECTS_DESTROYED(obj) \
812  (_OBJECTS_DESTROYED(obj))
813 
816 #define OBJECTS_DESTROYED_END() \
817  } while (0)
818 
823 #define OBJECT_IS_PROJECTILE(ob) (QUERY_FLAG((ob), FLAG_FLYING) && (QUERY_FLAG((ob), FLAG_IS_MISSILE) || QUERY_FLAG((ob), FLAG_IS_SPELL)))
824 
828 #define OBJECT_IS_RANGED(_ob) ((_ob)->type == WAND || (_ob)->type == ROD || (_ob)->type == BOW || (_ob)->type == SPELL || (_ob)->type == SKILL || ((_ob)->type == ARROW && QUERY_FLAG((_ob), FLAG_IS_THROWN)))
829 
833 #define OBJECT_IS_AMMO(_ob) (((_ob)->type == CONTAINER && \
834  (_ob)->race != NULL && (_ob)->sub_type == ST1_CONTAINER_QUIVER) || \
835  ((_ob)->type == ARROW && !QUERY_FLAG((_ob), FLAG_IS_THROWN)))
836 
840 #define OBJECT_IS_SPELL_TOOL(ob) \
841  ((ob)->type == WAND || \
842  (ob)->type == ROD || \
843  (ob)->type == POTION || \
844  (ob)->type == SCROLL || \
845  (ob)->type == BOOK_SPELL)
846 
847 /* Prototypes */
848 extern object *active_objects;
849 extern const char *gender_noun[GENDER_MAX];
850 extern const char *gender_subjective[GENDER_MAX];
851 extern const char *gender_subjective_upper[GENDER_MAX];
852 extern const char *gender_objective[GENDER_MAX];
853 extern const char *gender_possessive[GENDER_MAX];
854 extern const char *gender_reflexive[GENDER_MAX];
855 extern int freearr_x[SIZEOFFREE];
856 extern int freearr_y[SIZEOFFREE];
857 extern int maxfree[SIZEOFFREE];
858 extern int freedir[SIZEOFFREE];
859 extern const char *object_flag_names[NUM_FLAGS + 1];
860 
861 bool
862 object_can_merge(object *ob1, object *ob2);
863 object *
864 object_merge(object *op);
865 uint32_t
866 object_weight_sum(object *op);
867 void
868 object_weight_add(object *op, uint32_t weight);
869 void
870 object_weight_sub(object *op, uint32_t weight);
871 object *
872 object_get_env(object *op);
873 bool
874 object_is_in_inventory(const object *op, const object *inv);
875 void
876 object_dump(const object *op, StringBuffer *sb);
877 void
878 object_dump_rec(const object *op, StringBuffer *sb);
879 void
880 object_owner_clear(object *op);
881 void
882 object_owner_set(object *op, object *owner);
883 void
884 object_owner_copy(object *op, object *clone_ob);
885 object *
886 object_owner(object *op);
887 void
888 object_copy(object *op, const object *src, bool no_speed);
889 void
890 object_copy_full(object *op, const object *src);
891 void
892 object_init(void);
893 void
894 object_deinit(void);
895 object *
896 object_get(void);
897 void
898 object_update_turnable(object *op);
899 void
900 object_update_speed(object *op);
901 void
902 object_update(object *op, int action);
903 void
904 object_drop_inventory(object *op);
905 void
906 object_destroy_inv(object *ob);
907 void
908 object_destroy(object *ob);
909 void
910 object_destruct(object *op);
911 void
912 object_remove(object *op, int flags);
913 object *
914 object_insert_map(object *op, mapstruct *m, object *originator, int flag);
915 object *
916 object_stack_get(object *op, uint32_t nrof);
917 object *
918 object_stack_get_reinsert(object *op, uint32_t nrof);
919 object *
920 object_stack_get_removed(object *op, uint32_t nrof);
921 object *
922 object_decrease(object *op, uint32_t i);
923 object *
924 object_insert_into(object *op, object *where, int flag);
925 object *
926 object_find_arch(object *op, archetype_t *at);
927 object *
928 object_find_type(object *op, uint8_t type);
929 int
930 object_dir_to_target(object *op, object *target);
931 bool
932 object_can_pick(const object *op, const object *item);
933 object *
934 object_clone(const object *op);
935 object *
936 object_load_str(const char *obstr);
937 void
938 object_free_key_values(object *op);
939 key_value_t *
940 object_get_key_link(const object *op, shstr *key);
941 shstr *
942 object_get_value(const object *op, const char *const key);
943 bool
944 object_set_value(object *op, const char *key, const char *value, bool add_key);
945 int
946 object_matches_string(object *op, object *caller, const char *str);
947 int
948 object_get_gender(const object *op);
949 void
950 object_reverse_inventory(object *op);
951 bool
952 object_enter_map(object *op,
953  object *exit,
954  mapstruct *m,
955  int x,
956  int y,
957  bool fixed_pos);
958 const char *
959 object_get_str(const object *op);
960 char *
961 object_get_str_r(const object *op, char *buf, size_t bufsize);
962 int
963 object_blocked(object *op, mapstruct *m, int x, int y);
964 object *
965 object_create_singularity(const char *name);
966 void
967 object_save(const object *op, FILE *fp);
968 
978 static inline object *
979 OWNER (object *op)
980 {
981  HARD_ASSERT(op != NULL);
982 
983  object *owner = object_owner(op);
984  if (owner != NULL) {
985  return owner;
986  }
987 
988  return op;
989 }
990 
991 #endif
Definition: object.h:94
int object_matches_string(object *op, object *caller, const char *str)
Definition: object.c:2676
const char * gender_subjective_upper[GENDER_MAX]
Definition: object.c:59
void object_destroy(object *ob)
Definition: object.c:1441
void object_drop_inventory(object *op)
Definition: object.c:1282
tag_t ownercount
Definition: object.h:219
uint8_t move_type
Definition: object.h:384
void object_update_turnable(object *op)
Definition: object.c:1021
shstr * name
Definition: map.h:553
uint8_t quick_pos
Definition: object.h:357
bool object_is_in_inventory(const object *op, const object *inv)
Definition: object.c:655
uint8_t item_level
Definition: object.h:375
int16_t zoom_x
Definition: object.h:451
object * object_get_env(object *op)
Definition: object.c:631
bool object_set_value(object *op, const char *key, const char *value, bool add_key)
Definition: object.c:2635
void object_free_key_values(object *op)
Definition: object.c:2456
Definition: object.h:488
const char * race
Definition: object.h:174
double weapon_speed
Definition: object.h:475
tag_t attacked_by_count
Definition: object.h:222
tag_t enemy_count
Definition: object.h:216
void * custom_attrset
Definition: object.h:160
uint16_t material
Definition: object.h:304
void object_weight_sub(object *op, uint32_t weight)
Definition: object.c:600
int object_get_gender(const object *op)
Definition: object.c:2877
uint8_t type
One of operation types.
Definition: sound_ambient.c:45
void object_weight_add(object *op, uint32_t weight)
Definition: object.c:568
object * object_get(void)
Definition: object.c:993
uint8_t last_anim
Definition: object.h:396
uint16_t terrain_type
Definition: object.h:298
const char * gender_objective[GENDER_MAX]
Definition: object.c:65
double speed_left
Definition: object.h:472
struct key_value * next
Definition: object.h:88
int16_t last_heal
Definition: object.h:310
uint8_t item_skill
Definition: object.h:378
shstr * object_get_value(const object *op, const char *const key)
Definition: object.c:2515
struct treasure_list * randomitems
Definition: object.h:231
void object_copy(object *op, const object *src, bool no_speed)
Definition: object.c:886
object * object_create_singularity(const char *name)
Definition: object.c:3281
const char * slaying
Definition: object.h:180
int16_t material_real
Definition: object.h:307
int16_t last_sp
Definition: object.h:313
void object_dump_rec(const object *op, StringBuffer *sb)
Definition: object.c:711
long value
Definition: object.h:509
#define GENDER_MAX
Definition: object.h:639
uint8_t layer
Definition: object.h:405
struct obj * above
Definition: object.h:120
object * object_stack_get_removed(object *op, uint32_t nrof)
Definition: object.c:2078
int object_blocked(object *op, mapstruct *m, int x, int y)
Definition: object.c:3224
uint32_t object_weight_sum(object *op)
Definition: object.c:523
uint8_t item_quality
Definition: object.h:366
void object_destruct(object *op)
Definition: object.c:1521
Definition: living.h:67
uint32_t path_attuned
Definition: object.h:255
bool object_enter_map(object *op, object *exit, mapstruct *m, int x, int y, bool fixed_pos)
Definition: object.c:2956
object * object_find_arch(object *op, archetype_t *at)
Definition: object.c:2258
uint8_t alpha
Definition: object.h:463
uint32_t path_repelled
Definition: object.h:258
uint8_t absorb
Definition: object.h:421
shstr * value
Definition: object.h:85
struct archetype * arch
Definition: object.h:225
struct obj * enemy
Definition: object.h:196
struct archetype * other_arch
Definition: object.h:228
tag_t id
Definition: object.h:506
uint8_t quickslot
Definition: object.h:411
const char * gender_subjective[GENDER_MAX]
Definition: object.c:53
void object_remove(object *op, int flags)
Definition: object.c:1623
uint8_t attack[NROFATTACKS]
Definition: object.h:436
uint32_t flags[NUM_FLAGS_32]
Definition: object.h:270
object * object_load_str(const char *obstr)
Definition: object.c:2433
object * ob
Definition: object.h:496
void object_destroy_inv(object *ob)
Definition: object.c:1414
const char * gender_reflexive[GENDER_MAX]
Definition: object.c:77
const char * gender_possessive[GENDER_MAX]
Definition: object.c:71
object * object_clone(const object *op)
Definition: object.c:2385
struct obj * chosen_skill
Definition: object.h:210
const char * title
Definition: object.h:171
int16_t y
Definition: object.h:276
uint32_t path_denied
Definition: object.h:261
uint8_t glow_speed
Definition: object.h:466
shstr * key
Definition: object.h:82
const char * object_get_str(const object *op)
Definition: object.c:3151
New_Face * inv_face
Definition: object.h:237
uint32_t update_tag
Definition: object.h:267
void object_update(object *op, int action)
Definition: object.c:1117
uint8_t sub_layer
Definition: object.h:408
int8_t direction
Definition: object.h:350
Definition: arch.h:40
uint8_t item_race
Definition: object.h:372
uint8_t item_condition
Definition: object.h:369
double weapon_speed_left
Definition: object.h:478
uint32_t weight
Definition: object.h:246
int16_t z
Definition: object.h:286
struct mapdef * map
Definition: object.h:664
uint16_t animation_id
Definition: object.h:322
object * object_insert_into(object *op, object *where, int flag)
Definition: object.c:2158
struct mapdef * map
Definition: object.h:139
struct key_value key_value_t
struct obj * active_prev
Definition: object.h:111
object * active_objects
Definition: object.c:42
int freedir[SIZEOFFREE]
Definition: object.c:129
int16_t last_damage
Definition: object.h:292
uint32_t carrying
Definition: object.h:157
object * object_stack_get(object *op, uint32_t nrof)
Definition: object.c:2010
const char * name
Definition: object.h:168
object * object_decrease(object *op, uint32_t i)
Definition: object.c:2105
struct obj * env
Definition: object.h:130
uint8_t state
Definition: object.h:344
struct obj * below
Definition: object.h:114
void object_save(const object *op, FILE *fp)
Definition: object.c:3305
int16_t last_grace
Definition: object.h:316
int16_t zoom_y
Definition: object.h:460
uint32_t nrof
Definition: object.h:264
uint8_t anim_speed
Definition: object.h:393
union oblnk::@3 objlink
uint32_t damage_round_tag
Definition: object.h:149
int8_t item_power
Definition: object.h:442
int16_t align
Definition: object.h:332
uint8_t attack_move_type
Definition: object.h:387
char * object_get_str_r(const object *op, char *buf, size_t bufsize)
Definition: object.c:3175
double speed
Definition: object.h:469
void object_dump(const object *op, StringBuffer *sb)
Definition: object.c:680
object * object_merge(object *op)
Definition: object.c:479
key_value_t * object_get_key_link(const object *op, shstr *key)
Definition: object.c:2487
uint8_t block
Definition: object.h:416
struct obj * active_next
Definition: object.h:103
int16_t x
Definition: object.h:273
struct oblnk * prev
Definition: object.h:503
int16_t last_eat
Definition: object.h:319
object * object_insert_map(object *op, mapstruct *m, object *originator, int flag)
Definition: object.c:1741
#define SIZEOFFREE
Definition: define.h:660
uint32_t weight_limit
Definition: object.h:252
void object_deinit(void)
Definition: object.c:229
struct oblnk * link
Definition: object.h:493
int8_t protection[NROFATTACKS]
Definition: object.h:439
int8_t move_status
Definition: object.h:381
void object_owner_set(object *op, object *owner)
Definition: object.c:788
bool object_can_merge(object *ob1, object *ob2)
Definition: object.c:299
struct obj * exp_obj
Definition: object.h:213
struct obj * owner
Definition: object.h:207
tag_t count
Definition: object.h:142
living stats
Definition: object.h:481
struct oblnk * next
Definition: object.h:500
#define NUM_FLAGS_32
Definition: define.h:1349
int freearr_x[SIZEOFFREE]
Definition: object.c:84
uint8_t behavior
Definition: object.h:399
uint8_t type
Definition: object.h:360
object * object_owner(object *op)
Definition: object.c:857
int16_t attacked_by_distance
Definition: object.h:289
uint16_t terrain_flag
Definition: object.h:301
int maxfree[SIZEOFFREE]
Definition: object.c:114
const char * msg
Definition: object.h:183
object * object_find_type(object *op, uint8_t type)
Definition: object.c:2284
int8_t glow_radius
Definition: object.h:338
struct obj * inv
Definition: object.h:123
void object_owner_clear(object *op)
Definition: object.c:741
uint8_t anim_flags
Definition: object.h:390
void object_reverse_inventory(object *op)
Definition: object.c:2901
shstr * artifact
Definition: object.h:187
struct obj * head
Definition: object.h:136
const char * object_flag_names[NUM_FLAGS+1]
Definition: object.c:153
shstr * custom_name
Definition: object.h:190
struct magic_mirror_struct magic_mirror_struct
void object_init(void)
Definition: object.c:211
uint8_t run_away
Definition: object.h:402
bool object_can_pick(const object *op, const object *item)
Definition: object.c:2335
#define NUM_FLAGS
Definition: define.h:1347
void object_update_speed(object *op)
Definition: object.c:1043
uint32_t event_flags
Definition: object.h:243
Definition: map.h:536
New_Face * face
Definition: object.h:234
int8_t level
Definition: object.h:347
int freearr_y[SIZEOFFREE]
Definition: object.c:99
void object_copy_full(object *op, const object *src)
Definition: object.c:970
int object_dir_to_target(object *op, object *target)
Definition: object.c:2310
struct obj * more
Definition: object.h:133
uint16_t inv_animation_id
Definition: object.h:325
void object_owner_copy(object *op, object *clone_ob)
Definition: object.c:824
int64_t value
Definition: object.h:240
key_value_t * key_values
Definition: object.h:484
int8_t magic
Definition: object.h:341
static object * OWNER(object *op)
Definition: object.h:979
object * object_stack_get_reinsert(object *op, uint32_t nrof)
Definition: object.c:2046
const char * gender_noun[GENDER_MAX]
Definition: object.c:47
shstr * glow
Definition: object.h:193
int16_t rotate
Definition: object.h:335
struct obj * attacked_by
Definition: object.h:199
uint8_t sub_type
Definition: object.h:363