mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 07:11:49 +00:00
TITANIC: Fix dragging feather on nose holder
This commit is contained in:
parent
5bd028d9f3
commit
9e11746eba
@ -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);
|
||||
|
@ -36,7 +36,7 @@ class CNoseHolder : public CDropTarget {
|
||||
bool EnterViewMsg(CEnterViewMsg *msg);
|
||||
private:
|
||||
CGameObject *_dragObject;
|
||||
int _field11C;
|
||||
bool _draggingFeather;
|
||||
public:
|
||||
CLASSDEF;
|
||||
CNoseHolder();
|
||||
|
Loading…
x
Reference in New Issue
Block a user