[Scummvm-cvs-logs] SF.net SVN: scummvm:[49700] scummvm/trunk/engines/drascula/graphics.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Jun 15 12:17:35 CEST 2010
Revision: 49700
http://scummvm.svn.sourceforge.net/scummvm/?rev=49700&view=rev
Author: sev
Date: 2010-06-15 10:17:34 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
Drascula: Optimized blitting code.
Modified Paths:
--------------
scummvm/trunk/engines/drascula/graphics.cpp
Modified: scummvm/trunk/engines/drascula/graphics.cpp
===================================================================
--- scummvm/trunk/engines/drascula/graphics.cpp 2010-06-15 10:17:18 UTC (rev 49699)
+++ scummvm/trunk/engines/drascula/graphics.cpp 2010-06-15 10:17:34 UTC (rev 49700)
@@ -190,10 +190,16 @@
dest += xdes + ydes * 320;
src += xorg + yorg * 320;
- for (y = 0; y < height; y++)
- for (x = 0; x < width; x++)
- if (src[x + y * 320] != 255)
- dest[x + y * 320] = src[x + y * 320];
+ int ptr = 0;
+ for (y = 0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ if (src[ptr] != 255)
+ dest[ptr] = src[ptr];
+ ptr++;
+ }
+ ptr += 320 - width;
+ }
+
}
void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer) {
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