X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fgame_object.hpp;h=76b0883c605f6f77bd2047accf79f44bea968e68;hb=339968d0eb222f5cad1397580631ab44acf40b10;hp=7d4b05f713c1cc4b6f3c795776ae0e1ade390d5d;hpb=13c6f377301f91c8d79ab768ba97b5eb771ed624;p=supertux.git diff --git a/src/game_object.hpp b/src/game_object.hpp index 7d4b05f71..76b0883c6 100644 --- a/src/game_object.hpp +++ b/src/game_object.hpp @@ -21,6 +21,7 @@ #include #include "refcounter.hpp" +#include "lisp/lisp.hpp" class DrawingContext; class ObjectRemoveListener; @@ -34,7 +35,6 @@ class ObjectRemoveListener; * draw() functions. Both are called once per frame. * - Providing a safe way to remove the object by calling the remove_me * functions. - * - a 32bit bitset for flags... */ class GameObject : public RefCounter { @@ -59,14 +59,14 @@ public: { return !wants_to_die; } - + /** schedules this object to be removed at the end of the frame */ void remove_me() { wants_to_die = true; } - - /** registers a remove listener which will be called if the object + + /** registers a remove listener which will be called if the object * gets removed/destroyed */ void add_remove_listener(ObjectRemoveListener* listener) @@ -77,18 +77,10 @@ public: remove_listeners = entry; } - - // flags - enum { - /// the tile so you can stand on it - FLAG_SOLID = (1 << 0), - /// the object can be carried around (inherits from Portable) - FLAG_PORTABLE = (1 << 1) - }; - int get_flags() const + const std::string& get_name() const { - return flags; + return name; } private: @@ -105,7 +97,11 @@ private: RemoveListenerListEntry* remove_listeners; protected: - int flags; + /** + * a name for the gameobject, this is mostly a hint for scripts and for + * debugging, don't rely on names being set or being unique + */ + std::string name; }; #endif /*SUPERTUX_GAMEOBJECT_H*/