aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/scicore/decompressor.h
diff options
context:
space:
mode:
authorGreg Frieger2009-03-14 08:43:28 +0000
committerGreg Frieger2009-03-14 08:43:28 +0000
commit782c394dd78e31f1d4bca76d75e7cd91cd490f14 (patch)
treec8d8fc7e6f5dac5bdade7ad7c5b2029cb8a46daf /engines/sci/scicore/decompressor.h
parentd00a9e9a7d2ca2520c107d9e2481759bc4cc9251 (diff)
downloadscummvm-rg350-782c394dd78e31f1d4bca76d75e7cd91cd490f14.tar.gz
scummvm-rg350-782c394dd78e31f1d4bca76d75e7cd91cd490f14.tar.bz2
scummvm-rg350-782c394dd78e31f1d4bca76d75e7cd91cd490f14.zip
- LZS Decompressor added
- Some code clean-up svn-id: r39385
Diffstat (limited to 'engines/sci/scicore/decompressor.h')
-rw-r--r--engines/sci/scicore/decompressor.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/sci/scicore/decompressor.h b/engines/sci/scicore/decompressor.h
index 5d54212a95..c471b41cec 100644
--- a/engines/sci/scicore/decompressor.h
+++ b/engines/sci/scicore/decompressor.h
@@ -77,12 +77,17 @@ protected:
byte getByteLSB();
void fetchBitsMSB();
- void fetchBitsLSB();
+ void fetchBitsLSB();
//! put byte to _dest stream
/** @param b - byte to put
*/
virtual void putByte(byte b);
+ // Returns true if all expected data has been unpacked to _dest
+ // and there is no more data in _src
+ bool isFinished() {
+ return (_dwWrote == _szUnpacked) && (_dwRead >= _szPacked);
+ }
uint32 _dwBits; // bits buffer
byte _nBits; // # of bits in buffer
@@ -165,7 +170,12 @@ protected:
class DecompressorLZS : public Decompressor {
public:
int unpack(Common::ReadStream *src, byte *dest, uint32 nPacked, uint32 nUnpacked);
+protected:
+ int unpackLZS();
+ uint16 getCompLen();
+ void copyComp(int offs, int clen);
};
+
} // End of namespace Sci
#endif // SCI_SCICORE_DECOMPRESSOR_H