[Scummvm-cvs-logs] scummvm master -> c50487a0e685901a00f7e8e06c45733403badc3a
sev-
sev at scummvm.org
Sat Feb 1 15:56:34 CET 2014
This automated email contains information about 13 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6bda79bfb8 FULLPIPE: Some more work on MGM::genMovement()
0e16b32e2c FULLPIPE: Firther simplification in MGM::genMovement()
68ed0179c4 FULLPIPE: MGM::genMovement() improvements
74850348d5 FULLPIPE: More work on MGM::genMovement()
3dbd8817c3 FULLPIPE: Implement lift_animateButton()
d8367d63cb FULLPIPE: Implement lift_closedoorSeq()
26960936b5 FULLPIPE: Implement lift_walkAndGo()
3b1f609439 FULLPIPE: Implement lift_openLift()
b5182581eb FULLPIPE: Implement lift_hoverButton(). This completes the lift.
86d5e8bd68 FULLPIPE: Implement inventory class destructors
b668304f06 FULLPIPE: Implement Inventory2::removeItem2()
b28e740adf FULLPIPE: Fix cursor drawing on the edges
c50487a0e6 FULLPIPE: Added more modal stubs
Commit: 6bda79bfb8d4c09acea0c830e43e4a10b38df253
https://github.com/scummvm/scummvm/commit/6bda79bfb8d4c09acea0c830e43e4a10b38df253
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:43-08:00
Commit Message:
FULLPIPE: Some more work on MGM::genMovement()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index e2565e8..319645a 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1867,10 +1867,10 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
v71 = (Message *)(28 * itemIdx);
v16 = items[itemIdx].objId;
v17 = *(_DWORD *)(v16 + offsetof(MGMItem, staticsListCount));
- point.x = *(_DWORD *)(v16 + offsetof(MGMItem, subItems));
- v18 = (MGMSubItem *)(point.x + 24 * (subIdx + st2idx * v17));
+ off = *(_DWORD *)(v16 + offsetof(MGMItem, subItems));
+ v18 = (MGMSubItem *)(off + 24 * (subIdx + st2idx * v17));
x1 = (int)&v18->movement->go.CObject.vmt;
- v19 = (MGMSubItem *)(point.x + 24 * (st1idx + subOffset * v17));
+ v19 = (MGMSubItem *)(off + 24 * (st1idx + subOffset * v17));
v69 = (LONG)&v19->movement->go.CObject.vmt;
if (subIdx != st2idx && !x1)
@@ -1891,110 +1891,90 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
v23 = mgminfo->y1;
v75 = v21;
v24 = v23 - v20 - v76 - v22;
- point.x = mgminfo->x1 - mgminfo->x2 - v21 - point1.x;
- v75 = point.x;
+ v99 = mgminfo->x1 - mgminfo->x2 - v21 - point1.x;
+ v75 = v99;
v76 = v24;
mov->calcSomeXY(&point1, 0);
v26 = point1.x;
- v56 = point1.x;
v27 = point1.y;
- v58 = point1.y;
if (mgminfo->flags & 0x40) {
v62 = mgminfo->field_10;
- v28 = v62;
a2 = -1;
point1.x = v62 * v26;
point1.y = v62 * v27;
} else {
- v29 = calcLength(&point, mov, point.x, v24, &v62, &a2, 1);
- point1.x = v29->x;
- v26 = v56;
- v30 = v29->y;
- v28 = v62;
- point1.y = v30;
+ calcLength(&point, mov, v99, v24, &v62, &a2, 1);
+ point1.x = point.x;
+ point1.y = point.y;
}
if (!(mgminfo->flags & 2)) {
v32 = point3.x + mgminfo->x2;
a2 = -1;
- point1.x = v28 * v26;
- v75 = v28 * v26;
- mgminfo->x1 = v28 * v26 + point2.x + v32;
+ point1.x = v62 * v26;
+ v75 = v62 * v26;
+ mgminfo->x1 = v62 * v26 + point2.x + v32;
}
if (!(mgminfo->flags & 4)) {
- point1.y = v28 * v58;
- v76 = v28 * v58;
- v33 = mgminfo->y2;
+ point1.y = v62 * v27;
+ v76 = v62 * v27;
a2 = -1;
- mgminfo->y1 = v33 + v28 * v58 + point2.y + point3.y;
+ mgminfo->y1 = mgminfo->y2 + v62 * v27 + point2.y + point3.y;
}
- v34 = 0;
- point.x = 0;
- v57 = 0;
+ int px = 0;
+ int py = 0;
if (x1) {
- v35 = countPhases(itemIdx, subIdx, st2idx, 1);
- v34 = v35;
- point.x = v35;
- v57 = countPhases(itemIdx, subIdx, st2idx, 2);
- v28 = v62;
+ px = countPhases(itemIdx, subIdx, st2idx, 1);
+ py = countPhases(itemIdx, subIdx, st2idx, 2);
}
- if (v28 > 1) {
- v36 = Movement_countPhasesWithFlag(mov, -1, 1);
- v34 += (v62 - 1) * v36;
- point.x = v34;
- v37 = Movement_countPhasesWithFlag(mov, -1, 2);
- v28 = v62;
- v57 += (v62 - 1) * v37;
+ if (v62 > 1) {
+ px += (v62 - 1) * mov->countPhasesWithFlag(-1, 1);
+ py += (v62 - 1) * mov->countPhasesWithFlag(-1, 2);
}
- if (v28 > 0) {
- v34 += Movement_countPhasesWithFlag(mov, a2, 1);
- point.x = v34;
- v57 += Movement_countPhasesWithFlag(mov, a2, 2);
+ if (v62 > 0) {
+ px += mov->countPhasesWithFlag(a2, 1);
+ py += mov->countPhasesWithFlag(a2, 2);
}
if (v69) {
- v34 += countPhases(itemIdx, st1idx, subOffset, 1);
- point.x = v34;
- v57 += countPhases(itemIdx, st1idx, subOffset, 2);
+ px += countPhases(itemIdx, st1idx, subOffset, 1);
+ py += countPhases(itemIdx, st1idx, subOffset, 2);
}
v69 = v75 - point1.x;
v38 = v76 - point1.y;
- v70 = v76 - point1.y;
- if (v34) {
- x1 = (signed __int64)((double)v69 / (double)point.x);
- v38 = v70;
+ if (px) {
+ x1 = (signed __int64)((double)v69 / (double)px);
} else {
x1 = 0;
}
- if (v57) {
- y1 = (signed __int64)((double)v70 / (double)v57);
- v38 = v70;
+ if (py) {
+ y1 = (signed __int64)((double)v38 / (double)py);
} else {
y1 = 0;
}
- y2 = v75 - point1.x - v34 * x1;
- v78 = v38 - v57 * y1;
+ y2 = v75 - point1.x - px * x1;
+ v78 = v38 - py * y1;
- if (v75 - point1.x == v34 * x1)
+ if (v75 - point1.x == px * x1)
x2 = 0;
else
- x2 = (v75 - point1.x - v34 * x1) / abs(v75 - point1.x - v34 * x1);
+ x2 = (v75 - point1.x - px * x1) / abs(v75 - point1.x - px * x1);
- if (v38 == v57 * y1)
+ if (v38 == py * y1)
v74 = 0;
else
- v74 = (v38 - v57 * y1) / abs(v38 - v57 * y1);
+ v74 = (v38 - py * y1) / abs(v38 - py * y1);
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand2 *ex2;
Commit: 0e16b32e2c4f0a05d65385ed48a530f85cad6aa7
https://github.com/scummvm/scummvm/commit/0e16b32e2c4f0a05d65385ed48a530f85cad6aa7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:43-08:00
Commit Message:
FULLPIPE: Firther simplification in MGM::genMovement()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 319645a..4247ded 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1879,19 +1879,12 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
if (st1idx != subOffset && !v69)
return 0;
- v20 = mgminfo->y2;
point2.x = v18->x;
point2.y = v18->y;
point3.x = v19->x;
point3.y = v19->y;
- point1.x = v19->x;
- v21 = v18->x;
- v22 = v19->y;
- v76 = v18->y;
- v23 = mgminfo->y1;
- v75 = v21;
- v24 = v23 - v20 - v76 - v22;
- v99 = mgminfo->x1 - mgminfo->x2 - v21 - point1.x;
+ v24 = mgminfo->y1 - mgminfo->y2 - v18->y - v19->y;
+ v99 = mgminfo->x1 - mgminfo->x2 - v18->x - v19->x;
v75 = v99;
v76 = v24;
Commit: 68ed0179c462fc5b74a0d9810cf2c7f9ab05c73e
https://github.com/scummvm/scummvm/commit/68ed0179c462fc5b74a0d9810cf2c7f9ab05c73e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:43-08:00
Commit Message:
FULLPIPE: MGM::genMovement() improvements
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 4247ded..4c1fe2d 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1879,14 +1879,8 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
if (st1idx != subOffset && !v69)
return 0;
- point2.x = v18->x;
- point2.y = v18->y;
- point3.x = v19->x;
- point3.y = v19->y;
- v24 = mgminfo->y1 - mgminfo->y2 - v18->y - v19->y;
- v99 = mgminfo->x1 - mgminfo->x2 - v18->x - v19->x;
- v75 = v99;
- v76 = v24;
+ v75 = mgminfo->x1 - mgminfo->x2 - v18->x - v19->x;
+ v76 = mgminfo->y1 - mgminfo->y2 - v18->y - v19->y;
mov->calcSomeXY(&point1, 0);
v26 = point1.x;
@@ -1894,28 +1888,27 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
if (mgminfo->flags & 0x40) {
v62 = mgminfo->field_10;
- a2 = -1;
+ len = -1;
point1.x = v62 * v26;
point1.y = v62 * v27;
} else {
- calcLength(&point, mov, v99, v24, &v62, &a2, 1);
+ calcLength(&point, mov, v75, v76, &v62, &len, 1);
point1.x = point.x;
point1.y = point.y;
}
if (!(mgminfo->flags & 2)) {
- v32 = point3.x + mgminfo->x2;
- a2 = -1;
+ len = -1;
point1.x = v62 * v26;
v75 = v62 * v26;
- mgminfo->x1 = v62 * v26 + point2.x + v32;
+ mgminfo->x1 = mgminfo->x2 + v62 * v26 + v18->x + v19->x;
}
if (!(mgminfo->flags & 4)) {
point1.y = v62 * v27;
v76 = v62 * v27;
- a2 = -1;
- mgminfo->y1 = mgminfo->y2 + v62 * v27 + point2.y + point3.y;
+ len = -1;
+ mgminfo->y1 = mgminfo->y2 + v62 * v27 + v18->y + v19->y;
}
int px = 0;
@@ -1932,8 +1925,8 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
}
if (v62 > 0) {
- px += mov->countPhasesWithFlag(a2, 1);
- py += mov->countPhasesWithFlag(a2, 2);
+ px += mov->countPhasesWithFlag(len, 1);
+ py += mov->countPhasesWithFlag(len, 2);
}
if (v69) {
@@ -1956,25 +1949,25 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
y1 = 0;
}
- y2 = v75 - point1.x - px * x1;
- v78 = v38 - py * y1;
+ y2.x = v69 - px * x1;
+ y2.y = v38 - py * y1;
if (v75 - point1.x == px * x1)
- x2 = 0;
+ x2.x = 0;
else
- x2 = (v75 - point1.x - px * x1) / abs(v75 - point1.x - px * x1);
+ x2.x = (v69 - px * x1) / abs(v69 - px * x1);
if (v38 == py * y1)
- v74 = 0;
+ x2.y = 0;
else
- v74 = (v38 - py * y1) / abs(v38 - py * y1);
+ x2.y = (v38 - py * y1) / abs(v38 - py * y1);
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand2 *ex2;
for (v42 = subIdx; v42 != st2idx; v42 = v43->staticsIndex) {
v43 = &(*(MGMSubItem **)((char *)&this->items->subItems + (unsigned int)v71))[v42 + st2idx * *(int *)((char *)&this->items->staticsListCount + (unsigned int)v71)];
- ex2 = buildExCommand2(v43->movement, mgminfo->ani->go._id, x1, y1, (POINT *)&x2, (POINT *)&y2, -1);
+ ex2 = buildExCommand2(v43->movement, mgminfo->ani->go._id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
ex2->_keyCode = mgminfo->ani->_okeyCode;
@@ -1982,12 +1975,14 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
}
for (i = 0; i < v62; ++i) {
+ int plen;
+
if (i == v62 - 1)
- v47 = a2;
+ plen = len;
else
- v47 = -1;
+ plen = -1;
- ex2 = buildExCommand2(mov, mgminfo->ani->_id, x1, y1, (POINT *)&x2, (POINT *)&y2, v47);
+ ex2 = buildExCommand2(mov, mgminfo->ani->_id, x1, y1, &x2, &y2, plen);
ex2->_parId = mq->_id;
ex2->_keyCode = mgminfo->ani->_okeyCode;
@@ -1997,7 +1992,7 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
for (j = st1idx; j != subOffset; j = v50->staticsIndex) {
v50 = &(*(MGMSubItem **)((char *)&this->items->subItems + (unsigned int)v71))[j + subOffset * *(int *)((char *)&this->items->staticsListCount + (unsigned int)v71)];
- ex2 = buildExCommand2(v50->movement, mgminfo->ani->_id, x1, y1, (POINT *)&x2, (POINT *)&y2, -1);
+ ex2 = buildExCommand2(v50->movement, mgminfo->ani->_id, x1, y1, &x2, &y2, -1);
ex2->_parId = mq->_id;
ex2->_keyCode = mgminfo->ani->_okeyCode;
Commit: 74850348d55bdf5e75d873039dfdb5d9781d39c5
https://github.com/scummvm/scummvm/commit/74850348d55bdf5e75d873039dfdb5d9781d39c5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:43-08:00
Commit Message:
FULLPIPE: More work on MGM::genMovement()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 4c1fe2d..61612a2 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1879,36 +1879,38 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
if (st1idx != subOffset && !v69)
return 0;
- v75 = mgminfo->x1 - mgminfo->x2 - v18->x - v19->x;
- v76 = mgminfo->y1 - mgminfo->y2 - v18->y - v19->y;
+ int n1x = mgminfo->x1 - mgminfo->x2 - v18->x - v19->x;
+ int n1y = mgminfo->y1 - mgminfo->y2 - v18->y - v19->y;
mov->calcSomeXY(&point1, 0);
- v26 = point1.x;
- v27 = point1.y;
+
+ int n2x = point1.x;
+ int n2y = point1.y;
+ int mult;
if (mgminfo->flags & 0x40) {
- v62 = mgminfo->field_10;
+ mult = mgminfo->field_10;
len = -1;
- point1.x = v62 * v26;
- point1.y = v62 * v27;
+ n2x *= mult;
+ n2y *= mult;
} else {
- calcLength(&point, mov, v75, v76, &v62, &len, 1);
- point1.x = point.x;
- point1.y = point.y;
+ calcLength(&point, mov, n1x, n1y, &mult, &len, 1);
+ n2x = point.x;
+ n2y = point.y;
}
if (!(mgminfo->flags & 2)) {
len = -1;
- point1.x = v62 * v26;
- v75 = v62 * v26;
- mgminfo->x1 = mgminfo->x2 + v62 * v26 + v18->x + v19->x;
+ n2x = mult * point1.x;
+ n1x = mult * point1.x;
+ mgminfo->x1 = mgminfo->x2 + mult * point1.x + v18->x + v19->x;
}
if (!(mgminfo->flags & 4)) {
- point1.y = v62 * v27;
- v76 = v62 * v27;
+ n2y = mult * point1.y;
+ n1y = mult * point1.y;
len = -1;
- mgminfo->y1 = mgminfo->y2 + v62 * v27 + v18->y + v19->y;
+ mgminfo->y1 = mgminfo->y2 + mult * point1.y + v18->y + v19->y;
}
int px = 0;
@@ -1919,12 +1921,12 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
py = countPhases(itemIdx, subIdx, st2idx, 2);
}
- if (v62 > 1) {
- px += (v62 - 1) * mov->countPhasesWithFlag(-1, 1);
- py += (v62 - 1) * mov->countPhasesWithFlag(-1, 2);
+ if (mult > 1) {
+ px += (mult - 1) * mov->countPhasesWithFlag(-1, 1);
+ py += (mult - 1) * mov->countPhasesWithFlag(-1, 2);
}
- if (v62 > 0) {
+ if (mult > 0) {
px += mov->countPhasesWithFlag(len, 1);
py += mov->countPhasesWithFlag(len, 2);
}
@@ -1934,33 +1936,33 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
py += countPhases(itemIdx, st1idx, subOffset, 2);
}
- v69 = v75 - point1.x;
- v38 = v76 - point1.y;
+ int dx1 = n1x - n2x;
+ int dy1 = n1y - n2y;
if (px) {
- x1 = (signed __int64)((double)v69 / (double)px);
+ x1 = (int)((double)dx1 / (double)px);
} else {
x1 = 0;
}
if (py) {
- y1 = (signed __int64)((double)v38 / (double)py);
+ y1 = (int)((double)dy1 / (double)py);
} else {
y1 = 0;
}
- y2.x = v69 - px * x1;
- y2.y = v38 - py * y1;
+ y2.x = dx1 - px * x1;
+ y2.y = dy1 - py * y1;
- if (v75 - point1.x == px * x1)
+ if (n1x - n2x == px * x1)
x2.x = 0;
else
- x2.x = (v69 - px * x1) / abs(v69 - px * x1);
+ x2.x = (dx1 - px * x1) / abs(dx1 - px * x1);
- if (v38 == py * y1)
+ if (dy1 == py * y1)
x2.y = 0;
else
- x2.y = (v38 - py * y1) / abs(v38 - py * y1);
+ x2.y = (dy1 - py * y1) / abs(dy1 - py * y1);
MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand2 *ex2;
@@ -1974,10 +1976,10 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
mq->addExCommandToEnd(ex2);
}
- for (i = 0; i < v62; ++i) {
+ for (i = 0; i < mult; ++i) {
int plen;
- if (i == v62 - 1)
+ if (i == mult - 1)
plen = len;
else
plen = -1;
@@ -2115,34 +2117,34 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
return 0;
}
-Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *x1, int *y1, int flag) {
+Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
Common::Point point;
mov->calcSomeXY(point, 0);
int p1x = point.x;
int p1y = point.y;
- int newx1 = 0;
- int oldy1 = *y1;
+ int newmult = 0;
+ int oldlen = *len;
if (abs(p1y) > abs(p1x)) {
if (mov->calcSomeXY(point, 0)->y)
- newx1 = (int)((double)y / point.y);
+ newmult = (int)((double)y / point.y);
} else if (mov->calcSomeXY(point, 0)->x) {
- newx1 = (int)((double)x / point.y);
+ newmult = (int)((double)x / point.y);
}
- if (newx1 < 0)
- newx1 = 0;
+ if (newmult < 0)
+ newmult = 0;
- *x1 = newx1;
+ *mult = newmult;
int phase = 1;
int sz;
if (flag) {
if (abs(p1y) > abs(p1x)) {
- while (abs(p1y * newx1 + mov->calcSomeXY(point, 0)->y) < abs(y)) {
+ while (abs(p1y * newmult + mov->calcSomeXY(point, 0)->y) < abs(y)) {
sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
if (phase >= sz) {
@@ -2154,7 +2156,7 @@ Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y,
phase++;
}
} else {
- while (abs(p1x * newx1 + mov->calcSomeXY(point, 0)->x) < abs(x)) {
+ while (abs(p1x * newmult + mov->calcSomeXY(point, 0)->x) < abs(x)) {
sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
if (phase >= sz) {
@@ -2167,19 +2169,19 @@ Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y,
}
}
- *y1 = phase - 1;
+ *len = phase - 1;
} else {
- *y1 = -1;
+ *len = -1;
}
int p2x = 0;
int p2y = 0;
- if (!oldy1)
- oldy1 = -1;
+ if (!oldlen)
+ oldlen = -1;
- if (oldy1 > 0) {
- ++*x1;
+ if (oldlen > 0) {
+ ++*mult;
mov->calcSomeXY(point, 0);
p2x = point.x;
@@ -2191,8 +2193,8 @@ Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y,
p2y = p1y;
}
- pRes->x = p2x + p1x * newx1;
- pRes->y = p2y + p1y * newx1;
+ pRes->x = p2x + p1x * newmult;
+ pRes->y = p2y + p1y * newmult;
return pRes;
}
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 6ad46e7..8ca1cdf 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -176,7 +176,7 @@ public:
int getStaticsIndex(int idx, Statics *st);
void clearMovements2(int idx);
int recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop);
- Common::Point *calcLength(Common::Point *point, Movement *mov, int x, int y, int *x1, int *y1, int flag);
+ 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);
};
Commit: 3dbd8817c35e155229888d9be81e241f8e99ad10
https://github.com/scummvm/scummvm/commit/3dbd8817c35e155229888d9be81e241f8e99ad10
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:43-08:00
Commit Message:
FULLPIPE: Implement lift_animateButton()
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/fullpipe.h
engines/fullpipe/lift.cpp
engines/fullpipe/scenes/scene03.cpp
engines/fullpipe/scenes/scene06.cpp
engines/fullpipe/scenes/scene10.cpp
engines/fullpipe/scenes/scene14.cpp
engines/fullpipe/scenes/scene15.cpp
engines/fullpipe/scenes/scene30.cpp
engines/fullpipe/scenes/scene32.cpp
engines/fullpipe/scenes/scene34.cpp
engines/fullpipe/scenes/scene35.cpp
engines/fullpipe/scenes/scene38.cpp
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 788ff84..47416f9 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -218,6 +218,7 @@ namespace Fullpipe {
#define SC_MAP 5222
#define SC_TITLES 5166
#define SND_CMN_031 3516
+#define SND_CMN_032 3517
#define SND_CMN_060 4921
#define SND_CMN_061 4922
#define SND_CMN_070 5199
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 1e58327..ae03d2b 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -288,7 +288,7 @@ public:
void lift_clickButton();
void lift_walkAndGo();
void lift_goAnimation();
- void lift_sub1(StaticANIObject *ani);
+ void lift_animateButton(StaticANIObject *button);
void lift_startExitQueue();
void lift_sub05(ExCommand *ex);
bool lift_checkButton(const char *varname);
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 95cbaeb..cb8be5f 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -338,8 +338,41 @@ void FullpipeEngine::lift_goAnimation() { if (_lastLiftButton) {
}
}
-void FullpipeEngine::lift_sub1(StaticANIObject *ani) {
- warning("STUB: FullpipeEngine::lift_sub1()");
+void FullpipeEngine::lift_animateButton(StaticANIObject *button) {
+ int butId = lift_getButtonIdP(button->_statics->_staticsId);
+
+ if (butId && butId != button->_statics->_staticsId) {
+ if (button == _lastLiftButton) {
+ playSound(SND_CMN_032, 0);
+ } else {
+ if (_lastLiftButton) {
+ int id = lift_getButtonIdN(_lastLiftButton->_statics->_staticsId);
+
+ if (id)
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(id);
+
+ _lastLiftButton = 0;
+ }
+
+ if (_aniMan->isIdle() && !(_aniMan->_flags & 0x100)) {
+ _lastLiftButton = button;
+ button->_statics = button->getStaticsById(butId);
+
+ ExCommand *ex = new ExCommand(0, 35, SND_CMN_032, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ ex->_field_14 = 1;
+ ex->postMessage();
+
+ int id = lift_getButtonIdH(_lastLiftButton->_statics->_staticsId);
+
+ if (id) {
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(id);
+
+ lift_walkAndGo();
+ }
+ }
+ }
+ }
}
void FullpipeEngine::lift_startExitQueue() {
diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index 9ba84a5..b2b9180 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -246,7 +246,7 @@ int sceneHandler03(ExCommand *ex) {
{
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
ex->_messageKind = 0;
return 0;
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 7d637d8..fa2712d 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -647,7 +647,7 @@ int sceneHandler06(ExCommand *ex) {
if (st) {
if (!g_vars->scene06_arcadeEnabled && st->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(st);
+ g_fp->lift_animateButton(st);
ex->_messageKind = 0;
return 0;
}
diff --git a/engines/fullpipe/scenes/scene10.cpp b/engines/fullpipe/scenes/scene10.cpp
index 9c00902..2a694e1 100644
--- a/engines/fullpipe/scenes/scene10.cpp
+++ b/engines/fullpipe/scenes/scene10.cpp
@@ -185,7 +185,7 @@ int sceneHandler10(ExCommand *ex) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
ex->_messageKind = 0;
return 0;
diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp
index ab04879..543522e 100644
--- a/engines/fullpipe/scenes/scene14.cpp
+++ b/engines/fullpipe/scenes/scene14.cpp
@@ -820,7 +820,7 @@ int sceneHandler14(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
break;
}
diff --git a/engines/fullpipe/scenes/scene15.cpp b/engines/fullpipe/scenes/scene15.cpp
index 1558976..588868a 100644
--- a/engines/fullpipe/scenes/scene15.cpp
+++ b/engines/fullpipe/scenes/scene15.cpp
@@ -171,7 +171,7 @@ int sceneHandler15(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
}
diff --git a/engines/fullpipe/scenes/scene30.cpp b/engines/fullpipe/scenes/scene30.cpp
index a807e69..d305da8 100644
--- a/engines/fullpipe/scenes/scene30.cpp
+++ b/engines/fullpipe/scenes/scene30.cpp
@@ -123,7 +123,7 @@ int sceneHandler30(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
}
diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp
index 597d342..383df0d 100644
--- a/engines/fullpipe/scenes/scene32.cpp
+++ b/engines/fullpipe/scenes/scene32.cpp
@@ -403,7 +403,7 @@ int sceneHandler32(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
break;
diff --git a/engines/fullpipe/scenes/scene34.cpp b/engines/fullpipe/scenes/scene34.cpp
index b3e0db7..82c6e6d 100644
--- a/engines/fullpipe/scenes/scene34.cpp
+++ b/engines/fullpipe/scenes/scene34.cpp
@@ -426,7 +426,7 @@ int sceneHandler34(ExCommand *cmd) {
}
if (ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index f10786b..b800f9c 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -208,7 +208,7 @@ int sceneHandler35(ExCommand *cmd) {
if (ani)
if (ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
break;
}
diff --git a/engines/fullpipe/scenes/scene38.cpp b/engines/fullpipe/scenes/scene38.cpp
index 016dc83..4dc6f21 100644
--- a/engines/fullpipe/scenes/scene38.cpp
+++ b/engines/fullpipe/scenes/scene38.cpp
@@ -376,7 +376,7 @@ int sceneHandler38(ExCommand *cmd) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(g_fp->_sceneRect.left + cmd->_x, g_fp->_sceneRect.top + cmd->_y);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fp->lift_sub1(ani);
+ g_fp->lift_animateButton(ani);
cmd->_messageKind = 0;
}
Commit: d8367d63cbbe4f8244db2809e0951d35dd06c85b
https://github.com/scummvm/scummvm/commit/d8367d63cbbe4f8244db2809e0951d35dd06c85b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:43-08:00
Commit Message:
FULLPIPE: Implement lift_closedoorSeq()
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/lift.cpp
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 47416f9..9188217 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -256,6 +256,7 @@ namespace Fullpipe {
#define ST_LBN_8P 2775
#define ST_LBN_9P 2778
#define ST_LFT_CLOSED 1049
+#define ST_LFT_OPEN_NEW 1071
#define ST_MAN_EMPTY 476
#define ST_MAN_GOU 459
#define ST_MAN_RIGHT 325
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index cb8be5f..068e9c3 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -278,7 +278,40 @@ void FullpipeEngine::lift_exitSeq(ExCommand *cmd) {
}
void FullpipeEngine::lift_closedoorSeq() {
- warning("STUB: FullpipeEngine::lift_closedoorSeq()");
+ if (_lift->_movement) {
+ if (_lift->_movement->_id == MV_LFT_CLOSE) {
+ _lift->queueMessageQueue(0);
+ } else if (_lift->_movement->_id == MV_LFT_OPEN) {
+ int ph = _lift->_movement->_currDynamicPhaseIndex;
+
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+
+ if (_lift->_movement->_currMovement)
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_currMovement->_dynamicPhases.size() - ph);
+ else
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_dynamicPhases.size() - ph);
+ } else {
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+ }
+ } else {
+ if (_lift->_statics->_staticsId == ST_LFT_CLOSED ) {
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ } else {
+ _lift->startAnim(MV_LFT_CLOSE, 0, -1);
+ }
+ }
+
+ MessageQueue *mq = new MessageQueue(_globalMessageQueueList->compact());
+ ExCommand *ex = new ExCommand(0, 17, MSG_LIFT_GO, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ if (!mq->chain(_lift))
+ delete mq;
}
void FullpipeEngine::lift_walkAndGo() {
Commit: 26960936b5be75a8a77cea8449bceadfb6687a15
https://github.com/scummvm/scummvm/commit/26960936b5be75a8a77cea8449bceadfb6687a15
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Implement lift_walkAndGo()
Changed paths:
engines/fullpipe/fullpipe.h
engines/fullpipe/lift.cpp
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index ae03d2b..dc27f73 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -292,6 +292,7 @@ public:
void lift_startExitQueue();
void lift_sub05(ExCommand *ex);
bool lift_checkButton(const char *varname);
+ void lift_openLift();
GameVar *_musicGameVar;
Audio::SoundHandle _sceneTrackHandle;
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 068e9c3..d4aeef2 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -30,6 +30,7 @@
#include "fullpipe/statics.h"
#include "fullpipe/messages.h"
#include "fullpipe/gameloader.h"
+#include "fullpipe/motion.h"
namespace Fullpipe {
@@ -315,7 +316,50 @@ void FullpipeEngine::lift_closedoorSeq() {
}
void FullpipeEngine::lift_walkAndGo() {
- warning("STUB: FullpipeEngine::lift_walkAndGo()");
+ MessageQueue *mq;
+ ExCommand *ex;
+
+ if (abs(_liftX - _aniMan->_ox) > 1 || abs(_liftY - _aniMan->_oy) > 1 || _aniMan->_movement || _aniMan->_statics->_staticsId != ST_MAN_UP) {
+ mq = getCurrSceneSc2MotionController()->method34(_aniMan, _liftX, _liftY, 1, ST_MAN_UP);
+
+ if (mq) {
+ ex = new ExCommand(0, 17, MSG_LIFT_CLICKBUTTON, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+
+ mq->addExCommandToEnd(ex);
+ }
+ } else {
+ lift_openLift();
+
+ mq = new MessageQueue(_liftEnterMQ, 0, 0);
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ ex = new ExCommand(_aniMan->_id, 2, 15, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_excFlags |= 2;
+ mq->addExCommand(ex);
+
+ ex = new ExCommand(_aniMan->_id, 5, -1, 0, 0, 0, 1, 0, 0, 0);
+ ex->_keyCode = _aniMan->_okeyCode;
+ ex->_field_14 = _lift->_priority + 1;
+ ex->_x = -1;
+ ex->_y = -1;
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ ex = new ExCommand(0, 17, MSG_LIFT_CLOSEDOOR, 0, 0, 0, 1, 0, 0, 0);
+ ex->_excFlags |= 3;
+ mq->addExCommandToEnd(ex);
+
+ mq->chain(0);
+
+ _aniMan->_flags |= 1;
+ }
+}
+
+void FullpipeEngine::lift_openLift() {
+ warning("STUB: FullpipeEngine::lift_openLift()");
}
void FullpipeEngine::lift_clickButton() {
Commit: 3b1f60943990ee8ee0ff8f447287a72bdc014fe8
https://github.com/scummvm/scummvm/commit/3b1f60943990ee8ee0ff8f447287a72bdc014fe8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Implement lift_openLift()
Changed paths:
engines/fullpipe/lift.cpp
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index d4aeef2..54d3bb6 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -359,7 +359,28 @@ void FullpipeEngine::lift_walkAndGo() {
}
void FullpipeEngine::lift_openLift() {
- warning("STUB: FullpipeEngine::lift_openLift()");
+ if (_lift->_movement) {
+ if (_lift->_movement->_id == MV_LFT_OPEN) {
+ _lift->queueMessageQueue(0);
+ } else if (_lift->_movement->_id == MV_LFT_CLOSE) {
+ int idx = _lift->_movement->_currDynamicPhaseIndex;
+
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+
+ if (_lift->_movement->_currMovement)
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_currMovement->_dynamicPhases.size() - idx);
+ else
+ _lift->_movement->setDynamicPhaseIndex(_lift->_movement->_dynamicPhases.size() - idx);
+ } else {
+ _lift->changeStatics2(ST_LFT_CLOSED);
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+ }
+ } else if (_lift->_statics->_staticsId == ST_LFT_OPEN_NEW) {
+ _lift->changeStatics2(ST_LFT_OPEN_NEW);
+ } else {
+ _lift->startAnim(MV_LFT_OPEN, 0, -1);
+ }
}
void FullpipeEngine::lift_clickButton() {
Commit: b5182581eb9828c9edc0aebdc5e8dafc946f6e3e
https://github.com/scummvm/scummvm/commit/b5182581eb9828c9edc0aebdc5e8dafc946f6e3e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Implement lift_hoverButton(). This completes the lift.
Changed paths:
engines/fullpipe/fullpipe.h
engines/fullpipe/lift.cpp
engines/fullpipe/scenes/scene03.cpp
engines/fullpipe/scenes/scene06.cpp
engines/fullpipe/scenes/scene10.cpp
engines/fullpipe/scenes/scene14.cpp
engines/fullpipe/scenes/scene15.cpp
engines/fullpipe/scenes/scene30.cpp
engines/fullpipe/scenes/scene32.cpp
engines/fullpipe/scenes/scene34.cpp
engines/fullpipe/scenes/scene35.cpp
engines/fullpipe/scenes/scene38.cpp
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index dc27f73..3a43f69 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -290,7 +290,7 @@ public:
void lift_goAnimation();
void lift_animateButton(StaticANIObject *button);
void lift_startExitQueue();
- void lift_sub05(ExCommand *ex);
+ void lift_hoverButton(ExCommand *ex);
bool lift_checkButton(const char *varname);
void lift_openLift();
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 54d3bb6..8acea6a 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -479,8 +479,13 @@ void FullpipeEngine::lift_startExitQueue() {
mq->chain(0);
}
-void FullpipeEngine::lift_sub05(ExCommand *ex) {
- warning("STUB: FullpipeEngine::lift_sub05()");
+void FullpipeEngine::lift_hoverButton(ExCommand *cmd) {
+ if (_lastLiftButton) {
+ if (!(cmd->_keyCode & 2) || _liftX != cmd->_x || _liftY != cmd->_y) {
+ _lastLiftButton->_statics = _lastLiftButton->getStaticsById(lift_getButtonIdN(_lastLiftButton->_statics->_staticsId));
+ _lastLiftButton = 0;
+ }
+ }
}
bool FullpipeEngine::lift_checkButton(const char *varName) {
diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index b2b9180..5d22931 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -239,7 +239,7 @@ int sceneHandler03(ExCommand *ex) {
break;
case 64:
- g_fp->lift_sub05(ex);
+ g_fp->lift_hoverButton(ex);
break;
case 29:
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index fa2712d..83b98c2 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -622,7 +622,7 @@ int sceneHandler06(ExCommand *ex) {
break;
case 64:
- g_fp->lift_sub05(ex);
+ g_fp->lift_hoverButton(ex);
break;
case MSG_SC6_TAKEBALL:
diff --git a/engines/fullpipe/scenes/scene10.cpp b/engines/fullpipe/scenes/scene10.cpp
index 2a694e1..4f9e627 100644
--- a/engines/fullpipe/scenes/scene10.cpp
+++ b/engines/fullpipe/scenes/scene10.cpp
@@ -170,7 +170,7 @@ int sceneHandler10(ExCommand *ex) {
break;
case 64:
- g_fp->lift_sub05(ex);
+ g_fp->lift_hoverButton(ex);
break;
case 29:
diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp
index 543522e..28f054f 100644
--- a/engines/fullpipe/scenes/scene14.cpp
+++ b/engines/fullpipe/scenes/scene14.cpp
@@ -749,7 +749,7 @@ int sceneHandler14(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 33:
diff --git a/engines/fullpipe/scenes/scene15.cpp b/engines/fullpipe/scenes/scene15.cpp
index 588868a..9e11df9 100644
--- a/engines/fullpipe/scenes/scene15.cpp
+++ b/engines/fullpipe/scenes/scene15.cpp
@@ -156,7 +156,7 @@ int sceneHandler15(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 29:
diff --git a/engines/fullpipe/scenes/scene30.cpp b/engines/fullpipe/scenes/scene30.cpp
index d305da8..39a51de 100644
--- a/engines/fullpipe/scenes/scene30.cpp
+++ b/engines/fullpipe/scenes/scene30.cpp
@@ -111,7 +111,7 @@ int sceneHandler30(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case MSG_LIFT_GO:
diff --git a/engines/fullpipe/scenes/scene32.cpp b/engines/fullpipe/scenes/scene32.cpp
index 383df0d..be7c983 100644
--- a/engines/fullpipe/scenes/scene32.cpp
+++ b/engines/fullpipe/scenes/scene32.cpp
@@ -339,7 +339,7 @@ int sceneHandler32(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case MSG_SC6_INSTHANDLE:
diff --git a/engines/fullpipe/scenes/scene34.cpp b/engines/fullpipe/scenes/scene34.cpp
index 82c6e6d..0e690f4 100644
--- a/engines/fullpipe/scenes/scene34.cpp
+++ b/engines/fullpipe/scenes/scene34.cpp
@@ -392,7 +392,7 @@ int sceneHandler34(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case MSG_LIFT_GO:
diff --git a/engines/fullpipe/scenes/scene35.cpp b/engines/fullpipe/scenes/scene35.cpp
index b800f9c..a42849e 100644
--- a/engines/fullpipe/scenes/scene35.cpp
+++ b/engines/fullpipe/scenes/scene35.cpp
@@ -199,7 +199,7 @@ int sceneHandler35(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 29:
diff --git a/engines/fullpipe/scenes/scene38.cpp b/engines/fullpipe/scenes/scene38.cpp
index 4dc6f21..7fb0be8 100644
--- a/engines/fullpipe/scenes/scene38.cpp
+++ b/engines/fullpipe/scenes/scene38.cpp
@@ -368,7 +368,7 @@ int sceneHandler38(ExCommand *cmd) {
break;
case 64:
- g_fp->lift_sub05(cmd);
+ g_fp->lift_hoverButton(cmd);
break;
case 29:
Commit: 86d5e8bd6820aee3c124bf0d4c6c25ba31bd42e0
https://github.com/scummvm/scummvm/commit/86d5e8bd6820aee3c124bf0d4c6c25ba31bd42e0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Implement inventory class destructors
Changed paths:
engines/fullpipe/inventory.cpp
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index f5af061..f9255a5 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -31,7 +31,7 @@
namespace Fullpipe {
Inventory::~Inventory() {
- warning("STUB: Inventory::~Inventory()");
+ _itemsPool.clear();
}
bool Inventory::load(MfcArchive &file) {
@@ -90,7 +90,7 @@ Inventory2::Inventory2() {
}
Inventory2::~Inventory2() {
- warning("STUB: Inventory2::~Inventory2()");
+ removeMessageHandler(125, -1);
}
bool Inventory2::loadPartial(MfcArchive &file) { // Inventory2_SerializePartially
Commit: b668304f064c7798e382373adc210e57e5ce6a8f
https://github.com/scummvm/scummvm/commit/b668304f064c7798e382373adc210e57e5ce6a8f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Implement Inventory2::removeItem2()
Changed paths:
engines/fullpipe/inventory.cpp
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index f9255a5..cf12a82 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -123,7 +123,25 @@ void Inventory2::removeItem(int itemId, int count) {
}
void Inventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) {
- warning("STUB: void removeItem2(sc, %d, %d, %d, %d)", itemId, x, y, priority);
+ int idx = getInventoryItemIndexById(itemId);
+
+ if (idx >= 0) {
+ if (_inventoryItems[idx]->itemId >> 16) {
+ removeItem(itemId, 1);
+
+ Scene *sc = g_fp->accessScene(_sceneId);
+
+ if (sc) {
+ StaticANIObject *ani = new StaticANIObject(sc->getStaticANIObject1ById(itemId, -1));
+
+ sceneObj->addStaticANIObject(ani, 1);
+
+ ani->_statics = (Statics *)ani->_staticsList[0];
+ ani->setOXY(x, y);
+ ani->_priority = priority;
+ }
+ }
+ }
}
int Inventory2::getCountItemsWithId(int itemId) {
Commit: b28e740adf3155031cae54267536944f81cd3866
https://github.com/scummvm/scummvm/commit/b28e740adf3155031cae54267536944f81cd3866
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Fix cursor drawing on the edges
Changed paths:
engines/fullpipe/gfx.cpp
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 2d68600..d72419b 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -979,6 +979,9 @@ void Bitmap::putDibCB(int32 *palette) {
byte *srcPtr = &_pixels[pitch * (endy - _y)];
+ if (endy - _y < _height)
+ srcPtr = &_pixels[pitch * (_height - 1)];
+
int starty = _y;
if (starty < 0) {
starty = 0;
@@ -992,7 +995,7 @@ void Bitmap::putDibCB(int32 *palette) {
}
if (_flags & 0x1000000) {
- for (int y = starty; y < endy; srcPtr -= pitch, y++) {
+ for (int y = starty; y <= endy; srcPtr -= pitch, y++) {
curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y);
copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format);
}
Commit: c50487a0e685901a00f7e8e06c45733403badc3a
https://github.com/scummvm/scummvm/commit/c50487a0e685901a00f7e8e06c45733403badc3a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-02-01T06:55:44-08:00
Commit Message:
FULLPIPE: Added more modal stubs
Changed paths:
engines/fullpipe/modal.h
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 438e341..72d439f 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -161,6 +161,42 @@ public:
virtual void saveload() {}
};
+class ModalHelp : public BaseModalObject {
+public:
+ ModalHelp();
+ virtual ~ModalHelp() {}
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message) { return false; }
+ virtual bool init(int counterdiff) { return true; }
+ virtual void update() {}
+ virtual void saveload() {}
+};
+
+class ModalQuery : public BaseModalObject {
+public:
+ ModalQuery();
+ virtual ~ModalQuery() {}
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message) { return false; }
+ virtual bool init(int counterdiff) { return true; }
+ virtual void update() {}
+ virtual void saveload() {}
+};
+
+class ModalSaveGame : public BaseModalObject {
+public:
+ ModalSaveGame();
+ virtual ~ModalSaveGame() {}
+
+ virtual bool pollEvent() { return true; }
+ virtual bool handleMessage(ExCommand *message) { return false; }
+ virtual bool init(int counterdiff) { return true; }
+ virtual void update() {}
+ virtual void saveload() {}
+};
+
} // End of namespace Fullpipe
More information about the Scummvm-git-logs
mailing list