aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-12-29 17:55:16 +0000
committerPaweł Kołodziejski2002-12-29 17:55:16 +0000
commit36c2b8c58163e10c013e80bfd9bedbd3b2c59c30 (patch)
tree2ea8b8ebc6ef731a1f99c5b53d24d8b672506552 /scumm/smush
parentb885b47269c300dcf7663ffce502ce0d9a56ddee (diff)
downloadscummvm-rg350-36c2b8c58163e10c013e80bfd9bedbd3b2c59c30.tar.gz
scummvm-rg350-36c2b8c58163e10c013e80bfd9bedbd3b2c59c30.tar.bz2
scummvm-rg350-36c2b8c58163e10c013e80bfd9bedbd3b2c59c30.zip
changed a little structure for codec47
svn-id: r6257
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/blitter.h1
-rw-r--r--scumm/smush/codec47.cpp20
-rw-r--r--scumm/smush/codec47.h12
-rw-r--r--scumm/smush/player.cpp4
-rw-r--r--scumm/smush/player.h2
5 files changed, 31 insertions, 8 deletions
diff --git a/scumm/smush/blitter.h b/scumm/smush/blitter.h
index a59644e777..cfed25dd3f 100644
--- a/scumm/smush/blitter.h
+++ b/scumm/smush/blitter.h
@@ -77,6 +77,7 @@ public:
void putBlock(byte *); //!< This method allows to blit one block directly from a buffer
void putBlock(uint32, uint32, uint32, uint32); //!< This method allows to blit one block from a 4 int32 value
void blockCopy(int32); //!< This method allows to copy one block from another separated by the given offset
+ byte * getPtr() { return _ptr; }
};
#endif
diff --git a/scumm/smush/codec47.cpp b/scumm/smush/codec47.cpp
index 6bfd28d7ff..e7f0e5dec0 100644
--- a/scumm/smush/codec47.cpp
+++ b/scumm/smush/codec47.cpp
@@ -24,7 +24,25 @@
#include "chunk.h"
#include "blitter.h"
-bool DumpDecoder::decode(Blitter & dst, Chunk & src) {
+bool Codec47Decoder::initSize(const Point & p, const Rect & r) {
+ Decoder::initSize(p, r);
+ clean();
+ int32 frame_size = getRect().width() * getRect().height();
+
+ return true;
+}
+
+Codec47Decoder::Codec47Decoder() {
+}
+
+void Codec47Decoder::clean() {
+}
+
+Codec47Decoder::~Codec47Decoder() {
+ clean();
+}
+
+bool Codec47Decoder::decode(Blitter & dst, Chunk & src) {
return true;
}
diff --git a/scumm/smush/codec47.h b/scumm/smush/codec47.h
index 82712099b8..15ffb2c34d 100644
--- a/scumm/smush/codec47.h
+++ b/scumm/smush/codec47.h
@@ -26,12 +26,16 @@
#include "decoder.h"
-/*! @brief ::decoder for debugging purpose.
+class Codec47Decoder : public Decoder {
+private:
+
+public:
+ bool initSize(const Point &, const Rect &);
+ Codec47Decoder();
+ void clean();
+ virtual ~Codec47Decoder();
-*/
-class DumpDecoder : public Decoder {
public:
- virtual ~DumpDecoder() {}
bool decode(Blitter &, Chunk &);
};
diff --git a/scumm/smush/player.cpp b/scumm/smush/player.cpp
index d1a271ab91..a8ac75db2e 100644
--- a/scumm/smush/player.cpp
+++ b/scumm/smush/player.cpp
@@ -487,8 +487,8 @@ void SmushPlayer::initSize(const Rect & r, bool always, bool transparent) {
_codec1.initSize(_frameSize, r);
_codec37.initSize(_frameSize, r);
+ _codec47.initSize(_frameSize, r);
_codec44.initSize(_frameSize, r);
- _codecd.initSize(_frameSize, r);
_alreadyInit = true;
}
@@ -527,7 +527,7 @@ void SmushPlayer::handleFrameObject(Chunk & b) {
break;
case 47:
initSize(r, false, true);
- decodeCodec(b, r, _codecd);
+ decodeCodec(b, r, _codec47);
break;
case 21:
case 44:
diff --git a/scumm/smush/player.h b/scumm/smush/player.h
index 4563261f59..76d8e52804 100644
--- a/scumm/smush/player.h
+++ b/scumm/smush/player.h
@@ -56,8 +56,8 @@ private:
FontRenderer * _fr[4]; //!< pointers to the fonts for the animation
Codec1Decoder _codec1; //!< the ::decoder for codec 1 and 3
Codec37Decoder _codec37; //!< the ::decoder for codec 37
+ Codec47Decoder _codec47; //!< the ::decoder for codec 47
Codec44Decoder _codec44; //!< the ::decoder for codec 21 and 44
- DumpDecoder _codecd; //!< the ::decoder for codec 21 and 44
Point _frameSize; //!< the current frame size of the animation
int32 _frame; //!< the current frame number of the animation
bool _outputSound; //!< should we handle sound ?