[Scummvm-cvs-logs] SF.net SVN: scummvm:[54605] scummvm/trunk/engines/mohawk
bgk at users.sourceforge.net
bgk at users.sourceforge.net
Mon Nov 29 21:52:47 CET 2010
Revision: 54605
http://scummvm.svn.sourceforge.net/scummvm/?rev=54605&view=rev
Author: bgk
Date: 2010-11-29 20:52:46 +0000 (Mon, 29 Nov 2010)
Log Message:
-----------
MOHAWK: Revert the screen cache since it has a huge performance hit, and is not needed as is.
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/graphics.cpp
scummvm/trunk/engines/mohawk/graphics.h
Modified: scummvm/trunk/engines/mohawk/graphics.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/graphics.cpp 2010-11-29 20:52:33 UTC (rev 54604)
+++ scummvm/trunk/engines/mohawk/graphics.cpp 2010-11-29 20:52:46 UTC (rev 54605)
@@ -138,9 +138,6 @@
_pictureFile.entries = NULL;
- // Initialize our buffer
- _mainScreen = new Graphics::Surface();
- _mainScreen->create(_vm->_system->getWidth(), _vm->_system->getHeight(), _pixelFormat.bytesPerPixel);
_dirtyScreen = false;
}
@@ -149,9 +146,6 @@
delete _jpegDecoder;
delete _pictDecoder;
delete[] _pictureFile.entries;
-
- _mainScreen->free();
- delete _mainScreen;
}
static const char* picFileNames[] = {
@@ -273,9 +267,9 @@
// Convert from bitmap coordinates to surface coordinates
uint16 top = surface->h - src.top - height;
+
+ _vm->_system->copyRectToScreen((byte *)surface->getBasePtr(src.left, top), surface->pitch, dest.left, dest.top, width, height);
- for (uint16 i = 0; i < height; i++)
- memcpy(_mainScreen->getBasePtr(dest.left, i + dest.top), surface->getBasePtr(src.left, top + i), width * surface->bytesPerPixel);
// Mark the screen as dirty
_dirtyScreen = true;
@@ -288,7 +282,6 @@
void MystGraphics::updateScreen() {
if (_dirtyScreen) {
// Only copy the buffer to the screen if it's dirty
- _vm->_system->copyRectToScreen((byte *)_mainScreen->pixels, _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h);
_vm->_system->updateScreen();
_dirtyScreen = false;
}
Modified: scummvm/trunk/engines/mohawk/graphics.h
===================================================================
--- scummvm/trunk/engines/mohawk/graphics.h 2010-11-29 20:52:33 UTC (rev 54604)
+++ scummvm/trunk/engines/mohawk/graphics.h 2010-11-29 20:52:46 UTC (rev 54605)
@@ -125,7 +125,6 @@
Common::File picFile;
} _pictureFile;
- Graphics::Surface *_mainScreen;
bool _dirtyScreen;
Graphics::PixelFormat _pixelFormat;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list