[Scummvm-cvs-logs] scummvm master -> e0ce5a61b54cde3916b9aad51be43e8e9d5ea651
bluegr
md5 at scummvm.org
Thu Feb 24 20:28:59 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f890c1b6ed SCI: Fixed video playing in the PQ:SWAT demo
e0ce5a61b5 SCI: Added an initial implementation of RemapByPercent, which fixes the palette in the PQ:SWAT demo
Commit: f890c1b6ed3bf465fd7e372c2b2d29bd93cd048c
https://github.com/scummvm/scummvm/commit/f890c1b6ed3bf465fd7e372c2b2d29bd93cd048c
Author: md5 (md5 at scummvm.org)
Date: 2011-02-24T11:27:30-08:00
Commit Message:
SCI: Fixed video playing in the PQ:SWAT demo
Changed paths:
engines/sci/video/robot_decoder.cpp
diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp
index bf52de6..ecdce3b 100644
--- a/engines/sci/video/robot_decoder.cpp
+++ b/engines/sci/video/robot_decoder.cpp
@@ -251,6 +251,11 @@ const Graphics::Surface *RobotDecoder::decodeNextFrame() {
_fileStream->skip(4); // unknown, almost always 0
uint16 frameX = _fileStream->readUint16();
uint16 frameY = _fileStream->readUint16();
+ // TODO: In v4 robot files, frameX and frameY have a different meaning.
+ // Set them both to 0 for v4 for now, so that robots in PQ:SWAT show up
+ // correctly.
+ if (_header.version == 4)
+ frameX = frameY = 0;
uint16 compressedSize = _fileStream->readUint16();
uint16 frameFragments = _fileStream->readUint16();
_fileStream->skip(4); // unknown
Commit: e0ce5a61b54cde3916b9aad51be43e8e9d5ea651
https://github.com/scummvm/scummvm/commit/e0ce5a61b54cde3916b9aad51be43e8e9d5ea651
Author: md5 (md5 at scummvm.org)
Date: 2011-02-24T11:27:31-08:00
Commit Message:
SCI: Added an initial implementation of RemapByPercent, which fixes the palette in the PQ:SWAT demo
Changed paths:
engines/sci/engine/kgraphics.cpp
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 9034bd1..2bcf590 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1220,12 +1220,19 @@ reg_t kRemapColors(EngineState *s, int argc, reg_t *argv) {
}
break;
case 2: { // remap by percent
- // NOTE: This adjusts the alpha value of a specific color, and it operates on
- // an RGBA palette
- int16 color = argv[1].toSint16(); // this is subtracted from a maximum color value, and can be offset by 10
+ // This adjusts the alpha value of a specific color, and it operates on
+ // an RGBA palette. Since we're operating on an RGB palette, we just
+ // modify the color intensity instead
+ // TODO: From what I understand, palette remapping should be placed
+ // separately, so that it can be reset by case 0 above. Thus, we
+ // should adjust the functionality of the Palette class accordingly.
+ int16 color = argv[1].toSint16();
+ if (color >= 10)
+ color -= 10;
uint16 percent = argv[2].toUint16(); // 0 - 100
- uint16 unk3 = (argc >= 4) ? argv[3].toUint16() : 0;
- warning("kRemapColors: RemapByPercent color %d by %d percent (unk3 = %d)", color, percent, unk3);
+ if (argc >= 4)
+ warning("RemapByPercent called with 4 parameters, unknown parameter is %d", argv[3].toUint16());
+ g_sci->_gfxPalette->kernelSetIntensity(color, 255, percent, false);
}
break;
case 3: { // remap to gray
More information about the Scummvm-git-logs
mailing list