[Scummvm-cvs-logs] scummvm master -> 5b2acd514f5c8f83efdb61e84805d785bef0a9d2

sev- sev at scummvm.org
Sat Jan 4 00:03:00 CET 2014


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
25aa1b72d9 FULLPIPE: Renames in class MovGraphReact
b87d052d01 FULLPIPE: Implement MovGraphReact::setCenter()
5d18c50168 FULLPIPE: Implement Floaters::init()
ac0e6749ba FULLPIPE: Implement Floaters::genFlies()
6854decc00 FULLPIPE: Implement Floaters::stopAll()
5b2acd514f FULLPIPE: Implement Floaters::update()


Commit: 25aa1b72d95505514ea3e6b6d1c342972891a4a0
    https://github.com/scummvm/scummvm/commit/25aa1b72d95505514ea3e6b6d1c342972891a4a0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-03T12:43:46-08:00

Commit Message:
FULLPIPE: Renames in class MovGraphReact

Changed paths:
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 9e978c9..f82fe53 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2027,20 +2027,20 @@ void ReactParallel::createRegion() {
 	// GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2);
 }
 
-void ReactParallel::method14() {
-	warning("STUB: ReactParallel::method14()");
+void ReactParallel::setCenter() {
+	warning("STUB: ReactParallel::setCenter()");
 }
 
 ReactPolygonal::ReactPolygonal() {
-	_field_C = 0;
-	_field_10 = 0;
+	_centerX = 0;
+	_centerY = 0;
 }
 
 bool ReactPolygonal::load(MfcArchive &file) {
 	debug(5, "ReactPolygonal::load()");
 
-	_field_C = file.readUint32LE();
-	_field_10 = file.readUint32LE();
+	_centerX = file.readUint32LE();
+	_centerY = file.readUint32LE();
 	_pointCount = file.readUint32LE();
 
 	if (_pointCount > 0) {
@@ -2067,8 +2067,8 @@ void ReactPolygonal::createRegion() {
 	}
 }
 
-void ReactPolygonal::method14() {
-	warning("STUB: ReactPolygonal::method14()");
+void ReactPolygonal::setCenter() {
+	warning("STUB: ReactPolygonal::setCenter()");
 }
 
 bool MovGraphReact::pointInRegion(int x, int y) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 1f1e7a7..e482c0c 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -74,7 +74,7 @@ public:
 	MovGraphReact() : _pointCount(0), _points(0) {}
 	~MovGraphReact() { free(_points); }
 
-	virtual void method14() {}
+	virtual void setCenter() {}
 	virtual void createRegion() {}
 	virtual bool pointInRegion(int x, int y);
 };
@@ -247,20 +247,20 @@ class ReactParallel : public MovGraphReact {
 	ReactParallel();
 	virtual bool load(MfcArchive &file);
 
-	virtual void method14();
+	virtual void setCenter();
 	virtual void createRegion();
 };
 
 class ReactPolygonal : public MovGraphReact {
 	//CRgn _rgn;
-	int _field_C;
-	int _field_10;
+	int _centerX;
+	int _centerY;
 
   public:
 	ReactPolygonal();
 	virtual bool load(MfcArchive &file);
 
-	virtual void method14();
+	virtual void setCenter();
 	virtual void createRegion();
 };
 


Commit: b87d052d01adde493bc1af3c1b68c07a1623582b
    https://github.com/scummvm/scummvm/commit/b87d052d01adde493bc1af3c1b68c07a1623582b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-03T12:54:51-08:00

Commit Message:
FULLPIPE: Implement MovGraphReact::setCenter()

Changed paths:
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index f82fe53..0696794 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2027,8 +2027,11 @@ void ReactParallel::createRegion() {
 	// GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2);
 }
 
-void ReactParallel::setCenter() {
-	warning("STUB: ReactParallel::setCenter()");
+void ReactParallel::setCenter(int x1, int y1, int x2, int y2) {
+	_x1 = x1;
+	_y1 = y1;
+	_x2 = x2;
+	_y2 = y2;
 }
 
 ReactPolygonal::ReactPolygonal() {
@@ -2067,8 +2070,19 @@ void ReactPolygonal::createRegion() {
 	}
 }
 
-void ReactPolygonal::setCenter() {
-	warning("STUB: ReactPolygonal::setCenter()");
+void ReactPolygonal::setCenter(int x1, int y1, int x2, int y2) {
+	int cX = (x2 + x1) / 2;
+	int cY = (y2 + y1) / 2;
+
+	if (_points) {
+		for (int i = 0; i < _pointCount; i++) {
+			_points[i]->x += cX - _centerX;
+			_points[i]->y += cY - _centerY;
+		}
+	}
+
+	_centerX = cX;
+	_centerY = cY;
 }
 
 bool MovGraphReact::pointInRegion(int x, int y) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index e482c0c..1c8f17e 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -74,7 +74,7 @@ public:
 	MovGraphReact() : _pointCount(0), _points(0) {}
 	~MovGraphReact() { free(_points); }
 
-	virtual void setCenter() {}
+	virtual void setCenter(int x1, int y1, int x2, int y2) {}
 	virtual void createRegion() {}
 	virtual bool pointInRegion(int x, int y);
 };
@@ -243,11 +243,11 @@ class ReactParallel : public MovGraphReact {
 	int _dx;
 	int _dy;
 
-  public:
+public:
 	ReactParallel();
 	virtual bool load(MfcArchive &file);
 
-	virtual void setCenter();
+	virtual void setCenter(int x1, int y1, int x2, int y2);
 	virtual void createRegion();
 };
 
@@ -256,11 +256,11 @@ class ReactPolygonal : public MovGraphReact {
 	int _centerX;
 	int _centerY;
 
-  public:
+public:
 	ReactPolygonal();
 	virtual bool load(MfcArchive &file);
 
-	virtual void setCenter();
+	virtual void setCenter(int x1, int y1, int x2, int y2);
 	virtual void createRegion();
 };
 


Commit: 5d18c50168b24607ee24777692d3c7a7fb4156ea
    https://github.com/scummvm/scummvm/commit/5d18c50168b24607ee24777692d3c7a7fb4156ea
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-03T13:25:37-08:00

Commit Message:
FULLPIPE: Implement Floaters::init()

Changed paths:
    engines/fullpipe/floaters.cpp
    engines/fullpipe/floaters.h
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp
index 384bfa2..7e807ad 100644
--- a/engines/fullpipe/floaters.cpp
+++ b/engines/fullpipe/floaters.cpp
@@ -22,11 +22,66 @@
 
 #include "fullpipe/fullpipe.h"
 #include "fullpipe/floaters.h"
+#include "fullpipe/utils.h"
+#include "fullpipe/objects.h"
+#include "fullpipe/motion.h"
+#include "fullpipe/objectnames.h"
 
 namespace Fullpipe {
 
+Floaters::~Floaters() {
+	delete _hRgn;
+}
+
 void Floaters::init(GameVar *var) {
-	warning("STUB: Floaters::init()");
+	_array1.clear();
+	_array2.clear();
+
+	GameVar *varFliers = var->getSubVarByName(sO_Fliers);
+
+	if (!varFliers)
+		return;
+
+	GameVar *sub = varFliers->getSubVarByName("flyIdleRegion");
+
+	if (sub) {
+		_hRgn = new ReactPolygonal();
+
+		_hRgn->_pointCount = sub->getSubVarsCount();
+		_hRgn->_points = (Common::Point **)malloc(sizeof(Common::Point *) * _hRgn->_pointCount);
+
+		sub = sub->_subVars;
+
+		int idx = 0;
+
+		while (sub) {
+			_hRgn->_points[idx] = new Common::Point;
+			_hRgn->_points[idx]->x = sub->_subVars->_value.intValue;
+			_hRgn->_points[idx]->y = sub->_subVars->_nextVarObj->_value.intValue;
+
+			idx++;
+			sub = sub->_nextVarObj;
+		}
+	}
+
+	sub = varFliers->getSubVarByName("flyIdlePath");
+
+	if (sub) {
+		_array1.reserve(sub->getSubVarsCount());
+
+		sub = sub->_subVars;
+
+		int idx = 0;
+
+		while (sub) {
+			_array1[idx]->val1 = sub->_subVars->_value.intValue;
+			_array1[idx]->val2 = sub->_subVars->_nextVarObj->_value.intValue;
+
+			idx++;
+			sub = sub->_nextVarObj;
+		}
+
+	}
 }
 
 void Floaters::genFlies(Scene *sc, int x, int y, int a5, int a6) {
diff --git a/engines/fullpipe/floaters.h b/engines/fullpipe/floaters.h
index a4d64dd..6611f40 100644
--- a/engines/fullpipe/floaters.h
+++ b/engines/fullpipe/floaters.h
@@ -27,6 +27,7 @@ namespace Fullpipe {
 
 class StaticANIObject;
 class Scene;
+class ReactPolygonal;
 
 struct FloaterArray1 {
 	int val1;
@@ -52,10 +53,12 @@ struct FloaterArray2 {
 
 class Floaters {
 public:
-	//HRGN hRgn;
+	ReactPolygonal *_hRgn;
 	Common::Array<FloaterArray1 *> _array1;
 	Common::Array<FloaterArray2 *> _array2;
 
+	Floaters() { _hRgn = 0; }
+	~Floaters();
 	void init(GameVar *var);
 	void genFlies(Scene *sc, int x, int y, int a5, int a6);
 	void update();
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 1c8f17e..6ca24a3 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -29,6 +29,7 @@ class Statics;
 class Movement;
 class MctlConnectionPoint;
 class MovGraphLink;
+class MessageQueue;
 
 int startWalkTo(int objId, int objKey, int x, int y, int a5);
 int doSomeAnimation(int objId, int objKey, int a3);


Commit: ac0e6749ba0f87e95f5b510998b62caac7857d45
    https://github.com/scummvm/scummvm/commit/ac0e6749ba0f87e95f5b510998b62caac7857d45
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-03T13:58:31-08:00

Commit Message:
FULLPIPE: Implement Floaters::genFlies()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/floaters.cpp
    engines/fullpipe/floaters.h



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index af09d1d..b88e5e8 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -25,6 +25,11 @@
 
 namespace Fullpipe {
 
+// Common
+#define ANI_FLY 4916
+#define MV_FLY_FLY 4917
+#define ST_FLY_FLY 4918
+
 #define ANI_BALLDROP 2685
 #define ANI_BATUTA 737
 #define ANI_BIGBALL 4923
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp
index 7e807ad..9c4db80 100644
--- a/engines/fullpipe/floaters.cpp
+++ b/engines/fullpipe/floaters.cpp
@@ -25,6 +25,9 @@
 #include "fullpipe/utils.h"
 #include "fullpipe/objects.h"
 #include "fullpipe/motion.h"
+#include "fullpipe/statics.h"
+#include "fullpipe/scene.h"
+#include "fullpipe/constants.h"
 #include "fullpipe/objectnames.h"
 
 namespace Fullpipe {
@@ -84,8 +87,39 @@ void Floaters::init(GameVar *var) {
 	}
 }
 
-void Floaters::genFlies(Scene *sc, int x, int y, int a5, int a6) {
-	warning("STUB: Floaters::genFlies()");
+void Floaters::genFlies(Scene *sc, int x, int y, int priority, int flags) {
+	StaticANIObject *ani = new StaticANIObject(g_fp->accessScene(SC_COMMON)->getStaticANIObject1ById(ANI_FLY, -1));
+
+	ani->_statics = ani->getStaticsById(ST_FLY_FLY);
+	ani->_movement = 0;
+	ani->setOXY(x, y);
+	ani->_flags |= 4;
+	ani->_priority = priority;
+
+	sc->addStaticANIObject(ani, 1);
+
+	ani->startAnim(MV_FLY_FLY, 0, -1);
+
+	int nummoves;
+
+	if (ani->_movement->_currMovement)
+		nummoves = ani->_movement->_currMovement->_dynamicPhases.size();
+	else
+		nummoves = ani->_movement->_dynamicPhases.size();
+
+	ani->_movement->setDynamicPhaseIndex(g_fp->_rnd->getRandomNumber(nummoves));
+
+	FloaterArray2 *arr2 = new FloaterArray2;
+
+	arr2->ani = ani;
+	arr2->val11 = 15.0;
+	arr2->val3 = y;
+	arr2->val5 = y;
+	arr2->val2 = x;
+	arr2->val4 = x;
+	arr2->fflags = flags;
+
+	_array2.push_back(arr2);
 }
 
 void Floaters::update() {
diff --git a/engines/fullpipe/floaters.h b/engines/fullpipe/floaters.h
index 6611f40..3ecbbee 100644
--- a/engines/fullpipe/floaters.h
+++ b/engines/fullpipe/floaters.h
@@ -32,6 +32,8 @@ class ReactPolygonal;
 struct FloaterArray1 {
 	int val1;
 	int val2;
+
+	FloaterArray1() { val1 = 0; val2 = 0; }
 };
 
 struct FloaterArray2 {
@@ -49,6 +51,9 @@ struct FloaterArray2 {
 	int countdown;
 	int val15;
 	int fflags;
+
+	FloaterArray2() : ani(0), val2(0), val3(0), val4(0), val5(0), val6(0), val7(0), val8(0),
+		val9(0.0), val11(0.0), val13(0), countdown(0), val15(0), fflags(0) {}
 };
 
 class Floaters {
@@ -60,7 +65,7 @@ public:
 	Floaters() { _hRgn = 0; }
 	~Floaters();
 	void init(GameVar *var);
-	void genFlies(Scene *sc, int x, int y, int a5, int a6);
+	void genFlies(Scene *sc, int x, int y, int priority, int flags);
 	void update();
 	void stopAll();
 };


Commit: 6854decc0089dc42a69600cf826cc1d323b8681b
    https://github.com/scummvm/scummvm/commit/6854decc0089dc42a69600cf826cc1d323b8681b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-03T14:06:53-08:00

Commit Message:
FULLPIPE: Implement Floaters::stopAll()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/floaters.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index b88e5e8..73fa3b0 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -28,6 +28,7 @@ namespace Fullpipe {
 // Common
 #define ANI_FLY 4916
 #define MV_FLY_FLY 4917
+#define SND_CMN_060 4921
 #define ST_FLY_FLY 4918
 
 #define ANI_BALLDROP 2685
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp
index 9c4db80..1a9e52c 100644
--- a/engines/fullpipe/floaters.cpp
+++ b/engines/fullpipe/floaters.cpp
@@ -127,7 +127,15 @@ void Floaters::update() {
 }
 
 void Floaters::stopAll() {
-	warning("STUB: Floaters::stopAll()");
+	for (uint i = 0; i < _array2.size(); i++) {
+		g_fp->_currentScene->deleteStaticANIObject(_array2[i]->ani);
+
+		delete _array2[i]->ani;
+	}
+
+	_array2.clear();
+
+	g_fp->stopAllSoundInstances(SND_CMN_060);
 }
 
 


Commit: 5b2acd514f5c8f83efdb61e84805d785bef0a9d2
    https://github.com/scummvm/scummvm/commit/5b2acd514f5c8f83efdb61e84805d785bef0a9d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-01-03T15:02:12-08:00

Commit Message:
FULLPIPE: Implement Floaters::update()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/floaters.cpp
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 73fa3b0..d75aa3d 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -29,6 +29,7 @@ namespace Fullpipe {
 #define ANI_FLY 4916
 #define MV_FLY_FLY 4917
 #define SND_CMN_060 4921
+#define SND_CMN_061 4922
 #define ST_FLY_FLY 4918
 
 #define ANI_BALLDROP 2685
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp
index 1a9e52c..b405e33 100644
--- a/engines/fullpipe/floaters.cpp
+++ b/engines/fullpipe/floaters.cpp
@@ -123,7 +123,116 @@ void Floaters::genFlies(Scene *sc, int x, int y, int priority, int flags) {
 }
 
 void Floaters::update() {
-	warning("STUB: Floaters::update()");
+	for (int i = 0; i < _array2.size(); ++i) {
+		if (_array2[i]->val13 <= 0) {
+			if (_array2[i]->val4 != _array2[i]->val2 || _array2[i]->val5 != _array2[i]->val3) {
+				if (_array2[i]->val9 < 2.0)
+					_array2[i]->val9 = 2.0;
+
+				int dy = _array2[i]->val3 - _array2[i]->val5;
+				int dx = _array2[i]->val2 - _array2[i]->val4;
+				double dst = sqrt((double)(dy * dy + dx * dx));
+				double at = atan2((double)dx, (double)dy);
+				int newX = (int)(cos(at) * _array2[i]->val9);
+				int newY = (int)(sin(at) * _array2[i]->val9);
+
+				if (dst < _array2[i]->val9) {
+					newX = _array2[i]->val2 - _array2[i]->val4;
+					newY = _array2[i]->val3 - _array2[i]->val5;
+				}
+				if (dst <= 30.0) {
+					if (dst < 30.0) {
+						_array2[i]->val9 = _array2[i]->val9 - _array2[i]->val9 * 0.5;
+
+						if (_array2[i]->val9 < 2.0)
+							_array2[i]->val9 = 2.0;
+					}
+				} else {
+					_array2[i]->val9 = _array2[i]->val9 * 0.5 + _array2[i]->val9;
+
+					if (_array2[i]->val9 > _array2[i]->val11)
+						_array2[i]->val9 = _array2[i]->val11;
+				}
+
+				_array2[i]->val4 += newX;
+				_array2[i]->val5 += newY;
+				_array2[i]->ani->setOXY(newX + _array2[i]->ani->_ox, newY + _array2[i]->ani->_oy);
+
+				if (_array2[i]->val4 == _array2[i]->val2 && _array2[i]->val5 == _array2[i]->val3) {
+					_array2[i]->val9 = 0.0;
+
+					_array2[i]->val13 = g_fp->_rnd->getRandomNumber(200) + 20;
+
+					if (_array2[i]->fflags & 1) {
+						g_fp->_currentScene->deleteStaticANIObject(_array2[i]->ani);
+
+						if (_array2[i]->ani)
+							delete _array2[i]->ani;
+
+						_array2.remove_at(i);
+
+						i--;
+
+						if (!_array2.size())
+							g_fp->stopAllSoundInstances(SND_CMN_060);
+
+						continue;
+					}
+				}
+			} else {
+				if ((_array2[i]->fflags & 4) && _array2[i]->countdown < 1) {
+					_array2[i]->fflags |= 1;
+					_array2[i]->val2 = _array2[i]->val6;
+					_array2[i]->val3 = _array2[i]->val7;
+				} else {
+					if (_array2[i]->fflags & 2) {
+						int idx1 = g_fp->_rnd->getRandomNumber(_array1.size());
+
+						_array2[i]->val2 = _array1[idx1]->val1;
+						_array2[i]->val3 = _array1[idx1]->val2;
+					} else {
+						Common::Rect rect;
+
+						if (!_hRgn)
+							error("Floaters::update(): empty fliers region");
+
+						_hRgn->getBBox(&rect);
+
+						int x2 = rect.left + g_fp->_rnd->getRandomNumber(rect.right - rect.left);
+						int y2 = rect.top + g_fp->_rnd->getRandomNumber(rect.bottom - rect.top);
+
+						if (_hRgn->pointInRegion(x2, y2)) {
+							int dx = _array2[i]->val2 - x2;
+							int dy = _array2[i]->val3 - y2;
+							double dst = sqrt((double)(dy * dy + dx * dx));
+
+							if (dst < 300.0 || !_hRgn->pointInRegion(_array2[i]->val4, _array2[i]->val5)) {
+								_array2[i]->val2 = x2;
+								_array2[i]->val3 = y2;
+							}
+						}
+					}
+
+					g_fp->playSound(SND_CMN_061, 0);
+
+					if (_array2[i]->fflags & 4)
+						_array2[i]->countdown--;
+				}
+			}
+		} else {
+			_array2[i]->val13--;
+		}
+
+		if (!_array2[i]->ani->_movement && _array2[i]->ani->_statics->_staticsId == ST_FLY_FLY) {
+			if (!_array2[i]->val15) {
+				g_fp->playSound(SND_CMN_060, 1);
+
+				_array2[i]->val15 = 1;
+			}
+
+			_array2[i]->ani->startAnim(MV_FLY_FLY, 0, -1);
+		}
+	}
 }
 
 void Floaters::stopAll() {
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 0696794..6e4c1b6 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2037,6 +2037,11 @@ void ReactParallel::setCenter(int x1, int y1, int x2, int y2) {
 ReactPolygonal::ReactPolygonal() {
 	_centerX = 0;
 	_centerY = 0;
+	_bbox = 0;
+}
+
+ReactPolygonal::~ReactPolygonal() {
+	delete _bbox;
 }
 
 bool ReactPolygonal::load(MfcArchive &file) {
@@ -2085,6 +2090,39 @@ void ReactPolygonal::setCenter(int x1, int y1, int x2, int y2) {
 	_centerY = cY;
 }
 
+void ReactPolygonal::getBBox(Common::Rect *rect) {
+	if (!_pointCount)
+		return;
+
+	if (_bbox) {
+		*rect = *_bbox;
+		return;
+	}
+
+	rect->left = _points[0]->x;
+	rect->top = _points[0]->y;
+	rect->right = _points[0]->x;
+	rect->bottom = _points[0]->y;
+
+	for (int i = 1; i < _pointCount; i++) {
+		if (rect->left > _points[i]->x)
+			rect->left = _points[i]->x;
+
+		if (rect->top < _points[i]->y)
+			rect->top = _points[i]->y;
+
+		if (rect->right < _points[i]->x)
+			rect->right = _points[i]->x;
+
+		if (rect->bottom > _points[i]->y)
+			rect->bottom = _points[i]->y;
+	}
+
+	_bbox = new Common::Rect;
+	*_bbox = *rect;
+}
+
+
 bool MovGraphReact::pointInRegion(int x, int y) {
 	if (_pointCount < 3) {
 		return false;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 6ca24a3..1e813ee 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -253,16 +253,20 @@ public:
 };
 
 class ReactPolygonal : public MovGraphReact {
-	//CRgn _rgn;
+	Common::Rect *_bbox;
 	int _centerX;
 	int _centerY;
 
 public:
 	ReactPolygonal();
+	~ReactPolygonal();
+
 	virtual bool load(MfcArchive &file);
 
 	virtual void setCenter(int x1, int y1, int x2, int y2);
 	virtual void createRegion();
+
+	void getBBox(Common::Rect *rect);
 };
 
 class MovGraphLink : public CObject {






More information about the Scummvm-git-logs mailing list