#ifndef PUPPET_H #define PUPPET_H #include "ofMain.h" #include "ofxSprite.h" #include "ofxXmlSettings.h" /* "base" clip will be drawn unless another clip is playing TODO: make resolution independent */ class puppetSprite: public ofxSprite { //puppetSprite loops by default public: void draw(float x, float y, float scale) { getCurrentImage().draw(x-(anchorPoint.x*scale),y-(anchorPoint.y*scale),getWidth()*scale,getHeight()*scale); } }; class Puppet { public: Puppet(); virtual ~Puppet(); void load(string filename); void play(string clip); void playNow(string clip); void draw(float x, float y, float scale=1.0f); bool isPlaying(); protected: private: map clips; deque playlist; }; #endif // PUPPET_H