diff options
| author | Tim Redfern <tim@gray.(none)> | 2012-11-20 04:46:42 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@gray.(none)> | 2012-11-20 04:46:42 +0000 |
| commit | b4d89c0a9029739d2af1705b371dc28f27b6d2dc (patch) | |
| tree | 5df34978c29ca28f5c2d01d8694f83f44cdc848f /vfg/src/music.h | |
| parent | 891b71c261a4571e0e0ba0e824e1bdb2478e0c65 (diff) | |
puppet penguins
Diffstat (limited to 'vfg/src/music.h')
| -rwxr-xr-x | vfg/src/music.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/vfg/src/music.h b/vfg/src/music.h index 96c8e1d..f9317de 100755 --- a/vfg/src/music.h +++ b/vfg/src/music.h @@ -64,20 +64,18 @@ class note { int duration; //may be needed another time?
};
//---------------------------------------------------------------------------------------------------------------------------------------------
-class flake: public note {
+class flake: public note, public Puppet {
public:
flake(int n,int v,int d=0) : note(n,v,d) { activated=false; }
Puppet puppet;
bool activated;
- void activate() {
+ void activate() {
activated=true;
puppet.play("shatter");
}
void draw(float x, float y) {
if (!activated||puppet.isPlaying()) puppet.draw(x,y);
}
- bool disintegrated;
- void disintegrate() { disintegrated=true; }
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class lyric {
@@ -144,18 +142,20 @@ class musicscore: public score { void playerControl(int key,int threshold);
void makeFlakes(int threshStart,int threshEnd);
- int missedFlakes;
+ int missedFlakes; + int missedNote;
bool missedLast;
bool perfect;
private:
map<int,note*> notes;
- map<int,flake*> flakes;
+ map<int,flake*> flakes; + map<int,flake*>::iterator missedFlake;
int timeframe; float nowpoint;
-
+
vector<Puppet> snowflakes;
-
+
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class song {
@@ -168,7 +168,8 @@ class song { void setFlakeThresh(int tS,int tE);
void setKeythresh(int millis);
void drawNotes();
- void draw();
+ void draw(); + int missedNote();
bool isPlaying;
void playerControl(int key);
private:
|
