aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mads/nebular/menu_nebular.cpp10
-rw-r--r--engines/mads/nebular/menu_nebular.h1
-rw-r--r--engines/mads/scene_data.cpp1
3 files changed, 11 insertions, 1 deletions
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 069557d1e5..d5d7021d76 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -810,6 +810,7 @@ AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
_manualStartFrame = _manualEndFrame = 0;
_manualFrame2 = 0;
_animFrameNumber = 0;
+ _nextCyclingActive = false;
_sceneInfo = SceneInfo::init(_vm);
load();
@@ -864,6 +865,8 @@ void AnimationView::doFrame() {
scene._frameStartTime = 0;
loadNextResource();
}
+ } else if (_currentAnimation->getCurrentFrame() == 1) {
+ scene._cyclingActive = _nextCyclingActive;
}
if (_currentAnimation) {
@@ -923,11 +926,12 @@ void AnimationView::loadNextResource() {
&palette._cyclingPalette[0]);
_vm->_game->_fx = (ScreenTransition)resEntry._fx;
+ _nextCyclingActive = paletteCycles.size() > 0;
if (!_vm->_game->_fx) {
palette.setFullPalette(palette._mainPalette);
}
- scene.initPaletteAnimation(paletteCycles, (paletteCycles.size() > 0) && !_vm->_game->_fx);
+ scene.initPaletteAnimation(paletteCycles, _nextCyclingActive && !_vm->_game->_fx);
}
void AnimationView::scriptDone() {
@@ -965,8 +969,12 @@ void AnimationView::processLines() {
resName += c;
}
+ // Add resource into list along with any set state information
_resources.push_back(ResourceEntry(resName, _sfx, _soundFlag,
_bgLoadFlag, _showWhiteBars));
+
+ // Fx resets between resource entries
+ _sfx = 0;
}
// Skip any spaces
diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h
index ae063c6b43..c05c87258e 100644
--- a/engines/mads/nebular/menu_nebular.h
+++ b/engines/mads/nebular/menu_nebular.h
@@ -282,6 +282,7 @@ private:
int _manualStartFrame, _manualEndFrame;
int _manualFrame2;
int _animFrameNumber;
+ bool _nextCyclingActive;
private:
void checkResource(const Common::String &resourceName);
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp
index 2101a85bd0..b0a5aa35c6 100644
--- a/engines/mads/scene_data.cpp
+++ b/engines/mads/scene_data.cpp
@@ -299,6 +299,7 @@ void SceneInfo::loadPalette(int sceneId, int artFileNum, const Common::String &r
delete stream;
// Copy out the palette animation data
+ _paletteCycles.clear();
for (uint i = 0; i < artHeader._paletteCycles.size(); ++i)
_paletteCycles.push_back(artHeader._paletteCycles[i]);