[Scummvm-cvs-logs] SF.net SVN: scummvm:[45566] scummvm/trunk/engines/sci/gui/gui_screen.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Oct 31 18:02:12 CET 2009
Revision: 45566
http://scummvm.svn.sourceforge.net/scummvm/?rev=45566&view=rev
Author: thebluegr
Date: 2009-10-31 17:02:11 +0000 (Sat, 31 Oct 2009)
Log Message:
-----------
Slight optimization to the 2x scaler
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_screen.cpp
Modified: scummvm/trunk/engines/sci/gui/gui_screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.cpp 2009-10-31 15:44:59 UTC (rev 45565)
+++ scummvm/trunk/engines/sci/gui/gui_screen.cpp 2009-10-31 17:02:11 UTC (rev 45566)
@@ -495,15 +495,16 @@
void SciGuiScreen::scale2x(byte *src, byte *dst, int16 srcWidth, int16 srcHeight) {
int newWidth = srcWidth * 2;
+ byte *srcPtr = src;
for (int y = 0; y < srcHeight; y++) {
for (int x = 0; x < srcWidth; x++) {
int destOffset = y * 2 * newWidth + x * 2;
- int color = src[y * srcWidth + x];
- dst[destOffset] = color;
- dst[destOffset + 1] = color;
- dst[destOffset + newWidth] = color;
- dst[destOffset + newWidth + 1] = color;
+ dst[destOffset] = *srcPtr;
+ dst[destOffset + 1] = *srcPtr;
+ dst[destOffset + newWidth] = *srcPtr;
+ dst[destOffset + newWidth + 1] = *srcPtr;
+ srcPtr++;
}
}
}
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