X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=_Overlay.pde;h=f2f88d128d77b042fb87b9b69b4d554812b4a15e;hb=95c500328fc60b4ce81756023dc731e36de2a162;hp=2ee00c8c26b8247d8fac858ace30873851d2b67b;hpb=f0cc0ba566c8d933eefe780ea1ae921fa5c385bd;p=SugarCubes.git diff --git a/_Overlay.pde b/_Overlay.pde index 2ee00c8..f2f88d1 100644 --- a/_Overlay.pde +++ b/_Overlay.pde @@ -753,7 +753,7 @@ class DebugUI { final int debugY = 42; final int debugXSpacing = 28; final int debugYSpacing = 22; - final int[][] debugState = new int[17][6]; + final int[][] debugState; final int DEBUG_STATE_ANIM = 0; final int DEBUG_STATE_WHITE = 1; @@ -761,6 +761,8 @@ class DebugUI { DebugUI(PandaMapping[] pandaMappings) { int totalChannels = pandaMappings.length * PandaMapping.CHANNELS_PER_BOARD; + debugState = new int[totalChannels+1][ChannelMapping.CUBES_PER_CHANNEL+1]; + channelList = new ChannelMapping[totalChannels]; int channelIndex = 0; for (PandaMapping pm : pandaMappings) { @@ -935,7 +937,7 @@ class DebugUI { if ((dy >= 0) && (dy < debugState.length)) { if ((dx >= 0) && (dx < debugState[dy].length)) { int newState = debugState[dy][dx] = (debugState[dy][dx] + 1) % 3; - if (dy == 16) { + if (dy == debugState.length-1) { for (int[] states : debugState) { for (int i = 0; i < states.length; ++i) { states[i] = newState;