even wonkier line...

problems with angles and screen limits,
need to implement screen rotation seriously
This commit is contained in:
Emanuele Trabattoni
2021-05-29 12:55:35 +02:00
parent a77b66e4ef
commit 539a95df61
4 changed files with 54 additions and 28 deletions

View File

@@ -49,8 +49,8 @@ namespace Render {
}
void Mare::setPixel(uint8_t* img, uint16_t x, uint16_t y, bool value){
if (x >= _screenSize.x) return;
if (y >= _screenSize.y) return;
if (x >= _screenSize.y) return;
if (y >= _screenSize.x) return;
img += (sizeof(uint8_t)*y*(_screenSize.x>>3) + sizeof(uint8_t)*(x>>3));
if (value) *img &= ~(0x80 >> (x%8));
else *img |= (0x80 >> (x%8));