diff options
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 9982840de..2a91d1991 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -114,22 +114,20 @@ void Viewport::setMap(Map *const map) mMap = map; } -void Viewport::draw(gcn::Graphics *gcnGraphics) +void Viewport::draw(Graphics *graphics) { BLOCK_START("Viewport::draw 1") static int lastTick = tick_time; if (!mMap || !player_node) { - gcnGraphics->setColor(gcn::Color(64, 64, 64)); - gcnGraphics->fillRectangle( + graphics->setColor(gcn::Color(64, 64, 64)); + graphics->fillRectangle( gcn::Rectangle(0, 0, getWidth(), getHeight())); BLOCK_END("Viewport::draw 1") return; } - Graphics *const graphics = static_cast<Graphics* const>(gcnGraphics); - // Avoid freaking out when tick_time overflows if (tick_time < lastTick) lastTick = tick_time; @@ -260,7 +258,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics) miniStatusWindow->drawIcons(graphics); // Draw contained widgets - WindowContainer::draw(gcnGraphics); + WindowContainer::draw(graphics); BLOCK_END("Viewport::draw 1") } |