… | |
… | |
29 | |
29 | |
30 | #include "cfperl.h" |
30 | #include "cfperl.h" |
31 | #include "shstr.h" |
31 | #include "shstr.h" |
32 | |
32 | |
33 | typedef int tag_t; |
33 | typedef 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 | MTH std::string long_desc (object *who = 0); |
|
|
368 | MTH std::string describe_monster (object *who = 0); |
|
|
369 | MTH std::string describe_item (object *who = 0); |
|
|
370 | MTH std::string describe (object *who = 0); |
|
|
371 | |
|
|
372 | // If this object has no extra parts but should have them, |
|
|
373 | // add them, effectively expanding heads into multipart |
|
|
374 | // objects. This method only works on objects not inserted |
|
|
375 | // anywhere. |
|
|
376 | void expand_tail (); |
|
|
377 | |
366 | // insert object at same map position as 'where' |
378 | // insert object at same map position as 'where' |
367 | // handles both inventory and map "positions" |
379 | // handles both inventory and map "positions" |
368 | MTH object *insert_at (object *where, object *originator = 0, int flags = 0); |
380 | MTH object *insert_at (object *where, object *originator = 0, int flags = 0); |
369 | |
381 | |
370 | MTH void activate (); |
382 | MTH void activate (); |
… | |
… | |
482 | { |
494 | { |
483 | archetype (); |
495 | archetype (); |
484 | ~archetype (); |
496 | ~archetype (); |
485 | void gather_callbacks (AV *&callbacks, event_type event) const; |
497 | void gather_callbacks (AV *&callbacks, event_type event) const; |
486 | |
498 | |
487 | static bool load (object_thawer &f); |
499 | static archetype *read (object_thawer &f); |
488 | static archetype *get (const char *name); // find or create |
500 | static archetype *get (const char *name); // find or create |
489 | static archetype *find (const char *name); |
501 | static archetype *find (const char *name); |
490 | |
502 | |
491 | void hash_add (); // add to hashtable |
503 | void hash_add (); // add to hashtable |
492 | void hash_del (); // remove from hashtable |
504 | void hash_del (); // remove from hashtable |
493 | |
505 | |
… | |
… | |
495 | struct archetype *ACC (RW, next); /* Next archetype in a linked list */ |
507 | struct archetype *ACC (RW, next); /* Next archetype in a linked list */ |
496 | struct archetype *ACC (RW, head); /* The main part of a linked object */ |
508 | struct archetype *ACC (RW, head); /* The main part of a linked object */ |
497 | struct archetype *ACC (RW, more); /* Next part of a linked object */ |
509 | struct archetype *ACC (RW, more); /* Next part of a linked object */ |
498 | object ACC (RO, clone); /* An object from which to do ->copy_to () */ |
510 | object ACC (RO, clone); /* An object from which to do ->copy_to () */ |
499 | uint32 ACC (RW, editable); /* editable flags (mainly for editor) */ |
511 | uint32 ACC (RW, editable); /* editable flags (mainly for editor) */ |
|
|
512 | 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 |
513 | 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. |
514 | * in comparison to the head. |
502 | */ |
515 | */ |
503 | }; |
516 | }; |
504 | |
517 | |
… | |
… | |
543 | #define INS_ON_TOP 0x0008 |
556 | #define INS_ON_TOP 0x0008 |
544 | #define INS_BELOW_ORIGINATOR 0x0010 |
557 | #define INS_BELOW_ORIGINATOR 0x0010 |
545 | #define INS_MAP_LOAD 0x0020 |
558 | #define INS_MAP_LOAD 0x0020 |
546 | |
559 | |
547 | #define ARCH_SINGULARITY "singularity" |
560 | #define ARCH_SINGULARITY "singularity" |
548 | #define ARCH_SINGULARITY_LEN 11 |
|
|
549 | #define ARCH_DETECT_MAGIC "detect_magic" |
561 | #define ARCH_DETECT_MAGIC "detect_magic" |
550 | #define ARCH_DEPLETION "depletion" |
562 | #define ARCH_DEPLETION "depletion" |
551 | #define ARCH_SYMPTOM "symptom" |
563 | #define ARCH_SYMPTOM "symptom" |
552 | |
564 | |
553 | #endif |
565 | #endif |