diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-09-14 01:11:56 +0800 |
---|---|---|
committer | Yohann Ferreira <yohann.ferreira@orange.fr> | 2011-09-16 07:10:20 +0800 |
commit | d4584d81599f90b54cbc0fdd1c55b8ab0d5f0d68 (patch) | |
tree | 545100f845387ad515358c4f5d00c50fa5450ad5 /src/map.cpp | |
parent | d6248271842aa6edc26135568d92150f69491292 (diff) | |
download | mana-d4584d81599f90b54cbc0fdd1c55b8ab0d5f0d68.tar.gz mana-d4584d81599f90b54cbc0fdd1c55b8ab0d5f0d68.tar.bz2 mana-d4584d81599f90b54cbc0fdd1c55b8ab0d5f0d68.tar.xz mana-d4584d81599f90b54cbc0fdd1c55b8ab0d5f0d68.zip |
Renamed Map::DebugFlags enumerators
Their name is a bit more clear with DEBUG prefix rather than MAP
prefix. They're already scoped in the Map class anyway.
MAP_NORMAL was changed to DEBUG_NONE to represent no debug flags.
Acked-by: Bertram
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map.cpp b/src/map.cpp index 3e5e8e12..525f5a20 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -158,7 +158,7 @@ void MapLayer::draw(Graphics *graphics, } } - if (!(debugFlags & Map::MAP_SPECIAL3)) + if (!(debugFlags & Map::DEBUG_SPECIAL3)) { const int py0 = pixelY + dy; @@ -169,7 +169,7 @@ void MapLayer::draw(Graphics *graphics, { const int px = (x * mMap->getTileWidth()) + dx; const int py = py0 - img->getHeight(); - if (!(debugFlags & (Map::MAP_SPECIAL1 | Map::MAP_SPECIAL2)) + if (!(debugFlags & (Map::DEBUG_SPECIAL1 | Map::DEBUG_SPECIAL2)) || img->getHeight() <= mMap->getTileHeight()) { int width = 0; @@ -222,7 +222,7 @@ Map::Map(int width, int height, int tileWidth, int tileHeight): mTileWidth(tileWidth), mTileHeight(tileHeight), mMaxTileHeight(tileHeight), mMaxTileWidth(tileWidth), - mDebugFlags(MAP_NORMAL), + mDebugFlags(DEBUG_NONE), mOnClosedList(1), mOnOpenList(2), mLastScrollX(0.0f), mLastScrollY(0.0f) { @@ -370,7 +370,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) bool overFringe = false; - if (mDebugFlags & MAP_SPECIAL3) + if (mDebugFlags & DEBUG_SPECIAL3) { for (; layeri != mLayers.end(); ++layeri) { @@ -387,7 +387,7 @@ void Map::draw(Graphics *graphics, int scrollX, int scrollY) { for (; layeri != mLayers.end() && !overFringe; ++layeri) { - if ((*layeri)->isFringeLayer() && (mDebugFlags & MAP_SPECIAL2)) + if ((*layeri)->isFringeLayer() && (mDebugFlags & DEBUG_SPECIAL2)) overFringe = true; (*layeri)->draw(graphics, @@ -443,7 +443,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY, { graphics->setColor(gcn::Color(0, 0, 0, 64)); - if (debugFlags & MAP_GRID) + if (debugFlags & DEBUG_GRID) { graphics->drawRectangle(gcn::Rectangle( x * mTileWidth - scrollX, @@ -451,7 +451,7 @@ void Map::drawCollision(Graphics *graphics, int scrollX, int scrollY, mTileWidth + 1, mTileHeight + 1)); } - if (!(debugFlags & MAP_COLLISION_TILES)) + if (!(debugFlags & DEBUG_COLLISION_TILES)) continue; if (!getWalk(x, y, BLOCKMASK_WALL)) |