From 196cc38da19b867eaa9419343dd6ecd8212af354 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Oct 2012 19:48:26 +0300 Subject: Fix compilation errors and warnings in different modes. --- src/maplayer.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/maplayer.cpp') diff --git a/src/maplayer.cpp b/src/maplayer.cpp index 654cb7997..fcecb17bd 100644 --- a/src/maplayer.cpp +++ b/src/maplayer.cpp @@ -147,6 +147,25 @@ void MapLayer::draw(Graphics *const graphics, } } +void MapLayer::drawSDL(Graphics *const graphics) +{ + MapRows::const_iterator rit = mTempRows.begin(); + const MapRows::const_iterator rit_end = mTempRows.end(); + while (rit != rit_end) + { + MepRowImages *const images = &(*rit)->images; + MepRowImages::const_iterator iit = images->begin(); + const MepRowImages::const_iterator iit_end = images->end(); + while (iit != iit_end) + { + graphics->drawTile(*iit); + ++ iit; + } + ++ rit; + } +} + +#ifdef USE_OPENGL void MapLayer::updateSDL(Graphics *const graphics, int startX, int startY, int endX, int endY, const int scrollX, const int scrollY, @@ -209,30 +228,11 @@ void MapLayer::updateSDL(Graphics *const graphics, int startX, int startY, } } -void MapLayer::drawSDL(Graphics *const graphics) -{ - MapRows::const_iterator rit = mTempRows.begin(); - const MapRows::const_iterator rit_end = mTempRows.end(); - while (rit != rit_end) - { - MepRowImages *const images = &(*rit)->images; - MepRowImages::const_iterator iit = images->begin(); - const MepRowImages::const_iterator iit_end = images->end(); - while (iit != iit_end) - { - graphics->drawTile(*iit); - ++ iit; - } - ++ rit; - } -} - void MapLayer::updateOGL(Graphics *const graphics, int startX, int startY, int endX, int endY, const int scrollX, const int scrollY, const int debugFlags) { -#ifdef USE_OPENGL delete_all(mTempRows); mTempRows.clear(); @@ -303,7 +303,6 @@ void MapLayer::updateOGL(Graphics *const graphics, int startX, int startY, } } } -#endif } void MapLayer::drawOGL(Graphics *const graphics) @@ -326,6 +325,7 @@ void MapLayer::drawOGL(Graphics *const graphics) } // logger->log("draws: %d", k); } +#endif void MapLayer::drawFringe(Graphics *const graphics, int startX, int startY, int endX, int endY, -- cgit v1.2.3-60-g2f50