diff options
Diffstat (limited to 'vfg/src/music.h')
| -rwxr-xr-x | vfg/src/music.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/vfg/src/music.h b/vfg/src/music.h index e4e8601..1aa956a 100755 --- a/vfg/src/music.h +++ b/vfg/src/music.h @@ -17,7 +17,8 @@ class levelscore { if( !XML.loadFile(filename) ){
printf("unable to load %s check data/ folder\n",filename.c_str());
}else{
- int multiplier=1000/XML.getAttribute("VFxmas", "timebase",1000,0);
+ int multiplier=1000/XML.getAttribute("VFxmas", "timebase",1000,0); + name=XML.getAttribute("VFxmas", "name","",0);
length=XML.getAttribute("VFxmas", "length",0,0)*multiplier;
if(XML.pushTag("VFxmas")) {
for (int i=0;i<XML.getNumTags("Level");i++) {
@@ -74,10 +75,11 @@ class levelscore { }
return 2<<20; // a big number
}
- int length;
+ int length; + string name;
private:
map<int,int> levels;
-
+
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class note {
@@ -181,7 +183,7 @@ class musicscore: public score { map<int,flake*>::iterator missedFlake;
int timeframe; float nowpoint;
-
+
vector<Puppet> snowflakes;
};
@@ -205,16 +207,19 @@ class song { void playerControl(int key);
int getLevel(long time);
int getCurrentTime();
- string getScoreString();
-
+ string getScoreString(); + string getName(); + int getLength(); + bool isFinished();
+
musicscore notes;
private:
ofSoundPlayer backing;
ofSoundPlayer melody;
lyricscore lyrics;
-
+
levelscore levels;
- long startTime;
+ int startTime;
bool isPreroll,isPractice;
int fThreshStart,fThreshEnd;
|
