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.106 by root, Mon Apr 16 12:37:08 2007 UTC vs.
Revision 1.109 by root, Sat Apr 21 16:56:32 2007 UTC

29 29
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#define NUM_BODY_LOCATIONS 12 35#define NUM_BODY_LOCATIONS 12
35#define BODY_ARMS 1 36#define BODY_ARMS 1
36 37
37/* See common/item.c */ 38/* See common/item.c */
38 39
361 MTH object *head_ () 362 MTH object *head_ ()
362 { 363 {
363 return head ? head : this; 364 return head ? head : this;
364 } 365 }
365 366
367 // If this object has no extra parts but should have them,
368 // add them, effectively expanding heads into multipart
369 // objects. This method only works on objects not inserted
370 // anywhere.
371 void expand_tail ();
372
366 // insert object at same map position as 'where' 373 // insert object at same map position as 'where'
367 // handles both inventory and map "positions" 374 // handles both inventory and map "positions"
368 MTH object *insert_at (object *where, object *originator = 0, int flags = 0); 375 MTH object *insert_at (object *where, object *originator = 0, int flags = 0);
369 376
370 MTH void activate (); 377 MTH void activate ();
482{ 489{
483 archetype (); 490 archetype ();
484 ~archetype (); 491 ~archetype ();
485 void gather_callbacks (AV *&callbacks, event_type event) const; 492 void gather_callbacks (AV *&callbacks, event_type event) const;
486 493
487 static bool load (object_thawer &f); 494 static archetype *read (object_thawer &f);
488 static archetype *get (const char *name); // find or create 495 static archetype *get (const char *name); // find or create
489 static archetype *find (const char *name); 496 static archetype *find (const char *name);
490 497
491 void hash_add (); // add to hashtable 498 void hash_add (); // add to hashtable
492 void hash_del (); // remove from hashtable 499 void hash_del (); // remove from hashtable
493 500
495 struct archetype *ACC (RW, next); /* Next archetype in a linked list */ 502 struct archetype *ACC (RW, next); /* Next archetype in a linked list */
496 struct archetype *ACC (RW, head); /* The main part of a linked object */ 503 struct archetype *ACC (RW, head); /* The main part of a linked object */
497 struct archetype *ACC (RW, more); /* Next part of a linked object */ 504 struct archetype *ACC (RW, more); /* Next part of a linked object */
498 object ACC (RO, clone); /* An object from which to do ->copy_to () */ 505 object ACC (RO, clone); /* An object from which to do ->copy_to () */
499 uint32 ACC (RW, editable); /* editable flags (mainly for editor) */ 506 uint32 ACC (RW, editable); /* editable flags (mainly for editor) */
507 bool ACC (RW, linked); // linked into list of heads
500 sint8 ACC (RW, tail_x), ACC (RW, tail_y); /* Where the lower right most portion of the object is 508 sint8 ACC (RW, tail_x), ACC (RW, tail_y); /* Where the lower right most portion of the object is
501 * in comparison to the head. 509 * in comparison to the head.
502 */ 510 */
503}; 511};
504 512
543#define INS_ON_TOP 0x0008 551#define INS_ON_TOP 0x0008
544#define INS_BELOW_ORIGINATOR 0x0010 552#define INS_BELOW_ORIGINATOR 0x0010
545#define INS_MAP_LOAD 0x0020 553#define INS_MAP_LOAD 0x0020
546 554
547#define ARCH_SINGULARITY "singularity" 555#define ARCH_SINGULARITY "singularity"
548#define ARCH_SINGULARITY_LEN 11
549#define ARCH_DETECT_MAGIC "detect_magic" 556#define ARCH_DETECT_MAGIC "detect_magic"
550#define ARCH_DEPLETION "depletion" 557#define ARCH_DEPLETION "depletion"
551#define ARCH_SYMPTOM "symptom" 558#define ARCH_SYMPTOM "symptom"
552 559
553#endif 560#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines