#pragma once #include "Array.h" namespace Framework { class Bild; class Animation2DData; class Textur2D { private: struct Animation { Animation2DData *data; int jetzt; double ausgleich; }; bool circularAnimation; int animationIndex; Bild *txt; Array< Animation* > *animData; int ref; public: //! Konstructor __declspec( dllexport ) Textur2D(); //! Destructor __declspec( dllexport ) ~Textur2D(); //! Legt fest, ob die animation sich automatisch wiederhohlen soll //! \param ca 1, falls sich die animation automatisch wiederhohlen soll __declspec( dllexport ) void setCircularAnimation( bool ca ); //! setzt einen Zeiger auf die Textur (fals nicht animiert) //! \param textur Der Zeiger auf das Bild __declspec( dllexport ) void setTexturZ( Bild *textur ); //! fügt eine Animation hinzu //! \param textur Der Zeiger auf die Animationsdaten __declspec( dllexport ) void addAnimationZ( Animation2DData *textur ); //! setzt die aktuelle Annimation //! \param index Der Index der Animation __declspec( dllexport ) void setAnimation( int index ); //! aktiviert die nachfolgende animation __declspec( dllexport ) void nextAnimation(); //! setzt die vergangene Zeit seit dem letzten Aufruf //! \param t die vergangene Zeit in sekunden __declspec( dllexport ) bool tick( double t ); //! gibt die aktuelle Textur zurück __declspec( dllexport ) Bild *zTextur() const; //! erhöht den Reference Counter um 1 und gibt this zurück __declspec( dllexport ) Textur2D *getThis(); //! verringert den reference counter um 1 und löscht sich selbst, falls er 0 erreicht //! gibt 0 zurück __declspec( dllexport ) Textur2D *release(); }; }