mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
FULLPIPE: Implement MovGraph2::findNode()
This commit is contained in:
parent
1cfafc6cfd
commit
8880077ec3
@ -796,7 +796,19 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
|
||||
}
|
||||
|
||||
MovGraphNode *MovGraph2::findNode(int x, int y, int fuzzyMatch) {
|
||||
warning("STUB: MovGraphLink *MovGraph2::findNode()");
|
||||
for (ObList::iterator i = _nodes.begin(); i != _nodes.end(); ++i) {
|
||||
assert(((CObject *)*i)->_objtype == kObjTypeMovGraphNode);
|
||||
|
||||
MovGraphNode *node = (MovGraphNode *)*i;
|
||||
|
||||
if (fuzzyMatch) {
|
||||
if (abs(node->_x - x) < 15 && abs(node->_y - y) < 15)
|
||||
return node;
|
||||
} else {
|
||||
if (node->_x == x && node->_y == y)
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -147,15 +147,15 @@ public:
|
||||
};
|
||||
|
||||
class MovGraphNode : public CObject {
|
||||
public:
|
||||
public:
|
||||
int _x;
|
||||
int _y;
|
||||
int _distance;
|
||||
int16 _field_10;
|
||||
int _field_14;
|
||||
|
||||
public:
|
||||
MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {}
|
||||
public:
|
||||
MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) { _objtype = kObjTypeMovGraphNode; }
|
||||
virtual bool load(MfcArchive &file);
|
||||
};
|
||||
|
||||
|
@ -66,15 +66,16 @@ class MfcArchive : public Common::SeekableReadStream {
|
||||
|
||||
enum ObjType {
|
||||
kObjTypeDefault,
|
||||
kObjTypeObjstateCommand,
|
||||
kObjTypeStaticANIObject,
|
||||
kObjTypePictureObject,
|
||||
kObjTypeMovGraph,
|
||||
kObjTypeMctlCompound
|
||||
kObjTypeMovGraphNode,
|
||||
kObjTypeMctlCompound,
|
||||
kObjTypeObjstateCommand,
|
||||
kObjTypePictureObject,
|
||||
kObjTypeStaticANIObject
|
||||
};
|
||||
|
||||
class CObject {
|
||||
public:
|
||||
public:
|
||||
ObjType _objtype;
|
||||
|
||||
CObject() : _objtype(kObjTypeDefault) {}
|
||||
|
Loading…
Reference in New Issue
Block a user