diff options
author | Nicola Mettifogo | 2007-04-11 20:20:22 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-04-11 20:20:22 +0000 |
commit | 88b8f944355e8b97ffb7fc7f9ef8ef7ce0e3c313 (patch) | |
tree | 017c1c169b2ec464a55fc688ee03a46574148159 /engines/parallaction/disk.cpp | |
parent | ab85ecdcb78fba1de64533c0ac3426c3ed0278ff (diff) | |
download | scummvm-rg350-88b8f944355e8b97ffb7fc7f9ef8ef7ce0e3c313.tar.gz scummvm-rg350-88b8f944355e8b97ffb7fc7f9ef8ef7ce0e3c313.tar.bz2 scummvm-rg350-88b8f944355e8b97ffb7fc7f9ef8ef7ce0e3c313.zip |
Implemented palette animation to Amiga version of Nippon Safes.
svn-id: r26453
Diffstat (limited to 'engines/parallaction/disk.cpp')
-rw-r--r-- | engines/parallaction/disk.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index dea7a54078..c224ac5801 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -1030,6 +1030,31 @@ void buildMask(byte* buf) { } } +class BackgroundDecoder : public Graphics::ILBMDecoder { + + PaletteFxRange *_range; + uint32 _i; + +protected: + void readCRNG() { + _range[_i]._timer = _chunk.readUint16(); + _range[_i]._step = _chunk.readUint16(); + _range[_i]._flags = _chunk.readUint16(); + _range[_i]._first = _chunk.readByte(); + _range[_i]._last = _chunk.readByte(); + + _i++; + } + +public: + BackgroundDecoder(Common::ReadStream &input, PaletteFxRange *range) : ILBMDecoder(input), _range(range), _i(0) { + } + + uint32 getNumRanges() { + return _i; + } +}; + void AmigaDisk::loadScenery(const char* background, const char* mask) { debugC(1, kDebugDisk, "AmigaDisk::loadScenery '%s', '%s'", background, mask); @@ -1039,7 +1064,7 @@ void AmigaDisk::loadScenery(const char* background, const char* mask) { sprintf(path, "%s.bkgnd", background); Common::SeekableReadStream *s = openArchivedFile(path, true); - Graphics::ILBMDecoder decoder(*s); + BackgroundDecoder decoder(*s, _vm->_gfx->_palettefx); decoder.decode(surf, pal); for (uint32 i = 0; i < PALETTE_SIZE; i++) _vm->_gfx->_palette[i] = pal[i] >> 2; |