summaryrefslogtreecommitdiff
path: root/vfg/src/music.h
diff options
context:
space:
mode:
Diffstat (limited to 'vfg/src/music.h')
-rwxr-xr-xvfg/src/music.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/vfg/src/music.h b/vfg/src/music.h
index 292e05f..f20838f 100755
--- a/vfg/src/music.h
+++ b/vfg/src/music.h
@@ -79,14 +79,22 @@ class lyric {
class score {
//basics of timelime
public:
- long startTime;
- protected:
+ long startTime;
+ void start() { startTime=ofGetElapsedTimeMillis(); }
+ void start(int _st) { startTime=_st; }
ofxXmlSettings XML;
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class lyricscore: public score {
//draws lyrics to screen for a certain time
- public:
+ public:
+ lyricscore() {
+ font.loadFont("verdana.ttf", 30, true, true);
+ font.setLineHeight(34.0f);
+ font.setLetterSpacing(1.035);
+ ypos=(int)(((float)ofGetHeight())*0.9f); //set lyric position
+ fadeout=500; //ms
+ }
void load(string filename) {
if( !XML.loadFile(filename) ){
printf("unable to load %s check data/ folder\n",filename.c_str());
@@ -99,11 +107,15 @@ class lyricscore: public score {
}
printf("processed %s: %i lyrics \n",filename.c_str(),lyrics.size());
}
-
+
}
- }
+ }
+ void draw();
private:
- map<int,lyric*> lyrics;
+ map<int,lyric*> lyrics;
+ ofTrueTypeFont font;
+ int ypos;
+ int fadeout;
};
//---------------------------------------------------------------------------------------------------------------------------------------------
class musicscore: public score {
@@ -147,8 +159,8 @@ class song {
levelscore levels;
long startTime;
bool isPreroll;
-
- int fThreshStart,fThreshEnd,keyThresh;
+
+ int fThreshStart,fThreshEnd,keyThresh;
};
//---------------------------------------------------------------------------------------------------------------------------------------------
/*
@@ -163,7 +175,7 @@ Stage 2 – 5 notes missed will mean Game Over
Stage 3 – 4 notes missed will mean Game Over
Stage 4 – 3 notes missed will mean Game Over
-Scoring – Scoring will be based on the level of the game you achieve. There will be 4 scoring brackets (subject to testing and tweaking):
+Scoring – Scoring will be based on the level of the game you achieve. There will be 4 scoring brackets (subject to testing and tweaking):
Scoring Bracket 1 - Those who make it to Level 2 (see above - it's not possible to be kicked out in Level 1)
Scoring Bracket 2 – Those who make it to Level 3