… | |
… | |
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 |
… | |
… | |
760 | object (const object &); |
760 | object (const object &); |
761 | }; |
761 | }; |
762 | |
762 | |
763 | // move this object to the top of its env's inventory to speed up |
763 | // move this object to the top of its env's inventory to speed up |
764 | // searches for it. |
764 | // searches for it. |
765 | static object * |
765 | static inline object * |
766 | splay (object *ob) |
766 | splay (object *ob) |
767 | { |
767 | { |
768 | if (ob->above && ob->env) |
768 | if (ob->above && ob->env) |
769 | { |
769 | { |
770 | if (ob->above) ob->above->below = ob->below; |
770 | if (ob->above) ob->above->below = ob->below; |
… | |
… | |
902 | #define INS_ABOVE_FLOOR_ONLY 0x0002 |
902 | #define INS_ABOVE_FLOOR_ONLY 0x0002 |
903 | #define INS_NO_WALK_ON 0x0004 |
903 | #define INS_NO_WALK_ON 0x0004 |
904 | #define INS_ON_TOP 0x0008 |
904 | #define INS_ON_TOP 0x0008 |
905 | #define INS_BELOW_ORIGINATOR 0x0010 |
905 | #define INS_BELOW_ORIGINATOR 0x0010 |
906 | |
906 | |
907 | #define ARCH_DEPLETION "depletion" |
|
|
908 | |
|
|
909 | //-GPL |
907 | //-GPL |
910 | |
908 | |
911 | #endif |
909 | #endif |
912 | |
910 | |