summaryrefslogtreecommitdiff
path: root/futuregael/src
diff options
context:
space:
mode:
Diffstat (limited to 'futuregael/src')
-rw-r--r--futuregael/src/ofApp.cpp97
-rw-r--r--futuregael/src/ofApp.h39
2 files changed, 136 insertions, 0 deletions
diff --git a/futuregael/src/ofApp.cpp b/futuregael/src/ofApp.cpp
new file mode 100644
index 0000000..77fb538
--- /dev/null
+++ b/futuregael/src/ofApp.cpp
@@ -0,0 +1,97 @@
+#include "ofApp.h"
+
+
+
+//--------------------------------------------------------------
+void ofApp::setup(){
+ // Load a CSV File.
+ if(csv.load("show.csv","|")) {
+ ofLog()<<"found "<<csv.getNumRows()<<" of data";
+
+ for (auto row:csv){
+ if (row.size()<2){
+ ofLog()<<"Error, found row with "<<row.size()<<" elements";
+ }
+ else script.push_back(scriptLine(row[0],row[1],row[2]));
+ }
+
+ }
+
+
+}
+
+//--------------------------------------------------------------
+void ofApp::update(){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::draw(){
+
+
+
+}
+
+
+//--------------------------------------------------------------
+void ofApp::exit() {
+
+}
+
+
+
+//--------------------------------------------------------------
+void ofApp::keyPressed(ofKeyEventArgs &args){
+
+
+
+}
+
+
+
+//--------------------------------------------------------------
+void ofApp::keyReleased(int key){
+ switch(key){
+ case OF_KEY_UP:{
+ break;
+ }
+ case OF_KEY_DOWN:{
+ break;
+ }
+ }
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseMoved(int x, int y ){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseDragged(int x, int y, int button){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mousePressed(int x, int y, int button){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseReleased(int x, int y, int button){
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseEntered(int x, int y){
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseExited(int x, int y){
+}
+
+//--------------------------------------------------------------
+void ofApp::windowResized(int w, int h){
+}
+
+//--------------------------------------------------------------
+void ofApp::dragEvent(ofDragInfo dragInfo){
+}
diff --git a/futuregael/src/ofApp.h b/futuregael/src/ofApp.h
new file mode 100644
index 0000000..26987e1
--- /dev/null
+++ b/futuregael/src/ofApp.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include "ofMain.h"
+#
+#include "ofxCsv.h"
+
+class scriptLine{
+public:
+ scriptLine(string audiofile,string palette,string words){
+ audio.load(audiofile);
+ text=words;
+ }
+ vector<ofColor> palette;
+ string text;
+ ofSoundPlayer audio;
+};
+
+class ofApp : public ofBaseApp{
+
+ public:
+ void setup();
+ void update();
+ void draw();
+ void exit();
+ void keyPressed(ofKeyEventArgs &keyargs);
+ void keyReleased(int key);
+ void mouseMoved(int x, int y );
+ void mouseDragged(int x, int y, int button);
+ void mousePressed(int x, int y, int button);
+ void mouseReleased(int x, int y, int button);
+ void mouseEntered(int x, int y);
+ void mouseExited(int x, int y);
+ void windowResized(int w, int h);
+ void dragEvent(ofDragInfo dragInfo);
+
+ ofxCsv csv;
+
+ vector<scriptLine> script;
+};