X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=_Internals.pde;h=d24f13b3910c364055c769102ad0f5ddfef9aa86;hb=0137237dffbb4ffdfa3a995dd7daee5f1f15c982;hp=f25f74a89473cece0229c6e052d65296ec1377e4;hpb=d1dcc4b55abff7b6efa2816695e29f3fa7ee7fc9;p=SugarCubes.git diff --git a/_Internals.pde b/_Internals.pde index f25f74a..d24f13b 100644 --- a/_Internals.pde +++ b/_Internals.pde @@ -39,6 +39,9 @@ final float TRAILER_WIDTH = 240; final float TRAILER_DEPTH = 97; final float TRAILER_HEIGHT = 33; +final int MaxCubeHeight = 7; +final int NumBackTowers = 9; + int targetFramerate = 60; int startMillis, lastMillis; @@ -259,23 +262,23 @@ void draw() { // Send output colors color[] sendColors = glucose.getColors(); if (debugMode) { - debugUI.maskColors(colors); + debugUI.maskColors(sendColors); } // Gamma correction here. Apply a cubic to the brightness // for better representation of dynamic range - for (int i = 0; i < colors.length; ++i) { - float b = brightness(colors[i]) / 100.f; - colors[i] = color( - hue(colors[i]), - saturation(colors[i]), + for (int i = 0; i < sendColors.length; ++i) { + float b = brightness(sendColors[i]) / 100.f; + sendColors[i] = color( + hue(sendColors[i]), + saturation(sendColors[i]), (b*b*b) * 100. ); } // TODO(mcslee): move into GLucose engine for (PandaDriver p : pandaBoards) { - p.send(colors); + p.send(sendColors); } } @@ -508,8 +511,8 @@ void mouseReleased() { context.mouseReleased(mouseX, mouseY); } } - -void mouseWheel(int delta) { + +void mouseWheel(int delta) {delta*=20; boolean wheeled = false; for (UIContext context : overlays) { wheeled |= context.mouseWheel(mouseX, mouseY, delta);