diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-10-14 16:16:34 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-10-14 16:16:34 +0200 |
commit | 672180b2ee3ed9b9ff984538a85e6eaf2e1c91bc (patch) | |
tree | 9dc40562890b7dff088afc46fb4e2af0ea3552d8 /src/render.cpp | |
parent | e4ca910e7731e2a12815a4a8de2582157f519898 (diff) |
Move assets to assets.cpp.
Diffstat (limited to 'src/render.cpp')
-rw-r--r-- | src/render.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render.cpp b/src/render.cpp index ce9b837..ee2e5b2 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -8,6 +8,7 @@ static void draw_tile(sf::RenderWindow *window, float x, float y, { sf::Color color; + wot_rect.setTexture(NULL); wot_rect.setSize(sf::Vector2f(1.0f, 1.0f)); wot_rect.setPosition(sf::Vector2f(x, y)); @@ -109,6 +110,9 @@ void state_t::render(game::state_t *game) void state_t::render(animated_texture_t *anim, sf::FloatRect bounds, bool mirror){ size_t frame; + if (!anim) + return; + if (!anim->frame_count) return; |