diff options
author | Paul Gilbert | 2017-02-13 21:46:12 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-13 21:46:12 -0500 |
commit | 534ec946dd3448e71956cee54bdc40f26bb976f7 (patch) | |
tree | b80ed1ff52cba0eb8ab3d86f024986946fecdcfb /engines/titanic/game/restaurant_cylinder_holder.cpp | |
parent | 7886ca6a4f9da6a8b974359371387347e3853b14 (diff) | |
download | scummvm-rg350-534ec946dd3448e71956cee54bdc40f26bb976f7.tar.gz scummvm-rg350-534ec946dd3448e71956cee54bdc40f26bb976f7.tar.bz2 scummvm-rg350-534ec946dd3448e71956cee54bdc40f26bb976f7.zip |
TITANIC: Some phonograph cleanup, fix record button
Diffstat (limited to 'engines/titanic/game/restaurant_cylinder_holder.cpp')
-rw-r--r-- | engines/titanic/game/restaurant_cylinder_holder.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/titanic/game/restaurant_cylinder_holder.cpp b/engines/titanic/game/restaurant_cylinder_holder.cpp index 5fb8c97cde..05f731d32d 100644 --- a/engines/titanic/game/restaurant_cylinder_holder.cpp +++ b/engines/titanic/game/restaurant_cylinder_holder.cpp @@ -34,13 +34,13 @@ BEGIN_MESSAGE_MAP(CRestaurantCylinderHolder, CDropTarget) END_MESSAGE_MAP() CRestaurantCylinderHolder::CRestaurantCylinderHolder() : CDropTarget(), - _field118(0), _field11C(0), _field12C(0), _field130(0), + _isOpen(false), _field11C(0), _field12C(0), _field130(0), _ejectSoundName("z#61.wav"), _defaultCursorId(CURSOR_ARROW) { } void CRestaurantCylinderHolder::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_field118, indent); + file->writeNumberLine(_isOpen, indent); file->writeNumberLine(_field11C, indent); file->writeQuotedLine(_target, indent); file->writeNumberLine(_field12C, indent); @@ -53,7 +53,7 @@ void CRestaurantCylinderHolder::save(SimpleFile *file, int indent) { void CRestaurantCylinderHolder::load(SimpleFile *file) { file->readNumber(); - _field118 = file->readNumber(); + _isOpen = file->readNumber(); _field11C = file->readNumber(); _target = file->readString(); _field12C = file->readNumber(); @@ -68,7 +68,7 @@ bool CRestaurantCylinderHolder::EjectCylinderMsg(CEjectCylinderMsg *msg) { _field11C = true; bool hasCylinder = findByName("Phonograph Cylinder") != nullptr; - if (_field118) { + if (_isOpen) { playClip(hasCylinder ? "CloseHolder_Full" : "CloseHolder_Empty", MOVIE_NOTIFY_OBJECT | MOVIE_GAMESTATE); _dropEnabled = true; @@ -82,7 +82,7 @@ bool CRestaurantCylinderHolder::EjectCylinderMsg(CEjectCylinderMsg *msg) { } bool CRestaurantCylinderHolder::EnterViewMsg(CEnterViewMsg *msg) { - if (_field118) { + if (_isOpen) { CTreeItem *cylinder = findByName("Phonograph Cylinder", true); if (cylinder) { loadFrame(_dropFrame); @@ -101,14 +101,14 @@ bool CRestaurantCylinderHolder::EnterViewMsg(CEnterViewMsg *msg) { bool CRestaurantCylinderHolder::MovieEndMsg(CMovieEndMsg *msg) { _field11C = false; - if (_field118) { - _field118 = false; + if (_isOpen) { + _isOpen = false; _cursorId = _defaultCursorId; CPhonographReadyToPlayMsg readyMsg; readyMsg.execute(_target); } else { - _field118 = true; + _isOpen = true; _dropEnabled = false; _cursorId = findByName("Phonograph Cylinder") ? _dropCursorId : _dragCursorId; } @@ -121,9 +121,9 @@ bool CRestaurantCylinderHolder::MovieEndMsg(CMovieEndMsg *msg) { bool CRestaurantCylinderHolder::QueryCylinderHolderMsg(CQueryCylinderHolderMsg *msg) { CNamedItem *cylinder = findByName("Phonograph Cylinder", true); - msg->_value1 = _field118; + msg->_isOpen = _isOpen; if (cylinder) { - msg->_value2 = 1; + msg->_isPresent = true; msg->_target = cylinder; } @@ -143,7 +143,7 @@ bool CRestaurantCylinderHolder::QueryCylinderNameMsg(CQueryCylinderNameMsg *msg) } bool CRestaurantCylinderHolder::MouseDragStartMsg(CMouseDragStartMsg *msg) { - if (_field118) + if (_isOpen) return CDropTarget::MouseDragStartMsg(msg); else return true; |