diff options
author | Filippos Karapetis | 2008-12-06 14:38:04 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-06 14:38:04 +0000 |
commit | d148d481f9692a7a475fda8240f4e27e30aa17fd (patch) | |
tree | 52fdf005f7fa5d8bc761bbeb904e49ce50218f05 /engines | |
parent | 668eaea68c3b19a4deb1fa2c998a9ae597bf62ab (diff) | |
download | scummvm-rg350-d148d481f9692a7a475fda8240f4e27e30aa17fd.tar.gz scummvm-rg350-d148d481f9692a7a475fda8240f4e27e30aa17fd.tar.bz2 scummvm-rg350-d148d481f9692a7a475fda8240f4e27e30aa17fd.zip |
Fixed compilation when SAGA_DEBUG is defined
svn-id: r35262
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/gfx.h | 2 | ||||
-rw-r--r-- | engines/saga/objectmap.cpp | 8 | ||||
-rw-r--r-- | engines/saga/objectmap.h | 9 | ||||
-rw-r--r-- | engines/saga/render.cpp | 6 |
4 files changed, 10 insertions, 15 deletions
diff --git a/engines/saga/gfx.h b/engines/saga/gfx.h index b0819c60af..7894dfaff3 100644 --- a/engines/saga/gfx.h +++ b/engines/saga/gfx.h @@ -99,9 +99,7 @@ struct Color { struct Surface : Graphics::Surface { void transitionDissolve(const byte *sourceBuffer, const Common::Rect &sourceRect, int flags, double percent); -#ifdef SAGA_DEBUG void drawPalette(); -#endif void drawPolyLine(const Point *points, int count, int color); void blit(const Common::Rect &destRect, const byte *sourceBuffer); diff --git a/engines/saga/objectmap.cpp b/engines/saga/objectmap.cpp index 91d265fa05..17256a67d9 100644 --- a/engines/saga/objectmap.cpp +++ b/engines/saga/objectmap.cpp @@ -149,6 +149,8 @@ void HitZone::draw(SagaEngine *vm, int color) { Point *points; Point specialPoint1; Point specialPoint2; + Surface *backBuffer = vm->_gfx->getBackBuffer(); + for (i = 0; i < _clickAreasCount; i++) { clickArea = &_clickAreas[i]; pointsCount = clickArea->pointsCount; @@ -166,11 +168,11 @@ void HitZone::draw(SagaEngine *vm, int color) { if (pointsCount == 2) { // 2 points represent a box - ds->drawFrame(points[0], points[1], color); + backBuffer->drawFrame(points[0], points[1], color); } else { if (pointsCount > 2) { // Otherwise draw a polyline - ds->drawPolyLine(points, pointsCount, color); + backBuffer->drawPolyLine(points, pointsCount, color); } } if (vm->_scene->getFlags() & kSceneFlagISO) { @@ -184,7 +186,7 @@ void HitZone::draw(SagaEngine *vm, int color) { specialPoint1.y--; specialPoint2.x++; specialPoint2.y++; - ds->drawFrame(specialPoint1, specialPoint2, color); + backBuffer->drawFrame(specialPoint1, specialPoint2, color); } } #endif diff --git a/engines/saga/objectmap.h b/engines/saga/objectmap.h index 8076180eaf..cc9e28143a 100644 --- a/engines/saga/objectmap.h +++ b/engines/saga/objectmap.h @@ -76,9 +76,7 @@ public: return objectIndexToId(kGameObjectStepZone, _index); } bool getSpecialPoint(Point &specialPoint) const; -#ifdef SAGA_DEBUG - void draw(SagaEngine *vm, int color); -#endif + void draw(SagaEngine *vm, int color); // for debugging bool hitTest(const Point &testPoint); private: @@ -105,10 +103,7 @@ public: } void load(const byte *resourcePointer, size_t resourceLength); void freeMem(void); - -#ifdef SAGA_DEBUG - void draw(Surface *drawSurface, const Point& testPoint, int color, int color2); -#endif + void draw(const Point& testPoint, int color, int color2); // for debugging int hitTest(const Point& testPoint); HitZone *getHitZone(int16 index) { if ((index < 0) || (index >= _hitZoneListCount)) { diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp index f0867eb3eb..fa84188a78 100644 --- a/engines/saga/render.cpp +++ b/engines/saga/render.cpp @@ -115,9 +115,9 @@ void Render::drawScene() { #ifdef SAGA_DEBUG if (getFlags() & RF_OBJECTMAP_TEST) { if (_vm->_scene->_objectMap) - _vm->_scene->_objectMap->draw(backBufferSurface, mousePoint, kITEColorBrightWhite, kITEColorBlack); + _vm->_scene->_objectMap->draw(mousePoint, kITEColorBrightWhite, kITEColorBlack); if (_vm->_scene->_actionMap) - _vm->_scene->_actionMap->draw(backBufferSurface, mousePoint, kITEColorRed, kITEColorBlack); + _vm->_scene->_actionMap->draw(mousePoint, kITEColorRed, kITEColorBlack); } #endif @@ -168,7 +168,7 @@ void Render::drawScene() { textPoint.x = backBufferSurface->w - _vm->_font->getStringWidth(kKnownFontSmall, txtBuffer, 0, kFontOutline); textPoint.y = 2; - _vm->_font->textDraw(kKnownFontSmall, backBufferSurface, txtBuffer, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline); + _vm->_font->textDraw(kKnownFontSmall, txtBuffer, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline); } #endif |