… | |
… | |
531 | MTH bool is_arrow () const { return type == ARROW |
531 | MTH bool is_arrow () const { return type == ARROW |
532 | || (type == SPELL_EFFECT |
532 | || (type == SPELL_EFFECT |
533 | && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } |
533 | && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } |
534 | MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; } |
534 | MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; } |
535 | |
535 | |
536 | MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } |
536 | MTH bool has_active_speed () const { return fabs (speed) >= MIN_ACTIVE_SPEED; } |
537 | |
537 | |
538 | // temporary: wether the object can be saved in a map file |
538 | // temporary: wether the object can be saved in a map file |
539 | // contr => is a player |
539 | // contr => is a player |
540 | // head => only save head of a multitile object |
540 | // head => only save head of a multitile object |
541 | // owner => can not reference owner yet |
541 | // owner => can not reference owner yet |
… | |
… | |
645 | MTH void create_treasure (treasurelist *tl, int flags = 0); |
645 | MTH void create_treasure (treasurelist *tl, int flags = 0); |
646 | |
646 | |
647 | // insert object at same map position as 'where' |
647 | // insert object at same map position as 'where' |
648 | // handles both inventory and map "positions" |
648 | // handles both inventory and map "positions" |
649 | MTH object *insert_at (object *where, object *originator = 0, int flags = 0); |
649 | MTH object *insert_at (object *where, object *originator = 0, int flags = 0); |
|
|
650 | // check whether we can put this into the map, respect max_nrof, max_volume, max_items |
|
|
651 | MTH bool can_drop_at (maptile *m, int x, int y, object *originator = 0); |
650 | MTH void drop_unpaid_items (); |
652 | MTH void drop_unpaid_items (); |
651 | |
653 | |
652 | MTH void activate (); |
654 | MTH void activate (); |
653 | MTH void deactivate (); |
655 | MTH void deactivate (); |
654 | MTH void activate_recursive (); |
656 | MTH void activate_recursive (); |
… | |
… | |
760 | object (const object &); |
762 | object (const object &); |
761 | }; |
763 | }; |
762 | |
764 | |
763 | // move this object to the top of its env's inventory to speed up |
765 | // move this object to the top of its env's inventory to speed up |
764 | // searches for it. |
766 | // searches for it. |
765 | static object * |
767 | static inline object * |
766 | splay (object *ob) |
768 | splay (object *ob) |
767 | { |
769 | { |
768 | if (ob->above && ob->env) |
770 | if (ob->above && ob->env) |
769 | { |
771 | { |
770 | if (ob->above) ob->above->below = ob->below; |
772 | if (ob->above) ob->above->below = ob->below; |
… | |
… | |
902 | #define INS_ABOVE_FLOOR_ONLY 0x0002 |
904 | #define INS_ABOVE_FLOOR_ONLY 0x0002 |
903 | #define INS_NO_WALK_ON 0x0004 |
905 | #define INS_NO_WALK_ON 0x0004 |
904 | #define INS_ON_TOP 0x0008 |
906 | #define INS_ON_TOP 0x0008 |
905 | #define INS_BELOW_ORIGINATOR 0x0010 |
907 | #define INS_BELOW_ORIGINATOR 0x0010 |
906 | |
908 | |
907 | #define ARCH_DEPLETION "depletion" |
|
|
908 | |
|
|
909 | //-GPL |
909 | //-GPL |
910 | |
910 | |
911 | #endif |
911 | #endif |
912 | |
912 | |