aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/neverhood/module1600.cpp27
-rw-r--r--engines/neverhood/module1600.h1
-rw-r--r--engines/neverhood/module2700.cpp10
-rw-r--r--engines/neverhood/module2700.h2
4 files changed, 4 insertions, 36 deletions
diff --git a/engines/neverhood/module1600.cpp b/engines/neverhood/module1600.cpp
index c14e2b34ee..db8eeab4ab 100644
--- a/engines/neverhood/module1600.cpp
+++ b/engines/neverhood/module1600.cpp
@@ -210,7 +210,6 @@ AsCommonCar::AsCommonCar(NeverhoodEngine *vm, Scene *parentScene, int16 x, int16
_newDeltaXType = -1;
_soundCounter = 0;
_pathPoints = NULL;
- _rectList = NULL; // TODO Check if this is used
startAnimation(0xD4220027, 0, -1);
setDoDeltaX(getGlobalVar(V_CAR_DELTA_X));
@@ -408,7 +407,6 @@ void AsCommonCar::stCarAtHome() {
_isIdle = false;
_isMoving = false;
_rectFlag = false;
- _rectList = NULL;
NextState(&AsCommonCar::stLeanForwardIdle);
startAnimation(0x35698F78, 0, -1);
setDoDeltaX(doDeltaX ? 1 : 0);
@@ -452,27 +450,10 @@ void AsCommonCar::updateMovement() {
SetUpdateHandler(&AsCommonCar::update);
SetMessageHandler(&AsCommonCar::hmAnimation);
NextState(&AsCommonCar::stUpdateMoveDirection);
- } else {
- bool inRect = false;
- uint index = 0;
- if (_rectList && _rectList->size() > 0) {
- while (index < _rectList->size()) {
- NRect r = (*_rectList)[index];
- if (_x >= r.x1 && _x <= r.x2 && _y >= r.y1 && _y <= r.y2)
- break;
- }
- if (index < _rectList->size() && !_rectFlag)
- inRect = true;
- _rectFlag = index < _rectList->size();
- }
- if (inRect) {
- gotoNextState();
- stHandleRect();
- } else if (_newMoveDirection != _currMoveDirection && _isMoving && !_isBusy) {
- gotoNextState();
- _currMoveDirection = _newMoveDirection;
- stUpdateMoveDirection();
- }
+ } else if (_newMoveDirection != _currMoveDirection && _isMoving && !_isBusy) {
+ gotoNextState();
+ _currMoveDirection = _newMoveDirection;
+ stUpdateMoveDirection();
}
}
diff --git a/engines/neverhood/module1600.h b/engines/neverhood/module1600.h
index 28aad133d8..2a7d547551 100644
--- a/engines/neverhood/module1600.h
+++ b/engines/neverhood/module1600.h
@@ -50,7 +50,6 @@ public:
protected:
Scene *_parentScene;
NPointArray *_pathPoints;
- NRectArray *_rectList;
int _newMoveDirection;
int _currMoveDirection;
int _exitDirection;
diff --git a/engines/neverhood/module2700.cpp b/engines/neverhood/module2700.cpp
index a625f87033..9a8a2f973d 100644
--- a/engines/neverhood/module2700.cpp
+++ b/engines/neverhood/module2700.cpp
@@ -918,11 +918,6 @@ Scene2703::Scene2703(NeverhoodEngine *vm, Module *parentModule, int which, uint3
_trackPoints = _dataResource.getPointArray(sceneInfo->pointListName);
_asCar->setPathPoints(_trackPoints);
- if (sceneInfo->rectListName) {
- _rectList = _dataResource.getRectArray(sceneInfo->rectListName);
- // TODO _asCar->setPathRects(_rectList);
- }
-
if (which == _which2) {
NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1];
sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
@@ -1042,11 +1037,6 @@ Scene2704::Scene2704(NeverhoodEngine *vm, Module *parentModule, int which, uint3
_trackPoints = _dataResource.getPointArray(sceneInfo->pointListName);
_asCar->setPathPoints(_trackPoints);
- if (sceneInfo->rectListName) {
- _rectList = _dataResource.getRectArray(sceneInfo->rectListName);
- // TODO _asCar->setPathRects(_rectList);
- }
-
if (which == _which2) {
NPoint testPoint = (*_trackPoints)[_trackPoints->size() - 1];
sendMessage(_asCar, 0x2002, _trackPoints->size() - 1);
diff --git a/engines/neverhood/module2700.h b/engines/neverhood/module2700.h
index d17d12cfc5..68c471c58d 100644
--- a/engines/neverhood/module2700.h
+++ b/engines/neverhood/module2700.h
@@ -133,7 +133,6 @@ protected:
int _palStatus;
int _which1, _which2;
NPointArray *_trackPoints;
- NRectArray *_rectList;
void update();
uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
};
@@ -151,7 +150,6 @@ protected:
Sprite *_asCarConnectorShadow;
int _which1, _which2;
NPointArray *_trackPoints;
- NRectArray *_rectList;
void update();
uint32 handleMessage(int messageNum, const MessageParam &param, Entity *sender);
};