aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/m4/animation.h2
-rw-r--r--engines/m4/mads_scene.cpp12
-rw-r--r--engines/sci/graphics/palette.cpp2
3 files changed, 14 insertions, 2 deletions
diff --git a/engines/m4/animation.h b/engines/m4/animation.h
index c8be7f5cb3..2dfe0d887e 100644
--- a/engines/m4/animation.h
+++ b/engines/m4/animation.h
@@ -62,6 +62,8 @@ class Animation {
Common::String *_spriteSeriesNames;
SpriteAsset *_spriteSeries;
int _curFrame, _curFrameEntry;
+
+ bool freeFlag() const { return _freeFlag; }
};
} // End of namespace M4
diff --git a/engines/m4/mads_scene.cpp b/engines/m4/mads_scene.cpp
index efb495e823..8073db32db 100644
--- a/engines/m4/mads_scene.cpp
+++ b/engines/m4/mads_scene.cpp
@@ -64,7 +64,7 @@ void MadsScene::loadScene2(const char *aaName) {
_kernelMessages.clear();
// Load up the properties for the scene
- _sceneResources.load(_currentScene);
+ _sceneResources.load(_currentScene, NULL, 0/*word_83546*/, _walkSurface, _backgroundSurface);
// Load scene walk paths
loadSceneCodes(_currentScene);
@@ -304,6 +304,16 @@ void MadsScene::update() {
void MadsScene::updateState() {
_sequenceList.tick();
+
+ if ((_activeAnimation) && !_abortTimers) {
+ _activeAnimation->update();
+ if (((MadsAnimation *) _activeAnimation)->freeFlag()) {
+ delete _activeAnimation;
+ _activeAnimation = NULL;
+ }
+ }
+
+ _kernelMessages.update();
}
int MadsScene::loadSceneSpriteSet(const char *setName) {
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index 96bdb42007..6fe472f5fa 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -55,6 +55,7 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen, bool autoSetP
_sysPalette.colors[255].g = 255;
_sysPalette.colors[255].b = 255;
+ _sysPaletteChanged = false;
if (autoSetPalette) {
if (_resMan->getViewType() == kViewEga)
setEGA();
@@ -63,7 +64,6 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen, bool autoSetP
else
kernelSetFromResource(999, true);
}
- _sysPaletteChanged = false;
}
GfxPalette::~GfxPalette() {