diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-16 10:02:05 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-02-16 10:02:05 -0500 |
commit | a34396730c8d993fea84a454690bd13ea9a9b403 (patch) | |
tree | 5f226ee45acaa7070a1bb821df3320e907a9ecb2 /src/renderer.cpp | |
parent | 8ffb27ab09ff567a159e5be5a243fd3967084977 (diff) | |
download | dispatcher-a34396730c8d993fea84a454690bd13ea9a9b403.tar.gz dispatcher-a34396730c8d993fea84a454690bd13ea9a9b403.tar.bz2 dispatcher-a34396730c8d993fea84a454690bd13ea9a9b403.zip |
Started implementing pushing, but not really
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()), |