[Scummvm-cvs-logs] SF.net SVN: scummvm:[43522] scummvm/branches/branch-1-0-0/engines/made
john_doe at users.sourceforge.net
john_doe at users.sourceforge.net
Tue Aug 18 21:59:52 CEST 2009
Revision: 43522
http://scummvm.svn.sourceforge.net/scummvm/?rev=43522&view=rev
Author: john_doe
Date: 2009-08-18 19:59:51 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
Backported of r43521:
- PMV player: Use frame count from PVM file and fix incorrect "invalid chunk type" warning
- Fix sprite drawing glitch with vertically flipped sprites (bug #2825925)
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/engines/made/pmvplayer.cpp
scummvm/branches/branch-1-0-0/engines/made/screen.cpp
Modified: scummvm/branches/branch-1-0-0/engines/made/pmvplayer.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/made/pmvplayer.cpp 2009-08-18 19:42:13 UTC (rev 43521)
+++ scummvm/branches/branch-1-0-0/engines/made/pmvplayer.cpp 2009-08-18 19:59:51 UTC (rev 43522)
@@ -62,12 +62,8 @@
}
uint frameDelay = _fd->readUint16LE();
- int unk;
_fd->skip(4); // always 0?
- unk = _fd->readByte();
- debug(2, "%i", unk);
- unk = _fd->readByte();
- debug(2, "%i", unk);
+ uint frameCount = _fd->readUint16LE();
_fd->skip(4); // always 0?
uint soundFreq = _fd->readUint16LE();
@@ -80,7 +76,7 @@
if (soundFreq == 22254) soundFreq = 22050;
for (int i = 0; i < 22; i++) {
- unk = _fd->readUint16LE();
+ int unk = _fd->readUint16LE();
debug(2, "%i ", unk);
}
@@ -90,7 +86,7 @@
_fd->read(_paletteRGB, 768);
_vm->_screen->setRGBPalette(_paletteRGB);
- uint32 frameCount = 0;
+ uint32 frameNumber = 0;
uint16 chunkCount = 0;
uint32 soundSize = 0;
uint32 soundChunkOfs = 0, palChunkOfs = 0;
@@ -108,7 +104,7 @@
// get it to work well?
_audioStream = Audio::makeAppendableAudioStream(soundFreq, Audio::Mixer::FLAG_UNSIGNED);
- while (!_vm->shouldQuit() && !_aborted && !_fd->eos()) {
+ while (!_vm->shouldQuit() && !_aborted && !_fd->eos() && frameNumber < frameCount) {
int32 frameTime = _vm->_system->getMillis();
@@ -117,9 +113,6 @@
warning("Unknown chunk type");
}
- if (_fd->eos())
- break;
-
// Only reallocate the frame data buffer if its size has changed
if (prevChunkSize != chunkSize || !frameData) {
if (frameData)
@@ -192,7 +185,7 @@
updateScreen();
if (skipFrames == 0) {
- int32 waitTime = (frameCount * frameDelay) -
+ int32 waitTime = (frameNumber * frameDelay) -
(g_system->getMillis() - soundStartTime) - (_vm->_system->getMillis() - frameTime);
if (waitTime < 0) {
@@ -204,7 +197,7 @@
} else
skipFrames--;
- frameCount++;
+ frameNumber++;
}
Modified: scummvm/branches/branch-1-0-0/engines/made/screen.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/made/screen.cpp 2009-08-18 19:42:13 UTC (rev 43521)
+++ scummvm/branches/branch-1-0-0/engines/made/screen.cpp 2009-08-18 19:59:51 UTC (rev 43522)
@@ -188,7 +188,7 @@
if (flipX) {
linePtrAdd = -1;
- sourceAdd = sourceSurface->w;
+ sourceAdd = sourceSurface->w - 1;
} else {
linePtrAdd = 1;
sourceAdd = 0;
@@ -210,6 +210,7 @@
}
linePtr += linePtrAdd;
}
+
source += sourcePitch;
dest += clipInfo.destSurface->pitch;
if (_vm->getGameID() != GID_RTZ)
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