summaryrefslogtreecommitdiff
path: root/vfg/src/Puppet.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2012-12-10 19:30:27 +0000
committerComment <tim@gray.(none)>2012-12-10 19:30:27 +0000
commitdba01ce870165fd8d8a5fea921cb31f7c4e8c25f (patch)
treebc7f877edaeb2047eac9606c9bf869bbe9f7776a /vfg/src/Puppet.h
parent0bb92ced351b7fbba6e2e7036eae92037d08facf (diff)
fixed race condition in asterisk driver
Diffstat (limited to 'vfg/src/Puppet.h')
-rwxr-xr-xvfg/src/Puppet.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/vfg/src/Puppet.h b/vfg/src/Puppet.h
index 1f6d90a..d685a76 100755
--- a/vfg/src/Puppet.h
+++ b/vfg/src/Puppet.h
@@ -19,6 +19,9 @@ class puppetSprite: public ofxSprite {
public:
void draw(float x, float y, float scale) {
getCurrentImage().draw(x-(anchorPoint.x*scale),y-(anchorPoint.y*scale),getWidth()*scale,getHeight()*scale);
+ }
+ int getDuration() {
+ return totalFrames*(1000/frameRate);
}
};
@@ -28,14 +31,18 @@ class Puppet
Puppet();
virtual ~Puppet();
void load(string filename);
- void play(string clip);
- void playNow(string clip);
+ void play(string clip,int time=0);
+ void playNow(string clip,int time=0);
void draw(float x, float y, float scale=1.0f);
- bool isPlaying();
+ bool isPlaying();
+ void clear();
protected:
private:
map<string,puppetSprite> clips;
- deque<string> playlist;
+ //deque<string> playlist;
+ deque< pair<int,string> > playlist; //time,clip = when it comes to play, pause until time, or just leave at 0 to play immediate
+ //time absolute
+ //need a clear method? should never be called really
};
#endif // PUPPET_H