[Scummvm-cvs-logs] CVS: scummvm/scumm/smush codec1.cpp,1.13,1.14 smush_player.cpp,1.105,1.106
Eugene Sandulenko
sev at users.sourceforge.net
Fri Jan 30 13:15:33 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28362/scumm/smush
Modified Files:
codec1.cpp smush_player.cpp
Log Message:
o Renamed more variables/structures to reflect their functionality
o Fixed bug with only caveman approaching
o Extended smush player to process FT-specific overlays in videos.
They're used to draw broken truck & car approaching and opponents on the
mineroad
Index: codec1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec1.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- codec1.cpp 6 Jan 2004 12:45:31 -0000 1.13
+++ codec1.cpp 30 Jan 2004 02:14:29 -0000 1.14
@@ -24,14 +24,16 @@
namespace Scumm {
-void smush_decode_codec1(byte *dst, byte *src, int height) {
+void smush_decode_codec1(byte *dst, byte *src, int left, int top, int height, int width, int dstWidth) {
byte val, code;
int32 length;
int h = height, size_line;
+ dst += top * dstWidth;
for (h = 0; h < height; h++) {
size_line = READ_LE_UINT16(src);
src += 2;
+ dst += left;
while (size_line > 0) {
code = *src++;
size_line--;
@@ -52,6 +54,7 @@
}
}
}
+ dst += dstWidth - left - width;
}
}
Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- smush_player.cpp 28 Jan 2004 04:07:54 -0000 1.105
+++ smush_player.cpp 30 Jan 2004 02:14:29 -0000 1.106
@@ -661,7 +661,7 @@
setPalette(_pal);
}
-void smush_decode_codec1(byte *dst, byte *src, int height);
+void smush_decode_codec1(byte *dst, byte *src, int left, int top, int height, int width, int dstWidth);
void SmushPlayer::handleFrameObject(Chunk &b) {
checkBlock(b, TYPE_FOBJ, 14);
@@ -671,12 +671,12 @@
}
int codec = b.getWord();
- b.getWord(); // left
- b.getWord(); // top
+ int left = b.getWord(); // left
+ int top = b.getWord(); // top
int width = b.getWord();
int height = b.getWord();
- if ((height != _vm->_screenHeight) || (width != _vm->_screenWidth))
+ if ((height > _vm->_screenHeight) || (width > _vm->_screenWidth))
return;
if (!_alreadyInit) {
@@ -685,8 +685,8 @@
_alreadyInit = true;
}
- _width = width;
- _height = height;
+ _width = _vm->_screenWidth;
+ _height = _vm->_screenHeight;
b.getWord();
b.getWord();
@@ -699,7 +699,7 @@
switch (codec) {
case 1:
case 3:
- smush_decode_codec1(_dst, chunk_buffer, _height);
+ smush_decode_codec1(_dst, chunk_buffer, left, top, height, width, _vm->_screenWidth);
break;
case 37:
_codec37.decode(_dst, chunk_buffer);
@@ -972,6 +972,13 @@
delete _base;
_base = new FileChunk(file, directory);
+ // In this case we need to get palette and number of frames
+ if (pos > 8) {
+ Chunk *sub = _base->subBlock();
+ checkBlock(*sub, TYPE_AHDR);
+ handleAnimHeader(*sub);
+ delete sub;
+ }
if (pos >= 8)
pos -= 8;
} else {
More information about the Scummvm-git-logs
mailing list