aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-14 21:40:03 +0200
committerEugene Sandulenko2016-08-14 21:40:29 +0200
commit68508cb87e09ac1c6c5abffdb5a1f0d314cc9ff7 (patch)
tree452f6815664c6cae12a5da8905f4ee0971803342
parent1bcec8bcd9089e481a8b137f7bad0002fd773ca6 (diff)
downloadscummvm-rg350-68508cb87e09ac1c6c5abffdb5a1f0d314cc9ff7.tar.gz
scummvm-rg350-68508cb87e09ac1c6c5abffdb5a1f0d314cc9ff7.tar.bz2
scummvm-rg350-68508cb87e09ac1c6c5abffdb5a1f0d314cc9ff7.zip
FULLPIPE: Renamed rest of the AniHandler class methods
-rw-r--r--engines/fullpipe/anihandler.cpp20
-rw-r--r--engines/fullpipe/anihandler.h8
-rw-r--r--engines/fullpipe/motion.cpp12
-rw-r--r--engines/fullpipe/scenes/scene11.cpp2
-rw-r--r--engines/fullpipe/statics.cpp4
5 files changed, 23 insertions, 23 deletions
diff --git a/engines/fullpipe/anihandler.cpp b/engines/fullpipe/anihandler.cpp
index 219f20d6dd..71c894b9fe 100644
--- a/engines/fullpipe/anihandler.cpp
+++ b/engines/fullpipe/anihandler.cpp
@@ -29,7 +29,7 @@
namespace Fullpipe {
-void AniHandler::clear() {
+void AniHandler::detachAllObjects() {
_items.clear();
}
@@ -269,7 +269,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {
n2x *= mult;
n2y *= mult;
} else {
- calcLength(&point, mov, n1x, n1y, &mult, &len, 1);
+ getNumCycles(&point, mov, n1x, n1y, &mult, &len, 1);
n2x = point.x;
n2y = point.y;
}
@@ -348,7 +348,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {
for (int i = subIdx; i != st2idx;) {
MGMSubItem *s = _items[itemIdx]->subItems[i + subOffset * _items[itemIdx]->statics.size()];
- ex2 = buildExCommand2(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2 = createCommand(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
ex2->_keyCode = mkQueue->ani->_okeyCode;
@@ -365,7 +365,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {
else
plen = -1;
- ex2 = buildExCommand2(mov, mkQueue->ani->_id, x1, y1, &x2, &y2, plen);
+ ex2 = createCommand(mov, mkQueue->ani->_id, x1, y1, &x2, &y2, plen);
ex2->_parId = mq->_id;
ex2->_keyCode = mkQueue->ani->_okeyCode;
@@ -375,7 +375,7 @@ MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {
for (int j = st1idx; j != subOffset;) {
MGMSubItem *s = _items[itemIdx]->subItems[j + subOffset * _items[itemIdx]->statics.size()];
- ex2 = buildExCommand2(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2 = createCommand(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
ex2->_keyCode = mkQueue->ani->_okeyCode;
@@ -415,8 +415,8 @@ int AniHandler::getFramesCount(int idx, int subIdx, int endIdx, int flag) {
return res;
}
-void AniHandler::updateAnimStatics(StaticANIObject *ani, int staticsId) {
- debugC(4, kDebugPathfinding, "AniHandler::updateAnimStatics(*%d, %d)", ani->_id, staticsId);
+void AniHandler::putObjectToStatics(StaticANIObject *ani, int staticsId) {
+ debugC(4, kDebugPathfinding, "AniHandler::putObjectToStatics(*%d, %d)", ani->_id, staticsId);
if (getIndex(ani->_id) == -1)
return;
@@ -631,7 +631,7 @@ int AniHandler::getNumMovements(int objectId, int idx1, int idx2) {
return idx;
}
-Common::Point *AniHandler::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
+Common::Point *AniHandler::getNumCycles(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
Common::Point point;
mov->calcSomeXY(point, 0, -1);
@@ -707,8 +707,8 @@ Common::Point *AniHandler::calcLength(Common::Point *pRes, Movement *mov, int x,
return pRes;
}
-ExCommand2 *AniHandler::buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len) {
- debugC(2, kDebugPathfinding, "AniHandler::buildExCommand2(mov, %d, %d, %d, [%d, %d], [%d, %d], %d)", objId, x1, y1, x2->x, x2->y, y2->x, y2->y, len);
+ExCommand2 *AniHandler::createCommand(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len) {
+ debugC(2, kDebugPathfinding, "AniHandler::createCommand(mov, %d, %d, %d, [%d, %d], [%d, %d], %d)", objId, x1, y1, x2->x, x2->y, y2->x, y2->y, len);
uint cnt;
diff --git a/engines/fullpipe/anihandler.h b/engines/fullpipe/anihandler.h
index f0e535c428..ae16f91ba8 100644
--- a/engines/fullpipe/anihandler.h
+++ b/engines/fullpipe/anihandler.h
@@ -71,20 +71,20 @@ public:
Common::Array<MGMItem *> _items;
public:
- void clear();
+ void detachAllObjects();
void attachObject(int objId);
void resetData(int objId);
int getIndex(int objId);
MessageQueue *makeRunQueue(MakeQueueStruct *mkQueue);
- void updateAnimStatics(StaticANIObject *ani, int staticsId);
+ void putObjectToStatics(StaticANIObject *ani, int staticsId);
Common::Point *getTransitionSize(Common::Point *point, int aniId, int staticsId1, int staticsId2);
int getStaticsIndexById(int idx, int16 id);
int getStaticsIndex(int idx, Statics *st);
void clearVisitsList(int idx);
int seekWay(int idx, int st1idx, int st2idx, bool flip, bool flop);
- Common::Point *calcLength(Common::Point *point, Movement *mov, int x, int y, int *mult, int *len, int flag);
- ExCommand2 *buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len);
+ Common::Point *getNumCycles(Common::Point *point, Movement *mov, int x, int y, int *mult, int *len, int flag);
+ ExCommand2 *createCommand(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len);
MessageQueue *makeQueue(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr);
int getFramesCount(int idx, int subIdx, int subOffset, int flag);
int getNumMovements(int objectId, int idx1, int idx2);
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 995ba39b46..a8fe8b720a 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -413,7 +413,7 @@ bool MctlLadder::initMovement(StaticANIObject *ani, MctlLadderMovement *movement
void MctlLadder::detachAllObjects() {
debugC(4, kDebugPathfinding, "MctlLadder::detachAllObjects()");
- _aniHandler.clear();
+ _aniHandler.detachAllObjects();
for (uint i = 0; i < _ladmovements.size(); i++) {
delete _ladmovements[i]->movVars;
@@ -806,7 +806,7 @@ bool MovGraph::load(MfcArchive &file) {
void MovGraph::attachObject(StaticANIObject *obj) {
debugC(4, kDebugPathfinding, "MovGraph::attachObject(*%d)", obj->_id);
- _aniHandler.clear();
+ _aniHandler.detachAllObjects();
_aniHandler.attachObject(obj->_id);
for (uint i = 0; i < _items.size(); i++)
@@ -2504,7 +2504,7 @@ MessageQueue *MovGraph2::genMovement(MovInfo1 *info) {
int a2 = 0;
int mgmLen;
- _aniHandler.calcLength(&point, _items2[info->index]->_subItems[info->subIndex]._walk[1]._mov, x, y, &mgmLen, &a2, info->flags & 1);
+ _aniHandler.getNumCycles(&point, _items2[info->index]->_subItems[info->subIndex]._walk[1]._mov, x, y, &mgmLen, &a2, info->flags & 1);
int x1 = point.x;
int y1 = point.y;
@@ -2619,7 +2619,7 @@ MessageQueue *MovGraph2::genMovement(MovInfo1 *info) {
ex->_excFlags |= 2;
mq->addExCommandToEnd(ex);
- ex = _aniHandler.buildExCommand2(
+ ex = _aniHandler.createCommand(
_items2[info->index]->_subItems[info->subIndex]._walk[0]._mov,
_items2[info->index]->_objectId,
x1,
@@ -2641,7 +2641,7 @@ MessageQueue *MovGraph2::genMovement(MovInfo1 *info) {
else
par = -1;
- ex = _aniHandler.buildExCommand2(
+ ex = _aniHandler.createCommand(
_items2[info->index]->_subItems[info->subIndex]._walk[1]._mov,
_items2[info->index]->_objectId,
x1,
@@ -2655,7 +2655,7 @@ MessageQueue *MovGraph2::genMovement(MovInfo1 *info) {
}
if (!(info->flags & 4)) {
- ex = _aniHandler.buildExCommand2(
+ ex = _aniHandler.createCommand(
_items2[info->index]->_subItems[info->subIndex]._walk[2]._mov,
_items2[info->index]->_objectId,
x1,
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index 471436200d..1a8fa8ed67 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -96,7 +96,7 @@ void scene11_setupMusic() {
void scene11_initScene(Scene *sc) {
g_vars->scene11_swingie = sc->getStaticANIObject1ById(ANI_SWINGER, -1);
g_vars->scene11_boots = sc->getStaticANIObject1ById(ANI_BOOTS_11, -1);
- g_vars->scene11_aniHandler.clear();
+ g_vars->scene11_aniHandler.detachAllObjects();
g_vars->scene11_dudeOnSwing = sc->getStaticANIObject1ById(ANI_MAN11, -1);
g_vars->scene11_dudeOnSwing->_callback2 = scene11_dudeSwingCallback;
g_vars->scene11_dudeOnSwing = sc->getStaticANIObject1ById(ANI_KACHELI, -1);
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 264de51c4b..45cf743e51 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -156,7 +156,7 @@ StaticANIObject::~StaticANIObject() {
_movements.clear();
- g_fp->_aniHandler->clear();
+ g_fp->_aniHandler->detachAllObjects();
}
StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) {
@@ -1072,7 +1072,7 @@ void StaticANIObject::changeStatics2(int objId) {
if (_movement || _statics) {
g_fp->_aniHandler->attachObject(_id);
- g_fp->_aniHandler->updateAnimStatics(this, objId);
+ g_fp->_aniHandler->putObjectToStatics(this, objId);
} else {
_statics = getStaticsById(objId);
}