summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index ca1f0f3..175b817 100644 --- a/src/game.cpp +++ b/src/game.cpp
@@ -351,9 +351,8 @@ void Game::recalculateRender() {
351 { 351 {
352 if (map.at(x,y).dirtyRender) { 352 if (map.at(x,y).dirtyRender) {
353 map.at(x,y).dirtyRender = false; 353 map.at(x,y).dirtyRender = false;
354 map.at(x,y).renderId = -1;
355 354
356 if (map.tile(x,y) == Tile::Floor) { 355 if (map.tile(x,y) == Tile::Floor && (!map.at(x,y).lit || !map.at(x,y).wasLit)) {
357 int renderDesc = 0; 356 int renderDesc = 0;
358 if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7); 357 if (isTileSetOrNotLit(map, x-1, y-1)) renderDesc |= (1 << 7);
359 if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6); 358 if (isTileSetOrNotLit(map, x , y-1)) renderDesc |= (1 << 6);
@@ -383,6 +382,7 @@ void Game::recalculateRender() {
383 } 382 }
384 } else { 383 } else {
385 map.at(x,y).sign = false; 384 map.at(x,y).sign = false;
385 map.at(x,y).renderId = -1;
386 } 386 }
387 } else if (map.tile(x,y) == Tile::Wall) { 387 } else if (map.tile(x,y) == Tile::Wall) {
388 static bool initWalls = false; 388 static bool initWalls = false;
@@ -475,6 +475,8 @@ void Game::recalculateRender() {
475 std::cout << ((renderDesc & (1 << 3)) ? 'X' : 'O'); 475 std::cout << ((renderDesc & (1 << 3)) ? 'X' : 'O');
476 std::cout << std::endl;*/ 476 std::cout << std::endl;*/
477 } 477 }
478 } else {
479 map.at(x,y).renderId = -1;
478 } 480 }
479 } 481 }
480 } 482 }