aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mads/game.h4
-rw-r--r--engines/mads/inventory.h2
-rw-r--r--engines/mads/nebular/game_nebular.cpp24
3 files changed, 13 insertions, 17 deletions
diff --git a/engines/mads/game.h b/engines/mads/game.h
index 1b06f847d0..8b16590503 100644
--- a/engines/mads/game.h
+++ b/engines/mads/game.h
@@ -39,10 +39,6 @@ namespace MADS {
class MADSEngine;
-enum {
- PLAYER_INVENTORY = 2
-};
-
enum KernelMode {
KERNEL_GAME_LOAD = 0, KERNEL_SECTION_PRELOAD = 1, KERNEL_SECTION_INIT = 2,
KERNEL_ROOM_PRELOAD = 3, KERNEL_ROOM_INIT = 4, KERNEL_ACTIVE_CODE = 5
diff --git a/engines/mads/inventory.h b/engines/mads/inventory.h
index 09ed67a826..cf82de59f1 100644
--- a/engines/mads/inventory.h
+++ b/engines/mads/inventory.h
@@ -30,7 +30,7 @@
namespace MADS {
enum {
- NOWHERE = 1
+ PLAYER_INVENTORY = 2, NOWHERE = 1
};
class MADSEngine;
diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp
index 8d1358f0ed..4fcfe3fdfb 100644
--- a/engines/mads/nebular/game_nebular.cpp
+++ b/engines/mads/nebular/game_nebular.cpp
@@ -217,7 +217,7 @@ void GameNebular::initializeGlobals() {
_objects.setRoom(OBJ_PLANT_STALK, NOWHERE);
_globals[kLeavesStatus] = LEAVES_ON_GROUND;
- _globals[kDurafailRecharged] = true;
+ _globals[kDurafailRecharged] = 1;
_globals[kPenlightCellStatus] = FIRST_TIME_CHARGED_DURAFAIL;
break;
@@ -227,7 +227,7 @@ void GameNebular::initializeGlobals() {
_globals[kLeavesStatus] = LEAVES_ON_GROUND;
_globals[kPenlightCellStatus] = FIRST_TIME_UNCHARGED_DURAFAIL;
- _globals[kDurafailRecharged] = false;
+ _globals[kDurafailRecharged] = 0;
break;
}
@@ -550,15 +550,14 @@ void GameNebular::doObjectAction() {
case 1:
_objects.addToInventory(OBJ_DURAFAIL_CELLS);
dialogs.showItem(OBJ_DURAFAIL_CELLS,
- _difficulty != 1 || _globals[kDurafailRecharged] ? 415 : 414);
+ _difficulty != DIFFICULTY_HARD || _globals[kDurafailRecharged] ? 415 : 414);
break;
case 2:
_objects.addToInventory(OBJ_DURAFAIL_CELLS);
- if (_difficulty == 1) {
+ if (_difficulty == DIFFICULTY_HARD) {
dialogs.showItem(OBJ_DURAFAIL_CELLS, 416);
- } else {
- _globals[kHandsetCellStatus] = 0;
- }
+ }
+ _globals[kHandsetCellStatus] = 0;
break;
case 3:
_objects.addToInventory(OBJ_PHONE_CELLS);
@@ -567,6 +566,7 @@ void GameNebular::doObjectAction() {
case 4:
_objects.addToInventory(OBJ_PHONE_CELLS);
dialogs.showItem(OBJ_PHONE_CELLS, 417);
+ _globals[kHandsetCellStatus] = 0;
break;
default:
dialogs.show(478);
@@ -592,16 +592,16 @@ void GameNebular::doObjectAction() {
if (_globals[kPenlightCellStatus]) {
dialogs.show(424);
} else {
- _objects.setRoom(OBJ_DURAFAIL_CELLS, PLAYER_INVENTORY);
- _globals[kPenlightCellStatus] = _difficulty != 1 || _globals[kDurafailRecharged] ? 1 : 2;
+ _objects.setRoom(OBJ_DURAFAIL_CELLS, NOWHERE);
+ _globals[kPenlightCellStatus] = _difficulty != DIFFICULTY_HARD || _globals[kDurafailRecharged] ? 1 : 2;
dialogs.show(423);
}
} else if (action.isAction(VERB_PUT, NOUN_DURAFAIL_CELLS, NOUN_PHONE_HANDSET)) {
if (_globals[kHandsetCellStatus]) {
- dialogs.show(424);
+ dialogs.show(426);
} else {
- _objects.setRoom(OBJ_DURAFAIL_CELLS, PLAYER_INVENTORY);
- _globals[kDurafailRecharged] = _difficulty != 1 || _globals[kHandsetCellStatus] ? 1 : 2;
+ _objects.setRoom(OBJ_DURAFAIL_CELLS, NOWHERE);
+ _globals[kHandsetCellStatus] = _difficulty != DIFFICULTY_HARD || _globals[kHandsetCellStatus] ? 1 : 2;
dialogs.show(425);
}
} else if (action.isAction(VERB_SET, NOUN_TIMEBOMB)) {