aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/menu_nebular.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-10-06 22:14:57 -0400
committerPaul Gilbert2014-10-06 22:14:57 -0400
commitde434e45d3828bb1c5b0c82711d0fe34bf14eed2 (patch)
tree27afc954a5e816c4f08b5cde99248b795d3d50ee /engines/mads/nebular/menu_nebular.cpp
parent9e6f3c5964962ca15f4663e75174ca87852334de (diff)
downloadscummvm-rg350-de434e45d3828bb1c5b0c82711d0fe34bf14eed2.tar.gz
scummvm-rg350-de434e45d3828bb1c5b0c82711d0fe34bf14eed2.tar.bz2
scummvm-rg350-de434e45d3828bb1c5b0c82711d0fe34bf14eed2.zip
MADS: Fixes for loading of intro cutscene animation
Diffstat (limited to 'engines/mads/nebular/menu_nebular.cpp')
-rw-r--r--engines/mads/nebular/menu_nebular.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index 4f9493ade5..1b71555e23 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -833,12 +833,13 @@ void AnimationView::load() {
}
void AnimationView::display() {
+ Scene &scene = _vm->_game->_scene;
_vm->_palette->initPalette();
Common::fill(&_vm->_palette->_cyclingPalette[0], &_vm->_palette->_cyclingPalette[PALETTE_SIZE], 0);
_vm->_palette->resetGamePalette(1, 8);
- _vm->_game->_scene._spriteSlots.reset();
- _vm->_game->_scene._paletteCycles.clear();
+ scene._spriteSlots.reset();
+ scene._paletteCycles.clear();
MenuView::display();
}
@@ -855,14 +856,22 @@ bool AnimationView::onEvent(Common::Event &event) {
}
void AnimationView::doFrame() {
-// Scene &scene = _vm->_game->_scene;
+ Scene &scene = _vm->_game->_scene;
// TODO: Or when current animation is finished
if (_resourceIndex == -1) {
- if (++_resourceIndex == (int)_resources.size())
+ if (++_resourceIndex == (int)_resources.size()) {
scriptDone();
- else
+ } else {
+ scene._frameStartTime = 0;
loadNextResource();
+ }
+ }
+
+ if (_currentAnimation) {
+ ++scene._frameStartTime;
+ _currentAnimation->update();
+// scene._spriteSlots.fullRefresh();
}
}
@@ -876,7 +885,7 @@ void AnimationView::loadNextResource() {
delete _currentAnimation;
_currentAnimation = Animation::init(_vm, &scene);
_currentAnimation->load(scene._backgroundSurface, scene._depthSurface,
- resEntry._resourceName, resEntry._bgFlag ? 0x100 : 0,
+ resEntry._resourceName, resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0,
nullptr, _sceneInfo);
// If a sound driver has been specified, then load the correct one
@@ -903,6 +912,7 @@ void AnimationView::loadNextResource() {
_vm->_audio->setSoundGroup(dsrName);
// Initial frames scan loop
+ /*
bool foundFrame = false;
for (int frameCtr = 0; frameCtr < (int)_currentAnimation->_frameEntries.size(); ++frameCtr) {
int spritesIdx = _currentAnimation->_spriteListIndexes[_manualFrameNumber];
@@ -917,7 +927,11 @@ void AnimationView::loadNextResource() {
}
}
if (!foundFrame)
- _hasManual = false;
+ */
+ _hasManual = false;
+
+ // Start the new animation
+ _currentAnimation->startAnimation(0);
}
void AnimationView::scriptDone() {