diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-08 18:43:44 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-04-08 18:43:44 +0000 |
commit | 720f716ba8d98a85266b8e81a534737c6fcdcf5f (patch) | |
tree | 192c702c463db0661f42fa34addf8f957e19e169 /src/gui | |
parent | f25d5640eba5b1a0bbbc050a858aa4cdbdffdc7f (diff) | |
download | mana-720f716ba8d98a85266b8e81a534737c6fcdcf5f.tar.gz mana-720f716ba8d98a85266b8e81a534737c6fcdcf5f.tar.bz2 mana-720f716ba8d98a85266b8e81a534737c6fcdcf5f.tar.xz mana-720f716ba8d98a85266b8e81a534737c6fcdcf5f.zip |
Implemented support for an arbitrary number of map layers. The only layer
requirement for map layers are now that the fringe layer is called "Fringe" and
that the collision layer is called "Collision".
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/viewport.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 7c68b577..33449659 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -48,6 +48,8 @@ #include <cassert> +extern volatile int tick_time; + Viewport::Viewport(): mMap(0), mViewX(0.0f), @@ -214,25 +216,17 @@ Viewport::draw(gcn::Graphics *gcnGraphics) // Draw tiles and sprites if (mMap) { - mMap->draw(graphics, (int) mViewX, (int) mViewY, 0); - drawTargetCursor(graphics); - mMap->draw(graphics, (int) mViewX, (int) mViewY, 1); - mMap->draw(graphics, (int) mViewX, (int) mViewY, 2); - if (mShowDebugPath) - { - mMap->drawCollision(graphics, (int) mViewX, (int) mViewY); - } - mMap->drawOverlay(graphics, mViewX, mViewY, - (int) config.getValue("OverlayDetail", 2)); + mMap->draw(graphics, (int) mViewX, (int) mViewY); + drawTargetCursor(graphics); // TODO: Draw the cursor with the sprite drawTargetName(graphics); - } - if (mShowDebugPath && mMap) - { - drawDebugPath(graphics); + if (mShowDebugPath) { + mMap->drawCollision(graphics, (int) mViewX, (int) mViewY); + drawDebugPath(graphics); + } } - // Draw player nickname, speech, and emotion sprite as needed + // Draw player names, speech, and emotion sprite as needed Beings &beings = beingManager->getAll(); for (BeingIterator i = beings.begin(); i != beings.end(); i++) { |