2013-06-16 15:11:18 +03:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FULLPIPE_MOTION_H
|
|
|
|
#define FULLPIPE_MOTION_H
|
|
|
|
|
|
|
|
namespace Fullpipe {
|
|
|
|
|
2013-08-26 22:17:20 +03:00
|
|
|
int startWalkTo(int objId, int objKey, int x, int y, int a5);
|
|
|
|
int doSomeAnimation(int objId, int objKey, int a3);
|
|
|
|
int doSomeAnimation2(int objId, int objKey);
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class MotionController : public CObject {
|
2013-09-22 11:42:50 +03:00
|
|
|
public:
|
2013-06-16 15:11:18 +03:00
|
|
|
int _field_4;
|
2013-07-21 23:22:04 +03:00
|
|
|
bool _isEnabled;
|
2013-06-16 15:11:18 +03:00
|
|
|
|
2013-09-22 11:42:50 +03:00
|
|
|
public:
|
|
|
|
MotionController() : _isEnabled(true), _field_4(0) {}
|
2013-09-24 23:24:33 +03:00
|
|
|
virtual ~MotionController() {}
|
2013-06-16 15:11:18 +03:00
|
|
|
virtual bool load(MfcArchive &file);
|
2013-09-24 23:24:33 +03:00
|
|
|
virtual void methodC() {}
|
|
|
|
virtual void method10() {}
|
|
|
|
virtual void clearEnabled() { _isEnabled = false; }
|
|
|
|
virtual void setEnabled() { _isEnabled = true; }
|
|
|
|
virtual int addObject(StaticANIObject *obj) { return 0; }
|
|
|
|
virtual int removeObject(StaticANIObject *obj) { return 0; }
|
2013-09-12 22:47:45 +03:00
|
|
|
virtual void freeItems() {}
|
2013-09-24 23:24:33 +03:00
|
|
|
virtual int method28() { return 0; }
|
|
|
|
virtual int method2C() { return 0; }
|
|
|
|
virtual int method30() { return 0; }
|
|
|
|
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { return 0; }
|
|
|
|
virtual int changeCallback() { return 0; }
|
|
|
|
virtual int method3C() { return 0; }
|
|
|
|
virtual int method40() { return 0; }
|
|
|
|
virtual int method44() { return 0; }
|
|
|
|
virtual int method48() { return -1; }
|
|
|
|
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { return 0; }
|
2013-06-16 15:11:18 +03:00
|
|
|
};
|
|
|
|
|
2013-09-27 22:16:15 +03:00
|
|
|
class MovGraphReact : public CObject {
|
|
|
|
// Empty
|
|
|
|
};
|
|
|
|
|
2013-09-28 11:21:13 +03:00
|
|
|
typedef Common::Array<CObject> MctlConnectionPointsArray;
|
2013-06-16 15:11:18 +03:00
|
|
|
|
2013-09-27 22:16:15 +03:00
|
|
|
class MctlCompoundArrayItem : public CObject {
|
|
|
|
friend class MctlCompound;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
MotionController *_motionControllerObj;
|
|
|
|
MovGraphReact *_movGraphReactObj;
|
|
|
|
MctlConnectionPointsArray _connectionPoints;
|
|
|
|
int _field_20;
|
|
|
|
int _field_24;
|
|
|
|
int _field_28;
|
|
|
|
|
|
|
|
public:
|
|
|
|
MctlCompoundArrayItem() : _movGraphReactObj(0) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class MctlCompoundArray : public Common::Array<MctlCompoundArrayItem *>, public CObject {
|
2013-06-16 15:11:18 +03:00
|
|
|
public:
|
|
|
|
virtual bool load(MfcArchive &file);
|
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class MctlCompound : public MotionController {
|
|
|
|
MctlCompoundArray _motionControllers;
|
2013-06-16 15:11:18 +03:00
|
|
|
|
|
|
|
public:
|
2013-09-25 09:35:07 +03:00
|
|
|
MctlCompound() { _objtype = kObjTypeMctlCompound; }
|
|
|
|
|
2013-06-16 15:11:18 +03:00
|
|
|
virtual bool load(MfcArchive &file);
|
2013-07-21 23:22:04 +03:00
|
|
|
|
2013-09-24 23:24:33 +03:00
|
|
|
virtual int addObject(StaticANIObject *obj);
|
|
|
|
virtual int removeObject(StaticANIObject *obj);
|
|
|
|
virtual void freeItems();
|
|
|
|
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
|
|
|
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
2013-09-08 23:53:02 +03:00
|
|
|
|
2013-09-24 23:24:33 +03:00
|
|
|
void initMovGraph2();
|
2013-06-16 15:11:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
class Unk2 : public CObject {
|
2013-06-22 13:26:49 -04:00
|
|
|
int _items;
|
|
|
|
int _count;
|
2013-06-16 15:11:18 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
Unk2() : _items(0), _count(0) {}
|
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class MovGraphNode : public CObject {
|
2013-09-18 00:00:33 +04:00
|
|
|
public:
|
2013-06-22 13:26:49 -04:00
|
|
|
int _x;
|
|
|
|
int _y;
|
|
|
|
int _distance;
|
|
|
|
int16 _field_10;
|
|
|
|
int _field_14;
|
2013-06-16 16:10:46 +03:00
|
|
|
|
|
|
|
public:
|
2013-09-18 19:04:36 +04:00
|
|
|
MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {}
|
2013-06-16 16:10:46 +03:00
|
|
|
virtual bool load(MfcArchive &file);
|
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class ReactParallel : public MovGraphReact {
|
2013-06-22 13:26:49 -04:00
|
|
|
//CRgn _rgn;
|
|
|
|
int _x1;
|
|
|
|
int _y1;
|
|
|
|
int _x2;
|
|
|
|
int _y2;
|
|
|
|
int _dx;
|
|
|
|
int _dy;
|
|
|
|
Common::Point **_points;
|
2013-06-18 10:04:29 -04:00
|
|
|
|
|
|
|
public:
|
2013-09-18 19:04:36 +04:00
|
|
|
ReactParallel();
|
2013-06-22 13:26:49 -04:00
|
|
|
virtual bool load(MfcArchive &file);
|
|
|
|
void createRegion();
|
2013-06-18 10:04:29 -04:00
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class ReactPolygonal : public MovGraphReact {
|
2013-06-22 13:26:49 -04:00
|
|
|
//CRgn _rgn;
|
|
|
|
int _field_C;
|
|
|
|
int _field_10;
|
|
|
|
int _pointCount;
|
|
|
|
Common::Point **_points;
|
2013-06-18 10:23:49 -04:00
|
|
|
|
|
|
|
public:
|
2013-09-18 19:04:36 +04:00
|
|
|
ReactPolygonal();
|
2013-06-22 13:26:49 -04:00
|
|
|
virtual bool load(MfcArchive &file);
|
|
|
|
void createRegion();
|
2013-06-18 10:23:49 -04:00
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class MovGraphLink : public CObject {
|
2013-09-18 00:00:33 +04:00
|
|
|
public:
|
2013-09-18 19:04:36 +04:00
|
|
|
MovGraphNode *_movGraphNode1;
|
|
|
|
MovGraphNode *_movGraphNode2;
|
2013-09-18 19:08:31 +04:00
|
|
|
DWordArray _dwordArray1;
|
|
|
|
DWordArray _dwordArray2;
|
2013-06-22 13:26:49 -04:00
|
|
|
int _flags;
|
|
|
|
int _field_38;
|
|
|
|
int _field_3C;
|
|
|
|
double _distance;
|
|
|
|
double _angle;
|
2013-09-18 19:04:36 +04:00
|
|
|
MovGraphReact *_movGraphReact;
|
2013-06-22 13:26:49 -04:00
|
|
|
char *_name;
|
2013-06-16 16:10:46 +03:00
|
|
|
|
|
|
|
public:
|
2013-09-18 19:04:36 +04:00
|
|
|
MovGraphLink();
|
2013-06-22 13:26:49 -04:00
|
|
|
virtual bool load(MfcArchive &file);
|
2013-06-16 15:11:18 +03:00
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class MovGraph : public MotionController {
|
2013-09-18 00:00:33 +04:00
|
|
|
public:
|
2013-09-18 19:08:31 +04:00
|
|
|
ObList _nodes;
|
|
|
|
ObList _links;
|
2013-06-22 13:26:49 -04:00
|
|
|
int _field_44;
|
|
|
|
int _items;
|
|
|
|
int _itemsCount;
|
|
|
|
int (*_callback1)(int, int, int);
|
|
|
|
Unk2 _unk2;
|
2013-06-16 15:11:18 +03:00
|
|
|
|
|
|
|
public:
|
2013-09-18 19:04:36 +04:00
|
|
|
MovGraph();
|
2013-06-16 15:11:18 +03:00
|
|
|
virtual bool load(MfcArchive &file);
|
2013-07-21 23:22:04 +03:00
|
|
|
|
2013-09-24 23:24:33 +03:00
|
|
|
virtual int addObject(StaticANIObject *obj);
|
2013-09-27 22:16:15 +03:00
|
|
|
virtual int removeObject(StaticANIObject *obj);
|
|
|
|
virtual void freeItems();
|
|
|
|
virtual int method28();
|
|
|
|
virtual int method2C();
|
|
|
|
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
|
|
|
virtual int changeCallback();
|
|
|
|
virtual int method3C();
|
|
|
|
virtual int method44();
|
|
|
|
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
|
|
|
virtual int method50();
|
2013-09-18 00:00:33 +04:00
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
double calcDistance(Common::Point *point, MovGraphLink *link, int flag);
|
|
|
|
MovGraphNode *calcOffset(int ox, int oy);
|
2013-06-16 15:11:18 +03:00
|
|
|
};
|
|
|
|
|
2013-09-27 22:16:15 +03:00
|
|
|
class MovGraph2 : public MovGraph {
|
|
|
|
public:
|
|
|
|
ObArray _items;
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual int addObject(StaticANIObject *obj);
|
|
|
|
virtual int removeObject(StaticANIObject *obj);
|
|
|
|
virtual void freeItems();
|
|
|
|
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
|
|
|
virtual MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId);
|
|
|
|
};
|
|
|
|
|
2013-09-18 19:04:36 +04:00
|
|
|
class MctlConnectionPoint : public CObject {
|
2013-06-18 17:07:28 -04:00
|
|
|
int _connectionX;
|
|
|
|
int _connectionY;
|
|
|
|
int _field_C;
|
|
|
|
int _field_10;
|
|
|
|
int16 _field_14;
|
|
|
|
int16 _field_16;
|
|
|
|
int _messageQueueObj;
|
|
|
|
int _motionControllerObj;
|
|
|
|
};
|
|
|
|
|
2013-06-16 15:11:18 +03:00
|
|
|
} // End of namespace Fullpipe
|
|
|
|
|
|
|
|
#endif /* FULLPIPE_MOTION_H */
|