From bcefc1e2d87d57aaf6ae5ef8a05946081d259e41 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 14 Mar 2022 18:18:57 -0400 Subject: slightly offscreen lamp glows are rendered --- src/renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer.cpp b/src/renderer.cpp index 61aaf31..139b493 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -225,9 +225,9 @@ void Renderer::renderGame( SDL_SetRenderDrawColor(ren_.get(), 0, 0, 0, 0); SDL_RenderClear(ren_.get()); - for (int y = topmost; y < topmost + windowTileHeight; y++) + for (int y = topmost - RADIUS; y < topmost + windowTileHeight + RADIUS; y++) { - for (int x = leftmost; x < leftmost + windowTileWidth; x++) + for (int x = leftmost - RADIUS; x < leftmost + windowTileWidth + RADIUS; x++) { if (game.map.at(x,y).lightType != Source::None) { -- cgit 1.4.1