From 9dc429df9dbd1a5ae0f93d553ccfde7ab37a53a2 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 22 Nov 2012 11:00:03 +0000 Subject: gameplay good: up against memory limit --- vfg/src/Puppet.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'vfg/src/Puppet.h') 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 clips; + map clips; deque playlist; }; -- cgit v1.2.3