changed a little structure for codec47

svn-id: r6257
This commit is contained in:
Paweł Kołodziejski 2002-12-29 17:55:16 +00:00
parent b885b47269
commit 36c2b8c581
5 changed files with 31 additions and 8 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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 &);
};

View File

@ -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:

View File

@ -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 ?