[Scummvm-cvs-logs] scummvm master -> 3097ac8f1e336193755b2386506842ef76951b13
bluegr
bluegr at gmail.com
Thu Dec 24 11:38:17 CET 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3097ac8f1e LAB: Change condition defines into an enum
Commit: 3097ac8f1e336193755b2386506842ef76951b13
https://github.com/scummvm/scummvm/commit/3097ac8f1e336193755b2386506842ef76951b13
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-24T12:36:26+02:00
Commit Message:
LAB: Change condition defines into an enum
Changed paths:
engines/lab/engine.cpp
engines/lab/processroom.h
engines/lab/special.cpp
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index d511065..8d859bc 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -62,10 +62,6 @@ enum Items {
kItemQuarter = 30
};
-#define kCondLampOn 151
-#define kCondBeltGlowing 70
-#define kCondUsedHelmet 184
-
enum Monitors {
kMonitorMuseum = 71,
kMonitorGramophone = 72,
diff --git a/engines/lab/processroom.h b/engines/lab/processroom.h
index 31a8f28..37585bc 100644
--- a/engines/lab/processroom.h
+++ b/engines/lab/processroom.h
@@ -91,6 +91,17 @@ enum RuleAction {
kRuleActionTakeDef = 4
};
+enum Condition {
+ kCondBeltGlowing = 70,
+ kCondBridge1 = 104,
+ kCondNoNews = 135,
+ kCondBridge0 = 148,
+ kCondLampOn = 151,
+ kCondNoClean = 152,
+ kCondDirty = 175,
+ kCondUsedHelmet = 184
+};
+
#if defined(WIN32)
#pragma pack(push, 1)
#endif
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index 8c69fb4..de9f1d9 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -41,11 +41,6 @@
#include "lab/utils.h"
namespace Lab {
-#define BRIDGE0 148
-#define BRIDGE1 104
-#define DIRTY 175
-#define NONEWS 135
-#define NOCLEAN 152
void LabEngine::doNotes() {
TextFont *noteFont = _resource->getFont("F:Note.fon");
@@ -103,10 +98,10 @@ void LabEngine::loadJournalData() {
Common::String filename = "Lab:Rooms/j";
- bool bridge = _conditions->in(BRIDGE0) || _conditions->in(BRIDGE1);
- bool dirty = _conditions->in(DIRTY);
- bool news = !_conditions->in(NONEWS);
- bool clean = !_conditions->in(NOCLEAN);
+ bool bridge = _conditions->in(kCondBridge0) || _conditions->in(kCondBridge1);
+ bool dirty = _conditions->in(kCondDirty);
+ bool news = !_conditions->in(kCondNoNews);
+ bool clean = !_conditions->in(kCondNoClean);
if (bridge && clean && news)
filename += '8';
More information about the Scummvm-git-logs
mailing list