From 0dbd1d249d0138c460eaf6ca39568d8d87666cfb Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 27 May 2018 16:44:46 -0400 Subject: fixed player lighting strength special case --- src/main.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 957789f..2840439 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -139,11 +139,6 @@ void render( SDL_RenderFillRect(ren, &rect); int alpha = (1.0 - map.lightStrength.at(x+y*VIEW_WIDTH)) * 255; - if (x == player_x && y == player_y) - { - alpha = 0; - } - SDL_SetRenderDrawColor(ren, 40, 40, 40, alpha); SDL_RenderFillRect(ren, &rect); } @@ -286,6 +281,7 @@ void recalculateLighting(Map& map, fov_settings_type* fov) } map.lighting[player_x+VIEW_WIDTH*player_y] = true; + map.lightStrength[player_x+VIEW_WIDTH*player_y] = 1.0; } void processKeys(Map& map, const Input& keystate) -- cgit 1.4.1