aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorPaul Gilbert2014-06-01 22:36:16 -0400
committerPaul Gilbert2014-06-01 22:36:16 -0400
commit62e5fdc95cf68e74b1c3b448051e621fd66ac70b (patch)
tree2e4ea7486c76e7c57870de834838ceaafbf943c4 /engines/mads
parent3c287aad182d7769f50642e9035f8dad1101d8d3 (diff)
downloadscummvm-rg350-62e5fdc95cf68e74b1c3b448051e621fd66ac70b.tar.gz
scummvm-rg350-62e5fdc95cf68e74b1c3b448051e621fd66ac70b.tar.bz2
scummvm-rg350-62e5fdc95cf68e74b1c3b448051e621fd66ac70b.zip
MADS: Fixes for giving batteries to Hermin
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/nebular/game_nebular.cpp1
-rw-r--r--engines/mads/nebular/nebular_scenes6.cpp8
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 4fcfe3fdfb..f2889feb31 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -551,6 +551,7 @@ void GameNebular::doObjectAction() {
_objects.addToInventory(OBJ_DURAFAIL_CELLS);
dialogs.showItem(OBJ_DURAFAIL_CELLS,
_difficulty != DIFFICULTY_HARD || _globals[kDurafailRecharged] ? 415 : 414);
+ _globals[kDurafailRecharged] = true;
break;
case 2:
_objects.addToInventory(OBJ_DURAFAIL_CELLS);
diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp
index c0a034749b..725548f889 100644
--- a/engines/mads/nebular/nebular_scenes6.cpp
+++ b/engines/mads/nebular/nebular_scenes6.cpp
@@ -3156,7 +3156,8 @@ bool Scene611::check2ChargedBatteries() {
}
bool Scene611::check4ChargedBatteries() {
- if (_game._objects.isInInventory(OBJ_DURAFAIL_CELLS) && _game._objects.isInInventory(OBJ_PHONE_CELLS) && _globals[136])
+ if (_game._objects.isInInventory(OBJ_DURAFAIL_CELLS) && _game._objects.isInInventory(OBJ_PHONE_CELLS)
+ && _globals[kDurafailRecharged])
return true;
return false;
@@ -3954,7 +3955,6 @@ void Scene611::enter() {
if (!_globals[kHasTalkedToHermit]) {
_scene->loadAnimation(Resources::formatName(611, 'h', -1, EXT_AA, ""), 0);
- _scene->loadAnimation(Resources::formatName(203, 'a', -1, EXT_AA, ""), 81);
_nextFrame = 47;
_hermitMode = 1;
_hermitTalkingFl = false;
@@ -4145,7 +4145,7 @@ void Scene611::step() {
_hermitMode = 1;
}
- if ((_scene->_activeAnimation->getCurrentFrame() == 240) && _check1Fl) {
+ if (_scene->_activeAnimation != nullptr && (_scene->_activeAnimation->getCurrentFrame() == 240) && _check1Fl) {
_check1Fl = false;
_scene->_kernelMessages.add(Common::Point(33, 88), 0xFDFC, 0, 0, 90, _game.getQuote(0x27E));
_scene->_sequences.addTimer(120, 120);
@@ -4234,7 +4234,7 @@ void Scene611::step() {
}
}
- if (_scene->_activeAnimation->getCurrentFrame() == 254)
+ if (_scene->_activeAnimation != nullptr && _scene->_activeAnimation->getCurrentFrame() == 254)
_game._player._stepEnabled = true;
if (_game._trigger == 110) {