diff options
Diffstat (limited to 'engines/neverhood/scene.h')
-rw-r--r-- | engines/neverhood/scene.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/engines/neverhood/scene.h b/engines/neverhood/scene.h index 1abcbfb964..5e42e34418 100644 --- a/engines/neverhood/scene.h +++ b/engines/neverhood/scene.h @@ -37,6 +37,8 @@ namespace Neverhood { +class Console; + class Scene : public Entity { public: Scene(NeverhoodEngine *vm, Module *parentModule); @@ -46,6 +48,7 @@ public: bool removeEntity(Entity *entity); void addSurface(BaseSurface *surface); bool removeSurface(BaseSurface *surface); + void printSurfaces(Console *con); Sprite *addSprite(Sprite *sprite); void removeSprite(Sprite *sprite); void setSurfacePriority(BaseSurface *surface, int priority); @@ -73,89 +76,89 @@ public: void checkCollision(Sprite *sprite, uint16 flags, int messageNum, uint32 messageParam); // Some crazy templated functions to make the logic code smaller/simpler (imo!) // insertKlaymen - template<class T> + template<class T> void insertKlaymen() { _klaymen = (T*)addSprite(new T(_vm, this)); } - template<class T, class Arg1> + template<class T, class Arg1> void insertKlaymen(Arg1 arg1) { _klaymen = (T*)addSprite(new T(_vm, this, arg1)); } - template<class T, class Arg1, class Arg2> + template<class T, class Arg1, class Arg2> void insertKlaymen(Arg1 arg1, Arg2 arg2) { _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2)); } - template<class T, class Arg1, class Arg2, class Arg3> + template<class T, class Arg1, class Arg2, class Arg3> void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3) { _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3)); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4> void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) { _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3, arg4)); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) { _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3, arg4, arg5)); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6> void insertKlaymen(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) { _klaymen = (T*)addSprite(new T(_vm, this, arg1, arg2, arg3, arg4, arg5, arg6)); } // insertSprite - template<class T> + template<class T> T* insertSprite() { return (T*)addSprite(new T(_vm)); } - template<class T, class Arg1> + template<class T, class Arg1> T* insertSprite(Arg1 arg1) { return (T*)addSprite(new T(_vm, arg1)); } - template<class T, class Arg1, class Arg2> + template<class T, class Arg1, class Arg2> T* insertSprite(Arg1 arg1, Arg2 arg2) { return (T*)addSprite(new T(_vm, arg1, arg2)); } - template<class T, class Arg1, class Arg2, class Arg3> + template<class T, class Arg1, class Arg2, class Arg3> T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3) { return (T*)addSprite(new T(_vm, arg1, arg2, arg3)); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4> T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) { return (T*)addSprite(new T(_vm, arg1, arg2, arg3, arg4)); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) { return (T*)addSprite(new T(_vm, arg1, arg2, arg3, arg4, arg5)); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6> T* insertSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) { return (T*)addSprite(new T(_vm, arg1, arg2, arg3, arg4, arg5, arg6)); } // createSprite - template<class T> + template<class T> T* createSprite() { return new T(_vm); } - template<class T, class Arg1> + template<class T, class Arg1> T* createSprite(Arg1 arg1) { return new T(_vm, arg1); } - template<class T, class Arg1, class Arg2> + template<class T, class Arg1, class Arg2> T* createSprite(Arg1 arg1, Arg2 arg2) { return new T(_vm, arg1, arg2); } - template<class T, class Arg1, class Arg2, class Arg3> + template<class T, class Arg1, class Arg2, class Arg3> T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3) { return new T(_vm, arg1, arg2, arg3); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4> T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4) { return new T(_vm, arg1, arg2, arg3, arg4); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5) { return new T(_vm, arg1, arg2, arg3, arg4, arg5); } - template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6> + template<class T, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6> T* createSprite(Arg1 arg1, Arg2 arg2, Arg3 arg3, Arg4 arg4, Arg5 arg5, Arg6 arg6) { return new T(_vm, arg1, arg2, arg3, arg4, arg5, arg6); } |