[Scummvm-git-logs] scummvm master -> 3410b5e776c4158171b2c260099f328697617087
mduggan
mgithub at guarana.org
Sun Jul 25 06:40:38 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
732d05f036 IMAGE: Make JYV1 decoder a little more robust to bad data
8377ac93d6 ULTIMA8: Explicitly set in-between pixels to black on doubled videos
3410b5e776 ULTIMA8: Really fix keypad gump cheat code this time
Commit: 732d05f0367233fe4f0a8dc5dd08307d2d9fec3f
https://github.com/scummvm/scummvm/commit/732d05f0367233fe4f0a8dc5dd08307d2d9fec3f
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-07-25T15:40:03+09:00
Commit Message:
IMAGE: Make JYV1 decoder a little more robust to bad data
Changed paths:
image/codecs/jyv1.cpp
diff --git a/image/codecs/jyv1.cpp b/image/codecs/jyv1.cpp
index 49a499f5b3..43a5ccac9b 100644
--- a/image/codecs/jyv1.cpp
+++ b/image/codecs/jyv1.cpp
@@ -75,8 +75,6 @@ const Graphics::Surface *JYV1Decoder::decodeFrame(Common::SeekableReadStream &st
offsets[i] = stream.readUint32LE() + startOffset;
}
- int y = 0;
- int x = 0;
bool upscale = false;
//
@@ -106,7 +104,10 @@ const Graphics::Surface *JYV1Decoder::decodeFrame(Common::SeekableReadStream &st
upscale = true;
}
- for (int i = 0; i < numOffsets; i++) {
+ int y = 0;
+ int x = 0;
+
+ for (int i = 0; i < numOffsets && y < _height; i++) {
stream.seek(offsets[i], SEEK_SET);
const int cmdLen = stream.readUint32LE();
@@ -116,7 +117,7 @@ const Graphics::Surface *JYV1Decoder::decodeFrame(Common::SeekableReadStream &st
Common::BitStreamMemoryStream cmdMemStream(cmdData, cmdLen);
Common::BitStreamMemory8MSB cmdBitStream(cmdMemStream);
bool skipping = true;
- while (!cmdBitStream.eos()) {
+ while (cmdBitStream.size() - cmdBitStream.pos() >= 4 && y < _height) {
uint32 idx = cmdBitStream.getBits(4);
uint32 blocksize = BASE_LEN[idx];
if (idx != 0 && idx != 8) {
@@ -137,7 +138,7 @@ const Graphics::Surface *JYV1Decoder::decodeFrame(Common::SeekableReadStream &st
}
} else {
// draw blocksize pixels from data block
- while (blocksize) {
+ while (blocksize && y < _height) {
// TODO: would be nicer to read these in whole scanlines.
// Also this upscale code is kinda ugly.
const uint8 p = stream.readByte();
Commit: 8377ac93d604dffcec416eee9c5a5e17ba5acda9
https://github.com/scummvm/scummvm/commit/8377ac93d604dffcec416eee9c5a5e17ba5acda9
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-07-25T15:40:03+09:00
Commit Message:
ULTIMA8: Explicitly set in-between pixels to black on doubled videos
Color 0 on the palette is not black in all versions of the game, so we need to
force the background color. This is not a super-efficient way to do it, but it
works ok.
Changed paths:
engines/ultima/ultima8/graphics/avi_player.cpp
diff --git a/engines/ultima/ultima8/graphics/avi_player.cpp b/engines/ultima/ultima8/graphics/avi_player.cpp
index a14c83de81..306c6ea695 100644
--- a/engines/ultima/ultima8/graphics/avi_player.cpp
+++ b/engines/ultima/ultima8/graphics/avi_player.cpp
@@ -45,6 +45,8 @@ AVIPlayer::AVIPlayer(Common::SeekableReadStream *rs, int width, int height, cons
_currentFrame.create(vidWidth, vidHeight, _decoder->getPixelFormat());
_currentFrame.fillRect(Common::Rect(0, 0, vidWidth, vidHeight),
_decoder->getPixelFormat().RGBToColor(0, 0, 0));
+ if (_currentFrame.format.bytesPerPixel == 1)
+ _currentFrame.setTransparentColor(0);
}
AVIPlayer::~AVIPlayer() {
@@ -115,6 +117,7 @@ void AVIPlayer::paint(RenderSurface *surf, int /*lerp*/) {
}
}
+ surf->Fill32(0, _xoff, _yoff, _currentFrame.w, _currentFrame.h);
surf->Blit(&_currentFrame, 0, 0, _currentFrame.w, _currentFrame.h,
_xoff, _yoff);
}
Commit: 3410b5e776c4158171b2c260099f328697617087
https://github.com/scummvm/scummvm/commit/3410b5e776c4158171b2c260099f328697617087
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-07-25T15:40:03+09:00
Commit Message:
ULTIMA8: Really fix keypad gump cheat code this time
Changed paths:
engines/ultima/ultima8/gumps/keypad_gump.cpp
diff --git a/engines/ultima/ultima8/gumps/keypad_gump.cpp b/engines/ultima/ultima8/gumps/keypad_gump.cpp
index 99c2332734..5a972e87b9 100644
--- a/engines/ultima/ultima8/gumps/keypad_gump.cpp
+++ b/engines/ultima/ultima8/gumps/keypad_gump.cpp
@@ -104,6 +104,7 @@ bool KeypadGump::OnKeyDown(int key, int mod) {
case Common::KEYCODE_RETURN:
if (_value == _targetValue || _value == CHEAT_CODE_VAL) {
sfxno = SFXNO_CORRECT;
+ _value = _targetValue;
SetResult(_targetValue);
} else {
// wrong.
@@ -166,6 +167,7 @@ void KeypadGump::ChildNotify(Gump *child, uint32 message) {
update = false;
if (_value == _targetValue || _value == CHEAT_CODE_VAL) {
sfxno = SFXNO_CORRECT;
+ _value = _targetValue;
SetResult(_targetValue);
} else {
// wrong.
More information about the Scummvm-git-logs
mailing list