summaryrefslogtreecommitdiff
path: root/liveengineUnmapped/src/viewport.cpp
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-08-08 22:09:59 +0100
committerComment <tim@gray.(none)>2013-08-08 22:09:59 +0100
commite632e908a973a87c82e061f36167ea162d1e390f (patch)
tree4b08aad9b18c7aff721806b6f6fb0a8e4799a59f /liveengineUnmapped/src/viewport.cpp
parent3bf0663e94b6335cb748a50a8b95e8a98d2a0630 (diff)
a few playlist changes + whole screen fade
Diffstat (limited to 'liveengineUnmapped/src/viewport.cpp')
-rwxr-xr-xliveengineUnmapped/src/viewport.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/liveengineUnmapped/src/viewport.cpp b/liveengineUnmapped/src/viewport.cpp
index e533ef4..36e7c65 100755
--- a/liveengineUnmapped/src/viewport.cpp
+++ b/liveengineUnmapped/src/viewport.cpp
@@ -24,7 +24,7 @@ void viewport::setup(int _w,int _h,int _x,int _y,float _r,int _ox,int _oy) {
printf("%ix%i, vp offset: %f,%f\n",w,h,-(sin(ofDegToRad(r))*h/2)-(cos(ofDegToRad(r))*w/2),-(sin(ofDegToRad(r))*w/2)-(cos(ofDegToRad(r))*h/2));
}
-void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift){
+void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,playlist &list,bool transparentBlack,int note,int mode,ofColor* controller_colours,bool controlColours,float scale,float fscale,float colShift,int fadeBG){
@@ -53,6 +53,14 @@ void viewport::draw(float a,unsigned char* controllers,int xshift,int yshift,pla
}
}
+ if (fadeBG<255) {
+ //fadeout part
+ ofEnableAlphaBlending();
+ ofSetColor(0,0,0,fadeBG);
+ ofRect(0,0,ofGetWidth(),ofGetHeight());
+ ofDisableAlphaBlending();
+ }
+
float notewidth=w/NUM_NOTES;
float noteheight=h/NUM_CONTROLLERS;