[Scummvm-git-logs] scummvm master -> 069061035fe0542cb75587d8e3eb9846f29cb0ce

dreammaster dreammaster at scummvm.org
Sun Jan 15 02:04:27 CET 2017


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:
069061035f TITANIC: Renamings for CSeasonalAdjustment


Commit: 069061035fe0542cb75587d8e3eb9846f29cb0ce
    https://github.com/scummvm/scummvm/commit/069061035fe0542cb75587d8e3eb9846f29cb0ce
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-14T20:04:17-05:00

Commit Message:
TITANIC: Renamings for CSeasonalAdjustment

Changed paths:
    engines/titanic/game/seasonal_adjustment.cpp
    engines/titanic/game/seasonal_adjustment.h


diff --git a/engines/titanic/game/seasonal_adjustment.cpp b/engines/titanic/game/seasonal_adjustment.cpp
index d9eb0d6..7a729c9 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 4b7ef3d..c170879 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





More information about the Scummvm-git-logs mailing list