summaryrefslogtreecommitdiff
path: root/vfg/src/Puppet.h
blob: e0df87ab6085732364926e3c7124f7ea6ca28bd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#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 Puppet
{
    public:
        Puppet();
        virtual ~Puppet();
        void load(string filename);
        void play(string clip);
        void playNow(string clip);
        void draw(float x, float y);
        bool isPlaying();
    protected:
    private:
        map<string,ofxSprite> clips;
        deque<string> playlist;
};

#endif // PUPPET_H