aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickspriteengine_p.h
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-01-17 20:02:30 +1000
committerQt by Nokia <qt-info@nokia.com>2012-01-23 07:38:34 +0100
commiteed81bda805e05ea7bbd486ab7d198f7ca45d2ed (patch)
tree67805283499d5f1e5597129e8797a2785af32ceb /src/quick/items/qquickspriteengine_p.h
parent658728c1397e1523d8293956815325f2269e4ffb (diff)
Per-frame Sprites patch three
interpolation bools work with the new sprite rendering approach. Giant sprite images that get split into multiple rows now work with the new sprite rendering approach (or even at all). Change-Id: I7f3e09684622f523564802c7634361b6fe363676 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/quick/items/qquickspriteengine_p.h')
-rw-r--r--src/quick/items/qquickspriteengine_p.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/quick/items/qquickspriteengine_p.h b/src/quick/items/qquickspriteengine_p.h
index 926bb68435..48ef6c305e 100644
--- a/src/quick/items/qquickspriteengine_p.h
+++ b/src/quick/items/qquickspriteengine_p.h
@@ -212,7 +212,8 @@ public:
void setGoal(int state, int sprite=0, bool jump=false);
void start(int index=0, int state=0);
- void advance(int index=0);//Sends state to the next chosen state, unlike goal.
+ virtual void restart(int index=0);
+ virtual void advance(int index=0);//Sends state to the next chosen state, unlike goal.
void stop(int index=0);
int curState(int index=0) {return m_things[index];}
@@ -245,7 +246,6 @@ public slots:
protected:
friend class QQuickParticleSystem;
- void restart(int index);
void addToUpdateList(uint t, int idx);
int nextState(int curState, int idx=0);
int goalSeek(int curState, int idx, int dist=-1);
@@ -262,6 +262,7 @@ protected:
QString m_globalGoal;
int m_maxFrames;
int m_imageStateCount;
+ bool m_addAdvance;
};
class QQuickSpriteEngine : public QQuickStochasticEngine
@@ -281,14 +282,18 @@ public:
int spriteState(int sprite=0);
int spriteStart(int sprite=0);
int spriteFrames(int sprite=0);
- int spriteDuration(int sprite=0);
+ int spriteDuration(int sprite=0);//Full duration, not per frame
int spriteX(int /* sprite */ = 0) { return 0; }//Currently all rows are 0 aligned, if we get more space efficient we might change this
int spriteY(int sprite=0);
int spriteWidth(int sprite=0);
int spriteHeight(int sprite=0);
- int spriteCount();//Like state count, but for the image states
+ int spriteCount();//Like state count
int maxFrames();
+ QString realName(int sprite=0);//Gives the parent sprite name for pseudosprites
QImage assembledImage();
+
+ virtual void restart(int index=0);
+ virtual void advance(int index=0);
private:
QList<QQuickSprite*> m_sprites;
};