diff options
author | Strangerke | 2013-04-05 08:17:26 +0200 |
---|---|---|
committer | Strangerke | 2013-04-05 08:17:26 +0200 |
commit | 89bf72ff5d608b86c6efc413baedff7618f4b44e (patch) | |
tree | 4322ec1c2c472a752b858859e353b879e5ee1f22 /engines | |
parent | 2ee8b1e342eca39602b2e5fc8cbdb9f505d49bcb (diff) | |
download | scummvm-rg350-89bf72ff5d608b86c6efc413baedff7618f4b44e.tar.gz scummvm-rg350-89bf72ff5d608b86c6efc413baedff7618f4b44e.tar.bz2 scummvm-rg350-89bf72ff5d608b86c6efc413baedff7618f4b44e.zip |
HOPKINS: JANITORIAL: Remove trailing spaces and tabs
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/anim.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/anim.h | 2 | ||||
-rw-r--r-- | engines/hopkins/computer.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/dialogs.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 2 | ||||
-rw-r--r-- | engines/hopkins/files.h | 2 | ||||
-rw-r--r-- | engines/hopkins/font.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/globals.h | 4 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 36 | ||||
-rw-r--r-- | engines/hopkins/graphics.h | 2 | ||||
-rw-r--r-- | engines/hopkins/hopkins.cpp | 18 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 26 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 42 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 4 | ||||
-rw-r--r-- | engines/hopkins/script.cpp | 6 | ||||
-rw-r--r-- | engines/hopkins/sound.cpp | 8 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 6 |
17 files changed, 87 insertions, 87 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 24b4c4e5d6..09e392d4f5 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -467,7 +467,7 @@ int AnimationManager::loadSpriteBank(int idx, const Common::String &filename) { Bank[idx]._loadedFl = false; result = -1; } - + Bank[idx]._data = fileDataPtr; int objectDataIdx = 0; diff --git a/engines/hopkins/anim.h b/engines/hopkins/anim.h index 6becd544af..22f725681a 100644 --- a/engines/hopkins/anim.h +++ b/engines/hopkins/anim.h @@ -68,7 +68,7 @@ public: void playAnim2(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3); void playSequence(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipEscFl, bool skipSeqFl, bool noColFl = false); void playSequence2(const Common::String &file, uint32 rate1, uint32 rate2, uint32 rate3, bool skipSeqFl = false); - + void setClearAnimFlag() { _clearAnimationFl = true; } void unsetClearAnimFlag() { _clearAnimationFl = false; } }; diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp index 09ce5080b8..86ad87e139 100644 --- a/engines/hopkins/computer.cpp +++ b/engines/hopkins/computer.cpp @@ -289,7 +289,7 @@ void ComputerManager::showComputer(ComputerEnum mode) { _vm->_graphicsManager->resetDirtyRects(); } -static const char _englishText[] = +static const char _englishText[] = "% ****** FBI COMPUTER NUMBER 4985 ****** J.HOPKINS COMPUTER ******\n" "% ****** FBI COMPUTER NUMBER 4998 ****** S.COLLINS COMPUTER ******\n" "% ****** FBI COMPUTER NUMBER 4997 ****** ACCES FREE COMPUTER ******\n" @@ -308,7 +308,7 @@ static const char _englishText[] = "% 6) SCIENTIST KIDNAPPED (next).\n" "%% fin\n"; -static const char _frenchText[] = +static const char _frenchText[] = "% ****** FBI COMPUTER NUMBER 4985 ****** J.HOPKINS COMPUTER ******\n" "% ****** FBI COMPUTER NUMBER 4998 ****** S.COLLINS COMPUTER ******\n" "% ****** FBI COMPUTER NUMBER 4997 ****** ACCES FREE COMPUTER ******\n" @@ -328,7 +328,7 @@ static const char _frenchText[] = "% 6) DISPARITIONS (suite).\n" "%% fin\n"; -static const char _spanishText[] = +static const char _spanishText[] = "% **** ORDENADOR DEL FBI NUMERO 4985 **** ORDENADOR J.HOPKINS *****\n" "% **** ORDENADOR DEL FBI NUMERO 4998 **** ORDENADOR S.COLLINS *****\n" "% *** ORDENADOR DEL FBI NUMERO 4997 *** ORDENADOR DE ACCESO LIBRE ***\n" @@ -651,7 +651,7 @@ void ComputerManager::newLevel() { _padPositionX = 150; _vm->_objectsManager->animateSprite(0); _vm->_objectsManager->animateSprite(1); - + _vm->_eventsManager->mouseOn(); _vm->_soundManager->playSample(3, 5); } diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp index caffed67eb..a162c87e76 100644 --- a/engines/hopkins/dialogs.cpp +++ b/engines/hopkins/dialogs.cpp @@ -259,7 +259,7 @@ void DialogsManager::showOptionsDialog() { //if (mousePos.x >= _vm->_graphicsManager->ofscroll + 348 && mousePos.y > 248 && mousePos.x <= _vm->_graphicsManager->ofscroll + 394 && mousePos.y <= 273) // _vm->_globals->_speed = 2; - if ( mousePos.x < scrollOffset + 165 || mousePos.x > scrollOffset + 496 + if ( mousePos.x < scrollOffset + 165 || mousePos.x > scrollOffset + 496 || mousePos.y < 107 || mousePos.y > 318) doneFlag = true; } diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 21578b02a0..2fd0054874 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -464,7 +464,7 @@ void EventsManager::refreshScreenAndEvents() { _vm->_graphicsManager->lockScreen(); _vm->_graphicsManager->m_scroll16(_vm->_graphicsManager->_frontBuffer, _vm->_graphicsManager->_scrollPosX, 20, SCREEN_WIDTH, 440, 0, 20); _vm->_graphicsManager->unlockScreen(); - + _vm->_graphicsManager->resetRefreshRects(); _vm->_graphicsManager->addRefreshRect(0, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 20); diff --git a/engines/hopkins/files.h b/engines/hopkins/files.h index 307c2f820a..5e5eaa755c 100644 --- a/engines/hopkins/files.h +++ b/engines/hopkins/files.h @@ -33,7 +33,7 @@ namespace Hopkins { class HopkinsEngine; // RES_ANI = 4 has been removed because it's not used -enum CatMode { RES_INI = 1, RES_REP = 2, RES_LIN = 3, RES_PER = 5, +enum CatMode { RES_INI = 1, RES_REP = 2, RES_LIN = 3, RES_PER = 5, RES_PIC = 6, RES_SAN = 7, RES_SLI = 8, RES_VOI = 9 }; class FileManager { diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index 3277ebb8c2..d8abc5e704 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -471,9 +471,9 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i charWidth = _vm->_objectsManager->getWidth(_font, printChar) - 1; else if (curChar == 'm' || curChar == 'w') charWidth = _vm->_objectsManager->getWidth(_font, printChar); - else + else charWidth = 6; - } else + } else charWidth = _vm->_objectsManager->getWidth(_font, printChar); int charStartPosX = charEndPosX; diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h index 62cc5bb9e0..f86a810c28 100644 --- a/engines/hopkins/globals.h +++ b/engines/hopkins/globals.h @@ -105,7 +105,7 @@ enum SauvegardeOffset { , svField401 = 401 }; -// As Script engine directly access savegame fields, +// As Script engine directly access savegame fields, // refactoring it in separated fields properly named is impossible struct Savegame { byte _data[2050]; @@ -130,7 +130,7 @@ enum Language { LANG_EN = 0, LANG_FR = 1, LANG_SP = 2}; enum PlayerCharacter { CHARACTER_HOPKINS = 0, CHARACTER_HOPKINS_CLONE = 1, CHARACTER_SAMANTHA = 2 }; enum Directions { - DIR_NONE = -1, + DIR_NONE = -1, DIR_UP = 1, DIR_UP_RIGHT = 2, DIR_RIGHT = 3, diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 59adc0e9fc..019d5a5ae8 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -78,7 +78,7 @@ GraphicsManager::GraphicsManager(HopkinsEngine *vm) { Common::fill(&_colorTable[0], &_colorTable[PALETTE_EXT_BLOCK_SIZE], 0); Common::fill(&_palette[0], &_palette[PALETTE_EXT_BLOCK_SIZE], 0); Common::fill(&_oldPalette[0], &_oldPalette[PALETTE_EXT_BLOCK_SIZE], 0); - + if (_vm->getIsDemo()) { if (_vm->getPlatform() == Common::kPlatformLinux) // CHECKME: Should be false? @@ -134,7 +134,7 @@ void GraphicsManager::lockScreen() { _videoPtr = _screenBuffer; _screenLineSize = SCREEN_WIDTH * 2; } - } + } } /** @@ -240,7 +240,7 @@ void GraphicsManager::loadScreen(const Common::String &file) { } } - memcpy(_frontBuffer, _backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); + memcpy(_frontBuffer, _backBuffer, SCREEN_WIDTH * 2 * SCREEN_HEIGHT); } void GraphicsManager::initColorTable(int minIndex, int maxIndex, byte *palette) { @@ -405,7 +405,7 @@ void GraphicsManager::loadPCX320(byte *surface, const Common::String &file, byte // Clear Palette void GraphicsManager::clearPalette() { - // As weird as it sounds, this is what the original Linux executable does, + // As weird as it sounds, this is what the original Linux executable does, // and not a full array clear. SD_PIXELS[0] = 0; } @@ -483,7 +483,7 @@ void GraphicsManager::Copy_Vga16(const byte *surface, int xp, int yp, int width, addRefreshRect(destX, destY, destX + width, destY + width); } -/** +/** * Fade in. the step number is determine by parameter. */ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface) { @@ -524,7 +524,7 @@ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface) updateScreen(); } -/** +/** * Fade out. the step number is determine by parameter. */ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface) { @@ -556,7 +556,7 @@ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface updateScreen(); } -/** +/** * Short fade in. The step number is 1, the default step number is also set to 1. */ void GraphicsManager::fadeInShort() { @@ -564,7 +564,7 @@ void GraphicsManager::fadeInShort() { fadeIn(_palette, 1, (const byte *)_frontBuffer); } -/** +/** * Short fade out. The step number is 1, the default step number is also set to 1. */ void GraphicsManager::fadeOutShort() { @@ -572,7 +572,7 @@ void GraphicsManager::fadeOutShort() { fadeOut(_palette, 1, (const byte *)_frontBuffer); } -/** +/** * Long fade in. The step number is 20, the default step number is also set to 15. */ void GraphicsManager::fadeInLong() { @@ -580,7 +580,7 @@ void GraphicsManager::fadeInLong() { fadeIn(_palette, 20, (const byte *)_frontBuffer); } -/** +/** * Long fade out. The step number is 20, the default step number is also set to 15. */ void GraphicsManager::fadeOutLong() { @@ -588,7 +588,7 @@ void GraphicsManager::fadeOutLong() { fadeOut(_palette, 20, (const byte *)_frontBuffer); } -/** +/** * Fade in. The step number used is the default step number. */ void GraphicsManager::fadeInDefaultLength(const byte *surface) { @@ -596,7 +596,7 @@ void GraphicsManager::fadeInDefaultLength(const byte *surface) { fadeIn(_palette, _fadeDefaultSpeed, surface); } -/** +/** * Fade out. The step number used is the default step number. */ void GraphicsManager::fadeOutDefaultLength(const byte *surface) { @@ -604,7 +604,7 @@ void GraphicsManager::fadeOutDefaultLength(const byte *surface) { fadeOut(_palette, _fadeDefaultSpeed, surface); } -/** +/** * Fade in used by for the breakout mini-game */ void GraphicsManager::fadeInBreakout() { @@ -615,7 +615,7 @@ void GraphicsManager::fadeInBreakout() { updateScreen(); } -/** +/** * Fade out used by for the breakout mini-game */ void GraphicsManager::fadeOutBreakout() { @@ -1050,7 +1050,7 @@ void GraphicsManager::addDirtyRect(int x1, int y1, int x2, int y2) { x2 = CLIP(x2, _minX, _maxX); y2 = CLIP(y2, _minY, _maxY); - if ((x2 > x1) && (y2 > y1)) + if ((x2 > x1) && (y2 > y1)) addRectToArray(_dirtyRects, Common::Rect(x1, y1, x2, y2)); } @@ -1070,7 +1070,7 @@ void GraphicsManager::addRectToArray(Common::Array<Common::Rect> &rects, const C uint rectIndex; for (rectIndex = 0; rectIndex < rects.size(); ++rectIndex) { Common::Rect &r = rects[rectIndex]; - + if (r.intersects(newRect)) { // Rect either intersects or is completely inside existing one, so extend existing one as necessary r.extend(newRect); @@ -1108,8 +1108,8 @@ void GraphicsManager::displayDirtyRects() { return; lockScreen(); - - // Refresh the entire screen + + // Refresh the entire screen for (uint idx = 0; idx < _dirtyRects.size(); ++idx) { Common::Rect &r = _dirtyRects[idx]; Common::Rect dstRect; diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h index bc8bb19c3f..89504bb512 100644 --- a/engines/hopkins/graphics.h +++ b/engines/hopkins/graphics.h @@ -108,7 +108,7 @@ public: int _screenLineSize; /** - * The _dirtyRects list contains paletted game areas that need to be redrawn. + * The _dirtyRects list contains paletted game areas that need to be redrawn. * The _dstrect array is the list of areas of the screen that ScummVM needs to be redrawn. * Some areas, such as the animation managers, skip the _dirtyRects and use _dstrec directly. */ diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp index 23a5a62812..afa1abf553 100644 --- a/engines/hopkins/hopkins.cpp +++ b/engines/hopkins/hopkins.cpp @@ -321,7 +321,7 @@ bool HopkinsEngine::runWin95Demo() { while (_eventsManager->getMouseButton() != 1); _graphicsManager->fadeOutLong(); restoreSystem(); - } else + } else bombExplosion(); break; @@ -605,7 +605,7 @@ bool HopkinsEngine::runLinuxDemo() { if (!_globals->_saveData->_data[svBombDisarmedFl]) bombExplosion(); - else + else _objectsManager->PERSONAGE2("IM09", "IM09", "ANIM09", "IM09", 10, true); break; @@ -781,7 +781,7 @@ bool HopkinsEngine::runFull() { if (getPlatform() == Common::kPlatformLinux) { _objectsManager->_helicopterFl = false; _eventsManager->mouseOff(); - // No code has been added to display the version as it's wrong + // No code has been added to display the version as it's wrong // in my copy: it mentions a Win95 version v4 using DirectDraw (Strangerke) } else if (getPlatform() == Common::kPlatformWindows) { _objectsManager->_helicopterFl = false; @@ -797,7 +797,7 @@ bool HopkinsEngine::runFull() { } _graphicsManager->clearVesaScreen(); } else { - // This piece of code, though named "display_version" in the original, + // This piece of code, though named "display_version" in the original, // displays a "loading please wait" screen. if (_startGameSlot == -1) { _graphicsManager->loadImage("VERSW"); @@ -814,7 +814,7 @@ bool HopkinsEngine::runFull() { _graphicsManager->clearScreen(); _graphicsManager->unlockScreen(); _graphicsManager->clearPalette(); - + if (_startGameSlot == -1) { if (getPlatform() == Common::kPlatformLinux) { _graphicsManager->loadImage("H2"); @@ -848,7 +848,7 @@ bool HopkinsEngine::runFull() { _globals->_characterType = 0; _objectsManager->_mapCarPosX = _objectsManager->_mapCarPosY = 0; memset(_globals->_saveData, 0, 2000); - + _globals->_exitId = 0; if (_startGameSlot != -1) @@ -2069,7 +2069,7 @@ void HopkinsEngine::playUnderwaterBaseCutscene() { _graphicsManager->displayAllBob(); _objectsManager->loadLinkFile("IM92"); /* - for (int cpt = 0; cpt <= 4 && !shouldQuit(); cpt++) + for (int cpt = 0; cpt <= 4 && !shouldQuit(); cpt++) _eventsManager->refreshScreenAndEvents(); */ _graphicsManager->fadeInLong(); @@ -2310,8 +2310,8 @@ void HopkinsEngine::drawBaseMap() { 162, 365, 162 + 21, 365 + 23, 106, 267, 106 + 20, 267 + 26 }; - - // Loop through displaying + + // Loop through displaying const int *rectP = &rects[0]; for (int rectIndex = 0; rectIndex < 6; ++rectIndex, rectP += 4) { Common::Rect r(rectP[0], rectP[1], rectP[2], rectP[3]); diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 38d7448bc2..6e5ab07f57 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -134,7 +134,7 @@ void LinesManager::loadLines(const Common::String &file) { _vm->_globals->freeMemory(ptr); } -/** +/** * Check Hotspots in Inventory screen * Returns the ID of the hotspot under mouse */ @@ -326,8 +326,8 @@ void LinesManager::addLine(int lineIdx, Directions direction, int fromX, int fro _lineItem[lineIdx]._directionRouteInc = DIR_DOWN_LEFT; _lineItem[lineIdx]._directionRouteDec = DIR_UP_RIGHT; } else if (stepY < -250 && stepY > -1000) { - // In the original code, the test was on positive values and - // was impossible to meet. + // In the original code, the test was on positive values and + // was impossible to meet. _lineItem[lineIdx]._directionRouteInc = DIR_UP_LEFT; _lineItem[lineIdx]._directionRouteDec = DIR_DOWN_RIGHT; } @@ -435,7 +435,7 @@ void LinesManager::initRoute() { int curLineX = curLineData[2 * curDataIdx - 2]; int curLineY = curLineData[2 * curDataIdx - 1]; - if (_vm->_graphicsManager->_maxX == curLineX || _vm->_graphicsManager->_maxY == curLineY || + if (_vm->_graphicsManager->_maxX == curLineX || _vm->_graphicsManager->_maxY == curLineY || _vm->_graphicsManager->_minX == curLineX || _vm->_graphicsManager->_minY == curLineY || (lineX == curLineX && lineY == curLineY)) break; @@ -1135,7 +1135,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { return _bestRoute; int tmpDelta = 0; - for (int tmpY = clipDestY; tmpY < _vm->_graphicsManager->_maxY; tmpY++, tmpDelta++) { + for (int tmpY = clipDestY; tmpY < _vm->_graphicsManager->_maxY; tmpY++, tmpDelta++) { if (checkCollisionLine(clipDestX, tmpY, &collLineDataIdxArr[DIR_DOWN], &collLineIdxArr[DIR_DOWN], 0, _lastLine) && collLineIdxArr[DIR_DOWN] <= _lastLine) break; collLineDataIdxArr[DIR_DOWN] = 0; @@ -1308,7 +1308,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { } int bestRouteNum = characterRoute(fromX, fromY, clipDestX, clipDestY, lineIdx, curLineIdx, 0); - + if (bestRouteNum == 1) return _bestRoute; @@ -1387,7 +1387,7 @@ RouteItem *LinesManager::findRoute(int fromX, int fromY, int destX, int destY) { break; } } - + bool loopCond; do { loopCond = false; @@ -1603,7 +1603,7 @@ int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int int maxDist; if (distX > distY) maxDist = distX; - else + else maxDist = distY; maxDist--; assert(maxDist != 0); @@ -1702,7 +1702,7 @@ int LinesManager::characterRoute(int fromX, int fromY, int destX, int destY, int newDirection = DIR_UP; else if (newStepX >= 510 && newStepX <= 1000) newDirection = DIR_UP_RIGHT; - else + else newDirection = DIR_UP_LEFT; } } @@ -2133,7 +2133,7 @@ RouteItem *LinesManager::cityMapCarRoute(int x1, int y1, int x2, int y2) { if (PLAN_TEST(_lineItem[l]._lineData[2 * _lineItem[l]._lineDataEndIdx - 2], _lineItem[l]._lineData[2 * _lineItem[l]._lineDataEndIdx - 1], superRouteIdx, l, curLineIdx)) { curRouteLineIdx = _newLineIdx; curRouteDataIdx = _newLineDataIdx; - superRouteIdx = _newRouteIdx; + superRouteIdx = _newRouteIdx; loopFl = true; break; } @@ -2362,7 +2362,7 @@ bool LinesManager::PLAN_TEST(int paramX, int paramY, int superRouteIdx, int para direction = 3; else if (idxTestRight != -1) direction = 4; - else + else return false; } else { int stepCountUp = 100; @@ -2552,7 +2552,7 @@ int LinesManager::getMouseZone() { for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) { int bobId = _bobZone[bobZoneId]; if (bobId && _bobZoneFl[bobZoneId] && _vm->_objectsManager->_bob[bobId]._bobMode && _vm->_objectsManager->_bob[bobId]._frameIndex != 250 && - !_vm->_objectsManager->_bob[bobId]._disabledAnimationFl && xp > _vm->_objectsManager->_bob[bobId]._oldX && + !_vm->_objectsManager->_bob[bobId]._disabledAnimationFl && xp > _vm->_objectsManager->_bob[bobId]._oldX && xp < _vm->_objectsManager->_bob[bobId]._oldWidth + _vm->_objectsManager->_bob[bobId]._oldX && yp > _vm->_objectsManager->_bob[bobId]._oldY) { if (yp < _vm->_objectsManager->_bob[bobId]._oldHeight + _vm->_objectsManager->_bob[bobId]._oldY) { if (_zone[bobZoneId]._spriteIndex == -1) { @@ -2759,7 +2759,7 @@ void LinesManager::clearAll() { _testRoute1 = NULL; if (!_testRoute2) _testRoute2 = NULL; - + _largeBuf = _vm->_globals->allocMemory(10000); _lineBuf = (int16 *)(_largeBuf); } diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index c92fcbe9bf..b6012e1182 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -217,7 +217,7 @@ byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) { if (mode) { sprite_alone(_objectDataBuf, _vm->_eventsManager->_objectBuf, idx); dataP = _vm->_eventsManager->_objectBuf; - } else { + } else { dataP = _vm->_globals->allocMemory(height * width); if (dataP == NULL) error("CAPTURE_OBJET"); @@ -387,7 +387,7 @@ void ObjectsManager::displaySprite() { if (clipX < _vm->_graphicsManager->_minX) clipX = _vm->_graphicsManager->_minX; - + clipY = _vm->_fontManager->_textList[idx]._pos.y - 2; if (clipY < _vm->_graphicsManager->_minY) clipY = _vm->_graphicsManager->_minY; @@ -437,7 +437,7 @@ void ObjectsManager::displaySprite() { } if (_priorityFl && _sortedDisplayCount) { - for (int i = 1; i <= 48; i++) + for (int i = 1; i <= 48; i++) arr[i] = i; do { @@ -712,7 +712,7 @@ void ObjectsManager::computeHideCounter(int idx) { if ((oldBottom > hid->_y) && (oldBottom < hid->_yOffset + hid->_height + hid->_y)) { if ((oldRight >= hid->_x && oldRight <= hiddenRight) - // CHECKME: The original was doing the test two times. This looks like an + // CHECKME: The original was doing the test two times. This looks like an // original bug // || (cachedRight >= _bob[i]._oldWidth && _bob[i]._oldWidth >= hid->_x) || (hiddenRight >= _bob[i]._oldWidth && _bob[i]._oldWidth >= hid->_x) @@ -820,7 +820,7 @@ void ObjectsManager::checkHidingItem() { if (bottom > hid->_y && bottom < (hid->_yOffset + hid->_height + hid->_y)) { if ((right >= hid->_x && right <= hidingRight) - // CHECKME: The original was doing the test two times. This looks like an + // CHECKME: The original was doing the test two times. This looks like an // original bug // || (hidingRight >= spr->_destX && hid->_x <= spr->_destX) || (hidingRight >= spr->_destX && hid->_x <= spr->_destX) @@ -887,7 +887,7 @@ void ObjectsManager::showSprite(int idx) { void ObjectsManager::displayHiding(int idx) { HidingItem *hid = &_hidingItem[idx]; - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _hidingItemData[1], + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, _hidingItemData[1], hid->_x + 300, hid->_y + 300, hid->_spriteIndex); _vm->_graphicsManager->addDirtyRect(hid->_x, hid->_y, hid->_x + hid->_width, hid->_y + hid->_height); } @@ -922,7 +922,7 @@ void ObjectsManager::computeSprite(int idx) { reducePercent = -spr->_zoomFactor; if (reducePercent > 95) reducePercent = 95; - } else + } else zoomPercent = spr->_zoomFactor; if (zoomPercent) { @@ -996,7 +996,7 @@ void ObjectsManager::displayBobAnim() { continue; } - if (_bob[idx]._bobMode != 10) + if (_bob[idx]._bobMode != 10) continue; _bob[idx]._bobMode10 = false; @@ -1206,7 +1206,7 @@ void ObjectsManager::displayVBob() { _vm->_graphicsManager->Affiche_Perfect(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex, 0, 0, false); } else { - _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData, + _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_frontBuffer, vbob->_spriteData, vbob->_xp + 300, vbob->_yp + 300, vbob->_frameIndex); _vm->_graphicsManager->Sprite_Vesa(_vm->_graphicsManager->_backBuffer, vbob->_spriteData, @@ -1894,8 +1894,8 @@ void ObjectsManager::handleLeftButton() { int destX = _vm->_eventsManager->getMouseX(); int destY = _vm->_eventsManager->getMouseY(); - if (!_vm->_dialogsManager->_inventFl && !_vm->_globals->_cityMapEnabledFl && - destX > _vm->_graphicsManager->_scrollOffset - 30 && destX < _vm->_graphicsManager->_scrollOffset + 50 && + if (!_vm->_dialogsManager->_inventFl && !_vm->_globals->_cityMapEnabledFl && + destX > _vm->_graphicsManager->_scrollOffset - 30 && destX < _vm->_graphicsManager->_scrollOffset + 50 && destY > -30 && destY < 50) { int oldMouseCursor = _vm->_eventsManager->_mouseCursorId; _vm->_dialogsManager->_inventFl = true; @@ -2005,7 +2005,7 @@ void ObjectsManager::handleLeftButton() { if (_zoneNum != -1 && _zoneNum != 0) { if (_vm->_eventsManager->_mouseCursorId == 23) _vm->_globals->_saveData->_data[svLastMouseCursor] = 5; - else + else _vm->_globals->_saveData->_data[svLastMouseCursor] = _vm->_eventsManager->_mouseCursorId; if (_vm->_globals->_cityMapEnabledFl) @@ -2526,7 +2526,7 @@ void ObjectsManager::nextObjectIcon(int idx) { if (_vm->_eventsManager->_mouseCursorId == 0 || _vm->_eventsManager->_mouseCursorId == 2 || _vm->_eventsManager->_mouseCursorId == 3 || _vm->_eventsManager->_mouseCursorId == 16) return; - + int nextCursorId = _vm->_eventsManager->_mouseCursorId + 1; if (nextCursorId > 25) nextCursorId = 6; @@ -2543,7 +2543,7 @@ void ObjectsManager::nextObjectIcon(int idx) { if (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag2 == 1) return; nextCursorId++; - } + } if (nextCursorId == 8) { _vm->_eventsManager->_mouseCursorId = 8; return; @@ -2586,7 +2586,7 @@ void ObjectsManager::nextObjectIcon(int idx) { if (nextCursorId == 24 || nextCursorId == 25) { _vm->_eventsManager->_mouseCursorId = 25; } - + nextCursorId = 6; } while (_objectAuthIcons[_vm->_globals->_inventory[idx]]._flag6 != 2); } @@ -2819,7 +2819,7 @@ void ObjectsManager::doActionBack(int idx) { _curGestureFile = 1; _gestureBuf = _vm->_fileManager->loadFile("DOS.SPR"); } - + switch (idx) { case 1: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, false); @@ -2860,7 +2860,7 @@ void ObjectsManager::doActionRight(int idx) { _curGestureFile = 3; _gestureBuf = _vm->_fileManager->loadFile("PROFIL.SPR"); } - + switch (idx) { case 1: showActionAnimation(_gestureBuf, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 8, false); @@ -2942,7 +2942,7 @@ void ObjectsManager::doActionFront(int idx) { _curGestureFile = 2; _gestureBuf = _vm->_fileManager->loadFile("FACE.SPR"); } - + switch (idx) { case 1: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,9,9,9,9,9,9,7,6,5,4,3,2,1,0,-1,", 8, false); @@ -2965,7 +2965,7 @@ void ObjectsManager::doActionDiagLeft(int idx) { _curGestureFile = 4; _gestureBuf = _vm->_fileManager->loadFile("3Q.SPR"); } - + switch (idx) { case 1: showActionAnimation(_gestureBuf, "0,1,2,3,4,5,6,7,8,8,8,8,8,7,6,5,4,3,2,1,0,-1,", 8, true); @@ -3006,7 +3006,7 @@ void ObjectsManager::doActionLeft(int idx) { _curGestureFile = 3; _gestureBuf = _vm->_fileManager->loadFile("PROFIL.SPR"); } - + switch (idx) { case 1: showActionAnimation(_gestureBuf, "20,19,18,17,16,15,14,13,13,13,13,13,14,15,16,17,18,19,20,-1,", 8, true); @@ -3638,7 +3638,7 @@ void ObjectsManager::handleForest(int screenId, int minX, int maxX, int minY, in case 36: if (idx > 2) savegameIdx = 203; - else + else savegameIdx = 202; break; case 37: diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index d14e353840..e0c05bbe1f 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -200,7 +200,7 @@ private: void showSprite(int idx); void clearSprite(); void setSpriteZoom(int idx, int zoomFactor); - + void loadZone(const Common::String &file); void changeCharacterHead(PlayerCharacter oldCharacter, PlayerCharacter newCharacter); void GOHOME2(); @@ -232,7 +232,7 @@ public: int _mapCarPosX, _mapCarPosY; int _oldCharacterPosX, _oldCharacterPosY; Common::Point _borderPos; - Common::Point _oldBorderPos; + Common::Point _oldBorderPos; Common::Point _characterPos; byte *_forestSprite; byte *_saveLoadSprite; diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp index c6046c6a2b..1c9e18db70 100644 --- a/engines/hopkins/script.cpp +++ b/engines/hopkins/script.cpp @@ -689,7 +689,7 @@ int ScriptManager::handleOpcode(byte *dataP) { case 36: if (_vm->_globals->_saveData->_data[svField270] == 2 && _vm->_globals->_saveData->_data[svField94] == 1 && _vm->_globals->_saveData->_data[svField95] == 1) _vm->_globals->_saveData->_data[svField270] = 3; - + switch (_vm->_globals->_saveData->_data[svField270]) { case 0: _vm->_talkManager->startStaticCharacterDialogue("PATRON0.pe2"); @@ -2141,7 +2141,7 @@ int ScriptManager::handleOpcode(byte *dataP) { if (_vm->_globals->_saveData->_data[svField341]) { _vm->_soundManager->playSoundFile("SOUND83.WAV"); _vm->_objectsManager->setAndPlayAnim(vbobFrameIndex, 26, 50, false); - + switch (_vm->_globals->_saveData->_data[svField341]) { case 1: _vm->_graphicsManager->fastDisplay(_vm->_globals->_levelSpriteBuf, 27, 117, 0); @@ -2560,7 +2560,7 @@ int ScriptManager::handleIf(const byte *dataP, int offset) { (oper2 == 6 && compVal2 > _vm->_globals->_saveData->_data[saveDataIdx2])) check2Fl = true; } - + if ((operType == 3) && check1Fl) { return (offset + 1); } else if ((operType == 1) && check1Fl && check2Fl) { diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp index 909f563a3c..f30ca4a401 100644 --- a/engines/hopkins/sound.cpp +++ b/engines/hopkins/sound.cpp @@ -609,7 +609,7 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) { // This avoids skipping completely the talk animations in the Win95 UK Demo if (!checkVoiceStatus(2) && _sWav[20]._active) breakFlag = true; - // This is specific to the Win95 UK Demo again: if nothing is displayed, + // This is specific to the Win95 UK Demo again: if nothing is displayed, // don't wait for a click event. if (!_sWav[20]._active && !dispTxtFl) break; @@ -700,12 +700,12 @@ void SoundManager::playSample(int wavIndex, int voiceMode) { if (_soundFl) delWav(_currentSoundIndex); - + switch (voiceMode) { case 5: case 8: // Case added to identify the former PLAY_SAMPLE2 calls - case 9: + case 9: if (checkVoiceStatus(1)) stopVoice(1); playWavSample(1, wavIndex); @@ -775,7 +775,7 @@ bool SoundManager::loadVoice(const Common::String &filename, size_t fileOffset, if (!f.open(filename)) { // Fallback to APC... if (!f.open(setExtension(filename, ".APC"))) { - // The English demo doesn't include the speech file. + // The English demo doesn't include the speech file. // This avoids it to crash when discussing with other characters if (!_vm->getIsDemo()) error("Could not open %s for reading", filename.c_str()); diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 7e665915d7..24be12da6d 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -760,7 +760,7 @@ bool TalkManager::searchCharacterAnim(int idx, const byte *bufPerso, int animId, void TalkManager::handleAnswer(int zone, int verb) { byte zoneObj = zone; byte verbObj = verb; - + bool outerLoopFl; byte *ptr = NULL; do { @@ -882,7 +882,7 @@ void TalkManager::handleForestAnswser(int zone, int verb) { while (_vm->_objectsManager->getBobAnimDataIdx(6) < 12); _vm->_objectsManager->stopBobAnimation(6); _vm->_objectsManager->setBobAnimation(8); - + switch (_vm->_globals->_screenId) { case 35: indx = 201; @@ -967,7 +967,7 @@ void TalkManager::animateObject(const Common::String &filename) { _vm->_linesManager->clearAllZones(); _vm->_linesManager->resetLines(); _vm->_objectsManager->resetHidingItems(); - + for (int i = 0; i <= 44; i++) _vm->_linesManager->_bobZone[i] = 0; |