Here's another tiny tweak to the array transformation routine that makes quite a difference:
Code:
FOR Row = 0 to 31 ' Cycle thru 32 rows
TempW = ROW * 32 ' Precalculate this instead of doing it every time thru the loop
FOR Col = 0 to 31 ' of 32 pixels each
InPtr = (TempW) + Col '
led[InPtr] = lednew[InPtr]
IF Row.0 = 0 THEN ' If the row number is even
OutPtr = InPtr ' Output pixels in true order
ELSE
OutPtr = (TempW) + (31-Col) ' Output pixels in reversed order
ENDIF
IF led[InPtr] > 0 THEN
NeoLed(OutPtr) = Led[InPtr]
alive = alive + 1
dead = dead + InPtr
else
NeoLed(OutPtr) = 0
ENDIF
NEXT
NEXT
Bookmarks