diff options
Diffstat (limited to 'src/renderer.cpp')
-rw-r--r-- | src/renderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/renderer.cpp b/src/renderer.cpp index 2916dd6..64b3a8e 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp | |||
@@ -61,9 +61,9 @@ void Renderer::render(const Simulation& sim) | |||
61 | { | 61 | { |
62 | for (size_t x = 0; x < level.getSize().w(); x++) | 62 | for (size_t x = 0; x < level.getSize().w(); x++) |
63 | { | 63 | { |
64 | int val = level.at(x, y) * 10; | 64 | int val = 255 - level.at(x, y) * 10; |
65 | 65 | ||
66 | SDL_SetRenderDrawColor(ren_.get(), val, val, 0, 255); | 66 | SDL_SetRenderDrawColor(ren_.get(), val, val, val, 255); |
67 | 67 | ||
68 | SDL_Rect rect { | 68 | SDL_Rect rect { |
69 | static_cast<int>(x * TILE_SIZE.w()), | 69 | static_cast<int>(x * TILE_SIZE.w()), |
@@ -80,7 +80,7 @@ void Renderer::render(const Simulation& sim) | |||
80 | { | 80 | { |
81 | const Entity& entity = sim.getEntity(id); | 81 | const Entity& entity = sim.getEntity(id); |
82 | 82 | ||
83 | SDL_SetRenderDrawColor(ren_.get(), 100, 100, 100, 255); | 83 | SDL_SetRenderDrawColor(ren_.get(), entity.colorVal, entity.colorVal, 65, 255); |
84 | 84 | ||
85 | SDL_Rect rect { | 85 | SDL_Rect rect { |
86 | static_cast<int>(entity.pos.x()), | 86 | static_cast<int>(entity.pos.x()), |