aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/anihandler.cpp78
-rw-r--r--engines/fullpipe/anihandler.h8
-rw-r--r--engines/fullpipe/motion.cpp166
-rw-r--r--engines/fullpipe/scenes/scene04.cpp166
-rw-r--r--engines/fullpipe/scenes/scene11.cpp62
-rw-r--r--engines/fullpipe/scenes/scene22.cpp32
-rw-r--r--engines/fullpipe/scenes/scene29.cpp22
-rw-r--r--engines/fullpipe/statics.cpp4
8 files changed, 269 insertions, 269 deletions
diff --git a/engines/fullpipe/anihandler.cpp b/engines/fullpipe/anihandler.cpp
index a1baed9aea..a423b2b70d 100644
--- a/engines/fullpipe/anihandler.cpp
+++ b/engines/fullpipe/anihandler.cpp
@@ -131,7 +131,7 @@ MGMSubItem::MGMSubItem() {
y = 0;
}
-void AniHandler::addItem(int objId) {
+void AniHandler::attachObject(int objId) {
debugC(4, kDebugPathfinding, "AniHandler::addItem(%d)", objId);
if (getItemIndexById(objId) == -1) {
@@ -185,55 +185,55 @@ int AniHandler::getItemIndexById(int objId) {
return -1;
}
-MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
- debugC(4, kDebugPathfinding, "AniHandler::genMovement(*%d)", mgminfo->ani ? mgminfo->ani->_id : -1);
+MessageQueue *AniHandler::makeRunQueue(MakeQueueStruct *mkQueue) {
+ debugC(4, kDebugPathfinding, "AniHandler::makeRunQueue(*%d)", mkQueue->ani ? mkQueue->ani->_id : -1);
- if (!mgminfo->ani)
+ if (!mkQueue->ani)
return 0;
- Movement *mov = mgminfo->ani->_movement;
+ Movement *mov = mkQueue->ani->_movement;
- if (!mov && !mgminfo->ani->_statics)
+ if (!mov && !mkQueue->ani->_statics)
return 0;
- if (!(mgminfo->flags & 1)) {
+ if (!(mkQueue->flags & 1)) {
if (mov)
- mgminfo->staticsId1 = mov->_staticsObj2->_staticsId;
+ mkQueue->staticsId1 = mov->_staticsObj2->_staticsId;
else
- mgminfo->staticsId1 = mgminfo->ani->_statics->_staticsId;
+ mkQueue->staticsId1 = mkQueue->ani->_statics->_staticsId;
}
Common::Point point;
- if (!(mgminfo->flags & 0x10) || !(mgminfo->flags & 0x20)) {
- int nx = mgminfo->ani->_ox;
- int ny = mgminfo->ani->_oy;
+ if (!(mkQueue->flags & 0x10) || !(mkQueue->flags & 0x20)) {
+ int nx = mkQueue->ani->_ox;
+ int ny = mkQueue->ani->_oy;
- if (mgminfo->ani->_movement) {
- mgminfo->ani->calcNextStep(&point);
+ if (mkQueue->ani->_movement) {
+ mkQueue->ani->calcNextStep(&point);
nx += point.x;
ny += point.y;
}
- if (!(mgminfo->flags & 0x10))
- mgminfo->x2 = nx;
+ if (!(mkQueue->flags & 0x10))
+ mkQueue->x2 = nx;
- if (!(mgminfo->flags & 0x20))
- mgminfo->y2 = ny;
+ if (!(mkQueue->flags & 0x20))
+ mkQueue->y2 = ny;
}
- mov = mgminfo->ani->getMovementById(mgminfo->movementId);
+ mov = mkQueue->ani->getMovementById(mkQueue->movementId);
if (!mov)
return 0;
- int itemIdx = getItemIndexById(mgminfo->ani->_id);
- int subIdx = getStaticsIndexById(itemIdx, mgminfo->staticsId1);
+ int itemIdx = getItemIndexById(mkQueue->ani->_id);
+ int subIdx = getStaticsIndexById(itemIdx, mkQueue->staticsId1);
int st2idx = getStaticsIndexById(itemIdx, mov->_staticsObj1->_staticsId);
int st1idx = getStaticsIndexById(itemIdx, mov->_staticsObj2->_staticsId);
- int subOffset = getStaticsIndexById(itemIdx, mgminfo->staticsId2);
+ int subOffset = getStaticsIndexById(itemIdx, mkQueue->staticsId2);
debugC(3, kDebugPathfinding, "AniHandler::genMovement. (1) movements1 sz: %d movements2 sz: %d", _items[itemIdx]->movements1.size(), _items[itemIdx]->movements2.size());
@@ -251,8 +251,8 @@ MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
if (st1idx != subOffset && !sub2->movement)
return 0;
- int n1x = mgminfo->x1 - mgminfo->x2 - sub1->x - sub2->x;
- int n1y = mgminfo->y1 - mgminfo->y2 - sub1->y - sub2->y;
+ int n1x = mkQueue->x1 - mkQueue->x2 - sub1->x - sub2->x;
+ int n1y = mkQueue->y1 - mkQueue->y2 - sub1->y - sub2->y;
Common::Point point1;
@@ -263,8 +263,8 @@ MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
int mult;
int len = -1;
- if (mgminfo->flags & 0x40) {
- mult = mgminfo->field_10;
+ if (mkQueue->flags & 0x40) {
+ mult = mkQueue->field_10;
len = -1;
n2x *= mult;
n2y *= mult;
@@ -274,18 +274,18 @@ MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
n2y = point.y;
}
- if (!(mgminfo->flags & 2)) {
+ if (!(mkQueue->flags & 2)) {
len = -1;
n2x = mult * point1.x;
n1x = mult * point1.x;
- mgminfo->x1 = mgminfo->x2 + mult * point1.x + sub1->x + sub2->x;
+ mkQueue->x1 = mkQueue->x2 + mult * point1.x + sub1->x + sub2->x;
}
- if (!(mgminfo->flags & 4)) {
+ if (!(mkQueue->flags & 4)) {
n2y = mult * point1.y;
n1y = mult * point1.y;
len = -1;
- mgminfo->y1 = mgminfo->y2 + mult * point1.y + sub1->y + sub2->y;
+ mkQueue->y1 = mkQueue->y2 + mult * point1.y + sub1->y + sub2->y;
}
int px = 0;
@@ -348,9 +348,9 @@ MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
for (int i = subIdx; i != st2idx;) {
MGMSubItem *s = _items[itemIdx]->subItems[i + subOffset * _items[itemIdx]->statics.size()];
- ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2 = buildExCommand2(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
- ex2->_keyCode = mgminfo->ani->_okeyCode;
+ ex2->_keyCode = mkQueue->ani->_okeyCode;
mq->addExCommandToEnd(ex2);
@@ -365,9 +365,9 @@ MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
else
plen = -1;
- ex2 = buildExCommand2(mov, mgminfo->ani->_id, x1, y1, &x2, &y2, plen);
+ ex2 = buildExCommand2(mov, mkQueue->ani->_id, x1, y1, &x2, &y2, plen);
ex2->_parId = mq->_id;
- ex2->_keyCode = mgminfo->ani->_okeyCode;
+ ex2->_keyCode = mkQueue->ani->_okeyCode;
mq->addExCommandToEnd(ex2);
}
@@ -375,19 +375,19 @@ MessageQueue *AniHandler::genMovement(MGMInfo *mgminfo) {
for (int j = st1idx; j != subOffset;) {
MGMSubItem *s = _items[itemIdx]->subItems[j + subOffset * _items[itemIdx]->statics.size()];
- ex2 = buildExCommand2(s->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
+ ex2 = buildExCommand2(s->movement, mkQueue->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
- ex2->_keyCode = mgminfo->ani->_okeyCode;
+ ex2->_keyCode = mkQueue->ani->_okeyCode;
mq->addExCommandToEnd(ex2);
j = s->staticsIndex;
}
- ExCommand *ex = new ExCommand(mgminfo->ani->_id, 5, -1, mgminfo->x1, mgminfo->y1, 0, 1, 0, 0, 0);
+ ExCommand *ex = new ExCommand(mkQueue->ani->_id, 5, -1, mkQueue->x1, mkQueue->y1, 0, 1, 0, 0, 0);
- ex->_field_14 = mgminfo->field_1C;
- ex->_keyCode = mgminfo->ani->_okeyCode;
+ ex->_field_14 = mkQueue->field_1C;
+ ex->_keyCode = mkQueue->ani->_okeyCode;
ex->_field_24 = 0;
ex->_excFlags |= 3;
diff --git a/engines/fullpipe/anihandler.h b/engines/fullpipe/anihandler.h
index 5632a8f986..ec0dcd0bd3 100644
--- a/engines/fullpipe/anihandler.h
+++ b/engines/fullpipe/anihandler.h
@@ -50,7 +50,7 @@ struct MGMItem {
MGMItem();
};
-struct MGMInfo {
+struct MakeQueueStruct {
StaticANIObject *ani;
int staticsId1;
int staticsId2;
@@ -63,7 +63,7 @@ struct MGMInfo {
int y2;
int flags;
- MGMInfo() { memset(this, 0, sizeof(MGMInfo)); }
+ MakeQueueStruct() { memset(this, 0, sizeof(MakeQueueStruct)); }
};
class AniHandler : public CObject {
@@ -72,11 +72,11 @@ public:
public:
void clear();
- void addItem(int objId);
+ void attachObject(int objId);
void rebuildTables(int objId);
int getItemIndexById(int objId);
- MessageQueue *genMovement(MGMInfo *mgminfo);
+ MessageQueue *makeRunQueue(MakeQueueStruct *mkQueue);
void updateAnimStatics(StaticANIObject *ani, int staticsId);
Common::Point *getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2);
int getStaticsIndexById(int idx, int16 id);
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index f2d3a65feb..25ee191dc4 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -348,7 +348,7 @@ void MctlLadder::attachObject(StaticANIObject *obj) {
MctlLadderMovement *movement = new MctlLadderMovement;
if (initMovement(obj, movement)) {
- _aniHandler.addItem(obj->_id);
+ _aniHandler.attachObject(obj->_id);
_ladmovements.push_back(movement);
} else {
delete movement;
@@ -459,7 +459,7 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *ani, int xpos, int ypos, int
int direction = (normy - ani->_oy) < 0 ? 0 : 1;
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
PicAniInfo picinfo;
MessageQueue *mq;
ExCommand *ex;
@@ -484,38 +484,38 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *ani, int xpos, int ypos, int
}
if (ani->_statics->_staticsId == _ladmovements[pos]->staticIds[0]) {
- mgminfo.ani = ani;
+ mkQueue.ani = ani;
if (staticsId)
- mgminfo.staticsId2 = staticsId;
+ mkQueue.staticsId2 = staticsId;
else
- mgminfo.staticsId2 = _ladmovements[pos]->staticIds[direction];
+ mkQueue.staticsId2 = _ladmovements[pos]->staticIds[direction];
- mgminfo.x1 = normx;
- mgminfo.y1 = normy;
- mgminfo.field_1C = _ladder_field_14;
- mgminfo.flags = 14;
- mgminfo.movementId = direction ? _ladmovements[pos]->movVars->varDownGo : _ladmovements[pos]->movVars->varUpGo;
+ mkQueue.x1 = normx;
+ mkQueue.y1 = normy;
+ mkQueue.field_1C = _ladder_field_14;
+ mkQueue.flags = 14;
+ mkQueue.movementId = direction ? _ladmovements[pos]->movVars->varDownGo : _ladmovements[pos]->movVars->varUpGo;
- return _aniHandler.genMovement(&mgminfo);
+ return _aniHandler.makeRunQueue(&mkQueue);
}
if (ani->_statics->_staticsId == _ladmovements[pos]->staticIds[2]) {
if (!direction) {
- mgminfo.ani = ani;
+ mkQueue.ani = ani;
if (staticsId)
- mgminfo.staticsId2 = staticsId;
+ mkQueue.staticsId2 = staticsId;
else
- mgminfo.staticsId2 = _ladmovements[pos]->staticIds[0];
+ mkQueue.staticsId2 = _ladmovements[pos]->staticIds[0];
- mgminfo.x1 = normx;
- mgminfo.y1 = normy;
- mgminfo.field_1C = _ladder_field_14;
- mgminfo.flags = 14;
- mgminfo.movementId = _ladmovements[pos]->movVars->varUpGo;
+ mkQueue.x1 = normx;
+ mkQueue.y1 = normy;
+ mkQueue.field_1C = _ladder_field_14;
+ mkQueue.flags = 14;
+ mkQueue.movementId = _ladmovements[pos]->movVars->varUpGo;
- return _aniHandler.genMovement(&mgminfo);
+ return _aniHandler.makeRunQueue(&mkQueue);
}
int ox = ani->_ox;
@@ -523,23 +523,23 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *ani, int xpos, int ypos, int
ani->getMovementById(_ladmovements[pos]->movVars->varUpStop)->calcSomeXY(point, 0, -1);
- mgminfo.ani = ani;
+ mkQueue.ani = ani;
if (staticsId)
- mgminfo.staticsId2 = staticsId;
+ mkQueue.staticsId2 = staticsId;
else
- mgminfo.staticsId2 = _ladmovements[pos]->staticIds[1];
+ mkQueue.staticsId2 = _ladmovements[pos]->staticIds[1];
- mgminfo.field_1C = _ladder_field_14;
- mgminfo.x1 = normx;
- mgminfo.y1 = normy;
- mgminfo.y2 = point.y + oy;
- mgminfo.x2 = point.x + ox;
- mgminfo.flags = 63;
- mgminfo.staticsId1 = _ladmovements[pos]->staticIds[0];
- mgminfo.movementId = _ladmovements[pos]->movVars->varDownGo;
+ mkQueue.field_1C = _ladder_field_14;
+ mkQueue.x1 = normx;
+ mkQueue.y1 = normy;
+ mkQueue.y2 = point.y + oy;
+ mkQueue.x2 = point.x + ox;
+ mkQueue.flags = 63;
+ mkQueue.staticsId1 = _ladmovements[pos]->staticIds[0];
+ mkQueue.movementId = _ladmovements[pos]->movVars->varDownGo;
- mq = _aniHandler.genMovement(&mgminfo);
+ mq = _aniHandler.makeRunQueue(&mkQueue);
ex = new ExCommand(ani->_id, 1, _ladmovements[pos]->movVars->varUpStop, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = ani->_okeyCode;
@@ -590,22 +590,22 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *ani, int xpos, int ypos, int
nx += point.x;
ny += point.y;
- mgminfo.ani = ani;
+ mkQueue.ani = ani;
if (staticsId)
- mgminfo.staticsId2 = staticsId;
+ mkQueue.staticsId2 = staticsId;
else
- mgminfo.staticsId2 = _ladmovements[pos]->staticIds[0];
+ mkQueue.staticsId2 = _ladmovements[pos]->staticIds[0];
- mgminfo.field_1C = _ladder_field_14;
- mgminfo.x1 = normx;
- mgminfo.y1 = normy;
- mgminfo.y2 = ny;
- mgminfo.x2 = nx;
- mgminfo.flags = 63;
- mgminfo.staticsId1 = _ladmovements[pos]->staticIds[1];
- mgminfo.movementId = _ladmovements[pos]->movVars->varUpGo;
+ mkQueue.field_1C = _ladder_field_14;
+ mkQueue.x1 = normx;
+ mkQueue.y1 = normy;
+ mkQueue.y2 = ny;
+ mkQueue.x2 = nx;
+ mkQueue.flags = 63;
+ mkQueue.staticsId1 = _ladmovements[pos]->staticIds[1];
+ mkQueue.movementId = _ladmovements[pos]->movVars->varUpGo;
- mq = _aniHandler.genMovement(&mgminfo);
+ mq = _aniHandler.makeRunQueue(&mkQueue);
ex = new ExCommand(ani->_id, 1, _ladmovements[pos]->movVars->varDownStop, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = ani->_okeyCode;
@@ -617,20 +617,20 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *ani, int xpos, int ypos, int
}
- mgminfo.ani = ani;
+ mkQueue.ani = ani;
if (staticsId)
- mgminfo.staticsId2 = staticsId;
+ mkQueue.staticsId2 = staticsId;
else
- mgminfo.staticsId2 = _ladmovements[pos]->staticIds[1];
+ mkQueue.staticsId2 = _ladmovements[pos]->staticIds[1];
- mgminfo.x1 = normx;
- mgminfo.y1 = normy;
- mgminfo.field_1C = _ladder_field_14;
- mgminfo.flags = 14;
- mgminfo.movementId = _ladmovements[pos]->movVars->varDownGo;
+ mkQueue.x1 = normx;
+ mkQueue.y1 = normy;
+ mkQueue.field_1C = _ladder_field_14;
+ mkQueue.flags = 14;
+ mkQueue.movementId = _ladmovements[pos]->movVars->varDownGo;
- return _aniHandler.genMovement(&mgminfo);
+ return _aniHandler.makeRunQueue(&mkQueue);
}
MessageQueue *MctlLadder::controllerWalkTo(StaticANIObject *ani, int off) {
@@ -807,7 +807,7 @@ void MovGraph::attachObject(StaticANIObject *obj) {
debugC(4, kDebugPathfinding, "MovGraph::attachObject(*%d)", obj->_id);
_aniHandler.clear();
- _aniHandler.addItem(obj->_id);
+ _aniHandler.attachObject(obj->_id);
for (uint i = 0; i < _items.size(); i++)
if (_items[i]->ani == obj)
@@ -819,7 +819,7 @@ void MovGraph::attachObject(StaticANIObject *obj) {
_items.push_back(item);
- _aniHandler.addItem(obj->_id); // FIXME: Is it really needed?
+ _aniHandler.attachObject(obj->_id); // FIXME: Is it really needed?
}
int MovGraph::detachObject(StaticANIObject *obj) {
@@ -1230,24 +1230,24 @@ MessageQueue *MovGraph::makeWholeQueue(StaticANIObject *ani, MovArr *movarr, int
}
}
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- memset(&mgminfo, 0, sizeof(mgminfo));
- mgminfo.ani = ani;
- mgminfo.staticsId2 = id2;
- mgminfo.staticsId1 = id1;
- mgminfo.x1 = nx;
- mgminfo.x2 = ox;
- mgminfo.y2 = oy;
- mgminfo.y1 = ny;
- mgminfo.field_1C = nd;
- mgminfo.movementId = st->link->_dwordArray1[_field_44 + st->sfield_0];
+ memset(&mkQueue, 0, sizeof(mkQueue));
+ mkQueue.ani = ani;
+ mkQueue.staticsId2 = id2;
+ mkQueue.staticsId1 = id1;
+ mkQueue.x1 = nx;
+ mkQueue.x2 = ox;
+ mkQueue.y2 = oy;
+ mkQueue.y1 = ny;
+ mkQueue.field_1C = nd;
+ mkQueue.movementId = st->link->_dwordArray1[_field_44 + st->sfield_0];
- mgminfo.flags = 0xe;
+ mkQueue.flags = 0xe;
if (mq)
- mgminfo.flags |= 0x31;
+ mkQueue.flags |= 0x31;
- MessageQueue *newmq = _aniHandler.genMovement(&mgminfo);
+ MessageQueue *newmq = _aniHandler.makeRunQueue(&mkQueue);
if (mq) {
if (newmq) {
@@ -2006,24 +2006,24 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
curX += mg2i->_mx;
curY += mg2i->_my;
} else {
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- memset(&mgminfo, 0, sizeof(mgminfo));
+ memset(&mkQueue, 0, sizeof(mkQueue));
- mgminfo.ani = _items2[movInfo->index]->_obj;
- mgminfo.staticsId2 = mg2i->_mov->_staticsObj2->_staticsId;
- mgminfo.x1 = movInfo->items[i + 1]->x;
- mgminfo.y1 = movInfo->items[i + 1]->y;
- mgminfo.field_1C = movInfo->items[i + 1]->distance;
- mgminfo.staticsId1 = mg2i->_mov->_staticsObj1->_staticsId;
+ mkQueue.ani = _items2[movInfo->index]->_obj;
+ mkQueue.staticsId2 = mg2i->_mov->_staticsObj2->_staticsId;
+ mkQueue.x1 = movInfo->items[i + 1]->x;
+ mkQueue.y1 = movInfo->items[i + 1]->y;
+ mkQueue.field_1C = movInfo->items[i + 1]->distance;
+ mkQueue.staticsId1 = mg2i->_mov->_staticsObj1->_staticsId;
- mgminfo.x2 = movInfo->items[i]->x;
- mgminfo.y2 = movInfo->items[i]->y;
- mgminfo.field_10 = 1;
- mgminfo.flags = 0x7f;
- mgminfo.movementId = mg2i->_movementId;
+ mkQueue.x2 = movInfo->items[i]->x;
+ mkQueue.y2 = movInfo->items[i]->y;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 0x7f;
+ mkQueue.movementId = mg2i->_movementId;
- MessageQueue *mq2 = _aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq2 = _aniHandler.makeRunQueue(&mkQueue);
mq->transferExCommands(mq2);
delete mq2;
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 4d7b337d43..d901d74289 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -396,20 +396,20 @@ void sceneHandler04_jumpOnLadder() {
g_fp->_aniMan->_flags |= 1;
AniHandler aniHandler;
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- aniHandler.addItem(ANI_MAN);
+ aniHandler.attachObject(ANI_MAN);
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.staticsId2 = ST_MAN_ONPLANK;
- mgminfo.x1 = 938;
- mgminfo.y1 = 442;
- mgminfo.field_1C = 10;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_MAN_JUMPONPLANK;
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.staticsId2 = ST_MAN_ONPLANK;
+ mkQueue.x1 = 938;
+ mkQueue.y1 = 442;
+ mkQueue.field_1C = 10;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_MAN_JUMPONPLANK;
- MessageQueue *mq = aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = aniHandler.makeRunQueue(&mkQueue);
if (mq) {
mq->_flags |= 1;
@@ -461,20 +461,20 @@ void sceneHandler04_dropBottle() {
void sceneHandler04_gotoLadder(ExCommand *ex) {
AniHandler aniHandler;
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- aniHandler.addItem(ANI_MAN);
+ aniHandler.attachObject(ANI_MAN);
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.staticsId2 = ST_MAN_UP;
- mgminfo.x1 = 1095;
- mgminfo.y1 = 434;
- mgminfo.field_1C = 12;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_MAN_PLANKTOLADDER;
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.staticsId2 = ST_MAN_UP;
+ mkQueue.x1 = 1095;
+ mkQueue.y1 = 434;
+ mkQueue.field_1C = 12;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_MAN_PLANKTOLADDER;
- MessageQueue *mq = aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = aniHandler.makeRunQueue(&mkQueue);
if (mq) {
mq->deleteExCommandByIndex(mq->getCount() - 1, 1);
@@ -551,20 +551,20 @@ void sceneHandler04_raisePlank() {
MessageQueue *sceneHandler04_kozFly3(StaticANIObject *ani, double phase) {
AniHandler aniHandler;
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- aniHandler.addItem(ANI_KOZAWKA);
+ aniHandler.attachObject(ANI_KOZAWKA);
- mgminfo.ani = ani;
- mgminfo.staticsId2 = ST_KZW_SIT;
- mgminfo.x1 = (int)(723.0 - phase * 185.0);
- mgminfo.y1 = 486;
- mgminfo.field_1C = 10;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_KZW_JUMP;
+ mkQueue.ani = ani;
+ mkQueue.staticsId2 = ST_KZW_SIT;
+ mkQueue.x1 = (int)(723.0 - phase * 185.0);
+ mkQueue.y1 = 486;
+ mkQueue.field_1C = 10;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_KZW_JUMP;
- MessageQueue *mq = aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = aniHandler.makeRunQueue(&mkQueue);
if (mq) {
ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0);
@@ -600,34 +600,34 @@ MessageQueue *sceneHandler04_kozFly3(StaticANIObject *ani, double phase) {
MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {
AniHandler aniHandler;
- MGMInfo mgminfo;
-
- aniHandler.addItem(ANI_KOZAWKA);
-
- mgminfo.ani = ani;
- mgminfo.staticsId2 = ST_KZW_JUMPOUT;
- mgminfo.x1 = 525;
- mgminfo.y1 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase);
- mgminfo.field_1C = 10;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_KZW_JUMPHIT;
-
- MessageQueue *mq1 = aniHandler.genMovement(&mgminfo);
-
- memset(&mgminfo, 0, sizeof(mgminfo));
- mgminfo.ani = ani;
- mgminfo.staticsId1 = ST_KZW_JUMPOUT;
- mgminfo.staticsId2 = ST_KZW_SIT;
- mgminfo.x2 = 525;
- mgminfo.y2 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase);
- mgminfo.y1 = 486;
- mgminfo.field_1C = 10;
- mgminfo.field_10 = 1;
- mgminfo.flags = 117;
- mgminfo.movementId = MV_KZW_JUMPOUT;
-
- MessageQueue *mq2 = aniHandler.genMovement(&mgminfo);
+ MakeQueueStruct mkQueue;
+
+ aniHandler.attachObject(ANI_KOZAWKA);
+
+ mkQueue.ani = ani;
+ mkQueue.staticsId2 = ST_KZW_JUMPOUT;
+ mkQueue.x1 = 525;
+ mkQueue.y1 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase);
+ mkQueue.field_1C = 10;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_KZW_JUMPHIT;
+
+ MessageQueue *mq1 = aniHandler.makeRunQueue(&mkQueue);
+
+ memset(&mkQueue, 0, sizeof(mkQueue));
+ mkQueue.ani = ani;
+ mkQueue.staticsId1 = ST_KZW_JUMPOUT;
+ mkQueue.staticsId2 = ST_KZW_SIT;
+ mkQueue.x2 = 525;
+ mkQueue.y2 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase);
+ mkQueue.y1 = 486;
+ mkQueue.field_1C = 10;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 117;
+ mkQueue.movementId = MV_KZW_JUMPOUT;
+
+ MessageQueue *mq2 = aniHandler.makeRunQueue(&mkQueue);
if (mq1 && mq2) {
mq1->addExCommandToEnd(mq2->getExCommandByIndex(0)->createClone());
@@ -671,20 +671,20 @@ MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {
MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) {
AniHandler aniHandler;
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- aniHandler.addItem(ANI_KOZAWKA);
+ aniHandler.attachObject(ANI_KOZAWKA);
- mgminfo.ani = ani;
- mgminfo.staticsId2 = ST_KZW_SIT;
- mgminfo.x1 = 397 - 4 * g_fp->_rnd->getRandomNumber(1);
- mgminfo.field_1C = ani->_priority;
- mgminfo.y1 = g_vars->scene04_bottle->_oy - 4 * g_fp->_rnd->getRandomNumber(1) + 109;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_KZW_JUMPROTATE;
+ mkQueue.ani = ani;
+ mkQueue.staticsId2 = ST_KZW_SIT;
+ mkQueue.x1 = 397 - 4 * g_fp->_rnd->getRandomNumber(1);
+ mkQueue.field_1C = ani->_priority;
+ mkQueue.y1 = g_vars->scene04_bottle->_oy - 4 * g_fp->_rnd->getRandomNumber(1) + 109;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_KZW_JUMPROTATE;
- MessageQueue *mq = aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = aniHandler.makeRunQueue(&mkQueue);
if (mq) {
mq->deleteExCommandByIndex(mq->getCount() - 1, 1);
@@ -729,20 +729,20 @@ void sceneHandler04_kozMove(Movement *mov, int from, int to, Common::Point *poin
MessageQueue *sceneHandler04_kozFly7(StaticANIObject *ani, double phase) {
AniHandler aniHandler;
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
- aniHandler.addItem(ANI_KOZAWKA);
+ aniHandler.attachObject(ANI_KOZAWKA);
- mgminfo.ani = ani;
- mgminfo.staticsId2 = 560;
- mgminfo.x1 = (int)(250.0 - phase * 100.0);
- mgminfo.y1 = 455;
- mgminfo.field_1C = 10;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_KZW_JUMPROTATE;
+ mkQueue.ani = ani;
+ mkQueue.staticsId2 = 560;
+ mkQueue.x1 = (int)(250.0 - phase * 100.0);
+ mkQueue.y1 = 455;
+ mkQueue.field_1C = 10;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_KZW_JUMPROTATE;
- MessageQueue *mq = aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = aniHandler.makeRunQueue(&mkQueue);
if (mq) {
sceneHandler04_kozMove(ani->getMovementById(MV_KZW_JUMPROTATE), 1, 9, g_vars->scene04_jumpRotateKozyawki, phase * 0.5 + 1.5);
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index e152286f48..471436200d 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -251,7 +251,7 @@ void sceneHandler11_manToSwing() {
g_vars->scene11_dudeOnSwing->startAnim(MV_MAN11_SWING_0, 0, -1);
g_vars->scene11_dudeOnSwing->_movement->setDynamicPhaseIndex(45);
- g_vars->scene11_aniHandler.addItem(g_fp->_aniMan->_id);
+ g_vars->scene11_aniHandler.attachObject(g_fp->_aniMan->_id);
g_fp->_currentScene->_x = 1400 - g_fp->_sceneRect.right;
@@ -385,7 +385,7 @@ void sceneHandler11_emptySwing() {
}
void sceneHandler11_jumpHitAndWin() {
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
sceneHandler11_emptySwing();
@@ -393,16 +393,16 @@ void sceneHandler11_jumpHitAndWin() {
MV_MAN11_JUMPHIT, 0);
g_fp->_aniMan->_priority = 10;
- mgminfo.field_1C = 10;
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.staticsId2 = ST_MAN_1PIX;
- mgminfo.x1 = 1400;
- mgminfo.y1 = 0;
- mgminfo.field_10 = 1;
- mgminfo.flags = 66;
- mgminfo.movementId = MV_MAN11_JUMPHIT;
+ mkQueue.field_1C = 10;
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.staticsId2 = ST_MAN_1PIX;
+ mkQueue.x1 = 1400;
+ mkQueue.y1 = 0;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 66;
+ mkQueue.movementId = MV_MAN11_JUMPHIT;
- MessageQueue *mq = g_vars->scene11_aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = g_vars->scene11_aniHandler.makeRunQueue(&mkQueue);
if (mq) {
g_vars->scene11_crySound = SND_11_024;
@@ -430,7 +430,7 @@ void sceneHandler11_jumpHitAndWin() {
}
void sceneHandler11_jumpOver(double angle) {
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
sceneHandler11_emptySwing();
@@ -438,16 +438,16 @@ void sceneHandler11_jumpOver(double angle) {
MV_MAN11_JUMPOVER, 0);
g_fp->_aniMan->_priority = 0;
- mgminfo.staticsId2 = ST_MAN_1PIX;
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.x1 = 1163;
- mgminfo.y1 = 837 - (int)(angle * 153.0);
- mgminfo.field_1C = 0;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_MAN11_JUMPOVER;
+ mkQueue.staticsId2 = ST_MAN_1PIX;
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.x1 = 1163;
+ mkQueue.y1 = 837 - (int)(angle * 153.0);
+ mkQueue.field_1C = 0;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_MAN11_JUMPOVER;
- MessageQueue *mq = g_vars->scene11_aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = g_vars->scene11_aniHandler.makeRunQueue(&mkQueue);
if (mq) {
g_vars->scene11_crySound = SND_11_022;
@@ -463,7 +463,7 @@ void sceneHandler11_jumpOver(double angle) {
}
void sceneHandler11_jumpHit(double angle) {
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
sceneHandler11_emptySwing();
@@ -478,16 +478,16 @@ void sceneHandler11_jumpHit(double angle) {
MV_MAN11_JUMPOVER, 0);
g_fp->_aniMan->_priority = 0;
- mgminfo.staticsId2 = ST_MAN_1PIX;
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.x1 = 1017 - (int)(angle * -214.0);
- mgminfo.y1 = 700;
- mgminfo.field_1C = 0;
- mgminfo.field_10 = 1;
- mgminfo.flags = 78;
- mgminfo.movementId = MV_MAN11_JUMPHIT;
+ mkQueue.staticsId2 = ST_MAN_1PIX;
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.x1 = 1017 - (int)(angle * -214.0);
+ mkQueue.y1 = 700;
+ mkQueue.field_1C = 0;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 78;
+ mkQueue.movementId = MV_MAN11_JUMPHIT;
- MessageQueue *mq = g_vars->scene11_aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = g_vars->scene11_aniHandler.makeRunQueue(&mkQueue);
if (mq) {
g_vars->scene11_crySound = SND_11_022;
diff --git a/engines/fullpipe/scenes/scene22.cpp b/engines/fullpipe/scenes/scene22.cpp
index ce060dce49..84cd5f9a9a 100644
--- a/engines/fullpipe/scenes/scene22.cpp
+++ b/engines/fullpipe/scenes/scene22.cpp
@@ -240,22 +240,22 @@ void sceneHandler22_stoolLogic(ExCommand *cmd) {
}
AniHandler mgm;
- MGMInfo mgminfo;
-
- mgm.addItem(ANI_MAN);
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.staticsId2 = ST_MAN_RIGHT;
- mgminfo.x1 = 934;
- mgminfo.y1 = 391;
- mgminfo.field_1C = 10;
- mgminfo.staticsId1 = 0x4145;
- mgminfo.x2 = 981;
- mgminfo.y2 = 390;
- mgminfo.field_10 = 1;
- mgminfo.flags = 127;
- mgminfo.movementId = rMV_MAN_TURN_SRL;
-
- mq = mgm.genMovement(&mgminfo);
+ MakeQueueStruct mkQueue;
+
+ mgm.attachObject(ANI_MAN);
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.staticsId2 = ST_MAN_RIGHT;
+ mkQueue.x1 = 934;
+ mkQueue.y1 = 391;
+ mkQueue.field_1C = 10;
+ mkQueue.staticsId1 = 0x4145;
+ mkQueue.x2 = 981;
+ mkQueue.y2 = 390;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = 127;
+ mkQueue.movementId = rMV_MAN_TURN_SRL;
+
+ mq = mgm.makeRunQueue(&mkQueue);
ExCommand *ex = mq->getExCommandByIndex(0);
diff --git a/engines/fullpipe/scenes/scene29.cpp b/engines/fullpipe/scenes/scene29.cpp
index c68553c490..28d06964a9 100644
--- a/engines/fullpipe/scenes/scene29.cpp
+++ b/engines/fullpipe/scenes/scene29.cpp
@@ -487,23 +487,23 @@ bool sceneHandler29_checkGreenBallHit(StaticANIObject *ani, int maxx) {
}
void sceneHandler29_manHit() {
- MGMInfo mgminfo;
+ MakeQueueStruct mkQueue;
g_vars->scene29_manIsHit = true;
g_fp->_aniMan->changeStatics2(ST_MAN29_RUNR);
g_fp->_aniMan->setOXY(g_vars->scene29_manX, g_vars->scene29_manY);
- mgminfo.ani = g_fp->_aniMan;
- mgminfo.staticsId2 = ST_MAN29_SITR;
- mgminfo.y1 = 463;
- mgminfo.x1 = g_vars->scene29_manX <= 638 ? 351 : 0;
- mgminfo.field_1C = 10;
- mgminfo.field_10 = 1;
- mgminfo.flags = (g_vars->scene29_manX <= 638 ? 2 : 0) | 0x44;
- mgminfo.movementId = MV_MAN29_HIT;
+ mkQueue.ani = g_fp->_aniMan;
+ mkQueue.staticsId2 = ST_MAN29_SITR;
+ mkQueue.y1 = 463;
+ mkQueue.x1 = g_vars->scene29_manX <= 638 ? 351 : 0;
+ mkQueue.field_1C = 10;
+ mkQueue.field_10 = 1;
+ mkQueue.flags = (g_vars->scene29_manX <= 638 ? 2 : 0) | 0x44;
+ mkQueue.movementId = MV_MAN29_HIT;
- MessageQueue *mq = g_vars->scene29_aniHandler.genMovement(&mgminfo);
+ MessageQueue *mq = g_vars->scene29_aniHandler.makeRunQueue(&mkQueue);
ExCommand *ex;
if (mq) {
@@ -728,7 +728,7 @@ void sceneHandler29_manToL() {
g_vars->scene29_arcadeIsOn = true;
- g_vars->scene29_aniHandler.addItem(g_fp->_aniMan->_id);
+ g_vars->scene29_aniHandler.attachObject(g_fp->_aniMan->_id);
g_fp->_updateScreenCallback = sceneHandler29_updateScreenCallback;
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index e02547795d..c81b84de43 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1040,7 +1040,7 @@ void StaticANIObject::adjustSomeXY() {
}
MessageQueue *StaticANIObject::changeStatics1(int msgNum) {
- g_fp->_aniHandler->addItem(_id);
+ g_fp->_aniHandler->attachObject(_id);
MessageQueue *mq = g_fp->_aniHandler->genMQ(this, msgNum, 0, 0, 0);
@@ -1071,7 +1071,7 @@ void StaticANIObject::changeStatics2(int objId) {
deleteFromGlobalMessageQueue();
if (_movement || _statics) {
- g_fp->_aniHandler->addItem(_id);
+ g_fp->_aniHandler->attachObject(_id);
g_fp->_aniHandler->updateAnimStatics(this, objId);
} else {
_statics = getStaticsById(objId);