From 0a0b2f397b95e6e219f2ac8c5b79bbe6300ef432 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Wed, 17 Apr 2013 12:41:49 +0200 Subject: SWORD25: Optimize graphics drawing code --- engines/sword25/gfx/staticbitmap.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'engines/sword25/gfx/staticbitmap.cpp') diff --git a/engines/sword25/gfx/staticbitmap.cpp b/engines/sword25/gfx/staticbitmap.cpp index 0ae07b36b5..91b93e8910 100644 --- a/engines/sword25/gfx/staticbitmap.cpp +++ b/engines/sword25/gfx/staticbitmap.cpp @@ -71,6 +71,8 @@ bool StaticBitmap::initBitmapResource(const Common::String &filename) { // RenderObject Eigenschaften aktualisieren _originalWidth = _width = bitmapPtr->getWidth(); _originalHeight = _height = bitmapPtr->getHeight(); + + _isSolid = bitmapPtr->isSolid(); // Bild-Resource freigeben bitmapPtr->release(); @@ -81,7 +83,7 @@ bool StaticBitmap::initBitmapResource(const Common::String &filename) { StaticBitmap::~StaticBitmap() { } -bool StaticBitmap::doRender() { +bool StaticBitmap::doRender(RectangleList *updateRects) { // Bitmap holen Resource *resourcePtr = Kernel::getInstance()->getResourceManager()->requestResource(_resourceFilename); assert(resourcePtr); @@ -98,12 +100,14 @@ bool StaticBitmap::doRender() { result = bitmapResourcePtr->blit(_absoluteX, _absoluteY, (_flipV ? BitmapResource::FLIP_V : 0) | (_flipH ? BitmapResource::FLIP_H : 0), - 0, _modulationColor, -1, -1); + 0, _modulationColor, -1, -1, + updateRects); } else { result = bitmapResourcePtr->blit(_absoluteX, _absoluteY, (_flipV ? BitmapResource::FLIP_V : 0) | (_flipH ? BitmapResource::FLIP_H : 0), - 0, _modulationColor, _width, _height); + 0, _modulationColor, _width, _height, + updateRects); } // Resource freigeben -- cgit v1.2.3