diff options
| author | Paul Gilbert | 2014-04-07 22:37:22 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2014-04-07 22:37:22 -0400 |
| commit | 7e13f488abeb6a7530d591bae880fdb185c8fef1 (patch) | |
| tree | f761b8479267909be151dbefe0f4f7176b23b3c1 /engines/mads/scene.cpp | |
| parent | f6a6ea974117cd8401a2caecdba9ef553821d41a (diff) | |
| download | scummvm-rg350-7e13f488abeb6a7530d591bae880fdb185c8fef1.tar.gz scummvm-rg350-7e13f488abeb6a7530d591bae880fdb185c8fef1.tar.bz2 scummvm-rg350-7e13f488abeb6a7530d591bae880fdb185c8fef1.zip | |
MADS: Implement loading logic for UI background animations
Diffstat (limited to 'engines/mads/scene.cpp')
| -rw-r--r-- | engines/mads/scene.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index b178de5839..ac57e0bcbf 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -123,8 +123,12 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) { _kernelMessages.clear(); // TODO: palletteUsage reset? setPalette(_nullPalette); + int flags = SCENEFLAG_LOAD_SHADOW; + if (_vm->_dithering) + flags |= SCENEFLAG_DITHER; + _sceneInfo = SceneInfo::init(_vm); - _sceneInfo->load(_currentSceneId, _variant, Common::String(), _vm->_game->_v2 ? 17 : 16, + _sceneInfo->load(_currentSceneId, _variant, Common::String(), flags, _depthSurface, _backgroundSurface); // Initialise palette animation for the scene @@ -143,10 +147,12 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) { _vm->_palette->_paletteUsage.load(1, 0xF); // Load interface - int flags = _vm->_game->_v2 ? 0x4101 : 0x4100; - if (!_vm->_textWindowStill) - flags |= 0x200; - + flags = PALFLAG_RESERVED | ANIMFLAG_LOAD_BACKGROUND; + if (_vm->_dithering) + flags |= ANIMFLAG_DITHER; + if (_vm->_textWindowStill) + flags |= ANIMFLAG_LOAD_BACKGROUND_ONLY; + _animationData = Animation::init(_vm, this); MSurface depthSurface; _animationData->load(_userInterface, depthSurface, prefix, flags, nullptr, nullptr); @@ -513,7 +519,7 @@ void Scene::loadAnimation(const Common::String &resName, int abortTimers) { _activeAnimation = Animation::init(_vm, this); _activeAnimation->load(interfaceSurface, depthSurface, resName, - _vm->_game->_v2 ? 1 : 0, nullptr, nullptr); + _vm->_dithering ? ANIMFLAG_DITHER : 0, nullptr, nullptr); _activeAnimation->startAnimation(abortTimers); } @@ -585,8 +591,4 @@ void Scene::resetScene() { _sequences.clear(); } -void Scene::backgroundAnimation() { - warning("TODO: Scene::backgroundAnimation"); -} - } // End of namespace MADS |
