diff options
author | Eugene Sandulenko | 2013-09-18 19:04:36 +0400 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-18 19:39:53 +0400 |
commit | 5d25dd3b365d2f74d90f3838013dbb90d3a72f60 (patch) | |
tree | e7895167b793cfb27ee55b84d2e9e4b9aa00f23f | |
parent | c6ef07f651645658d107e72a6f1a5216a88a318b (diff) | |
download | scummvm-rg350-5d25dd3b365d2f74d90f3838013dbb90d3a72f60.tar.gz scummvm-rg350-5d25dd3b365d2f74d90f3838013dbb90d3a72f60.tar.bz2 scummvm-rg350-5d25dd3b365d2f74d90f3838013dbb90d3a72f60.zip |
FULLPIPE: Remove C* prefixes from motion classes
-rw-r--r-- | engines/fullpipe/gameloader.cpp | 6 | ||||
-rw-r--r-- | engines/fullpipe/gameloader.h | 8 | ||||
-rw-r--r-- | engines/fullpipe/motion.cpp | 96 | ||||
-rw-r--r-- | engines/fullpipe/motion.h | 58 | ||||
-rw-r--r-- | engines/fullpipe/scenes.cpp | 14 | ||||
-rw-r--r-- | engines/fullpipe/utils.cpp | 48 |
6 files changed, 115 insertions, 115 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 2a8f64dac9..6abe26743f 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -35,10 +35,10 @@ CInventory2 *getGameLoaderInventory() { return &g_fullpipe->_gameLoader->_inventory; } -CMctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId) { +MctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId) { for (uint i = 0; i < g_fullpipe->_gameLoader->_sc2array.size(); i++) if (g_fullpipe->_gameLoader->_sc2array[i]._sceneId == sceneId) - return (CMctlCompound *)g_fullpipe->_gameLoader->_sc2array[i]._motionController; + return (MctlCompound *)g_fullpipe->_gameLoader->_sc2array[i]._motionController; return 0; } @@ -425,7 +425,7 @@ bool Sc2::load(MfcArchive &file) { _sceneId = file.readUint16LE(); - _motionController = (CMotionController *)file.readClass(); + _motionController = (MotionController *)file.readClass(); _count1 = file.readUint32LE(); debug(4, "count1: %d", _count1); diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 2f1f57a5e2..db691005f9 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -30,17 +30,17 @@ namespace Fullpipe { class SceneTag; -class CMctlCompound; +class MctlCompound; class CInputController; class CInteractionController; -class CMotionController; +class MotionController; class Sc2 : public CObject { public: int16 _sceneId; int16 _field_2; Scene *_scene; - CMotionController *_motionController; + MotionController *_motionController; int32 *_data1; // FIXME, could be a struct int _count1; PicAniInfo **_defPicAniInfos; @@ -110,7 +110,7 @@ class CGameLoader : public CObject { CInventory2 *getGameLoaderInventory(); CInteractionController *getGameLoaderInteractionController(); -CMctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId); +MctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId); } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 1d46f7994f..022eef87be 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -32,31 +32,31 @@ namespace Fullpipe { -bool CMotionController::load(MfcArchive &file) { +bool MotionController::load(MfcArchive &file) { // Is originally empty file.readClass(); - debug(5, "CMotionController::load()"); + debug(5, "MotionController::load()"); return true; } -bool CMctlCompound::load(MfcArchive &file) { - debug(5, "CMctlCompound::load()"); +bool MctlCompound::load(MfcArchive &file) { + debug(5, "MctlCompound::load()"); int count = file.readUint32LE(); - debug(6, "CMctlCompound::count = %d", count); + debug(6, "MctlCompound::count = %d", count); for (int i = 0; i < count; i++) { debug(6, "CompoundArray[%d]", i); - CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); + MctlCompoundArrayItem *obj = (MctlCompoundArrayItem *)file.readClass(); int count1 = file.readUint32LE(); debug(6, "ConnectionPoint::count: %d", count1); for (int j = 0; j < count1; j++) { debug(6, "ConnectionPoint[%d]", j); - CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass(); + MctlConnectionPoint *obj1 = (MctlConnectionPoint *)file.readClass(); obj->_connectionPoints.push_back(*obj1); } @@ -65,7 +65,7 @@ bool CMctlCompound::load(MfcArchive &file) { obj->_field_24 = file.readUint32LE(); debug(6, "graphReact"); - obj->_movGraphReactObj = (CMovGraphReact *)file.readClass(); + obj->_movGraphReactObj = (MovGraphReact *)file.readClass(); _motionControllers.push_back(*obj); } @@ -73,53 +73,53 @@ bool CMctlCompound::load(MfcArchive &file) { return true; } -void CMctlCompound::addObject(StaticANIObject *obj) { - warning("STUB: CMctlCompound::addObject()"); +void MctlCompound::addObject(StaticANIObject *obj) { + warning("STUB: MctlCompound::addObject()"); } -void CMctlCompound::initMovGraph2() { - warning("STUB: CMctlCompound::initMovGraph2()"); +void MctlCompound::initMovGraph2() { + warning("STUB: MctlCompound::initMovGraph2()"); } -MessageQueue *CMctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { - warning("STUB: CMctlCompound::method34()"); +MessageQueue *MctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { + warning("STUB: MctlCompound::method34()"); return 0; } -MessageQueue *CMctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { - warning("STUB: CMctlCompound::method4C()"); +MessageQueue *MctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { + warning("STUB: MctlCompound::method4C()"); return 0; } -bool CMctlCompoundArray::load(MfcArchive &file) { - debug(5, "CMctlCompoundArray::load()"); +bool MctlCompoundArray::load(MfcArchive &file) { + debug(5, "MctlCompoundArray::load()"); int count = file.readUint32LE(); - debug(0, "CMctlCompoundArray::count = %d", count); + debug(0, "MctlCompoundArray::count = %d", count); assert(0); return true; } -int CMovGraph_messageHandler(ExCommand *cmd); +int MovGraph_messageHandler(ExCommand *cmd); -CMovGraph::CMovGraph() { - warning("STUB: CMovGraph::CMovGraph()"); +MovGraph::MovGraph() { + warning("STUB: MovGraph::MovGraph()"); _itemsCount = 0; _items = 0; - //_callback1 = CMovGraphCallback1; // TODO + //_callback1 = MovGraphCallback1; // TODO _field_44 = 0; - insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129); + insertMessageHandler(MovGraph_messageHandler, getMessageHandlersCount() - 1, 129); _objtype = kObjTypeMovGraph; } -bool CMovGraph::load(MfcArchive &file) { - debug(5, "CMovGraph::load()"); +bool MovGraph::load(MfcArchive &file) { + debug(5, "MovGraph::load()"); _links.load(file); _nodes.load(file); @@ -127,24 +127,24 @@ bool CMovGraph::load(MfcArchive &file) { return true; } -void CMovGraph::addObject(StaticANIObject *obj) { - warning("STUB: CMovGraph::addObject()"); +void MovGraph::addObject(StaticANIObject *obj) { + warning("STUB: MovGraph::addObject()"); } -double CMovGraph::calcDistance(Common::Point *point, CMovGraphLink *link, int flag) { - warning("STUB: CMovGraph::calcDistance()"); +double MovGraph::calcDistance(Common::Point *point, MovGraphLink *link, int flag) { + warning("STUB: MovGraph::calcDistance()"); return 0; } -CMovGraphNode *CMovGraph::calcOffset(int ox, int oy) { - warning("STUB: CMovGraph::calcOffset()"); +MovGraphNode *MovGraph::calcOffset(int ox, int oy) { + warning("STUB: MovGraph::calcOffset()"); return 0; } -CMovGraphLink::CMovGraphLink() { +MovGraphLink::MovGraphLink() { _distance = 0; _angle = 0; _flags = 0x10000000; @@ -156,8 +156,8 @@ CMovGraphLink::CMovGraphLink() { _name = 0; } -bool CMovGraphLink::load(MfcArchive &file) { - debug(5, "CMovGraphLink::load()"); +bool MovGraphLink::load(MfcArchive &file) { + debug(5, "MovGraphLink::load()"); _dwordArray1.load(file); _dwordArray2.load(file); @@ -165,23 +165,23 @@ bool CMovGraphLink::load(MfcArchive &file) { _flags = file.readUint32LE(); debug(8, "GraphNode1"); - _movGraphNode1 = (CMovGraphNode *)file.readClass(); + _movGraphNode1 = (MovGraphNode *)file.readClass(); debug(8, "GraphNode2"); - _movGraphNode2 = (CMovGraphNode *)file.readClass(); + _movGraphNode2 = (MovGraphNode *)file.readClass(); _distance = file.readDouble(); _angle = file.readDouble(); debug(8, "distance: %g, angle: %g", _distance, _angle); - _movGraphReact = (CMovGraphReact *)file.readClass(); + _movGraphReact = (MovGraphReact *)file.readClass(); _name = file.readPascalString(); return true; } -bool CMovGraphNode::load(MfcArchive &file) { - debug(5, "CMovGraphNode::load()"); +bool MovGraphNode::load(MfcArchive &file) { + debug(5, "MovGraphNode::load()"); _field_14 = file.readUint32LE(); _x = file.readUint32LE(); @@ -191,7 +191,7 @@ bool CMovGraphNode::load(MfcArchive &file) { return true; } -CReactParallel::CReactParallel() { +ReactParallel::ReactParallel() { _x1 = 0; _x2 = 0; _dy = 0; @@ -201,8 +201,8 @@ CReactParallel::CReactParallel() { _y2 = 0; } -bool CReactParallel::load(MfcArchive &file) { - debug(5, "CReactParallel::load()"); +bool ReactParallel::load(MfcArchive &file) { + debug(5, "ReactParallel::load()"); _x1 = file.readUint32LE(); _y1 = file.readUint32LE(); @@ -216,7 +216,7 @@ bool CReactParallel::load(MfcArchive &file) { return true; } -void CReactParallel::createRegion() { +void ReactParallel::createRegion() { _points = (Common::Point **)malloc(sizeof(Common::Point *) * 4); for (int i = 0; i < 4; i++) @@ -241,15 +241,15 @@ void CReactParallel::createRegion() { // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2); } -CReactPolygonal::CReactPolygonal() { +ReactPolygonal::ReactPolygonal() { _field_C = 0; _points = 0; _pointCount = 0; _field_10 = 0; } -bool CReactPolygonal::load(MfcArchive &file) { - debug(5, "CReactPolygonal::load()"); +bool ReactPolygonal::load(MfcArchive &file) { + debug(5, "ReactPolygonal::load()"); _field_C = file.readUint32LE(); _field_10 = file.readUint32LE(); @@ -272,7 +272,7 @@ bool CReactPolygonal::load(MfcArchive &file) { return true; } -void CReactPolygonal::createRegion() { +void ReactPolygonal::createRegion() { if (_points) { // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2); diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 79739845c2..332a494e1c 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -29,13 +29,13 @@ 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); -class CMotionController : public CObject { +class MotionController : public CObject { public: int _field_4; bool _isEnabled; public: - CMotionController() : _isEnabled(true) {} + MotionController() : _isEnabled(true) {} virtual bool load(MfcArchive &file); void setEnabled() { _isEnabled = true; } @@ -45,18 +45,18 @@ class CMotionController : public CObject { virtual void freeItems() {} }; -class CMctlCompoundArray : public Common::Array<CObject>, public CObject { +class MctlCompoundArray : public Common::Array<CObject>, public CObject { public: virtual bool load(MfcArchive &file); }; -class CMctlConnectionPointsArray : public Common::Array<CObject>, public CObject { +class MctlConnectionPointsArray : public Common::Array<CObject>, public CObject { public: virtual bool load(MfcArchive &file); }; -class CMctlCompound : public CMotionController { - CMctlCompoundArray _motionControllers; +class MctlCompound : public MotionController { + MctlCompoundArray _motionControllers; public: virtual bool load(MfcArchive &file); @@ -76,7 +76,7 @@ class Unk2 : public CObject { Unk2() : _items(0), _count(0) {} }; -class CMovGraphNode : public CObject { +class MovGraphNode : public CObject { public: int _x; int _y; @@ -85,30 +85,30 @@ class CMovGraphNode : public CObject { int _field_14; public: - CMovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {} + MovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {} virtual bool load(MfcArchive &file); }; -class CMovGraphReact : public CObject { +class MovGraphReact : public CObject { // Empty }; -class CMctlCompoundArrayItem : public CObject { - friend class CMctlCompound; +class MctlCompoundArrayItem : public CObject { + friend class MctlCompound; protected: - CMotionController *_motionControllerObj; - CMovGraphReact *_movGraphReactObj; - CMctlConnectionPointsArray _connectionPoints; + MotionController *_motionControllerObj; + MovGraphReact *_movGraphReactObj; + MctlConnectionPointsArray _connectionPoints; int _field_20; int _field_24; int _field_28; public: - CMctlCompoundArrayItem() : _movGraphReactObj(0) {} + MctlCompoundArrayItem() : _movGraphReactObj(0) {} }; -class CReactParallel : public CMovGraphReact { +class ReactParallel : public MovGraphReact { //CRgn _rgn; int _x1; int _y1; @@ -119,12 +119,12 @@ class CReactParallel : public CMovGraphReact { Common::Point **_points; public: - CReactParallel(); + ReactParallel(); virtual bool load(MfcArchive &file); void createRegion(); }; -class CReactPolygonal : public CMovGraphReact { +class ReactPolygonal : public MovGraphReact { //CRgn _rgn; int _field_C; int _field_10; @@ -132,15 +132,15 @@ class CReactPolygonal : public CMovGraphReact { Common::Point **_points; public: - CReactPolygonal(); + ReactPolygonal(); virtual bool load(MfcArchive &file); void createRegion(); }; -class CMovGraphLink : public CObject { +class MovGraphLink : public CObject { public: - CMovGraphNode *_movGraphNode1; - CMovGraphNode *_movGraphNode2; + MovGraphNode *_movGraphNode1; + MovGraphNode *_movGraphNode2; CDWordArray _dwordArray1; CDWordArray _dwordArray2; int _flags; @@ -148,15 +148,15 @@ class CMovGraphLink : public CObject { int _field_3C; double _distance; double _angle; - CMovGraphReact *_movGraphReact; + MovGraphReact *_movGraphReact; char *_name; public: - CMovGraphLink(); + MovGraphLink(); virtual bool load(MfcArchive &file); }; -class CMovGraph : public CMotionController { +class MovGraph : public MotionController { public: CObList _nodes; CObList _links; @@ -167,16 +167,16 @@ class CMovGraph : public CMotionController { Unk2 _unk2; public: - CMovGraph(); + MovGraph(); virtual bool load(MfcArchive &file); virtual void addObject(StaticANIObject *obj); - double calcDistance(Common::Point *point, CMovGraphLink *link, int flag); - CMovGraphNode *calcOffset(int ox, int oy); + double calcDistance(Common::Point *point, MovGraphLink *link, int flag); + MovGraphNode *calcOffset(int ox, int oy); }; -class CMctlConnectionPoint : public CObject { +class MctlConnectionPoint : public CObject { int _connectionX; int _connectionY; int _field_C; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 7aec8652f0..a709d35f14 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -139,7 +139,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { if (_aniMan) { _aniMan2 = _aniMan; - CMctlCompound *cmp = getSc2MctlCompoundBySceneId(entrance->_sceneId); + MctlCompound *cmp = getSc2MctlCompoundBySceneId(entrance->_sceneId); cmp->initMovGraph2(); cmp->addObject(_aniMan); cmp->setEnabled(); @@ -1313,7 +1313,7 @@ int global_messageHandler4(ExCommand *cmd) { return 1; } -int CMovGraph_messageHandler(ExCommand *cmd) { +int MovGraph_messageHandler(ExCommand *cmd) { if (cmd->_messageKind != 17) return 0; @@ -1328,9 +1328,9 @@ int CMovGraph_messageHandler(ExCommand *cmd) { if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_objtype != kObjTypeMovGraph || !ani) return 0; - CMovGraph *gr = (CMovGraph *)getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId); + MovGraph *gr = (MovGraph *)getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId); - CMovGraphLink *link = 0; + MovGraphLink *link = 0; double mindistance = 1.0e10; Common::Point point; @@ -1338,17 +1338,17 @@ int CMovGraph_messageHandler(ExCommand *cmd) { point.x = ani->_ox; point.y = ani->_oy; - double dst = gr->calcDistance(&point, (CMovGraphLink *)(*i), 0); + double dst = gr->calcDistance(&point, (MovGraphLink *)(*i), 0); if (dst >= 0.0 && dst < mindistance) { mindistance = dst; - link = (CMovGraphLink *)(*i); + link = (MovGraphLink *)(*i); } } int top; if (link) { - CMovGraphNode *node = link->_movGraphNode1; + MovGraphNode *node = link->_movGraphNode1; double sq = (ani->_oy - node->_y) * (ani->_oy - node->_y) + (ani->_ox - node->_x) * (ani->_ox - node->_x); int off = (node->_field_14 >> 16) & 0xFF; diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 2ba5a85e68..920c3e29cf 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -267,12 +267,12 @@ enum { kExCommand, kCObjstateCommand, kCGameVar, - kCMctlCompound, - kCMovGraph, - kCMovGraphLink, - kCMovGraphNode, - kCReactParallel, - kCReactPolygonal + kMctlCompound, + kMovGraph, + kMovGraphLink, + kMovGraphNode, + kReactParallel, + kReactPolygonal }; const struct { @@ -284,12 +284,12 @@ const struct { { "ExCommand", kExCommand }, { "CObjstateCommand", kCObjstateCommand }, { "CGameVar", kCGameVar }, - { "CMctlCompound", kCMctlCompound }, - { "CMovGraph", kCMovGraph }, - { "CMovGraphLink", kCMovGraphLink }, - { "CMovGraphNode", kCMovGraphNode }, - { "CReactParallel", kCReactParallel }, - { "CReactPolygonal", kCReactPolygonal }, + { "MctlCompound", kMctlCompound }, + { "MovGraph", kMovGraph }, + { "MovGraphLink", kMovGraphLink }, + { "MovGraphNode", kMovGraphNode }, + { "ReactParallel", kReactParallel }, + { "ReactPolygonal", kReactPolygonal }, { 0, 0 } }; @@ -316,18 +316,18 @@ static CObject *createObject(int objectId) { return new CObjstateCommand(); case kCGameVar: return new CGameVar(); - case kCMctlCompound: - return new CMctlCompound(); - case kCMovGraph: - return new CMovGraph(); - case kCMovGraphLink: - return new CMovGraphLink(); - case kCMovGraphNode: - return new CMovGraphNode(); - case kCReactParallel: - return new CReactParallel(); - case kCReactPolygonal: - return new CReactPolygonal(); + case kMctlCompound: + return new MctlCompound(); + case kMovGraph: + return new MovGraph(); + case kMovGraphLink: + return new MovGraphLink(); + case kMovGraphNode: + return new MovGraphNode(); + case kReactParallel: + return new ReactParallel(); + case kReactPolygonal: + return new ReactPolygonal(); default: error("Unknown objectId: %d", objectId); } |