Files
eepp/src/gaming/cobjectlayer.hpp
spartanj@gmail.com ea34c1faa6 Updated Physics module integrating the lastest changes to Chipmunk Physics 6.
Small fixes to SDL 1.3 version to avoid crashes on Windows.
Avoid to compile SDL 1.2 when compiling SDL 1.3 in Windows.
2011-07-25 00:53:23 -03:00

47 lines
914 B
C++

#ifndef EE_GAMINGCOBJECTLAYER_HPP
#define EE_GAMINGCOBJECTLAYER_HPP
#include "clayer.hpp"
#include "cgameobject.hpp"
namespace EE { namespace Gaming {
class cMap;
class EE_API cObjectLayer : public cLayer {
public:
typedef std::list<cGameObject*> ObjList;
virtual ~cObjectLayer();
virtual void Draw( const eeVector2f &Offset = eeVector2f(0,0) );
virtual void Update();
virtual void AddGameObject( cGameObject * obj );
virtual void RemoveGameObject( cGameObject * obj );
virtual void RemoveGameObject( const eeVector2i& pos );
virtual cGameObject * GetObjectOver( const eeVector2i& pos );
virtual Uint32 GetObjectCount() const;
protected:
friend class cMap;
ObjList mObjects;
cObjectLayer( cMap * map, Uint32 flags, std::string name = "", eeVector2f offset = eeVector2f(0,0) );
void AllocateLayer();
void DeallocateLayer();
ObjList& GetObjectList();
};
}}
#endif