From b4d89c0a9029739d2af1705b371dc28f27b6d2dc Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 20 Nov 2012 04:46:42 +0000 Subject: puppet penguins --- vfg/src/music.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'vfg/src/music.h') 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 notes; - map flakes; + map flakes; + map::iterator missedFlake; int timeframe; float nowpoint; - + vector 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: -- cgit v1.2.3