#include <string>
#include "refcounter.hpp"
-#include "lisp/lisp.hpp"
class DrawingContext;
class ObjectRemoveListener;
/**
- * This is a base class for all game objects. Each sector of a level will hold a
- * list of active GameObject while the game is played.
+ * Base class for all the things that make up Levels' Sectors.
+ *
+ * Each sector of a level will hold a list of active GameObject while the
+ * game is played.
*
* This class is responsible for:
* - Updating and Drawing the object. This should happen in the update() and
/** registers a remove listener which will be called if the object
* gets removed/destroyed
*/
- void add_remove_listener(ObjectRemoveListener* listener)
- {
- RemoveListenerListEntry* entry = new RemoveListenerListEntry();
- entry->next = remove_listeners;
- entry->listener = listener;
-
- remove_listeners = entry;
- }
+ void add_remove_listener(ObjectRemoveListener* listener);
+
+ /**
+ * unregisters a remove listener, so it will no longer be called if the object
+ * gets removed/destroyed
+ */
+ void del_remove_listener(ObjectRemoveListener* listener);
const std::string& get_name() const
{