[Scummvm-git-logs] scummvm master -> cff73c14d1b5a39ea57fa0f37977429f7e315009

sev- sev at scummvm.org
Fri Sep 11 13:24:22 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
cff73c14d1 SCUMM: Implemented codec20 for SMUSH. Fixes #10899


Commit: cff73c14d1b5a39ea57fa0f37977429f7e315009
    https://github.com/scummvm/scummvm/commit/cff73c14d1b5a39ea57fa0f37977429f7e315009
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-09-11T15:23:03+02:00

Commit Message:
SCUMM: Implemented codec20 for SMUSH. Fixes #10899

It is a simple copying codec, used in FT Classic in Remaster.

Changed paths:
  A engines/scumm/smush/codec20.cpp
    engines/scumm/module.mk
    engines/scumm/smush/smush_player.cpp


diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index c9319e85a1..b6a90bd6bd 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -101,6 +101,7 @@ MODULE_OBJS += \
 	insane/insane_iact.o \
 	smush/channel.o \
 	smush/codec1.o \
+	smush/codec20.o \
 	smush/codec37.o \
 	smush/codec47.o \
 	smush/imuse_channel.o \
diff --git a/engines/scumm/smush/codec20.cpp b/engines/scumm/smush/codec20.cpp
new file mode 100644
index 0000000000..652182929f
--- /dev/null
+++ b/engines/scumm/smush/codec20.cpp
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#include "common/endian.h"
+
+namespace Scumm {
+
+void smush_decode_codec20(byte *dst, const byte *src, int left, int top, int width, int height, int pitch) {
+	if (width == 0 || height == 0)
+		return;
+
+	dst += left * pitch + top;
+
+	while (height--) {
+		memcpy(dst, src, width);
+		src += width;
+		dst += pitch;
+	}
+}
+
+} // End of namespace Scumm
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 1f7e2cc1bf..da558aad9c 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -735,6 +735,7 @@ void SmushPlayer::handleNewPalette(int32 subSize, Common::SeekableReadStream &b)
 }
 
 void smush_decode_codec1(byte *dst, const byte *src, int left, int top, int width, int height, int pitch);
+void smush_decode_codec20(byte *dst, const byte *src, int left, int top, int width, int height, int pitch);
 
 void SmushPlayer::decodeFrameObject(int codec, const uint8 *src, int left, int top, int width, int height) {
 	if ((height == 242) && (width == 384)) {
@@ -776,8 +777,7 @@ void SmushPlayer::decodeFrameObject(int codec, const uint8 *src, int left, int t
 		break;
 	case 20:
 		// Used by Full Throttle Classic (from Remastered)
-		warning("Codec 20 is not yet implemented");
-		memset(_dst, 0, _width * _height);
+		smush_decode_codec20(_dst, src, left, top, width, height, _vm->_screenWidth);
 		break;
 	default:
 		error("Invalid codec for frame object : %d", codec);




More information about the Scummvm-git-logs mailing list