diff options
author | Paul Gilbert | 2016-12-22 18:22:37 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-24 18:23:34 -0500 |
commit | 9e11746eba734fd88ef8c8d1d17d16ef3dac3c99 (patch) | |
tree | a446e8183b59ce57e133a109c9088009d9762f24 /engines/titanic/game/nose_holder.cpp | |
parent | 5bd028d9f3da31b17551b3851b40aca781db06b5 (diff) | |
download | scummvm-rg350-9e11746eba734fd88ef8c8d1d17d16ef3dac3c99.tar.gz scummvm-rg350-9e11746eba734fd88ef8c8d1d17d16ef3dac3c99.tar.bz2 scummvm-rg350-9e11746eba734fd88ef8c8d1d17d16ef3dac3c99.zip |
TITANIC: Fix dragging feather on nose holder
Diffstat (limited to 'engines/titanic/game/nose_holder.cpp')
-rw-r--r-- | engines/titanic/game/nose_holder.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/titanic/game/nose_holder.cpp b/engines/titanic/game/nose_holder.cpp index ac6c10dafd..6882e4f56d 100644 --- a/engines/titanic/game/nose_holder.cpp +++ b/engines/titanic/game/nose_holder.cpp @@ -33,19 +33,19 @@ BEGIN_MESSAGE_MAP(CNoseHolder, CDropTarget) END_MESSAGE_MAP() CNoseHolder::CNoseHolder() : CDropTarget(), _dragObject(nullptr), - _field11C(0) { + _draggingFeather(false) { } void CNoseHolder::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_field11C, indent); + file->writeNumberLine(_draggingFeather, indent); CDropTarget::save(file, indent); } void CNoseHolder::load(SimpleFile *file) { file->readNumber(); - _field11C = file->readNumber(); + _draggingFeather = file->readNumber(); CDropTarget::load(file); } @@ -78,13 +78,12 @@ bool CNoseHolder::FrameMsg(CFrameMsg *msg) { } if (_dragObject) { - if (!checkPoint(Point(_dragObject->_bounds.left, - _dragObject->_bounds.top))) { - _field11C = false; - } else if (!_field11C) { + if (!checkPoint(Point(_dragObject->_bounds.left, _dragObject->_bounds.top), true)) { + _draggingFeather = false; + } else if (!_draggingFeather) { CActMsg actMsg("Sneeze"); actMsg.execute(this); - _field11C = true; + _draggingFeather = true; } } @@ -92,7 +91,7 @@ bool CNoseHolder::FrameMsg(CFrameMsg *msg) { } bool CNoseHolder::LeaveViewMsg(CLeaveViewMsg *msg) { - _field11C = false; + _draggingFeather = false; _dragObject = nullptr; if (_fieldF4) { loadFrame(_dropFrame); |