From 1b56a18fc25f86591b410d32ceb19faea6fc74ea Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Tue, 13 Nov 2012 22:16:15 +0000 Subject: first demo with phone --- vfg/src/testApp.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vfg/src/testApp.cpp') diff --git a/vfg/src/testApp.cpp b/vfg/src/testApp.cpp index 928604d..427ece9 100755 --- a/vfg/src/testApp.cpp +++ b/vfg/src/testApp.cpp @@ -6,7 +6,8 @@ void testApp::setup(){ //for (float i=0;i<1.2;i+=0.1) printf("%f in level %i bound %f\n",i,lives->getLevel(i),lives->getLowerBound(lives->getLevel(i))); testsong=new song("VODA_MUS_DeckTheHalls-Backing_v.1.5.mp3","VODA_MUS_DeckTheHalls-Melody_v.1.5.mp3","MIDI_DeckTheHalls_MIDI.1.5.xml","Lyrics_DeckTheHalls.1.5.xml","Levels_DeckTheHalls.1.5.xml"); - + testsong->setTimeframe(2500); + testsong->setFlakeThresh(1000,100); ofSetBackgroundAuto(false); ofBackground(0,0,0); @@ -37,8 +38,6 @@ void testApp::exit(){ void testApp::update(){ int ret=game.update(); if (ret==1000) { - testsong->setTimeframe(2500); - testsong->setFlakeThresh(1000,100); testsong->preRoll(250); } else if (ret>0) { @@ -74,8 +73,10 @@ void testApp::draw(){ //-------------------------------------------------------------- void testApp::keyPressed(int key){ switch (key) { - case '0': - if (!testsong->isPlaying) testsong->preRoll(250); + case ' ': + if (!testsong->isPlaying) { + testsong->preRoll(250); + } break; case '1': case '2': -- cgit v1.2.3