diff options
author | Paul Gilbert | 2014-05-20 21:11:53 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-05-20 21:11:53 -0400 |
commit | df23dff5177ece670f2fd8222337faa80baf12bd (patch) | |
tree | a4184fb2a8ee321aebce4ffaabda9f09e49e2e70 /engines/mads/animation.cpp | |
parent | 6f66459f4ab89aeb152d7b13b4289ab7ba8cfca4 (diff) | |
download | scummvm-rg350-df23dff5177ece670f2fd8222337faa80baf12bd.tar.gz scummvm-rg350-df23dff5177ece670f2fd8222337faa80baf12bd.tar.bz2 scummvm-rg350-df23dff5177ece670f2fd8222337faa80baf12bd.zip |
MADS: Change the animation _animMode to an enum'ed _bgType
Diffstat (limited to 'engines/mads/animation.cpp')
-rw-r--r-- | engines/mads/animation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/mads/animation.cpp b/engines/mads/animation.cpp index f006d1fe61..f55e485c20 100644 --- a/engines/mads/animation.cpp +++ b/engines/mads/animation.cpp @@ -36,7 +36,7 @@ void AAHeader::load(Common::SeekableReadStream *f) { _flags = f->readByte(); f->skip(2); - _animMode = f->readUint16LE(); + _bgType = (AnimBgType)f->readUint16LE(); _roomNumber = f->readUint16LE(); f->skip(2); _manualFlag = f->readUint16LE() != 0; @@ -186,7 +186,7 @@ void Animation::load(UserInterface &interfaceSurface, MSurface &depthSurface, _header.load(stream); delete stream; - if (_header._animMode == 4) + if (_header._bgType == ANIMBG_INTERFACE) flags |= PALFLAG_RESERVED; if (flags & ANIMFLAG_LOAD_BACKGROUND) { @@ -296,7 +296,7 @@ void Animation::load(UserInterface &interfaceSurface, MSurface &depthSurface, if (usageList.size() > 0) _vm->_palette->_paletteUsage.updateUsage(usageList, _header._messagesCount); - if (_header._animMode == 4) { + if (_header._bgType == ANIMBG_INTERFACE) { // Remaps the sprite list indexes for frames to the loaded sprite list indexes for (uint i = 0; i < _frameEntries.size(); ++i) { int spriteListIndex = _frameEntries[i]._spriteSlot._spritesIndex; @@ -377,7 +377,7 @@ bool Animation::drawFrame(SpriteAsset &spriteSet, const Common::Point &pt, int f void Animation::loadInterface(UserInterface &interfaceSurface, MSurface &depthSurface, AAHeader &header, int flags, Common::Array<PaletteCycle> *palCycles, SceneInfo *sceneInfo) { _scene->_depthStyle = 0; - if (header._animMode <= 2) { + if (header._bgType <= ANIMBG_FULL_SIZE) { _vm->_palette->_paletteUsage.setEmpty(); sceneInfo->load(header._roomNumber, flags, header._interfaceFile, 0, depthSurface, interfaceSurface); _scene->_depthStyle = sceneInfo->_depthStyle == 2 ? 1 : 0; @@ -386,7 +386,7 @@ void Animation::loadInterface(UserInterface &interfaceSurface, MSurface &depthSu for (uint i = 0; i < sceneInfo->_paletteCycles.size(); ++i) palCycles->push_back(sceneInfo->_paletteCycles[i]); } - } else if (header._animMode == 4) { + } else if (header._bgType == ANIMBG_INTERFACE) { // Load a scene interface Common::String resourceName = "*" + header._interfaceFile; interfaceSurface.load(resourceName); |