From bbeed54d2c0572d9fc12edab14781dd544dc149a Mon Sep 17 00:00:00 2001 From: Comment Date: Fri, 30 Nov 2012 13:30:48 +0000 Subject: demo v0.9 --- vfg/addons.make | 2 + vfg/bin/data/VODA_MUS_WEWISHU_Midi_v.2.2.xml | 406 +++++++++++++++++++++++++++ vfg/src/main.cpp | 4 +- vfg/src/music.cpp | 34 +-- vfg/src/music.h | 10 +- vfg/src/testApp.cpp | 227 +++++++++++---- vfg/src/testApp.h | 42 ++- vfg/vfg.layout | 26 +- 8 files changed, 654 insertions(+), 97 deletions(-) create mode 100755 vfg/bin/data/VODA_MUS_WEWISHU_Midi_v.2.2.xml (limited to 'vfg') diff --git a/vfg/addons.make b/vfg/addons.make index 9a23735..ddc7e24 100644 --- a/vfg/addons.make +++ b/vfg/addons.make @@ -3,3 +3,5 @@ ofxSpriteManager ofxAssets ofxExtras ofxNetwork +ofxFenster +ofxGui diff --git a/vfg/bin/data/VODA_MUS_WEWISHU_Midi_v.2.2.xml b/vfg/bin/data/VODA_MUS_WEWISHU_Midi_v.2.2.xml new file mode 100755 index 0000000..eb8aca4 --- /dev/null +++ b/vfg/bin/data/VODA_MUS_WEWISHU_Midi_v.2.2.xml @@ -0,0 +1,406 @@ + + + + Melody + Melody + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Marker ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vfg/src/main.cpp b/vfg/src/main.cpp index ead5d41..14b1008 100755 --- a/vfg/src/main.cpp +++ b/vfg/src/main.cpp @@ -6,11 +6,11 @@ int main( ){ ofAppGlutWindow window; - ofSetupOpenGL(&window, 800,800, OF_WINDOW); // <-------- setup the GL context + ofSetupOpenGL(ofxFensterManager::get(), 800,800, OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: - ofRunApp( new testApp()); + ofRunFensterApp( new testApp()); } diff --git a/vfg/src/music.cpp b/vfg/src/music.cpp index d3d7807..30af87b 100755 --- a/vfg/src/music.cpp +++ b/vfg/src/music.cpp @@ -13,7 +13,7 @@ int notemap(int n) { else return 2; } //---------------------------------------------------------------------------------------------------------- -void lyricscore::draw(){ +void lyricscore::draw(float hOffs){ int scoreTime=ofGetElapsedTimeMillis()-startTime; map::iterator iter; iter=lyrics.upper_bound(scoreTime); @@ -22,7 +22,7 @@ void lyricscore::draw(){ if ((iter->first+iter->second->duration)>scoreTime) { //outpoint of lyric previous to the one next soonest is afterwards => this lyric is visible int alpha=((iter->first+iter->second->duration)-scoreTime)first+iter->second->duration)-scoreTime))/((float)fadeout))*255.0f):255; ofSetColor(255,255,255,alpha); - font.drawString(iter->second->text,(ofGetWidth()/2)-(font.stringWidth(iter->second->text)/2.0f), gridY[1]*ofGetHeight()); + font.drawString(iter->second->text,hOffs+(ofGetHeight()/2)-(font.stringWidth(iter->second->text)/2.0f), gridY[1]*ofGetHeight()); } } } @@ -62,10 +62,12 @@ void musicscore::parseMidi(string filename){ float time=0; //counts up in float seconds to avoid rounding errors but converts to millis for map index map events; + int startnote; if( !XML.loadFile(filename) ){ printf("unable to load %s check data/ folder\n",filename.c_str()); }else{ + startnote=XML.getAttribute("MidiFile", "startnote",70,0); if(XML.pushTag("MidiFile")) { for (int i=0;i::iterator iter; @@ -173,14 +175,14 @@ void musicscore::drawNotes(levelscore *levels) { int thisstart=iter->first-scoreStart; int thislength=iter->second->duration; ofSetColor(ofColor::fromHsb(((float)thisnote*255)/numnotes,200,100),(((float)(thisstart*heightStep))/ofGetHeight()*128)+32); - ofRect(thisnote*widthStep,ofGetHeight()-(thisstart*heightStep),widthStep,-(thislength*heightStep)); + ofRect(hOffs+thisnote*widthStep,ofGetHeight()-(thisstart*heightStep),widthStep,-(thislength*heightStep)); } //visualise keyThreshold ofSetColor(255,0,0,70); - ofRect(0,ofGetHeight()-(nowpoint*heightStep),ofGetWidth(),keyThresh*heightStep); + ofRect(hOffs,ofGetHeight()-(nowpoint*heightStep),ofGetHeight(),keyThresh*heightStep); } -void musicscore::drawFlakes(levelscore *levels,float scale) { +void musicscore::drawFlakes(float hOffs,levelscore *levels,float scale) { ofEnableAlphaBlending(); int now=ofGetElapsedTimeMillis()-startTime; int screenStart=now-nowpoint; @@ -188,7 +190,7 @@ void musicscore::drawFlakes(levelscore *levels,float scale) { //note drawing 46h - 52h int numnotes=16; int firstnote=70; - float widthStep=((float)ofGetWidth())/numnotes; + float widthStep=((float)ofGetHeight())/numnotes; float heightStep=((float)ofGetHeight())/timeframe; map::iterator iter; //draw flakes @@ -203,7 +205,7 @@ void musicscore::drawFlakes(levelscore *levels,float scale) { //if (iter->second->activated&&(!iter->second->disintegrated)) iter->second->disintegrate(); ofSetColor(255,255,255); - iter->second->draw(gridX[notemap(iter->second->num)+1]*ofGetWidth(),ofGetHeight()-(thisstart*heightStep),scale); + iter->second->draw((gridX[notemap(iter->second->num)+1]*ofGetHeight())+hOffs,ofGetHeight()-(thisstart*heightStep),scale); //todo - make all drawing resolution independent } @@ -283,10 +285,10 @@ void song::preRoll(long preroll) { isPlaying=true; notes.makeFlakes(fThreshStart,fThreshEnd,&levels); } -void song::drawNotes(){ - notes.drawNotes(&levels); +void song::drawNotes(float hOffs){ + notes.drawNotes(hOffs,&levels); } -void song::draw(float scale){ +void song::draw(float hOffs,float scale){ int songTime=ofGetElapsedTimeMillis()-startTime; if (isPlaying) { if (isPreroll) { @@ -306,15 +308,15 @@ void song::draw(float scale){ } } else melody.setVolume(1.0f); - notes.drawFlakes(&levels,scale); - lyrics.draw(); + notes.drawFlakes(hOffs,&levels,scale); + lyrics.draw(hOffs); if (songTime>levels.length) { printf("stopping: %i (%i)\n",songTime,levels.length); stop(); } } - ofDrawBitmapString(ofToString((float)songTime/1000.0f,1)+" "+ofToString(levels.getLevel(songTime))+" "+ofToString(notes.missedFlakes)+" of "+ofToString(levels.getLives(songTime)),10,(ofGetHeight()*gridY[1])-3); + ofDrawBitmapString(ofToString((float)songTime/1000.0f,1)+" "+ofToString(levels.getLevel(songTime))+" "+ofToString(notes.missedFlakes)+" of "+ofToString(levels.getLives(songTime)),hOffs+10,(ofGetHeight()*gridY[1])-3); } void song::playerControl(int key){ notes.playerControl(key); diff --git a/vfg/src/music.h b/vfg/src/music.h index 3a9f299..8733bb1 100755 --- a/vfg/src/music.h +++ b/vfg/src/music.h @@ -144,7 +144,7 @@ class lyricscore: public score { } } - void draw(); + void draw(float hOffs); private: map lyrics; ofTrueTypeFont font; @@ -157,8 +157,8 @@ class musicscore: public score { musicscore(); void parseMidi(string filename); void setTimeframe(int millis); - void drawNotes(levelscore *levels); - void drawFlakes(levelscore *levels,float scale); + void drawNotes(float hOffs,levelscore *levels); + void drawFlakes(float hOffs,levelscore *levels,float scale); void playerControl(int key); void makeFlakes(int threshStart,int threshEnd,levelscore *levels); void printNotes(); @@ -189,8 +189,8 @@ class song { void setTimeframe(int millis); void setFlakeThresh(int tS,int tE); void setKeyThresh(int millis); - void drawNotes(); - void draw(float scale); + void drawNotes(float hOffs); + void draw(float hOffs,float scale); int missedNote(); int hitNote(); bool isPlaying; diff --git a/vfg/src/testApp.cpp b/vfg/src/testApp.cpp index 53cfa95..5324b23 100755 --- a/vfg/src/testApp.cpp +++ b/vfg/src/testApp.cpp @@ -1,9 +1,30 @@ #include "testApp.h" //bug in codeblocks: it sometimes checks for existence of executable from previous project + //-------------------------------------------------------------- +guiWindow::~guiWindow(){ + cout << "gui window destroyed" << endl; +} +void guiWindow::setup(){} +void guiWindow::setParent(testApp *p){ + parent=p; +} +void guiWindow::draw(){ + + parent->gui.draw(); + +} +void guiWindow::dragEvent(ofDragInfo dragInfo, ofxFenster* win){ + parent->dragEvent(dragInfo); +} +void guiWindow::windowMoved(int x,int y){ + //printf("window moved!\n"); +} + +//---------------------------------------------------------------------- void testApp::setup(){ - //songs.push_back(new song("WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Backing_v.2.1.mp3","WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Lead_v.2.1.mp3","VODA_MUS_WEWISHU_Midi_v.2.1.xml","Lyrics_WeWishYou.2.1.xml","Levels_WeWishYou.2.1.xml")); + songs.push_back(new song("WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Backing_v.2.1.mp3","WeWishYouAMerryChistmas_v.2.1/VODA_MUS_WEWISHU_Lead_v.2.1.mp3","VODA_MUS_WEWISHU_Midi_v.2.2.xml","Lyrics_WeWishYou.2.1.xml","Levels_WeWishYou.2.1.xml")); songs.push_back(new song("DeckTheHalls_v.4.0/VODA_MUS_DeckTheHalls-Backing_v.4.0.mp3","DeckTheHalls_v.4.0/VODA_MUS_DeckTheHalls-Lead_v.4.0.mp3","VODA_MIDI_DeckTheHalls-v.4.0.xml","Lyrics_DeckTheHalls.4.0.xml","Levels_DeckTheHalls.4.0.xml")); songs.push_back(new song("DingDong.v.2.2/VODA_MUS_DingDong_Backing_v.2.2.mp3","DingDong.v.2.2/VODA_MUS_DingDong_Melody_v.2.2.mp3","VODA_MIDI_DingDong_v.2.2.xml","Lyrics_DingDong.2.2.xml","Levels_DingDong.2.2.xml")); songs.push_back(new song("JingleBells_v.4.0/VODA_MUS_JingleBells_Backing_v.4.0.mp3","JingleBells_v.4.0/VODA_MUS_JingleBells_Melody_v.4.0.mp3","VODA_MUS_JingleBells_MIDI_v.4.0.xml","Lyrics_JingleBells.4.0.xml","Levels_JingleBells.4.0.xml")); @@ -19,10 +40,12 @@ void testApp::setup(){ penguins[1].load("Penguin-Purple.xml"); penguins[2].load("Penguin-Green.xml"); + /* temp save time for (int i=0;i<3;i++) raccoons.push_back(Animal()); raccoons[0].load("Raccoon-Blue.xml"); raccoons[1].load("Raccoon-Purple.xml"); raccoons[2].load("Raccoon-Green.xml"); + */ tags.push_back(new Tag("Tags/TAG_Get-Ready.png",2000,0.5,0)); tags.push_back(new Tag("Tags/TAG_Level-1.png",3000,0.5,0)); @@ -49,6 +72,12 @@ void testApp::setup(){ //release: commented out: 436m 256m //508fr 1.4s load in use: 836m 443m + + intro.loadMovie("Game-Demo_v3.mp4"); + intro.setLoopState(OF_LOOP_NONE); + + advert.loadMovie("GW2003761_GRY-VFBR055-060_MPEG_hi.mpg"); + advert.setLoopState(OF_LOOP_NONE); background.loadMovie("Background_v3.mp4"); background.setLoopState(OF_LOOP_NORMAL); @@ -58,9 +87,32 @@ void testApp::setup(){ showFPS=true; showVis=true; + fullscreenoutput=false; currentsong=0; nextsong=0; + gamestate=GAME_READY; + + + guiWin=new guiWindow(); + gui.setup("","panel.xml",0,0); + + threshStart=2000; + gui.add(tS.setup("start threshold",threshStart,0,4000,255)); + threshEnd=500; + gui.add(tE.setup("end threshold",threshEnd,0,4000,255)); + timescale=5000; + gui.add(ts.setup("timescale",timescale,0,10000,255)); + keyThresh=1500; + gui.add(kT.setup("keythresh",keyThresh,0,4000,255)); + + ofxFenster* win=ofxFensterManager::get()->createFenster(0, 0, 200, 400, OF_WINDOW); + win->setWindowTitle("config"); + win->addListener(guiWin); + ofAddListener(win->events.keyPressed, this, &testApp::keyPressedEvent); + guiWin->setup(); + guiWin->setParent(this); + } /* void testApp::loadanimals(string which) { @@ -92,15 +144,16 @@ void testApp::update(){ if (ret==1000) { currentlevel=0; currentsong=nextsong; - songs[currentsong]->setTimeframe(3000); - songs[currentsong]->setFlakeThresh(1000,100); - songs[currentsong]->setKeyThresh(1000); + songs[currentsong]->setTimeframe(timescale); + songs[currentsong]->setFlakeThresh(threshStart,threshEnd); + songs[currentsong]->setKeyThresh(keyThresh); songs[currentsong]->preRoll(750); tags[0]->play(); nextsong=(nextsong+1)%songs.size(); + gamestate=GAME_PLAYING; } else if (ret>48&&ret<52) { - songs[currentsong]->playerControl(ret-48); + songs[currentsong]->playerControl(ret-49); (*playanimal)[ret-49].playNow("Clap"); } if (songs[currentsong]->isPlaying&&songs[currentsong]->getLevel(ofGetElapsedTimeMillis()+4000)>currentlevel) { @@ -119,55 +172,97 @@ void testApp::update(){ } background.update(); banner.update(); + intro.update(); + advert.update(); } //-------------------------------------------------------------- void testApp::draw(){ ofDisableAlphaBlending(); ofSetColor(255,255,255); - background.draw(0,0,ofGetWidth(),ofGetHeight()); - float scale=ofGetHeight()/1080.0f; - - ofEnableAlphaBlending(); - vignette.draw(0,0,ofGetWidth(),ofGetHeight()); - //ofBackground(0,0,0,0.1); - /* - ofSetColor(0,0,0,100); - ofRect(0,0,ofGetWidth(),ofGetHeight()); - */ + float hOffs=(ofGetWidth()-ofGetHeight())/2; + float bannerscale,scale; //this old chestnut + switch(gamestate) { + case GAME_READY: + case GAME_PLAYING: + background.draw(hOffs,0,ofGetHeight(),ofGetHeight()); + scale=ofGetHeight()/1080.0f; - if (songs[currentsong]->isPlaying) { - ofSetColor(255,255,255); - if (showVis) songs[currentsong]->drawNotes(); - int missed=songs[currentsong]->missedNote(); - if (missed>-1) (*playanimal)[missed].playNow("Shudder"); - int hit=songs[currentsong]->hitNote(); - if (hit>-1) (*playanimal)[hit].play("Catch"); - } - ofSetColor(255,255,255); - for (int i=0;i<3;i++) (*playanimal)[i].draw(gridX[i+1]*ofGetWidth(),gridY[0]*ofGetHeight(),scale); - if (songs[currentsong]->isPlaying) { - ofSetColor(255,255,255); - lyricspanel->draw(ofGetWidth()*0.5,ofGetHeight()*gridY[1],scale); - songs[currentsong]->draw(scale); - } - else { - ofDrawBitmapString("game over!", (ofGetWidth()/2)-25,(ofGetHeight()/2)-5); - logos[1]->draw(gridX[0]*ofGetWidth(),gridY[1]*ofGetHeight(),scale); - } - ofSetColor(255,255,255); - for (int i=0;iisPlaying) tags[i]->draw(0.5f*ofGetWidth(),0,scale); + ofEnableAlphaBlending(); + vignette.draw(hOffs,0,ofGetHeight(),ofGetHeight()); + //ofBackground(0,0,0,0.1); + /* + ofSetColor(0,0,0,100); + ofRect(0,0,ofGetWidth(),ofGetHeight()); + */ + + if (songs[currentsong]->isPlaying) { + ofSetColor(255,255,255); + if (showVis) songs[currentsong]->drawNotes(hOffs); + int missed=songs[currentsong]->missedNote(); + if (missed>-1) (*playanimal)[missed].playNow("Shudder"); + int hit=songs[currentsong]->hitNote(); + if (hit>-1) (*playanimal)[hit].play("Catch"); + } + else { + if (gamestate==GAME_PLAYING) { + game.endGame("GOOD!"); + gamestate=GAME_READY; + } + } + ofSetColor(255,255,255); + for (int i=0;i<3;i++) (*playanimal)[i].draw(hOffs+(gridX[i+1]*ofGetHeight()),gridY[0]*ofGetHeight(),scale); + if (songs[currentsong]->isPlaying) { + ofSetColor(255,255,255); + lyricspanel->draw(ofGetWidth()*0.5,ofGetHeight()*gridY[1],scale); + songs[currentsong]->draw(hOffs,scale); + } + else { + ofDrawBitmapString("game over!", (ofGetWidth()/2)-25,(ofGetHeight()/2)-5); + logos[1]->draw((gridX[0]*ofGetHeight())+hOffs,gridY[1]*ofGetHeight(),scale); + } + ofSetColor(255,255,255); + for (int i=0;iisPlaying) tags[i]->draw(0.5f*ofGetWidth(),0,scale); + } + logos[0]->draw((gridX[0]*ofGetHeight())+hOffs,0,scale); + bannerscale=songs[currentsong]->isPlaying?scale*(1.0f-(max(0.0,min(((float)songs[currentsong]->getCurrentTime())*.001,1.0))*0.325)):scale; + banner.draw(ofGetWidth()*0.5,0,bannerscale); + char buf[30]; + sprintf(buf,"%.1f",ofGetFrameRate()); + if (showFPS) ofDrawBitmapString(buf, hOffs+ofGetHeight()-50,(ofGetHeight()*gridY[1])-3); + break; + case GAME_INTRO: + intro.draw(hOffs,0,ofGetHeight(),ofGetHeight()); + if (intro.getCurrentFrame()==intro.getTotalNumFrames()) { + gamestate=GAME_READY; + } + break; + case GAME_ADVERT: + float aspect=advert.getHeight()/advert.getWidth(); + float wOffs=(ofGetHeight()-(ofGetWidth()*aspect))*0.5; + advert.draw(0,wOffs,ofGetWidth(),ofGetWidth()*aspect); + if (advert.getCurrentFrame()==advert.getTotalNumFrames()) { + gamestate=GAME_READY; + } + break; } - logos[0]->draw(gridX[0]*ofGetWidth(),0,scale); - float bannerscale=songs[currentsong]->isPlaying?scale*(1.0f-(max(0.0,min(((float)songs[currentsong]->getCurrentTime())*.001,1.0))*0.325)):scale; - banner.draw(ofGetWidth()*0.5,0,bannerscale); - char buf[30]; - sprintf(buf,"%.1f",ofGetFrameRate()); - if (showFPS) ofDrawBitmapString(buf, ofGetWidth()-50,(ofGetHeight()*gridY[1])-3); } - +//-------------------------------------------------------------- +void testApp::keyPressedEvent(ofKeyEventArgs &args) { + printf("window key pressed: %i (%c)\n",args.key,args.key); + keyPressed(args.key); +} +void testApp::keyPressed(int key, ofxFenster* win){ + printf("window sent %i\n",key); + if(key == '='){ + fullscreenoutput=!fullscreenoutput; + win->setFullscreen(fullscreenoutput); + printf("resolution: %ix%i %s\n",win->getWidth(),win->getHeight(),fullscreenoutput?"fullscreen":"windowed"); + } + else keyPressed(key); +} //-------------------------------------------------------------- void testApp::keyPressed(int key){ switch (key) { @@ -175,9 +270,9 @@ void testApp::keyPressed(int key){ if (!songs[currentsong]->isPlaying) { currentlevel=0; currentsong=nextsong; - songs[currentsong]->setTimeframe(5000); - songs[currentsong]->setFlakeThresh(2000,500); - songs[currentsong]->setKeyThresh(1500); + songs[currentsong]->setTimeframe(timescale); + songs[currentsong]->setFlakeThresh(threshStart,threshEnd); + songs[currentsong]->setKeyThresh(keyThresh); songs[currentsong]->preRoll(750); tags[0]->play(); nextsong=(nextsong+1)%songs.size(); @@ -190,7 +285,27 @@ void testApp::keyPressed(int key){ (*playanimal)[key-'1'].playNow("Clap"); break; case 's': - game.startGame(); + if (gamestate==GAME_READY) { + game.startGame(); + } + break; + case 'e': + if (gamestate==GAME_PLAYING) { + game.endGame("GOOD!"); + gamestate=GAME_READY; + } + break; + case 'q': + if (gamestate==GAME_READY) { + intro.play(); + gamestate=GAME_INTRO; + } + break; + case 'w': + if (gamestate==GAME_READY) { + advert.play(); + gamestate=GAME_ADVERT; + } break; case 'f': showFPS=!showFPS; @@ -198,14 +313,14 @@ void testApp::keyPressed(int key){ case 'v': showVis=!showVis; break; - case 'r': - //loadanimals("Raccoons"); - playanimal =&raccoons; - break; - case 'p': - //loadanimals("Penguins"); - playanimal =&penguins; - break; + case 'r': + //loadanimals("Raccoons"); + playanimal =&raccoons; + break; + case 'p': + //loadanimals("Penguins"); + playanimal =&penguins; + break; } } diff --git a/vfg/src/testApp.h b/vfg/src/testApp.h index 2d17cd0..4890724 100755 --- a/vfg/src/testApp.h +++ b/vfg/src/testApp.h @@ -2,6 +2,8 @@ #include "ofMain.h" #include "ofxSprite.h" +#include "ofxGui.h" +#include "ofxFensterManager.h" #include "music.h" #include "Asterisk.h" @@ -54,9 +56,15 @@ character class- load sprites from xml- play behaviours- block animations when o */ +#define GAME_INTRO 1 +#define GAME_READY 2 +#define GAME_ADVERT 3 +#define GAME_PLAYING 4 +class guiWindow; -class testApp : public ofBaseApp{ + +class testApp : public ofxFensterListener{ public: void setup(); @@ -64,6 +72,8 @@ class testApp : public ofBaseApp{ void draw(); void exit(); + void keyPressedEvent(ofKeyEventArgs &args); + void keyPressed(int key, ofxFenster* win); void keyPressed (int key); void keyReleased(int key); void mouseMoved(int x, int y ); @@ -74,7 +84,8 @@ class testApp : public ofBaseApp{ void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); - //void loadanimals(string which); + ofVideoPlayer intro; + ofVideoPlayer advert; ofVideoPlayer background; ofImage vignette; @@ -85,7 +96,7 @@ class testApp : public ofBaseApp{ vector penguins; vector raccoons; - vector > animals; + //vector > animals; //vector playanimals; @@ -105,12 +116,33 @@ class testApp : public ofBaseApp{ bool showFPS; bool showVis; + bool fullscreenoutput; + + int currentsong,nextsong,gamestate; - int currentsong,nextsong; + guiWindow *guiWin; + ofxPanel gui; + ofxIntSlider tS; + ofxParameterthreshStart; + ofxIntSlider tE; + ofxParameter threshEnd; + ofxIntSlider ts; + ofxParameter timescale; + ofxIntSlider kT; + ofxParameter keyThresh; }; - +class guiWindow: public ofxFensterListener{ +public: + ~guiWindow(); + testApp *parent; + void setup(); + void setParent(testApp *p); + void draw(); + void dragEvent(ofDragInfo dragInfo,ofxFenster* win); + void windowMoved(int x, int y); +}; diff --git a/vfg/vfg.layout b/vfg/vfg.layout index 59eb91b..2381d4d 100644 --- a/vfg/vfg.layout +++ b/vfg/vfg.layout @@ -1,37 +1,37 @@ - - + + - - + + - + - + - + - - + + - - + + - - + + -- cgit v1.2.3