summaryrefslogtreecommitdiff
path: root/vfg/src/Puppet.h
diff options
context:
space:
mode:
Diffstat (limited to 'vfg/src/Puppet.h')
-rwxr-xr-xvfg/src/Puppet.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/vfg/src/Puppet.h b/vfg/src/Puppet.h
index e0df87a..7ee80ee 100755
--- a/vfg/src/Puppet.h
+++ b/vfg/src/Puppet.h
@@ -11,6 +11,13 @@
TODO: make resolution independent
*/
+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);
+ }
+};
+
class Puppet
{
public:
@@ -19,11 +26,11 @@ class Puppet
void load(string filename);
void play(string clip);
void playNow(string clip);
- void draw(float x, float y);
+ void draw(float x, float y, float scale=1.0f);
bool isPlaying();
protected:
private:
- map<string,ofxSprite> clips;
+ map<string,puppetSprite> clips;
deque<string> playlist;
};