diff options
author | Strangerke | 2013-04-05 01:27:09 +0200 |
---|---|---|
committer | Strangerke | 2013-04-05 07:54:55 +0200 |
commit | 0b16ea3f3b21012d4a5c9dcf857827e35038fe16 (patch) | |
tree | 6ec053a216886ae923d4fdb8094fb27bc7401100 /engines | |
parent | e79a51c20894a74ac6ed8914daccfeedbfb28849 (diff) | |
download | scummvm-rg350-0b16ea3f3b21012d4a5c9dcf857827e35038fe16.tar.gz scummvm-rg350-0b16ea3f3b21012d4a5c9dcf857827e35038fe16.tar.bz2 scummvm-rg350-0b16ea3f3b21012d4a5c9dcf857827e35038fe16.zip |
HOPKINS: Remove useless casts, fix 2 crashes
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/globals.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 98 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 54 |
4 files changed, 81 insertions, 79 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index c6dbb2d372..83cfa44106 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -106,7 +106,7 @@ Globals::Globals(HopkinsEngine *vm) { // Initialize pointers _levelSpriteBuf = NULL; - _saveData = (Savegame *)NULL; + _saveData = NULL; _answerBuffer = NULL; _characterSpriteBuf = NULL; _optionDialogSpr = NULL; @@ -172,7 +172,7 @@ void Globals::clearAll() { _vm->_dialogsManager->clearAll(); _answerBuffer = NULL; _levelSpriteBuf = NULL; - _saveData = (Savegame *)NULL; + _saveData = NULL; _vm->_objectsManager->_curObjectIndex = 0; _vm->_linesManager->clearAll(); diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index e60efdcc25..23a5a62812 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -2097,7 +2097,7 @@ void HopkinsEngine::playEnding() { _globals->_cityMapEnabledFl = false; _globals->_eventMode = EVENTMODE_IGNORE; _soundManager->playSound(26); - _linesManager->_route = (RouteItem *)NULL; + _linesManager->_route = NULL; _globals->_freezeCharacterFl = true; _globals->_exitId = 0; _soundManager->loadSample(1, "SOUND90.WAV"); @@ -2830,7 +2830,7 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi _graphicsManager->SETCOLOR3(251, 100, 100, 100); _graphicsManager->SETCOLOR3(254, 0, 0, 0); _objectsManager->animateSprite(0); - _linesManager->_route = (RouteItem *)NULL; + _linesManager->_route = NULL; _eventsManager->mouseOn(); _eventsManager->changeMouseCursor(4); diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 16a0a9c029..e5d8ffae0f 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -67,11 +67,11 @@ LinesManager::LinesManager(HopkinsEngine *vm) { _lastLine = 0; _maxLineIdx = 0; _pathFindingMaxDepth = 0; - _testRoute0 = (RouteItem *)NULL; - _testRoute1 = (RouteItem *)NULL; - _testRoute2 = (RouteItem *)NULL; - _lineBuf = (int16 *)NULL; - _route = (RouteItem *)NULL; + _testRoute0 = NULL; + _testRoute1 = NULL; + _testRoute2 = NULL; + _lineBuf = NULL; + _route = NULL; _currentSegmentId = 0; _largeBuf = NULL; _zoneSkipCount = 0; @@ -89,11 +89,11 @@ LinesManager::LinesManager(HopkinsEngine *vm) { LinesManager::~LinesManager() { _vm->_globals->freeMemory(_largeBuf); - if (_testRoute0 != (RouteItem *)NULL) + if (_testRoute0 != NULL) delete[] _testRoute0; - if (_testRoute1 != (RouteItem *)NULL) + if (_testRoute1 != NULL) delete[] _testRoute1; - if (_testRoute2 != (RouteItem *)NULL) + if (_testRoute2 != NULL) delete[] _testRoute2; } @@ -220,7 +220,7 @@ void LinesManager::addZoneLine(int idx, int fromX, int fromY, int destX, int des maxDist += distX; zoneData = (int16 *)_vm->_globals->allocMemory(2 * sizeof(int16) * maxDist + (4 * sizeof(int16))); - assert(zoneData != (int16 *)NULL); + assert(zoneData != NULL); _zoneLine[idx]._zoneData = zoneData; @@ -379,7 +379,7 @@ bool LinesManager::checkCollisionLine(int xp, int yp, int *foundDataIdx, int *fo for (int curLineIdx = startLineIdx; curLineIdx <= endLineIdx; curLineIdx++) { lineData = _lineItem[curLineIdx]._lineData; - if (lineData == (int16 *)NULL) + if (lineData == NULL) continue; bool collisionFl = true; @@ -793,14 +793,14 @@ int LinesManager::computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY int endLineIdx = 2 * _lineItem[startLineIdx - 1]._lineDataEndIdx; int16 *lineData = _lineItem[startLineIdx - 1]._lineData; - if (lineData == (int16 *)NULL) + if (lineData == NULL) break; while (lineData[endLineIdx - 2] != lineX || lineY != lineData[endLineIdx - 1]) { --curLineIdx; if (_lastLine - 1 != curLineIdx) { endLineIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx; lineData = _lineItem[curLineIdx]._lineData; - if (lineData != (int16 *)NULL) + if (lineData != NULL) continue; } loopCond = true; @@ -824,7 +824,7 @@ int LinesManager::computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY int curLineIdx = endLineIdx + 1; int nextLineDataEndIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx; int16 *lineData = _lineItem[curLineIdx]._lineData; - if (lineData == (int16 *)NULL) + if (lineData == NULL) break; for (;;) { curLineDataEndIdx = nextLineDataEndIdx; @@ -835,7 +835,7 @@ int LinesManager::computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY if (curLineIdx != _linesNumb + 1) { nextLineDataEndIdx = 2 * _lineItem[curLineIdx]._lineDataEndIdx; lineData = _lineItem[curLineIdx]._lineData; - if (lineData != (int16 *)NULL) + if (lineData != NULL) continue; } loopCond = true; @@ -895,7 +895,7 @@ int LinesManager::computeRouteIdx(int lineIdx, int dataIdx, int fromX, int fromY int minLineY = 0; for (int i = startLineIdx; i <= endLineIdx; ++i) { int16 *lineData = _lineItem[i]._lineData; - if (lineData == (int16 *)NULL) + if (lineData == NULL) error("error in genial routine"); if (i == startLineIdx) { minLineY = MIN(lineData[1], lineData[2 * _lineItem[i]._lineDataEndIdx - 1]); @@ -1096,13 +1096,13 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { if (!_vm->_globals->_checkDistanceFl) { if (abs(fromX - _oldRouteFromX) <= 4 && abs(fromY - _oldRouteFromY) <= 4 && abs(_oldRouteDestX - destX) <= 4 && abs(_oldRouteDestY - clipDestY) <= 4) - return (RouteItem *)NULL; + return NULL; if (abs(fromX - destX) <= 4 && abs(fromY - clipDestY) <= 4) - return (RouteItem *)NULL; + return NULL; if (_oldZoneNum > 0 && _vm->_objectsManager->_zoneNum > 0 && _oldZoneNum == _vm->_objectsManager->_zoneNum) - return (RouteItem *)NULL; + return NULL; } _vm->_globals->_checkDistanceFl = false; _oldZoneNum = _vm->_objectsManager->_zoneNum; @@ -1122,7 +1122,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { clipDestY = _vm->_globals->_characterMaxPosY; if (abs(fromX - clipDestX) <= 3 && abs(fromY - clipDestY) <= 3) - return (RouteItem *)NULL; + return NULL; for (int i = 0; i <= 8; ++i) { collLineIdxArr[i] = -1; @@ -1201,7 +1201,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { if (collLineIdxArr[DIR_LEFT] < 0) deltaArr[DIR_LEFT] = INVALID_LINE_VALUE; if (collLineIdxArr[DIR_UP] == -1 && collLineIdxArr[DIR_RIGHT] == -1 && collLineIdxArr[DIR_DOWN] == -1 && collLineIdxArr[DIR_LEFT] == -1) - return (RouteItem *)NULL; + return NULL; if (collLineIdxArr[DIR_DOWN] != -1 && deltaArr[DIR_UP] >= deltaArr[DIR_DOWN] && deltaArr[DIR_RIGHT] >= deltaArr[DIR_DOWN] && deltaArr[DIR_LEFT] >= deltaArr[DIR_DOWN]) { curLineIdx = collLineIdxArr[DIR_DOWN]; @@ -2157,7 +2157,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { _bestRoute[superRouteIdx].invalidate(); result = &_bestRoute[0]; } else { - result = (RouteItem *)NULL; + result = NULL; } return result; } @@ -2439,19 +2439,21 @@ int LinesManager::testLine(int paramX, int paramY, int *testValue, int *foundLin for (int idx = _lastLine + 1; idx < _linesNumb + 1; idx++) { lineData = _lineItem[idx]._lineData; lineDataEndIdx = _lineItem[idx]._lineDataEndIdx; - if (lineData[0] == paramX && lineData[1] == paramY) { - *testValue = 1; - int posX = lineData[2 * (lineDataEndIdx - 1)]; - int posY = lineData[2 * (lineDataEndIdx - 1) + 1]; - if (_lineItem[idx]._directionRouteInc == DIR_DOWN || _lineItem[idx]._directionRouteInc == DIR_UP) - posY += 2; - if (_lineItem[idx]._directionRouteInc == DIR_RIGHT || _lineItem[idx]._directionRouteDec == DIR_LEFT) - posX += 2; - if (!checkCollisionLine(posX, posY, &collDataIdx, &collLineIdx, 0, _lastLine)) - error("Error in test line"); - *foundLineIdx = collLineIdx; - *foundDataIdx = collDataIdx; - return idx; + if (lineData) { + if (lineData[0] == paramX && lineData[1] == paramY) { + *testValue = 1; + int posX = lineData[2 * (lineDataEndIdx - 1)]; + int posY = lineData[2 * (lineDataEndIdx - 1) + 1]; + if (_lineItem[idx]._directionRouteInc == DIR_DOWN || _lineItem[idx]._directionRouteInc == DIR_UP) + posY += 2; + if (_lineItem[idx]._directionRouteInc == DIR_RIGHT || _lineItem[idx]._directionRouteDec == DIR_LEFT) + posX += 2; + if (!checkCollisionLine(posX, posY, &collDataIdx, &collLineIdx, 0, _lastLine)) + error("Error in test line"); + *foundLineIdx = collLineIdx; + *foundDataIdx = collDataIdx; + return idx; + } } if (lineDataEndIdx > 0) { @@ -2647,7 +2649,7 @@ int LinesManager::checkCollision(int xp, int yp) { do { LigneZoneItem *curZoneLine = &_zoneLine[curZoneLineIdx]; int16 *dataP = curZoneLine->_zoneData; - if (dataP != (int16 *)NULL) { + if (dataP != NULL) { int count = curZoneLine->_count; int startX = dataP[0]; int startY = dataP[1]; @@ -2693,7 +2695,7 @@ void LinesManager::initSquareZones() { for (int idx = 0; idx < MAX_LINES; ++idx) { int16 *dataP = _zoneLine[idx]._zoneData; - if (dataP == (int16 *)NULL) + if (dataP == NULL) continue; SquareZoneItem *curZone = &_squareZone[_zoneLine[idx]._bobZoneIdx]; @@ -2727,22 +2729,22 @@ void LinesManager::clearAll() { _zone[idx]._spriteIndex = 0; } - _testRoute0 = (RouteItem *)NULL; - _testRoute1 = (RouteItem *)NULL; - _testRoute2 = (RouteItem *)NULL; - _lineBuf = (int16 *)NULL; - _route = (RouteItem *)NULL; + _testRoute0 = NULL; + _testRoute1 = NULL; + _testRoute2 = NULL; + _lineBuf = NULL; + _route = NULL; for (int idx = 0; idx < MAX_LINES; ++idx) { _lineItem[idx]._lineDataEndIdx = 0; _lineItem[idx]._direction = DIR_NONE; _lineItem[idx]._directionRouteInc = DIR_NONE; _lineItem[idx]._directionRouteDec = DIR_NONE; - _lineItem[idx]._lineData = (int16 *)NULL; + _lineItem[idx]._lineData = NULL; _zoneLine[idx]._count = 0; _zoneLine[idx]._bobZoneIdx = 0; - _zoneLine[idx]._zoneData = (int16 *)NULL; + _zoneLine[idx]._zoneData = NULL; } for (int idx = 0; idx < 100; ++idx) @@ -2752,11 +2754,11 @@ void LinesManager::clearAll() { _testRoute1 = new RouteItem[8334]; _testRoute2 = new RouteItem[8334]; if (!_testRoute0) - _testRoute0 = (RouteItem*)NULL; + _testRoute0 = NULL; if (!_testRoute1) - _testRoute1 = (RouteItem*)NULL; + _testRoute1 = NULL; if (!_testRoute2) - _testRoute2 = (RouteItem*)NULL; + _testRoute2 = NULL; _largeBuf = _vm->_globals->allocMemory(10000); _lineBuf = (int16 *)(_largeBuf); @@ -2782,7 +2784,7 @@ void LinesManager::resetLines() { for (int idx = 0; idx < MAX_LINES; ++idx) { removeLine(idx); _lineItem[idx]._lineDataEndIdx = 0; - _lineItem[idx]._lineData = (int16 *)NULL; + _lineItem[idx]._lineData = NULL; } } @@ -2847,7 +2849,7 @@ void LinesManager::checkZone() { if (_zoneSkipCount <= 1) return; - if (_vm->_globals->_freezeCharacterFl || (_route == (RouteItem *)NULL) || _zoneSkipCount > 4) { + if (_vm->_globals->_freezeCharacterFl || (_route == NULL) || _zoneSkipCount > 4) { _zoneSkipCount = 0; int zoneId; if (_oldMouseX != mouseX || _oldMouseY != oldMouseY) { diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 5b9c84fe24..28d6f16a54 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -1327,7 +1327,7 @@ void ObjectsManager::setFlipSprite(int idx, bool flipFl) { } void ObjectsManager::GOHOME() { - if (_vm->_linesManager->_route == (RouteItem *)NULL) + if (_vm->_linesManager->_route == NULL) return; if (_homeRateCounter > 1) { @@ -1364,11 +1364,11 @@ void ObjectsManager::GOHOME() { zoneId = _vm->_globals->_saveData->_data[svLastZoneNum]; else zoneId = _zoneNum; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; computeAndSetSpriteSize(); setFlipSprite(0, false); _homeRateCounter = 0; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; _oldDirection = DIR_NONE; if (zoneId > 0) { if (_vm->_linesManager->_zone[zoneId]._destX && _vm->_linesManager->_zone[zoneId]._destY && _vm->_linesManager->_zone[zoneId]._destY != 31) { @@ -1584,7 +1584,7 @@ void ObjectsManager::GOHOME() { zoneId = _zoneNum; setSpriteIndex(0, _oldDirection + 59); _vm->_globals->_actionDirection = DIR_NONE; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; computeAndSetSpriteSize(); setFlipSprite(0, false); _homeRateCounter = 0; @@ -1644,7 +1644,7 @@ void ObjectsManager::GOHOME() { } void ObjectsManager::GOHOME2() { - if (_vm->_linesManager->_route == (RouteItem *)NULL) + if (_vm->_linesManager->_route == NULL) return; int realSpeed = 2; @@ -1707,7 +1707,7 @@ void ObjectsManager::GOHOME2() { break; } - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; } /** @@ -1824,7 +1824,7 @@ void ObjectsManager::handleCityMap() { _vm->_graphicsManager->scrollScreen(getSpriteX(0) - 320); _vm->_graphicsManager->_scrollOffset = getSpriteX(0) - 320; animateSprite(0); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); _vm->_graphicsManager->SETCOLOR3(253, 100, 100, 100); _vm->_graphicsManager->SETCOLOR3(251, 100, 100, 100); @@ -1866,7 +1866,7 @@ void ObjectsManager::handleCityMap() { _vm->_linesManager->checkZone(); GOHOME2(); - if (_vm->_linesManager->_route == (RouteItem *)NULL && _vm->_globals->_actionMoveTo) + if (_vm->_linesManager->_route == NULL && _vm->_globals->_actionMoveTo) PARADISE(); _vm->_eventsManager->refreshScreenAndEvents(); @@ -1960,25 +1960,25 @@ void ObjectsManager::handleLeftButton() { } _vm->_globals->_actionMoveTo = false; RouteItem *oldRoute = _vm->_linesManager->_route; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; if (_forestFl && _zoneNum >= 20 && _zoneNum <= 23) { if (getSpriteY(0) > 374 && getSpriteY(0) <= 410) { - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; setSpriteIndex(0, _oldDirectionSpriteIdx); _vm->_globals->_actionDirection = DIR_NONE; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; computeAndSetSpriteSize(); setFlipSprite(0, false); _homeRateCounter = 0; _oldDirection = DIR_NONE; } else { _vm->_linesManager->_route = _vm->_linesManager->findRoute(getSpriteX(0), getSpriteY(0), getSpriteX(0), 390); - if (_vm->_linesManager->_route != (RouteItem *)NULL) + if (_vm->_linesManager->_route != NULL) _vm->_linesManager->optimizeRoute(_vm->_linesManager->_route); _oldCharacterPosX = getSpriteX(0); _oldCharacterPosY = getSpriteY(0); _homeRateCounter = 0; - if (_vm->_linesManager->_route != (RouteItem *)NULL || oldRoute == _vm->_linesManager->_route) { + if (_vm->_linesManager->_route != NULL || oldRoute == _vm->_linesManager->_route) { _oldDirection = DIR_NONE; } else { _vm->_linesManager->_route = oldRoute; @@ -1987,12 +1987,12 @@ void ObjectsManager::handleLeftButton() { } else { if (!_vm->_globals->_freezeCharacterFl && !_vm->_globals->_cityMapEnabledFl) { _vm->_linesManager->_route = _vm->_linesManager->findRoute(getSpriteX(0), getSpriteY(0), destX, destY); - if (_vm->_linesManager->_route != (RouteItem *)NULL) + if (_vm->_linesManager->_route != NULL) _vm->_linesManager->optimizeRoute(_vm->_linesManager->_route); _oldCharacterPosX = getSpriteX(0); _oldCharacterPosY = getSpriteY(0); _homeRateCounter = 0; - if (_vm->_linesManager->_route != (RouteItem *)NULL || oldRoute == _vm->_linesManager->_route) + if (_vm->_linesManager->_route != NULL || oldRoute == _vm->_linesManager->_route) _oldDirection = DIR_NONE; else _vm->_linesManager->_route = oldRoute; @@ -2020,7 +2020,7 @@ void ObjectsManager::handleLeftButton() { && _curObjectIndex == 20 && _zoneNum == 12 && _vm->_eventsManager->_mouseCursorId == 23) { // Special case for throwing darts at the switch in Purgatory - the player shouldn't move - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; getSpriteX(0); getSpriteY(0); } @@ -2137,7 +2137,7 @@ void ObjectsManager::clearScreen() { _forceZoneFl = true; _vm->_linesManager->resetLinesNumb(); _vm->_linesManager->resetLastLine(); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; _vm->_globals->_answerBuffer = _vm->_globals->freeMemory(_vm->_globals->_answerBuffer); _vm->_globals->_levelSpriteBuf = _vm->_globals->freeMemory(_vm->_globals->_levelSpriteBuf); _vm->_eventsManager->_startPos.x = 0; @@ -2147,7 +2147,7 @@ void ObjectsManager::clearScreen() { _vm->_globals->_actionMoveTo = false; _forceZoneFl = true; _changeVerbFl = false; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; _oldDirection = DIR_NONE; _vm->_graphicsManager->resetDirtyRects(); } @@ -2164,7 +2164,7 @@ void ObjectsManager::changeCharacterHead(PlayerCharacter oldCharacter, PlayerCha _vm->_graphicsManager->copySurface(_vm->_graphicsManager->_backBuffer, 532, 25, 65, 40, _vm->_graphicsManager->_frontBuffer, 532, 25); _vm->_graphicsManager->addDirtyRect(532, 25, 597, 65); _vm->_globals->_checkDistanceFl = true; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; if (oldCharacter == CHARACTER_SAMANTHA && newCharacter == CHARACTER_HOPKINS && _vm->_globals->_saveData->_realHopkins._location == _vm->_globals->_screenId) { @@ -3725,7 +3725,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _vm->_globals->_cityMapEnabledFl = false; _vm->_globals->_eventMode = EVENTMODE_IGNORE; _vm->_soundManager->playSound(soundNum); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; _vm->_globals->_freezeCharacterFl = true; _vm->_globals->_exitId = 0; if (!backgroundFile.empty()) @@ -3745,7 +3745,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo if (_vm->_globals->_screenId == 61) { addStaticSprite(_vm->_globals->_characterSpriteBuf, Common::Point(330, 418), 0, 60, 0, false, 34, 190); animateSprite(0); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; computeAndSetSpriteSize(); } _vm->_graphicsManager->SETCOLOR3(252, 100, 100, 100); @@ -3763,13 +3763,13 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo _oldCharacterPosX = getSpriteX(0); _oldDirection = DIR_NONE; _homeRateCounter = 0; - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; _vm->_linesManager->_route = _vm->_linesManager->findRoute(getSpriteX(0), getSpriteY(0), 330, 345); _vm->_globals->_checkDistanceFl = true; do { GOHOME(); _vm->_eventsManager->refreshScreenAndEvents(); - } while (_vm->_linesManager->_route != (RouteItem *)NULL); + } while (_vm->_linesManager->_route != NULL); setSpriteIndex(0, 64); } do { @@ -3871,7 +3871,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm computeAndSetSpriteSize(); animateSprite(0); enableHidingBehavior(); - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; computeAndSetSpriteSize(); sceneSpecialIni(); _vm->_eventsManager->_mouseSpriteId = 4; @@ -3902,7 +3902,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm int yp = _vm->_eventsManager->getMouseY(); if ((xCheck == xp) && (yCheck == yp)) { - _vm->_linesManager->_route = (RouteItem *)NULL; + _vm->_linesManager->_route = NULL; PARADISE(); if (_vm->_globals->_exitId) breakFlag = true; @@ -3918,8 +3918,8 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm if (!_vm->_globals->_exitId) { _vm->_dialogsManager->testDialogOpening(); _vm->_linesManager->checkZone(); - if (_vm->_linesManager->_route == (RouteItem *)NULL - || (GOHOME(), _vm->_linesManager->_route == (RouteItem *)NULL)) { + if (_vm->_linesManager->_route == NULL + || (GOHOME(), _vm->_linesManager->_route == NULL)) { if (_vm->_globals->_actionMoveTo) PARADISE(); } |