[Scummvm-cvs-logs] SF.net SVN: scummvm:[34638] scummvm/trunk/engines/made/screen.cpp
john_doe at users.sourceforge.net
john_doe at users.sourceforge.net
Wed Sep 24 01:16:48 CEST 2008
Revision: 34638
http://scummvm.svn.sourceforge.net/scummvm/?rev=34638&view=rev
Author: john_doe
Date: 2008-09-23 23:16:47 +0000 (Tue, 23 Sep 2008)
Log Message:
-----------
Improved updateScreenAndWait; the mouse cursor is less jerky now in some scenes in Manhole:N&E
Modified Paths:
--------------
scummvm/trunk/engines/made/screen.cpp
Modified: scummvm/trunk/engines/made/screen.cpp
===================================================================
--- scummvm/trunk/engines/made/screen.cpp 2008-09-23 16:40:41 UTC (rev 34637)
+++ scummvm/trunk/engines/made/screen.cpp 2008-09-23 23:16:47 UTC (rev 34638)
@@ -174,13 +174,15 @@
if (_vm->getGameID() != GID_RTZ)
maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y);
- int32 sourcePitch, linePtrAdd;
+ int32 sourcePitch, linePtrAdd, sourceAdd;
byte *linePtr;
if (flipX) {
linePtrAdd = -1;
+ sourceAdd = sourceSurface->w;
} else {
linePtrAdd = 1;
+ sourceAdd = 0;
}
if (flipY) {
@@ -191,11 +193,7 @@
}
for (int16 yc = 0; yc < clipHeight; yc++) {
- if (flipX) {
- linePtr = source + sourceSurface->w;
- } else {
- linePtr = source;
- }
+ linePtr = source + sourceAdd;
for (int16 xc = 0; xc < clipWidth; xc++) {
if (*linePtr && (_vm->getGameID() == GID_RTZ || (mask == 0 || maskp[xc] == 0))) {
if (*linePtr)
@@ -688,7 +686,7 @@
for (int textPos = 0; textPos < textLen; textPos++) {
- uint c = ((byte*)text)[textPos];
+ uint c = ((const byte*)text)[textPos];
int charWidth = _font->getCharWidth(c);
if (c == 9) {
@@ -806,7 +804,12 @@
void Screen::updateScreenAndWait(int delay) {
_vm->_system->updateScreen();
- _vm->_system->delayMillis(delay);
+ uint32 startTime = _vm->_system->getMillis();
+ while (_vm->_system->getMillis() < startTime + delay) {
+ _vm->handleEvents();
+ _vm->_system->updateScreen();
+ _vm->_system->delayMillis(5);
+ }
}
int16 Screen::addToSpriteList(int16 index, int16 xofs, int16 yofs) {
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