aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/globals_nebular.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-03-26 09:32:33 -0400
committerPaul Gilbert2014-03-26 09:32:33 -0400
commitf9e2c1c71f29f6dc1ba8e860d597fe93bc79646a (patch)
treed90a8ecdfb86f9e97b2430d05ad7e102ce7bb720 /engines/mads/nebular/globals_nebular.h
parent56f7b51754e30ec75c596cd80c76991ac158da66 (diff)
downloadscummvm-rg350-f9e2c1c71f29f6dc1ba8e860d597fe93bc79646a.tar.gz
scummvm-rg350-f9e2c1c71f29f6dc1ba8e860d597fe93bc79646a.tar.bz2
scummvm-rg350-f9e2c1c71f29f6dc1ba8e860d597fe93bc79646a.zip
MADS: Cleaned up game initialisation code to use more constants
Diffstat (limited to 'engines/mads/nebular/globals_nebular.h')
-rw-r--r--engines/mads/nebular/globals_nebular.h82
1 files changed, 80 insertions, 2 deletions
diff --git a/engines/mads/nebular/globals_nebular.h b/engines/mads/nebular/globals_nebular.h
index b3cc94acb3..703dc1b62a 100644
--- a/engines/mads/nebular/globals_nebular.h
+++ b/engines/mads/nebular/globals_nebular.h
@@ -178,7 +178,7 @@ enum GlobalId {
kAntigravTiming = 162,
kAntigravTiming0 = 163,
kWindowFixed = 164,
- kinSpace = 165,
+ kInSpace = 165,
kReturnFromCut = 166,
kBeamIsUp = 167,
kForceBeamDown = 168,
@@ -205,12 +205,85 @@ enum GlobalId {
kTeleporterCode = 200
};
+/* Enums used for specific individual globals */
+/* Section #1 */
+// State of Meteorologist in the outpost
+enum { METEOROLOGIST_ABSENT = 0, METEOROLOGIST_PRESENT = 1, METEOROLOGIST_GONE = 2 };
+
+// State of watching the Meteorologist
+enum { METEOROLOGIST_NORMAL = 0, METEOROLOGIST_GROUND = 1, METEOROLOGIST_TOWER = 2 };
+
+// The fat bouncy lady that can squish you on the plains
+enum { RHOTUNDA_HUNGRY = 0, RHOTUNDA_STUCK = 1, RHOTUNDA_GONE = 2 };
+
+// Flags for the bones you can take
+enum { BONE_202_LEFT_GONE = 1, BONE_202_RIGHT_GONE = 2 };
+
+// Leaves used to cover the trap
+enum { LEAVES_ON_GROUND = 0, LEAVES_WITH_PLAYER = 1, LEAVES_ON_TRAP = 2 };
+
+// Monkey ambush state
+enum { MONKEY_AMBUSH_READY = 0, MONKEY_HAS_BINOCULARS = 1, MONKEY_IS_GONE = 2 };
+
+// Teleporter status flags
+enum {
+ TELEPORTER_NONE = 0, TELEPORTER_BEAM_IN = 1, TELEPORTER_BEAM_OUT = 2,
+ TELEPORTER_STEP_OUT = 3, TELEPORTER_WRONG = 4
+};
+
+// TWinkies status
+enum { TWINKLES_AT_HOME = 0, TWINKLES_GONE = 1 };
+
+/* Section #4 */
+// Status of the explosives
+enum { EXPLOSIVES_INSIDE = 3 };
+
+/* Section # 5 */
+enum { LINE_NOT_DROPPED = 1, LINE_DROPPED = 2, LINE_TIED = 3, LINE_NOW_UNTIED = 4 };
+
+/* Section #6 */
+enum {
+ NO_CELLS = 0, // Handset doesn't contain any cells
+ CHARGED_DURAFAIL = 1, // Handset has charged durafail cells
+ UNCHARGED_DURAFAIL = 2, // Handset has uncharged durafail cells */
+ PHONE_CELLS = 3, // Handset has already charged phone cells
+ FIRST_TIME_PHONE_CELLS = 4, // First time phone cells are in the handset
+ FIRST_TIME_UNCHARGED_DURAFAIL = 5, // First time uncharged cells are in penlight
+ FIRST_TIME_CHARGED_DURAFAIL = 6 // First time charged cells are in penlight
+};
+
+// Time bomb status
+enum {
+ TIMEBOMB_DEACTIVATED = 0, TIMEBOMB_ACTIVATED = 1,
+ TIMEBOMB_BLOW_UP = 2, TIMEBOMB_DEAD = 3
+};
+
+/* Section #7 */
+// Status of the the bottle
+enum {
+ BOTTLE_EMPTY = 0, BOTTLE_ONE_QUARTER_FULL = 1, BOTTLE_HALF_FULL = 2,
+ BOTTLE_THREE_QUARTERS_FULL = 3, BOTTLE_FULL = 4
+};
+
+// Status of the boat
+enum {
+ BOAT_UNFLOODED = 0, BOAT_ADRIFT = 1, BOAT_TIED_FLOATING = 2,
+ BOAT_TIED = 3, BOAT_GONE = 4
+};
+
+
+/* Miscellaneous defines */
+#define TELEPORTER_COUNT 10 // Total number of teleporters
+#define TELEPORTER_WORK_COUNT 6 // Total number that actually work
+
+
class Globals {
private:
Common::Array<int16> _flags;
public:
Common::Array<int> _spriteIndexes;
-
+
+ int _timebombClock, _timebombTimer;
int _v0;
uint32 _frameTime;
int _v2;
@@ -233,6 +306,11 @@ public:
* Square brackets operator for accessing flags
*/
int16 &operator[](int idx) { return _flags[idx]; }
+
+ /*
+ * Resets all the globals to empty
+ */
+ void reset();
};
} // End of namespace Nebular