diff options
author | Paul Gilbert | 2017-02-20 09:26:09 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-20 09:26:09 -0500 |
commit | 2963af577505325dc578bad096d64499e0823a34 (patch) | |
tree | 876a0adcdf6b4696ea74e92bbc4e709025242bbc /engines/titanic/game | |
parent | 9ed2977f1fc6f9bf3aa87dfb8fd0e5869fbdd006 (diff) | |
download | scummvm-rg350-2963af577505325dc578bad096d64499e0823a34.tar.gz scummvm-rg350-2963af577505325dc578bad096d64499e0823a34.tar.bz2 scummvm-rg350-2963af577505325dc578bad096d64499e0823a34.zip |
TITANIC: Fix adding centre cards to Titania
Diffstat (limited to 'engines/titanic/game')
-rw-r--r-- | engines/titanic/game/brain_slot.cpp | 18 | ||||
-rw-r--r-- | engines/titanic/game/brain_slot.h | 6 |
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/titanic/game/brain_slot.cpp b/engines/titanic/game/brain_slot.cpp index 1518d9b0b3..585df09591 100644 --- a/engines/titanic/game/brain_slot.cpp +++ b/engines/titanic/game/brain_slot.cpp @@ -33,12 +33,12 @@ BEGIN_MESSAGE_MAP(CBrainSlot, CGameObject) ON_MESSAGE(MouseDragStartMsg) END_MESSAGE_MAP() -int CBrainSlot::_added; +bool CBrainSlot::_added; bool CBrainSlot::_woken; void CBrainSlot::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_value1, indent); + file->writeNumberLine(_occupied, indent); file->writeQuotedLine(_target, indent); file->writeNumberLine(_added, indent); file->writeNumberLine(_woken, indent); @@ -48,7 +48,7 @@ void CBrainSlot::save(SimpleFile *file, int indent) { void CBrainSlot::load(SimpleFile *file) { file->readNumber(); - _value1 = file->readNumber(); + _occupied = file->readNumber(); _target = file->readString(); _added = file->readNumber(); _woken = file->readNumber(); @@ -58,12 +58,12 @@ void CBrainSlot::load(SimpleFile *file) { bool CBrainSlot::SetFrameMsg(CSetFrameMsg *msg) { loadFrame(msg->_frameNumber); - _value1 = 1; + _occupied = true; return true; } bool CBrainSlot::AddHeadPieceMsg(CAddHeadPieceMsg *msg) { - _added = 1; + _added = true; _cursorId = CURSOR_HAND; CAddHeadPieceMsg addMsg("NULL"); @@ -101,7 +101,7 @@ bool CBrainSlot::AddHeadPieceMsg(CAddHeadPieceMsg *msg) { } _target = msg->_value; - _value1 = 1; + _occupied = true; return true; } @@ -124,7 +124,7 @@ bool CBrainSlot::ActMsg(CActMsg *msg) { } bool CBrainSlot::MouseDragStartMsg(CMouseDragStartMsg *msg) { - if (!_value1 || _woken || !checkPoint(msg->_mousePos, false, true)) + if (!_occupied || _woken || !checkPoint(msg->_mousePos, false, true)) return false; _cursorId = CURSOR_ARROW; @@ -134,14 +134,14 @@ bool CBrainSlot::MouseDragStartMsg(CMouseDragStartMsg *msg) { takeMsg.execute("TitaniaControl"); loadFrame(isEquals("CentralCoreSlot") ? 21 : 0); - _value1 = 0; + _occupied = false; CPassOnDragStartMsg passMsg; passMsg._mousePos = msg->_mousePos; passMsg.execute(_target); msg->_dragItem = getRoot()->findByName(_target); - _added = 0; + _added = false; return true; } diff --git a/engines/titanic/game/brain_slot.h b/engines/titanic/game/brain_slot.h index 4d500cc59a..a821cfd1cb 100644 --- a/engines/titanic/game/brain_slot.h +++ b/engines/titanic/game/brain_slot.h @@ -35,14 +35,14 @@ class CBrainSlot : public CGameObject { bool ActMsg(CActMsg *msg); bool MouseDragStartMsg(CMouseDragStartMsg *msg); public: - static int _added; + static bool _added; static bool _woken; public: - int _value1; + bool _occupied; CString _target; public: CLASSDEF; - CBrainSlot() : CGameObject(), _value1(0) {} + CBrainSlot() : CGameObject(), _occupied(false) {} /** * Save the data for the class to file |