[Scummvm-cvs-logs] SF.net SVN: scummvm:[39479] scummvm/trunk/engines/sword1/screen.cpp
Hkz at users.sourceforge.net
Hkz at users.sourceforge.net
Tue Mar 17 09:22:51 CET 2009
Revision: 39479
http://scummvm.svn.sourceforge.net/scummvm/?rev=39479&view=rev
Author: Hkz
Date: 2009-03-17 08:22:51 +0000 (Tue, 17 Mar 2009)
Log Message:
-----------
sword1: cleanup
Modified Paths:
--------------
scummvm/trunk/engines/sword1/screen.cpp
Modified: scummvm/trunk/engines/sword1/screen.cpp
===================================================================
--- scummvm/trunk/engines/sword1/screen.cpp 2009-03-17 08:03:42 UTC (rev 39478)
+++ scummvm/trunk/engines/sword1/screen.cpp 2009-03-17 08:22:51 UTC (rev 39479)
@@ -378,24 +378,20 @@
_psxCache.decodedBackground = psxShrinkedBackgroundToIndexed(_layerBlocks[0], _scrnSizeX, _scrnSizeY);
memcpy(_screenBuf, _psxCache.decodedBackground, _scrnSizeX * _scrnSizeY);
} else {
-#if 0
- for (uint16 cnty = 0; cnty < _scrnSizeY; cnty++)
- for (uint16 cntx = 0; cntx < _scrnSizeX; cntx++) {
- if (*(src + cnty * _scrnSizeX + cntx))
- if (!(SwordEngine::isMac()) || *src != 255) // see bug #1701058
- *(dest + cnty * _scrnSizeX + cntx) = *(src + cnty * _scrnSizeX + cntx);
- }
-#endif
-
uint16 scrnScrlY = MIN((uint32)_oldScrollY, Logic::_scriptVars[SCROLL_OFFSET_Y]);
uint16 scrnHeight = SCREEN_DEPTH + ABS((int32)_oldScrollY - (int32)Logic::_scriptVars[SCROLL_OFFSET_Y]);
+ src += scrnScrlY * _scrnSizeX;
+ dest += scrnScrlY * _scrnSizeX;
+
// In this background to create transparency we have to iterate through all pixels, avoid checking those out of screen
for (uint16 cnty = scrnScrlY; (cnty < _scrnSizeY) && (cnty < scrnHeight + scrnScrlY); cnty++)
for (uint16 cntx = 0; cntx < _scrnSizeX; cntx++) {
- if (*(src + cnty * _scrnSizeX + cntx))
+ if (*src)
if (!(SwordEngine::isMac()) || *src != 255) // see bug #1701058
- *(dest + cnty * _scrnSizeX + cntx) = *(src + cnty * _scrnSizeX + cntx);
+ *dest = *src;
+ src++;
+ dest++;
}
}
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