thespielplatz / tspi-blockclock

Private homebrew project for a blockclock
MIT License
0 stars 0 forks source link

[BUG] start up screens flip vertically when using RENDERER_ROTATE #1

Open daskleinesys opened 8 months ago

daskleinesys commented 8 months ago

when using the RotatedWS281xRenderer the startup screens before playing tetris flicker

my guess: that's because im just reversing the pixeldata during render and some screens just read and render the pixeldata

daskleinesys commented 8 months ago

happens also when you start a new game or for the "game over" screen

thespielplatz commented 8 months ago

I think the major problem is the .reverse() function which alters the original array. To reverse the elements in an array without mutating the original array is toReversed()

thespielplatz commented 8 months ago

🚨 Breaking Change: Renamed env fromRENDERER_ROTATE to DISPLAY_ROTATION currently with valid values of 0 and 180

thespielplatz commented 8 months ago

@daskleinesys please test it and if it's ok you can close the issue.

daskleinesys commented 8 months ago

I can't test it at the moment, but I think it looks good. But you deleted the rotated console renderer without providing it's functionality anywhere else. the rotated console renderer rotated the display by 90 degrees. or is there another possibility to handle that?

thespielplatz commented 8 months ago

I added CONSOLE_RENDERER_ROTATION env var with const VALID_ROTATION = [0, 90, 180, 270]

thespielplatz commented 8 months ago

This is done? ...or?