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.129 by root, Mon Jun 4 12:19:08 2007 UTC vs.
Revision 1.130 by root, Mon Jun 4 13:04:00 2007 UTC

400 MTH object *head_ () 400 MTH object *head_ ()
401 { 401 {
402 return head ? head : this; 402 return head ? head : this;
403 } 403 }
404 404
405 MTH bool is_head ()
406 {
407 return head_ () == this;
408 }
409
405 MTH std::string long_desc (object *who = 0); 410 MTH std::string long_desc (object *who = 0);
406 MTH std::string describe_monster (object *who = 0); 411 MTH std::string describe_monster (object *who = 0);
407 MTH std::string describe_item (object *who = 0); 412 MTH std::string describe_item (object *who = 0);
408 MTH std::string describe (object *who = 0); 413 MTH std::string describe (object *who = 0);
409 414
482 } 487 }
483 488
484 MTH struct region *region () const; 489 MTH struct region *region () const;
485 490
486protected: 491protected:
487 friend struct archetype;
488
489 void link (); 492 void link ();
490 void unlink (); 493 void unlink ();
491 494
492 object (); 495 object ();
493 ~object (); 496 ~object ();
494}; 497};
537 * object and pointers. This structure should get removed, and just replaced 540 * object and pointers. This structure should get removed, and just replaced
538 * by the object structure 541 * by the object structure
539 */ 542 */
540 543
541INTERFACE_CLASS (archetype) 544INTERFACE_CLASS (archetype)
542struct archetype : zero_initialised, attachable 545struct archetype : object
543{ 546{
544 archetype (); 547 archetype (const char *name);
545 ~archetype (); 548 ~archetype ();
546 void gather_callbacks (AV *&callbacks, event_type event) const; 549 void gather_callbacks (AV *&callbacks, event_type event) const;
547 550
548 static archetype *read (object_thawer &f); 551 static archetype *read (object_thawer &f);
549 static archetype *get (const char *name); // find or create 552 static archetype *get (const char *name); // find or create
550 static archetype *find (const char *name); 553 static archetype *find (const char *name);
551 554
552 void hash_add (); // add to hashtable 555 void link ();
553 void hash_del (); // remove from hashtable 556 void unlink ();
554 557
555bool linked;//TODO: go away
556sint8 tail_x, tail_y;//TODO: go away
557 int ACC (RW, archid); // index in archvector 558 int ACC (RW, archid); // index in archvector
558 shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */ 559 shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */
559 bool ACC (RW, stub); // if true, this is an invalid archetype 560 bool ACC (RW, stub); // if true, this is an invalid archetype
560 struct archetype *ACC (RW, next); /* Next archetype in a linked list */ 561 struct archetype *ACC (RW, next); /* Next archetype in a linked list */
561 struct archetype *ACC (RW, head); /* The main part of a linked object */ 562 struct archetype *ACC (RW, head); /* The main part of a linked object */
562 struct archetype *ACC (RW, more); /* Next part of a linked object */ 563 struct archetype *ACC (RW, more); /* Next part of a linked object */
563 object ACC (RO, clone); /* An object from which to do ->copy_to () */
564 uint32 ACC (RW, editable); /* editable flags (mainly for editor) */ 564 uint32 ACC (RW, editable); /* editable flags (mainly for editor) */
565 565
566 sint8 ACC (RW, min_x), ACC (RW, min_y); /* extents, compared to the head (min_x, min_y should be zero, but aren't...) */ 566 sint8 ACC (RW, min_x), ACC (RW, min_y); /* extents, compared to the head (min_x, min_y should be zero, but aren't...) */
567 sint8 ACC (RW, max_x), ACC (RW, max_y); 567 sint8 ACC (RW, max_x), ACC (RW, max_y);
568}; 568};

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines