summaryrefslogtreecommitdiff
path: root/vfg/src/music.h
diff options
context:
space:
mode:
Diffstat (limited to 'vfg/src/music.h')
-rwxr-xr-xvfg/src/music.h19
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: