Skip to content
Browse files

fixed .h

  • Loading branch information...
1 parent 607ea8c commit 81a98dcb6651f75d00ee53ba530f27aae21b59c5 @xiphiaz committed Aug 2, 2011
Showing with 39 additions and 51 deletions.
  1. +37 −37 src/ofxOP1.cpp
  2. +2 −14 src/ofxOP1.h
View
74 src/ofxOP1.cpp
@@ -45,8 +45,8 @@ int keyMap[] = {53, 55, 57, 59, 60, 62, 64, 65, 67, 69, 71, 72, 74, 76, 54, 56,
//
//}
-//OP1::OP1(){ // constructor
-OP1::OP1(IScreen* screen): myScreen(screen){
+OP1::OP1(){ // constructor
+//OP1::OP1(IScreen* screen): myScreen(screen){
cout << "OP-1 created\n";
@@ -1198,45 +1198,45 @@ void OP1::drawScreenBorder(){
roundedRect(getScreenWidth(), getScreenHeight(), 0.5);
ofPopStyle();
-// myScreen->drawScreen();
+ drawScreen();
}
-//void OP1::drawScreen(){
-// // draw the left:
-// ofNoFill();
-// ofBeginShape();
-// ofSetHexColor(blue);
-// for (int i = 0; i < 256; i++){
-// float val = left[i]*20.0f;
-// if (val>5){
-// val = 5;
-// ofSetHexColor(orange);
-// }else if (val<-5){
-// val = -5;
-// ofSetHexColor(orange);
-// }
-// ofVertex(5+(float)i/5,10+val);
-// }
-// ofEndShape();
-//
-// ofSetHexColor(blue);
-// ofBeginShape();
-// for (int i = 0; i < 256; i++){
-// float val = right[i]*20.0f;
-// if (val>5){
-// val = 5;
-// ofSetHexColor(orange);
-// }else if (val<-5){
-// val = -5;
-// ofSetHexColor(orange);
-// }
-// ofVertex(5+(float)i/5,20+val);
-// }
-// ofEndShape();
-//
-//}
+void OP1::drawScreen(){
+ // draw the left:
+ ofNoFill();
+ ofBeginShape();
+ ofSetHexColor(blue);
+ for (int i = 0; i < 256; i++){
+ float val = left[i]*20.0f;
+ if (val>5){
+ val = 5;
+ ofSetHexColor(orange);
+ }else if (val<-5){
+ val = -5;
+ ofSetHexColor(orange);
+ }
+ ofVertex(5+(float)i/5,10+val);
+ }
+ ofEndShape();
+
+ ofSetHexColor(blue);
+ ofBeginShape();
+ for (int i = 0; i < 256; i++){
+ float val = right[i]*20.0f;
+ if (val>5){
+ val = 5;
+ ofSetHexColor(orange);
+ }else if (val<-5){
+ val = -5;
+ ofSetHexColor(orange);
+ }
+ ofVertex(5+(float)i/5,20+val);
+ }
+ ofEndShape();
+
+}
void OP1::audioReceived (float * input, int bufferSize, int nChannels){
// samples are "interleaved"
View
16 src/ofxOP1.h
@@ -58,13 +58,6 @@ typedef struct controlButton{
} controlButton;
-//class IScreen
-//{
-//public:
-// // Defines an interface named drawScreen
-// virtual void drawScreen() = 0;
-//};
-
class OP1 : public ofBaseApp{
//private
@@ -147,13 +140,10 @@ class OP1 : public ofBaseApp{
float * left;
float * right;
-
-// IScreen* myScreen;
+
public:
-// OP1(IScreen* screen);//constructor
-
OP1(); //constructor
~OP1(); //destructor
@@ -162,9 +152,7 @@ class OP1 : public ofBaseApp{
void draw();
void update(){};
-// void drawScreen();
-
- virtual void drawScreen();
+ void drawScreen();
float getScreenHeight();
float getScreenWidth();

0 comments on commit 81a98dc

Please sign in to comment.
Something went wrong with that request. Please try again.