summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gaunt01/bin/data/TextureTrapdoor.jpgbin104698 -> 37779 bytes
-rw-r--r--gaunt01/bin/data/settings.xml16
-rwxr-xr-xgaunt01/bin/data/trapdoor-surround.xmlbin3150 -> 3160 bytes
-rw-r--r--gaunt01/src/testApp.cpp27
-rw-r--r--gaunt01/src/testApp.h2
5 files changed, 44 insertions, 1 deletions
diff --git a/gaunt01/bin/data/TextureTrapdoor.jpg b/gaunt01/bin/data/TextureTrapdoor.jpg
index d3447ba..0408846 100644
--- a/gaunt01/bin/data/TextureTrapdoor.jpg
+++ b/gaunt01/bin/data/TextureTrapdoor.jpg
Binary files differ
diff --git a/gaunt01/bin/data/settings.xml b/gaunt01/bin/data/settings.xml
index ff6dfa0..f482957 100644
--- a/gaunt01/bin/data/settings.xml
+++ b/gaunt01/bin/data/settings.xml
@@ -1,2 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<gauntlet cam_angle="-55" threshold="30" />
+<bounds>
+ <vertex x="362.884" y="864.936"></vertex>
+ <vertex x="661.116" y="864.936"></vertex>
+ <vertex x="831.377" y="434.039"></vertex>
+ <vertex x="765.19" y="385.303"></vertex>
+ <vertex x="709.003" y="352.921"></vertex>
+ <vertex x="654.185" y="321.916"></vertex>
+ <vertex x="570.816" y="288.97"></vertex>
+ <vertex x="395.481" y="202.178"></vertex>
+ <vertex x="298.262" y="162.836"></vertex>
+ <vertex x="257.18" y="123.481"></vertex>
+ <vertex x="223.451" y="135.92"></vertex>
+ <vertex x="230.915" y="311.189"></vertex>
+ <vertex x="199.103" y="387.095"></vertex>
+ <vertex x="199.112" y="448.572"></vertex>
+</bounds>
diff --git a/gaunt01/bin/data/trapdoor-surround.xml b/gaunt01/bin/data/trapdoor-surround.xml
index a13fcb3..880b7b7 100755
--- a/gaunt01/bin/data/trapdoor-surround.xml
+++ b/gaunt01/bin/data/trapdoor-surround.xml
Binary files differ
diff --git a/gaunt01/src/testApp.cpp b/gaunt01/src/testApp.cpp
index 01afe95..8a8f65d 100644
--- a/gaunt01/src/testApp.cpp
+++ b/gaunt01/src/testApp.cpp
@@ -104,6 +104,9 @@ void testApp::setup(){
segTimes[GOTCHA]=2.0;
gameStart=ofGetElapsedTimef();
+
+ sounds=new ofSoundPlayer[1];
+ sounds[0].loadSound("arp5.mp3"); //game start
}
ofVec2f testApp::screen2plane(ofVec2f screenpos){
@@ -247,6 +250,7 @@ void testApp::update(){
if (firstframe) {
accumImg=grayImage;
firstframe=false;
+ sounds[0].play();
}
else {
accumImg.addWeighted( grayImage, 1.0/bgnum );
@@ -360,7 +364,7 @@ void testApp::draw(){
ofPopMatrix();
glDisable(GL_DEPTH_TEST);
- ofSetHexColor(0xffffff);
+https://twitter.com/# ofSetHexColor(0xffffff);
bindTexture(colorImg); //colorImg.getTextureReference().bind();
map<int,player>::iterator it;
for(int i=0;i<blobsManager.blobs.size();i++){
@@ -393,6 +397,7 @@ void testApp::draw(){
case PLAYING:
if (gameTime>segTimes[gameState]) {
gameState=TITLES;
+ sounds[0].play();
gameStart=ofGetElapsedTimef();
gameTime=0.0f;
}
@@ -657,6 +662,10 @@ void testApp::keyPressed(int key){
}
else drawingborder=false;
break;
+ case '>':
+ gameState=(gameState+1)%4;
+ gameStart=ofGetElapsedTimef();
+ break;
}
}
@@ -716,6 +725,12 @@ void testApp::loadSettings(string filename){
}else{
cam_angle=ofToInt(XML.getAttribute("gauntlet","cam_angle","none",0));
threshold=ofToInt(XML.getAttribute("gauntlet","threshold","none",0));
+ if(XML.pushTag("bounds")) {
+ for (int i=0;i<XML.getNumTags("vertex");i++){
+ border.push_back(ofVec2f(ofToFloat(XML.getAttribute("vertex","x","0",i)),ofToFloat(XML.getAttribute("vertex","y","0",i))));
+ }
+ XML.popTag();
+ }
printf("loaded %s\n",filename.c_str());
}
}
@@ -723,6 +738,16 @@ void testApp::loadSettings(string filename){
void testApp::saveSettings(string filename){
XML.setAttribute("gauntlet","cam_angle",ofToString(cam_angle),0);
XML.setAttribute("gauntlet","threshold",ofToString(threshold),0);
+ if (XML.tagExists("bounds")) XML.removeTag("bounds");
+ XML.addTag("bounds");
+ if(XML.pushTag("bounds")) {
+ for (int i=0;i<border.size();i++){
+ XML.addTag("vertex");
+ XML.setAttribute("vertex","x",ofToString(border[i].x),i);
+ XML.setAttribute("vertex","y",ofToString(border[i].y),i);
+ }
+ XML.popTag();
+ }
XML.saveFile(filename);
printf("saved %s\n",filename.c_str());
}
diff --git a/gaunt01/src/testApp.h b/gaunt01/src/testApp.h
index 4452ee0..dd52d76 100644
--- a/gaunt01/src/testApp.h
+++ b/gaunt01/src/testApp.h
@@ -108,6 +108,8 @@ class testApp : public ofBaseApp{
vector<ofPoint> border;
bool drawingborder;
+ ofSoundPlayer* sounds;
+
ofImage* billboards;
ofVec2f scaleFactor;