123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- #ifndef Animation_H
- #define Animation_H
- #include "Critical.h"
- #include "Zeichnung.h"
- namespace Framework
- {
- class Bild;
- class LTDBDatei;
- class InitDatei;
- class Rahmen;
-
- class Animation2DData : public virtual ReferenceCounter
- {
- private:
- Bild** bilder;
- int bildAnzahl;
- int fps;
- bool wiederhohlen;
- bool transparent;
- Critical cs;
- public:
-
- DLLEXPORT Animation2DData();
-
- DLLEXPORT ~Animation2DData();
-
-
-
- DLLEXPORT void lock();
-
-
-
- DLLEXPORT void unlock();
-
-
-
-
-
-
-
-
- DLLEXPORT void ladeAnimation(InitDatei* datei);
-
-
- DLLEXPORT void ladeAnimation(LTDBDatei* datei);
-
-
- DLLEXPORT void setFPS(int fps);
-
-
- DLLEXPORT void setWiederhohlend(bool wh);
-
-
- DLLEXPORT void setTransparent(bool trp);
-
-
- DLLEXPORT void reset();
-
-
- DLLEXPORT Bild* getBild(int i) const;
-
-
- DLLEXPORT Bild* zBild(int i) const;
-
- DLLEXPORT int getBildAnzahl() const;
-
- DLLEXPORT int getFPS() const;
-
-
- DLLEXPORT bool istWiederhohlend() const;
-
- DLLEXPORT bool istTransparent() const;
- };
-
- class Animation2D : public Zeichnung
- {
- private:
- Animation2DData* data;
- int jetzt;
- double ausgleich;
- unsigned char alpha;
- unsigned char maxAlpha;
- bool rahmen;
- Rahmen* ram;
- int aps;
- bool sichtbar;
- public:
-
- DLLEXPORT Animation2D();
-
- DLLEXPORT virtual ~Animation2D();
-
-
- DLLEXPORT void setRahmen(bool ram);
-
-
- DLLEXPORT void setRahmenZ(Rahmen* ram);
-
-
- DLLEXPORT void setRahmenBreite(int br);
-
-
- DLLEXPORT void setRahmenFarbe(int fc);
-
-
- DLLEXPORT void setAnimationDataZ(Animation2DData* data);
-
-
- DLLEXPORT void setAlphaMaske(unsigned char alpha);
-
-
- DLLEXPORT void setAPS(int aps);
-
-
-
- DLLEXPORT void setSichtbar(bool sichtbar);
-
-
- DLLEXPORT bool tick(double zeit) override;
-
-
- DLLEXPORT void render(Bild& zRObj) override;
-
- DLLEXPORT Animation2DData* getAnimationData() const;
-
- DLLEXPORT Animation2DData* zAnimationData() const;
-
- DLLEXPORT bool istSichtbar() const;
-
- DLLEXPORT int getJetzt() const;
-
- DLLEXPORT unsigned char getAlphaMaske() const;
-
- DLLEXPORT bool hatRahmen() const;
-
- DLLEXPORT Rahmen* getRahmen() const;
-
- DLLEXPORT Rahmen* zRahmen() const;
-
- DLLEXPORT int getRahmenBreite() const;
-
- DLLEXPORT int getRahmenFarbe() const;
-
-
- DLLEXPORT Zeichnung* dublizieren() const override;
- };
- }
- #endif
|