diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-27 16:44:46 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-27 16:44:46 -0400 |
commit | 0dbd1d249d0138c460eaf6ca39568d8d87666cfb (patch) | |
tree | 46d54549ae01f1fbdbacc41d74d96c113cf78514 /src/main.cpp | |
parent | e4cfb32534b2adebbacc1e4a36557874b31a4c53 (diff) | |
download | ether-0dbd1d249d0138c460eaf6ca39568d8d87666cfb.tar.gz ether-0dbd1d249d0138c460eaf6ca39568d8d87666cfb.tar.bz2 ether-0dbd1d249d0138c460eaf6ca39568d8d87666cfb.zip |
fixed player lighting strength special case
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
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 | ||
291 | void processKeys(Map& map, const Input& keystate) | 287 | void processKeys(Map& map, const Input& keystate) |