summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp6
1 files changed, 1 insertions, 5 deletions
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(
139 SDL_RenderFillRect(ren, &rect); 139 SDL_RenderFillRect(ren, &rect);
140 140
141 int alpha = (1.0 - map.lightStrength.at(x+y*VIEW_WIDTH)) * 255; 141 int alpha = (1.0 - map.lightStrength.at(x+y*VIEW_WIDTH)) * 255;
142 if (x == player_x && y == player_y)
143 {
144 alpha = 0;
145 }
146
147 SDL_SetRenderDrawColor(ren, 40, 40, 40, alpha); 142 SDL_SetRenderDrawColor(ren, 40, 40, 40, alpha);
148 SDL_RenderFillRect(ren, &rect); 143 SDL_RenderFillRect(ren, &rect);
149 } 144 }
@@ -286,6 +281,7 @@ void recalculateLighting(Map& map, fov_settings_type* fov)
286 } 281 }
287 282
288 map.lighting[player_x+VIEW_WIDTH*player_y] = true; 283 map.lighting[player_x+VIEW_WIDTH*player_y] = true;
284 map.lightStrength[player_x+VIEW_WIDTH*player_y] = 1.0;
289} 285}
290 286
291void processKeys(Map& map, const Input& keystate) 287void processKeys(Map& map, const Input& keystate)