diff options
| author | Eugene Sandulenko | 2016-09-07 12:12:31 +0200 | 
|---|---|---|
| committer | Eugene Sandulenko | 2016-09-07 12:12:31 +0200 | 
| commit | a021b4c7e8c811f56c522e69f1723d29d7c36cc7 (patch) | |
| tree | ee7f2ae3496416003ed9dff505cae01275a58e0a | |
| parent | 5dddde199fef11650f635c666dd797df011fcdb3 (diff) | |
| download | scummvm-rg350-a021b4c7e8c811f56c522e69f1723d29d7c36cc7.tar.gz scummvm-rg350-a021b4c7e8c811f56c522e69f1723d29d7c36cc7.tar.bz2 scummvm-rg350-a021b4c7e8c811f56c522e69f1723d29d7c36cc7.zip | |
FULLPIPE: Added and using StaticANIObject::isPixelHitAtPos()
| -rw-r--r-- | engines/fullpipe/scene.cpp | 3 | ||||
| -rw-r--r-- | engines/fullpipe/scenes/scene09.cpp | 2 | ||||
| -rw-r--r-- | engines/fullpipe/statics.cpp | 4 | ||||
| -rw-r--r-- | engines/fullpipe/statics.h | 1 | 
4 files changed, 7 insertions, 3 deletions
| diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 71990f7916..1d693fcebd 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -601,10 +601,9 @@ StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) {  	for (uint i = 0; i < _staticANIObjectList1.size(); i++) {  		StaticANIObject *p = _staticANIObjectList1[i]; -		int pixel;  		if ((p->_field_8 & 0x100) && (p->_flags & 4) && -				p->getPixelAtPos(x, y, &pixel) && +				p->isPixelHitAtPos(x, y) &&  				(!res || res->_priority > p->_priority))  			res = p;  	} diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp index aaa430d077..fe9051e540 100644 --- a/engines/fullpipe/scenes/scene09.cpp +++ b/engines/fullpipe/scenes/scene09.cpp @@ -369,7 +369,7 @@ void sceneHandler09_checkHangerCollide() {  		for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {  			for (int j = 0; j < 4; j++) { -				hit = g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y, 0, true); +				hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y);  				if (hit) {  					sceneHandler09_ballExplode(b); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index a1f91bc9db..fe1f1e2d01 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -458,6 +458,10 @@ Movement *StaticANIObject::getMovementByName(char *name) {  	return 0;  } +bool StaticANIObject::isPixelHitAtPos(int x, int y) { +	return getPixelAtPos(x, y, 0, true); +} +  bool StaticANIObject::getPixelAtPos(int x, int y, int *pixel, bool hitOnly) {  	bool res = false;  	Picture *pic; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 5082d501b3..6206fef4de 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -258,6 +258,7 @@ public:  	void changeStatics2(int objId);  	bool getPixelAtPos(int x, int y, int *pixel, bool hitOnly = false); +	bool isPixelHitAtPos(int x, int y);  };  struct MovTable { | 
