From 27e071dafb787aa5c949b18315fbe6514dfb9408 Mon Sep 17 00:00:00 2001 From: toxieainc Date: Mon, 18 Jul 2022 21:43:13 +0200 Subject: [PATCH] add comment --- Src/Graphics/Render2D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Graphics/Render2D.cpp b/Src/Graphics/Render2D.cpp index 536a79d..06294eb 100644 --- a/Src/Graphics/Render2D.cpp +++ b/Src/Graphics/Render2D.cpp @@ -333,7 +333,7 @@ static inline void DrawTileLine(uint32_t *line, int pixelOffset, uint16_t tile, uint32_t pattern = vram[patternOffset + patternLine]; for (int p = 7; p >= 0; p--) { - if (!clip || (/*pixelOffset >= 0 &&*/ (unsigned int)pixelOffset < 496u)) + if (!clip || (/*pixelOffset >= 0 &&*/ (unsigned int)pixelOffset < 496u)) // the >= 0 check is accounted for, as the cast to uint makes them appear as very large unsigned values { uint16_t maskTest = 1 << (15-((pixelOffset+0)/32)); bool visible = (mask & maskTest) != 0; @@ -351,7 +351,7 @@ static inline void DrawTileLine(uint32_t *line, int pixelOffset, uint16_t tile, uint32_t pattern = vram[patternOffset + patternLine + i]; for (int p = 3; p >= 0; p--) { - if (!clip || (/*pixelOffset >= 0 &&*/ (unsigned int)pixelOffset < 496u)) + if (!clip || (/*pixelOffset >= 0 &&*/ (unsigned int)pixelOffset < 496u)) // the >= 0 check is accounted for, as the cast to uint makes them appear as very large unsigned values { uint16_t maskTest = 1 << (15-((pixelOffset+0)/32)); bool visible = (mask & maskTest) != 0;