aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/game/seasonal_adjustment.cpp22
-rw-r--r--engines/titanic/game/seasonal_adjustment.h6
2 files changed, 14 insertions, 14 deletions
diff --git a/engines/titanic/game/seasonal_adjustment.cpp b/engines/titanic/game/seasonal_adjustment.cpp
index d9eb0d6fdf..7a729c9d90 100644
--- a/engines/titanic/game/seasonal_adjustment.cpp
+++ b/engines/titanic/game/seasonal_adjustment.cpp
@@ -37,16 +37,16 @@ END_MESSAGE_MAP()
void CSeasonalAdjustment::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldE0, indent);
- file->writeNumberLine(_fieldE4, indent);
+ file->writeNumberLine(_switching, indent);
+ file->writeNumberLine(_enabled, indent);
CBackground::save(file, indent);
}
void CSeasonalAdjustment::load(SimpleFile *file) {
file->readNumber();
- _fieldE0 = file->readNumber();
- _fieldE4 = file->readNumber();
+ _switching = file->readNumber();
+ _enabled = file->readNumber();
CBackground::load(file);
}
@@ -80,9 +80,9 @@ bool CSeasonalAdjustment::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
bool CSeasonalAdjustment::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
playSound("z#42.wav");
- if (!_fieldE4) {
+ if (!_enabled) {
petDisplayMessage(1, SEASONAL_SWITCH_NOT_WORKING);
- } else if (!_fieldE0) {
+ } else if (!_switching) {
playMovie(0, 6, MOVIE_NOTIFY_OBJECT);
playMovie(6, 18, 0);
}
@@ -105,8 +105,8 @@ bool CSeasonalAdjustment::MovieEndMsg(CMovieEndMsg *msg) {
}
bool CSeasonalAdjustment::TurnOn(CTurnOn *msg) {
- if (_fieldE0) {
- _fieldE0 = false;
+ if (_switching) {
+ _switching = false;
CTurnOn onMsg;
onMsg.execute("LeftPanExit");
onMsg.execute("RightPanExit");
@@ -116,7 +116,7 @@ bool CSeasonalAdjustment::TurnOn(CTurnOn *msg) {
}
bool CSeasonalAdjustment::TurnOff(CTurnOff *msg) {
- _fieldE0 = true;
+ _switching = true;
return true;
}
@@ -125,9 +125,9 @@ bool CSeasonalAdjustment::ActMsg(CActMsg *msg) {
msg->execute("SeasonBackground");
msg->execute("ArbGate");
} else if (msg->_action == "EnableObject") {
- _fieldE4 = true;
+ _enabled = true;
} else if (msg->_action == "DisableObject") {
- _fieldE4 = false;
+ _enabled = false;
}
return true;
diff --git a/engines/titanic/game/seasonal_adjustment.h b/engines/titanic/game/seasonal_adjustment.h
index 4b7ef3d4f6..c170879f18 100644
--- a/engines/titanic/game/seasonal_adjustment.h
+++ b/engines/titanic/game/seasonal_adjustment.h
@@ -37,11 +37,11 @@ class CSeasonalAdjustment : public CBackground {
bool TurnOff(CTurnOff *msg);
bool ActMsg(CActMsg *msg);
private:
- int _fieldE0;
- int _fieldE4;
+ bool _switching;
+ bool _enabled;
public:
CLASSDEF;
- CSeasonalAdjustment() : CBackground(), _fieldE0(0), _fieldE4(0) {}
+ CSeasonalAdjustment() : CBackground(), _switching(false), _enabled(0) {}
/**
* Save the data for the class to file