From a07d588c94f68cdc559ceb016c031c9199f0b868 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 20 Mar 2022 11:52:09 -0400 Subject: we can now build a mac bundle! --- src/game.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index a3aa7be..39828f4 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1,6 +1,6 @@ #include "game.h" #include -#include +#include "fov.h" #include #include #include @@ -8,6 +8,7 @@ #include "util.h" #include "renderer.h" #include "consts.h" +#include "runtime.h" Game::Game(std::mt19937& rng, Muxer& muxer, Renderer& renderer) : rng(rng), @@ -35,7 +36,7 @@ Game::Game(std::mt19937& rng, Muxer& muxer, Renderer& renderer) : tick(); } while (!isInitialCaveBigEnough()); - std::ifstream textFile("../res/childoflight.txt"); + std::ifstream textFile(Runtime::getResourcePath("childoflight.txt")); std::string line; while (std::getline(textFile, line)) { signTexts.push_back(line); @@ -284,7 +285,7 @@ void Game::recalculateLighting() if (game.map.inBounds(x, y)) { MapData& sourceData = *static_cast(source); - double lightRadius = static_cast(sourceData.lightRadius); + //double lightRadius = static_cast(sourceData.lightRadius); if (!game.map.at(x,y).lit) { @@ -302,7 +303,7 @@ void Game::recalculateLighting() for (int x = map.getLeft(); x < map.getRight(); x++) { Source ls = Source::None; - int lightRadius; + int lightRadius = 0; if (renderPlayer && player_x == x && player_y == y) { -- cgit 1.4.1