diff options
author | David Fioramonti | 2017-09-09 06:54:16 -0700 |
---|---|---|
committer | David Fioramonti | 2017-09-09 14:24:26 -0700 |
commit | b2dd72adbdf7fad21438f4860ad8b420b5a82812 (patch) | |
tree | b6c2c8235710402b85288a52f7b80f9b95d1d257 | |
parent | 1e0a22db5c7c336b1e663b8dfd7ee6192f35030f (diff) | |
download | scummvm-rg350-b2dd72adbdf7fad21438f4860ad8b420b5a82812.tar.gz scummvm-rg350-b2dd72adbdf7fad21438f4860ad8b420b5a82812.tar.bz2 scummvm-rg350-b2dd72adbdf7fad21438f4860ad8b420b5a82812.zip |
TITANIC: Improved naming for Helmet On/Off flag
-rw-r--r-- | engines/titanic/game/nav_helmet.cpp | 16 | ||||
-rw-r--r-- | engines/titanic/game/nav_helmet.h | 4 |
2 files changed, 10 insertions, 10 deletions
diff --git a/engines/titanic/game/nav_helmet.cpp b/engines/titanic/game/nav_helmet.cpp index c2496be2a2..498f52b0cb 100644 --- a/engines/titanic/game/nav_helmet.cpp +++ b/engines/titanic/game/nav_helmet.cpp @@ -37,13 +37,13 @@ END_MESSAGE_MAP() void CNavHelmet::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_flag, indent); + file->writeNumberLine(_helmetOn, indent); CGameObject::save(file, indent); } void CNavHelmet::load(SimpleFile *file) { file->readNumber(); - _flag = file->readNumber(); + _helmetOn = file->readNumber(); CGameObject::load(file); } @@ -51,7 +51,7 @@ bool CNavHelmet::MovieEndMsg(CMovieEndMsg *msg) { CPetControl *pet = getPetControl(); assert(pet); - if (_flag && pet->isAreaUnlocked()) { + if (_helmetOn && pet->isAreaUnlocked()) { setVisible(false); pet->setArea(PET_STARFIELD); @@ -78,8 +78,8 @@ bool CNavHelmet::LeaveViewMsg(CLeaveViewMsg *msg) { bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { CPetControl *pet = getPetControl(); - if (_flag) { - _flag = false; + if (_helmetOn) { + _helmetOn = false; setVisible(true); starFn(STAR_HIDE); playMovie(61, 120, MOVIE_NOTIFY_OBJECT); @@ -94,7 +94,7 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { decTransitions(); } else { incTransitions(); - _flag = true; + _helmetOn = true; setVisible(true); playMovie(0, 60, MOVIE_NOTIFY_OBJECT); playSound("a#48.wav"); @@ -105,14 +105,14 @@ bool CNavHelmet::PETHelmetOnOffMsg(CPETHelmetOnOffMsg *msg) { } bool CNavHelmet::PETPhotoOnOffMsg(CPETPhotoOnOffMsg *msg) { - if (_flag) + if (_helmetOn) starFn(STAR_TOGGLE_MODE); return true; } bool CNavHelmet::PETStarFieldLockMsg(CPETStarFieldLockMsg *msg) { - if (_flag) { + if (_helmetOn) { if (msg->_value) { playSound("a#6.wav"); starFn(LOCK_STAR); diff --git a/engines/titanic/game/nav_helmet.h b/engines/titanic/game/nav_helmet.h index c408d05c97..6e30c4b9c1 100644 --- a/engines/titanic/game/nav_helmet.h +++ b/engines/titanic/game/nav_helmet.h @@ -38,10 +38,10 @@ class CNavHelmet : public CGameObject { bool PETStarFieldLockMsg(CPETStarFieldLockMsg *msg); bool PETSetStarDestinationMsg(CPETSetStarDestinationMsg *msg); private: - bool _flag; + bool _helmetOn; public: CLASSDEF; - CNavHelmet() : CGameObject(), _flag(false) {} + CNavHelmet() : CGameObject(), _helmetOn(false) {} /** * Save the data for the class to file |