… | |
… | |
405 | int move (int dir) |
405 | int move (int dir) |
406 | { |
406 | { |
407 | return move (dir, this); |
407 | return move (dir, this); |
408 | } |
408 | } |
409 | |
409 | |
|
|
410 | // changes move_type to a new value - handles move_on/move_off effects |
|
|
411 | void change_move_type (MoveType mt); |
|
|
412 | |
410 | static bool can_merge_slow (object *op1, object *op2); |
413 | static bool can_merge_slow (object *op1, object *op2); |
411 | |
414 | |
412 | // this is often used in time-critical code, so optimise |
415 | // this is often used in time-critical code, so optimise |
413 | MTH static bool can_merge (object *op1, object *op2) |
416 | MTH static bool can_merge (object *op1, object *op2) |
414 | { |
417 | { |
… | |
… | |
808 | MTH void post_load_check (); // do some adjustments after parsing |
811 | MTH void post_load_check (); // do some adjustments after parsing |
809 | |
812 | |
810 | object_vector_index ACC (RW, archid); // index in archvector |
813 | object_vector_index ACC (RW, archid); // index in archvector |
811 | shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */ |
814 | shstr ACC (RW, archname); /* More definite name, like "generate_kobold" */ |
812 | |
815 | |
813 | sint8 ACC (RW, min_x), ACC (RW, min_y); /* extents, compared to the head (min_x, min_y should be zero, but aren't...) */ |
816 | sint8 ACC (RW, max_x); /* extents, compared to the head (min_x, min_y should be zero, but aren't...) */ |
814 | sint8 ACC (RW, max_x), ACC (RW, max_y); |
|
|
815 | |
817 | |
816 | // support for archetype loading |
818 | // support for archetype loading |
817 | static archetype *read (object_thawer &f); |
819 | static archetype *read (object_thawer &f); |
818 | MTH static void commit_load (); // commit any objects loaded, resolves cyclic dependencies and more |
820 | MTH static void commit_load (); // commit any objects loaded, resolves cyclic dependencies and more |
819 | static void postpone_arch_ref (arch_ptr &ref, const_utf8_string other_arch); /* postpone other_arch reference */ |
821 | static void postpone_arch_ref (arch_ptr &ref, const_utf8_string other_arch); /* postpone other_arch reference */ |
820 | }; |
822 | }; |
821 | |
823 | |
822 | // returns whether the objetc is a dragon player, which are often specialcased |
824 | // returns whether the object is a dragon player, which are often specialcased |
823 | inline bool |
825 | inline bool |
824 | object::is_dragon () const |
826 | object::is_dragon () const |
825 | { |
827 | { |
826 | return arch->race == shstr_dragon && is_player (); |
828 | return arch->race == shstr_dragon && is_player (); |
827 | } |
829 | } |