aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/smush/codec37.cpp
diff options
context:
space:
mode:
authorGregory Montoir2007-01-30 22:44:14 +0000
committerGregory Montoir2007-01-30 22:44:14 +0000
commit9abaa064a07bfb44ea3663e026cce874c77d449e (patch)
tree510a29a939ba31bbdab07993f72a3516e7dac39e /engines/scumm/smush/codec37.cpp
parent3766e0a77df3839c1622b254390e665c009d4b74 (diff)
downloadscummvm-rg350-9abaa064a07bfb44ea3663e026cce874c77d449e.tar.gz
scummvm-rg350-9abaa064a07bfb44ea3663e026cce874c77d449e.tar.bz2
scummvm-rg350-9abaa064a07bfb44ea3663e026cce874c77d449e.zip
got rid of codec37/codec47 init/deinit methods, cleanup
svn-id: r25295
Diffstat (limited to 'engines/scumm/smush/codec37.cpp')
-rw-r--r--engines/scumm/smush/codec37.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index 0078237c30..fadb7d115a 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -28,8 +28,7 @@
namespace Scumm {
-void Codec37Decoder::init(int width, int height) {
- deinit();
+Codec37Decoder::Codec37Decoder(int width, int height) {
_width = width;
_height = height;
_frameSize = _width * _height;
@@ -40,26 +39,15 @@ void Codec37Decoder::init(int width, int height) {
_deltaBufs[0] = _deltaBuf + 0x4D80;
_deltaBufs[1] = _deltaBuf + 0xE880 + _frameSize;
_offsetTable = new int16[255];
- _curtable = 0;
if (_offsetTable == 0)
error("unable to allocate decoder offset table");
- _tableLastPitch = -1;
- _tableLastIndex = -1;
-}
-
-Codec37Decoder::Codec37Decoder() {
- _deltaSize = 0;
- _deltaBuf = 0;
- _deltaBufs[0] = 0;
- _deltaBufs[1] = 0;
_curtable = 0;
- _offsetTable = 0;
+ _prevSeqNb = 0;
_tableLastPitch = -1;
_tableLastIndex = -1;
- _prevSeqNb = 0;
}
-void Codec37Decoder::deinit() {
+Codec37Decoder::~Codec37Decoder() {
if (_offsetTable) {
delete []_offsetTable;
_offsetTable = 0;
@@ -75,10 +63,6 @@ void Codec37Decoder::deinit() {
}
}
-Codec37Decoder::~Codec37Decoder() {
- deinit();
-}
-
void Codec37Decoder::maketable(int pitch, int index) {
static const int8 maketable_bytes[] = {
0, 0, 1, 0, 2, 0, 3, 0, 5, 0,