diff options
author | Filippos Karapetis | 2015-12-18 01:52:41 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:08 +0100 |
commit | bc25b6be552a929c4b3221538ebbfb256de5ecf6 (patch) | |
tree | 6490e90b8b18cd62186c4940bf388f62fca107a6 | |
parent | 832d87e0bf1cb7dbfd2d3e7217b5d8fe0fefa8b7 (diff) | |
download | scummvm-rg350-bc25b6be552a929c4b3221538ebbfb256de5ecf6.tar.gz scummvm-rg350-bc25b6be552a929c4b3221538ebbfb256de5ecf6.tar.bz2 scummvm-rg350-bc25b6be552a929c4b3221538ebbfb256de5ecf6.zip |
LAB: Change the graphics and audio code to use Common::File directly
-rw-r--r-- | engines/lab/anim.cpp | 98 | ||||
-rw-r--r-- | engines/lab/anim.h | 6 | ||||
-rw-r--r-- | engines/lab/dispman.cpp | 7 | ||||
-rw-r--r-- | engines/lab/dispman.h | 2 | ||||
-rw-r--r-- | engines/lab/music.cpp | 15 | ||||
-rw-r--r-- | engines/lab/music.h | 2 | ||||
-rw-r--r-- | engines/lab/utils.cpp | 127 | ||||
-rw-r--r-- | engines/lab/utils.h | 16 |
8 files changed, 111 insertions, 162 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index d1b79a2260..75a9af32af 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -56,7 +56,7 @@ Anim::Anim(LabEngine *vm) : _vm(vm) { _frameNum = 0; _playOnce = false; _diffFile = nullptr; - _diffFileStart = nullptr; + _diffFileStart = 0; _size = 0; _rawDiffBM._bytesPerRow = 0; _rawDiffBM._drawOnScreen = false; @@ -119,7 +119,7 @@ void Anim::diffNextFrame(bool onlyDiffData) { _frameNum++; if ((_frameNum == 1) && (_continuous || !_playOnce)) - _diffFileStart = _diffFile; + _diffFileStart = _diffFile->pos(); _isAnim = (_frameNum >= 3) && (!_playOnce); _curBit = 0; @@ -132,55 +132,52 @@ void Anim::diffNextFrame(bool onlyDiffData) { } _vm->_music->updateMusic(); - _header = READ_LE_UINT32(_diffFile); - _diffFile += 4; + _header = _diffFile->readUint32LE(); + _size = _diffFile->readUint32LE(); - _size = READ_LE_UINT32(_diffFile); - _diffFile += 4; + uint32 curPos = 0; switch (_header) { case 8: - memcpy(_diffPalette, _diffFile, _size); - _diffFile += _size; + _diffFile->read(_diffPalette, _size); _isPal = true; break; case 10: - _rawDiffBM._planes[_curBit] = _diffFile; - - if (onlyDiffData) { - _diffFile += _size; - } else { - memcpy(DrawBitMap->_planes[_curBit], _diffFile, _size); - _diffFile += _size; - } + if (onlyDiffData) + warning("Boom"); + _diffFile->read(DrawBitMap->_planes[_curBit], _size); _curBit++; break; case 11: - _diffFile += 4; + curPos = _diffFile->pos(); + _diffFile->skip(4); _vm->_utils->runLengthDecode(DrawBitMap->_planes[_curBit], _diffFile); _curBit++; - _diffFile += _size - 4; + _diffFile->seek(curPos + _size, SEEK_SET); break; case 12: - _diffFile += 4; + curPos = _diffFile->pos(); + _diffFile->skip(4); _vm->_utils->VRunLengthDecode(DrawBitMap->_planes[_curBit], _diffFile, DrawBitMap->_bytesPerRow); _curBit++; - _diffFile += _size - 4; + _diffFile->seek(curPos + _size, SEEK_SET); break; case 20: + curPos = _diffFile->pos(); _vm->_utils->unDiff(DrawBitMap->_planes[_curBit], _vm->_graphics->_dispBitMap->_planes[_curBit], _diffFile, DrawBitMap->_bytesPerRow, false); _curBit++; - _diffFile += _size; + _diffFile->seek(curPos + _size, SEEK_SET); break; case 21: + curPos = _diffFile->pos(); _vm->_utils->unDiff(DrawBitMap->_planes[_curBit], _vm->_graphics->_dispBitMap->_planes[_curBit], _diffFile, DrawBitMap->_bytesPerRow, true); _curBit++; - _diffFile += _size; + _diffFile->seek(curPos + _size, SEEK_SET); break; case 25: @@ -202,12 +199,11 @@ void Anim::diffNextFrame(bool onlyDiffData) { _size -= 8; - _diffFile += 4; - _sampleSpeed = READ_LE_UINT16(_diffFile); - _diffFile += 4; + _diffFile->skip(4); + _sampleSpeed = _diffFile->readUint16LE(); + _diffFile->skip(2); _vm->_music->playSoundEffect(_sampleSpeed, _size, _diffFile); - _diffFile += _size; break; case 65535: @@ -235,11 +231,11 @@ void Anim::diffNextFrame(bool onlyDiffData) { // Random frame number so it never gets back to 2 _frameNum = 4; - _diffFile = _diffFileStart; + _diffFile->seek(_diffFileStart, SEEK_SET); break; default: - _diffFile += _size; + _diffFile->skip(_size); break; } } @@ -270,7 +266,7 @@ void Anim::stopDiffEnd() { /** * Reads in a DIFF file. */ -void Anim::readDiff(byte *buffer, bool playOnce, bool onlyDiffData) { +void Anim::readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData) { _playOnce = playOnce; _delayMicros = 0; _header = 0; @@ -286,37 +282,27 @@ void Anim::readDiff(byte *buffer, bool playOnce, bool onlyDiffData) { _vm->_graphics->blackScreen(); } - _diffFile = _diffFileStart = buffer; + _diffFile = diffFile; _continuous = false; - uint32 signature = READ_BE_UINT32(_diffFile); - _diffFile += 4; - - _header = READ_LE_UINT32(_diffFile); - _diffFile += 4; + uint32 signature = _diffFile->readUint32BE(); + _header = _diffFile->readUint32LE(); if ((signature != MKTAG('D', 'I', 'F', 'F')) || (_header != 1219009121L)) { _isPlaying = false; return; } - _header = READ_LE_UINT32(_diffFile); - _diffFile += 4; - - _size = READ_LE_UINT32(_diffFile); - _diffFile += 4; + _header = _diffFile->readUint32LE(); + _size = _diffFile->readUint32LE(); if (_header == 0) { // sizeof(headerdata) != 18, but the padding might be at the end - _headerdata._version = READ_LE_UINT16(_diffFile); - _diffFile += 2; - _headerdata._width = READ_LE_UINT16(_diffFile); - _diffFile += 2; - _headerdata._height = READ_LE_UINT16(_diffFile); - _diffFile += 2; - _headerdata._depth = *_diffFile; - _diffFile++; - _headerdata._fps = *_diffFile; + _headerdata._version = _diffFile->readUint16LE(); + _headerdata._width = _diffFile->readUint16LE(); + _headerdata._height = _diffFile->readUint16LE(); + _headerdata._depth = _diffFile->readByte(); + _headerdata._fps = _diffFile->readByte(); // HACK: The original game defines a 1 second delay when changing screens, which is // very annoying. We first removed the delay, but it looked wrong when changing screens @@ -327,15 +313,11 @@ void Anim::readDiff(byte *buffer, bool playOnce, bool onlyDiffData) { if (_headerdata._fps == 1) _headerdata._fps = 0; - _diffFile++; - _headerdata._bufferSize = READ_LE_UINT32(_diffFile); - _diffFile += 4; - _headerdata._machine = READ_LE_UINT16(_diffFile); - _diffFile += 2; - _headerdata._flags = READ_LE_UINT32(_diffFile); - _diffFile += 4; - - _diffFile += _size - 18; + _headerdata._bufferSize = _diffFile->readUint32LE(); + _headerdata._machine = _diffFile->readUint16LE(); + _headerdata._flags = _diffFile->readUint32LE(); + + _diffFile->skip(_size - 18); _continuous = CONTINUOUS & _headerdata._flags; _diffWidth = _headerdata._width; diff --git a/engines/lab/anim.h b/engines/lab/anim.h index 6e568a40a3..0d2497bb73 100644 --- a/engines/lab/anim.h +++ b/engines/lab/anim.h @@ -69,8 +69,8 @@ private: bool _donePal; uint16 _frameNum; bool _playOnce; - byte *_diffFile; - byte *_diffFileStart; + Common::File *_diffFile; + uint32 _diffFileStart; uint32 _size; bool _stopPlayingEnd; uint16 _sampleSpeed; @@ -88,7 +88,7 @@ public: bool _noPalChange; // Don't change the palette. BitMap _rawDiffBM; - void readDiff(byte *buffer, bool playOnce, bool onlyDiffData = false); + void readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData = false); void diffNextFrame(bool onlyDiffData = false); void stopDiff(); void stopDiffEnd(); diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index c74302d77b..d230225488 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -71,11 +71,8 @@ DisplayMan::~DisplayMan() { // From readPict.c. Reads in pictures and animations from disk. void DisplayMan::loadPict(const char *filename) { - Common::File *bitmapFile = _vm->_resource->openDataFile(filename); freePict(); - _curBitmap = new byte[bitmapFile->size()]; - bitmapFile->read(_curBitmap, bitmapFile->size()); - delete bitmapFile; + _curBitmap = _vm->_resource->openDataFile(filename); } void DisplayMan::loadBackPict(const char *fileName, uint16 *highPal) { @@ -115,7 +112,7 @@ void DisplayMan::readPict(const char *filename, bool playOnce, bool onlyDiffData } void DisplayMan::freePict() { - delete[] _curBitmap; + delete _curBitmap; _curBitmap = nullptr; } diff --git a/engines/lab/dispman.h b/engines/lab/dispman.h index 2a86e344c1..ca686ded8e 100644 --- a/engines/lab/dispman.h +++ b/engines/lab/dispman.h @@ -65,7 +65,7 @@ private: void getWord(char *wordBuffer, const char *mainBuffer, uint16 *wordWidth); byte _curPen; - byte *_curBitmap; + Common::File *_curBitmap; byte _curvgapal[256 * 3]; public: diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp index 61d9fd0f4e..aa34b7f6b4 100644 --- a/engines/lab/music.cpp +++ b/engines/lab/music.cpp @@ -102,7 +102,7 @@ uint16 Music::getPlayingBufferCount() { return (_queuingAudioStream) ? _queuingAudioStream->numQueuedStreams() : 0; } -void Music::playSoundEffect(uint16 sampleSpeed, uint32 length, void *data) { +void Music::playSoundEffect(uint16 sampleSpeed, uint32 length, Common::File *dataFile) { pauseBackMusic(); stopSoundEffect(); @@ -115,7 +115,12 @@ void Music::playSoundEffect(uint16 sampleSpeed, uint32 length, void *data) { else soundFlags |= Audio::FLAG_UNSIGNED; - Audio::SeekableAudioStream *audioStream = Audio::makeRawStream((const byte *)data, length, sampleSpeed, soundFlags, DisposeAfterUse::NO); + // NOTE: We need to use malloc(), cause this will be freed with free() + // by the music code + byte *soundData = (byte *)malloc(length); + dataFile->read(soundData, length); + + Audio::SeekableAudioStream *audioStream = Audio::makeRawStream((const byte *)soundData, length, sampleSpeed, soundFlags, DisposeAfterUse::NO); uint loops = (_loopSoundEffect) ? 0 : 1; Audio::LoopingAudioStream *loopingAudioStream = new Audio::LoopingAudioStream(audioStream, loops); _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, loopingAudioStream); @@ -352,11 +357,7 @@ void Music::readSound(bool waitTillFinished, Common::File *file) { uint16 sampleRate = file->readUint16LE(); file->skip(2); - // NOTE: We need to use malloc(), cause this will be freed with free() - // by the music code - byte *soundData = (byte *)malloc(soundSize); - file->read(soundData, soundSize); - playSoundEffect(sampleRate, soundSize, soundData); + playSoundEffect(sampleRate, soundSize, file); } else if (soundTag == 65535L) { if (waitTillFinished) { while (isSoundEffectActive()) { diff --git a/engines/lab/music.h b/engines/lab/music.h index d5dd241d6e..4ea075eded 100644 --- a/engines/lab/music.h +++ b/engines/lab/music.h @@ -85,7 +85,7 @@ public: void freeMusic(); bool initMusic(const char *filename); bool isSoundEffectActive() const; - void playSoundEffect(uint16 sampleSpeed, uint32 length, void *data); + void playSoundEffect(uint16 sampleSpeed, uint32 length, Common::File *dataFile); bool readMusic(const char *filename, bool waitTillFinished); void resetMusic(); void resumeBackMusic(); diff --git a/engines/lab/utils.cpp b/engines/lab/utils.cpp index 73605582b0..71fce8154b 100644 --- a/engines/lab/utils.cpp +++ b/engines/lab/utils.cpp @@ -123,27 +123,22 @@ Common::Point Utils::vgaUnscale(Common::Point pos) { * Undiffs a piece of memory when header size is a byte, and copy/skip size * is also a byte. */ -void Utils::unDiffByteByte(byte *dest, byte *diff) { +void Utils::unDiffByteByte(byte *dest, Common::File *sourceFile) { while (1) { - uint16 skip = *diff; - diff++; - uint16 copy = *diff; - diff++; + uint16 skip = sourceFile->readByte(); + uint16 copy = sourceFile->readByte(); if (skip == 255) { if (copy == 0) { - skip = READ_LE_UINT16(diff); - diff += 2; - copy = READ_LE_UINT16(diff); - diff += 2; + skip = sourceFile->readUint16LE(); + copy = sourceFile->readUint16LE(); } else if (copy == 255) return; } dest += skip; - memcpy(dest, diff, copy); + sourceFile->read(dest, copy); dest += copy; - diff += copy; } } @@ -151,19 +146,15 @@ void Utils::unDiffByteByte(byte *dest, byte *diff) { * Undiffs a piece of memory when header size is a byte, and copy/skip size * is a word. */ -void Utils::unDiffByteWord(uint16 *dest, uint16 *diff) { +void Utils::unDiffByteWord(uint16 *dest, Common::File *sourceFile) { while (1) { - uint16 skip = ((byte *)diff)[0]; - uint16 copy = ((byte *)diff)[1]; - - diff++; + uint16 skip = sourceFile->readByte(); + uint16 copy = sourceFile->readByte(); if (skip == 255) { if (copy == 0) { - skip = READ_LE_UINT16(diff); - diff++; - copy = READ_LE_UINT16(diff); - diff++; + skip = sourceFile->readUint16LE(); + copy = sourceFile->readUint16LE(); } else if (copy == 255) return; } @@ -171,28 +162,16 @@ void Utils::unDiffByteWord(uint16 *dest, uint16 *diff) { dest += skip; while (copy > 3) { - *dest = READ_LE_UINT16(diff); - dest++; - diff++; - - *dest = READ_LE_UINT16(diff); - dest++; - diff++; - - *dest = READ_LE_UINT16(diff); - dest++; - diff++; - - *dest = READ_LE_UINT16(diff); - dest++; - diff++; + for (int i = 0; i < 4; i++) { + *dest = sourceFile->readUint16LE(); + dest++; + } copy -= 4; } while (copy) { - *dest++ = READ_LE_UINT16(diff); - diff++; + *dest++ = sourceFile->readUint16LE(); copy--; } } @@ -204,13 +183,13 @@ void Utils::unDiffByteWord(uint16 *dest, uint16 *diff) { * Undiffs a piece of memory when header size is a byte, and copy/skip size * is a byte. */ -void Utils::VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow) { +void Utils::VUnDiffByteByte(byte *dest, Common::File *sourceFile, uint16 bytesPerRow) { for (uint16 counter = 0; counter < _dataBytesPerRow; ) { byte *curPtr = dest + counter; for (;;) { - uint16 skip = *diff++; - uint16 copy = *diff++; + uint16 skip = sourceFile->readByte(); + uint16 copy = sourceFile->readByte(); if (skip == 255) { counter += copy; @@ -220,7 +199,7 @@ void Utils::VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow) { while (copy) { copy--; - *curPtr = *diff++; + *curPtr = sourceFile->readByte(); curPtr += bytesPerRow; } } @@ -232,7 +211,7 @@ void Utils::VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow) { * Undiffs a piece of memory when header size is a byte, and copy/skip size * is a word. */ -void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) { +void Utils::VUnDiffByteWord(uint16 *dest, Common::File *sourceFile, uint16 bytesPerRow) { uint16 counter = 0; uint16 wordsPerRow = bytesPerRow / 2; @@ -240,10 +219,8 @@ void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) { uint16 *curPtr = dest + counter; for (;;) { - uint16 skip = ((byte *)diff)[0]; - uint16 copy = ((byte *)diff)[1]; - - diff++; + uint16 skip = sourceFile->readByte(); + uint16 copy = sourceFile->readByte(); if (skip == 255) { counter += copy; @@ -252,7 +229,7 @@ void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) { curPtr += (skip * wordsPerRow); while (copy) { - *curPtr = *diff++; //swapUShort(*diff); + *curPtr = sourceFile->readUint16LE(); curPtr += wordsPerRow; copy--; } @@ -265,29 +242,26 @@ void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) { * Undiffs a piece of memory when header size is a byte, and copy/skip size * is a long. */ -void Utils::VUnDiffByteLong(uint32 *dest, uint32 *diff, uint16 bytesPerRow) { +void Utils::VUnDiffByteLong(uint32 *dest, Common::File *sourceFile, uint16 bytesPerRow) { uint16 counter = 0; - byte *diff1 = (byte *)diff; - uint16 longsperrow = bytesPerRow / 4; while (counter < (_dataBytesPerRow >> 2)) { - uint32 *_curPtr = dest + counter; + uint32 *curPtr = dest + counter; for (;;) { - uint16 skip = *diff1++; - uint16 copy = *diff1++; + uint16 skip = sourceFile->readByte(); + uint16 copy = sourceFile->readByte(); if (skip == 255) { counter += copy; break; } else { - _curPtr += (skip * longsperrow); + curPtr += (skip * longsperrow); while (copy) { - *_curPtr = *(uint32 *)diff1; //swapULong(*diff); - _curPtr += longsperrow; - diff1 += 4; + *curPtr = sourceFile->readUint32LE(); + curPtr += longsperrow; copy--; } } @@ -298,22 +272,21 @@ void Utils::VUnDiffByteLong(uint32 *dest, uint32 *diff, uint16 bytesPerRow) { /** * Runlength decodes a chunk of memory. */ -void Utils::runLengthDecode(byte *dest, byte *source) { +void Utils::runLengthDecode(byte *dest, Common::File *sourceFile) { int8 num; int16 count; while (1) { - num = (int8)*source++; + num = sourceFile->readSByte(); if (num == 127) { return; } else if (num > '\0') { - memcpy(dest, source, num); - source += num; + sourceFile->read(dest, num); dest += num; } else { count = (int16)(-num); - num = *source++; + num = sourceFile->readSByte(); while (count) { *dest++ = num; @@ -326,7 +299,7 @@ void Utils::runLengthDecode(byte *dest, byte *source) { /** * Does a vertical run length decode. */ -void Utils::VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow) { +void Utils::VRunLengthDecode(byte *dest, Common::File *sourceFile, uint16 bytesPerRow) { int16 count; byte *top = dest; @@ -334,20 +307,18 @@ void Utils::VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow) { dest = top; dest += i; - int8 num = (int8)*source; - source++; + int8 num = sourceFile->readSByte(); while (num != 127) { if (num > '\0') { while (num) { - *dest = *source++; + *dest = sourceFile->readByte(); dest += bytesPerRow; num--; } } else { count = (int16)(-num); - num = (int8)*source; - source++; + num = sourceFile->readSByte(); while (count) { *dest = num; @@ -356,8 +327,7 @@ void Utils::VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow) { } } - num = *source; - source++; + num = sourceFile->readSByte(); } } } @@ -365,25 +335,24 @@ void Utils::VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow) { /** * Does the undiffing between the bitmaps. */ -void Utils::unDiff(byte *newBuf, byte *oldBuf, byte *diffData, uint16 bytesPerRow, bool isV) { - diffData++; - byte bufType = *diffData; - diffData++; +void Utils::unDiff(byte *newBuf, byte *oldBuf, Common::File *sourceFile, uint16 bytesPerRow, bool isV) { + sourceFile->skip(1); + byte bufType = sourceFile->readByte(); if (isV) { if (bufType == 0) - VUnDiffByteByte(newBuf, diffData, bytesPerRow); + VUnDiffByteByte(newBuf, sourceFile, bytesPerRow); else if (bufType == 1) - VUnDiffByteWord((uint16 *)newBuf, (uint16 *)diffData, bytesPerRow); + VUnDiffByteWord((uint16 *)newBuf, sourceFile, bytesPerRow); else if (bufType == 3) - VUnDiffByteLong((uint32 *)newBuf, (uint32 *)diffData, bytesPerRow); + VUnDiffByteLong((uint32 *)newBuf, sourceFile, bytesPerRow); else error("Unexpected variable compression scheme %d", bufType); } else { if (bufType == 0) - unDiffByteByte(newBuf, diffData); + unDiffByteByte(newBuf, sourceFile); else if (bufType == 1) - unDiffByteWord((uint16 *)newBuf, (uint16 *)diffData); + unDiffByteWord((uint16 *)newBuf, sourceFile); else error("Unexpected compression scheme %d", bufType); } diff --git a/engines/lab/utils.h b/engines/lab/utils.h index c6337c797b..0d4f6496e1 100644 --- a/engines/lab/utils.h +++ b/engines/lab/utils.h @@ -38,11 +38,11 @@ private: LabEngine *_vm; uint16 _dataBytesPerRow; - void unDiffByteByte(byte *dest, byte *diff); - void unDiffByteWord(uint16 *dest, uint16 *diff); - void VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow); - void VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow); - void VUnDiffByteLong(uint32 *dest, uint32 *diff, uint16 bytesPerRow); + void unDiffByteByte(byte *dest, Common::File *sourceFile); + void unDiffByteWord(uint16 *dest, Common::File *sourceFile); + void VUnDiffByteByte(byte *dest, Common::File *sourceFile, uint16 bytesPerRow); + void VUnDiffByteWord(uint16 *dest, Common::File *sourceFile, uint16 bytesPerRow); + void VUnDiffByteLong(uint32 *dest, Common::File *sourceFile, uint16 bytesPerRow); public: Utils(LabEngine *vm); @@ -58,9 +58,9 @@ public: uint16 mapScaleX(uint16 x); uint16 mapScaleY(uint16 y); Common::Point vgaUnscale(Common::Point pos); - void unDiff(byte *newBuf, byte *oldBuf, byte *diffData, uint16 bytesPerRow, bool isV); - void runLengthDecode(byte *dest, byte *source); - void VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow); + void unDiff(byte *newBuf, byte *oldBuf, Common::File *sourceFile, uint16 bytesPerRow, bool isV); + void runLengthDecode(byte *dest, Common::File *sourceFile); + void VRunLengthDecode(byte *dest, Common::File *sourceFile, uint16 bytesPerRow); void setBytesPerRow(int num); uint16 getRandom(uint16 max); }; |