aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-04-10 09:17:36 +0000
committerPaweł Kołodziejski2004-04-10 09:17:36 +0000
commita3aead899ef8352624e8617b0608c29ab1dc5ae7 (patch)
tree3b60f4da671996e7586b5fcbe60e9dcda05ad33a /scumm/smush
parent56b5b9f7dfd3dcbf1f76538a2e0caded6f090ef7 (diff)
downloadscummvm-rg350-a3aead899ef8352624e8617b0608c29ab1dc5ae7.tar.gz
scummvm-rg350-a3aead899ef8352624e8617b0608c29ab1dc5ae7.tar.bz2
scummvm-rg350-a3aead899ef8352624e8617b0608c29ab1dc5ae7.zip
special case for 384x242 smush resolution for ft pc demo, it use additional buffer
svn-id: r13532
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/codec37.cpp2
-rw-r--r--scumm/smush/smush_player.cpp22
-rw-r--r--scumm/smush/smush_player.h1
3 files changed, 16 insertions, 9 deletions
diff --git a/scumm/smush/codec37.cpp b/scumm/smush/codec37.cpp
index c8db90769f..f108c79b1d 100644
--- a/scumm/smush/codec37.cpp
+++ b/scumm/smush/codec37.cpp
@@ -464,7 +464,7 @@ void Codec37Decoder::decode(byte *dst, const byte *src) {
memcpy(_deltaBufs[_curtable], src + 16, decoded_size);
break;
case 1:
- error("codec37: missing opcode 1");
+ warning("codec37: missing opcode 1");
break;
case 2:
bompDecodeLine(_deltaBufs[_curtable], src + 16, decoded_size);
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index ecae369daf..7a09ae115f 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -224,7 +224,8 @@ SmushPlayer::SmushPlayer(ScummEngine_v6 *scumm, int speed) {
_sf[4] = NULL;
_base = NULL;
_frameBuffer = NULL;
-
+ _specialBuffer = NULL;
+
_skipNext = false;
_subtitles = ConfMan.getBool("subtitles");
_dst = NULL;
@@ -283,6 +284,10 @@ void SmushPlayer::deinit() {
delete _base;
_base = NULL;
}
+ if (_specialBuffer) {
+ free(_specialBuffer);
+ _specialBuffer = NULL;
+ }
_vm->_mixer->stopHandle(_IACTchannel);
@@ -676,18 +681,19 @@ void SmushPlayer::handleFrameObject(Chunk &b) {
}
int codec = b.getWord();
- int left = b.getWord(); // left
- int top = b.getWord(); // top
+ int left = b.getWord();
+ int top = b.getWord();
int width = b.getWord();
int height = b.getWord();
- if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
+ if ((height == 242) && (width == 384)) {
+ _dst = _specialBuffer = (byte *)malloc(242 * 384);
+ } else if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
return;
-
// FT Insane uses smaller frames to draw overlays with moving objects
// Other .san files do have them as well but their purpose in unknown
// and often it causes memory overdraw. So just skip those frames
- if (!_insanity && ((height != _vm->_screenHeight) || (width != _vm->_screenWidth)))
+ else if (!_insanity && ((height != _vm->_screenHeight) || (width != _vm->_screenWidth)))
return;
if (!_alreadyInit) {
@@ -696,8 +702,8 @@ void SmushPlayer::handleFrameObject(Chunk &b) {
_alreadyInit = true;
}
- _width = _vm->_screenWidth;
- _height = _vm->_screenHeight;
+ _width = width;
+ _height = height;
b.getWord();
b.getWord();
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index 5b0cd7e119..4a1704c6dd 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -49,6 +49,7 @@ private:
Codec47Decoder _codec47;
FileChunk *_base;
byte *_frameBuffer;
+ byte *_specialBuffer;
bool _skipNext;
bool _subtitles;