diff options
author | Filippos Karapetis | 2014-10-28 16:19:26 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-10-28 16:19:26 +0200 |
commit | 01e8286e1c8df605c98f828e5834584c997713b4 (patch) | |
tree | 750377aec5366db1f1b0df1304caf62837f2fb7c /engines/mads | |
parent | e0c281b9b22fa8e515eb3b8c02a80ff3431acbc6 (diff) | |
download | scummvm-rg350-01e8286e1c8df605c98f828e5834584c997713b4.tar.gz scummvm-rg350-01e8286e1c8df605c98f828e5834584c997713b4.tar.bz2 scummvm-rg350-01e8286e1c8df605c98f828e5834584c997713b4.zip |
MADS: Remove trailing whitespace
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/game.cpp | 2 | ||||
-rw-r--r-- | engines/mads/menu_views.cpp | 24 | ||||
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.h | 4 | ||||
-rw-r--r-- | engines/mads/nebular/game_nebular.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/menu_nebular.cpp | 16 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes6.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes7.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes8.cpp | 2 | ||||
-rw-r--r-- | engines/mads/palette.cpp | 4 | ||||
-rw-r--r-- | engines/mads/scene_data.cpp | 2 | ||||
-rw-r--r-- | engines/mads/sequence.cpp | 2 |
12 files changed, 32 insertions, 32 deletions
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index 63a7e40d1b..94653f9a39 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -556,7 +556,7 @@ void Game::writeSavegameHeader(Common::OutSaveFile *out, MADSSavegameHeader &hea if (!_saveThumb) createThumbnail(); Graphics::saveThumbnail(*out, *_saveThumb); - + _saveThumb->free(); delete _saveThumb; _saveThumb = nullptr; diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp index 03afc70c3e..ee4268a650 100644 --- a/engines/mads/menu_views.cpp +++ b/engines/mads/menu_views.cpp @@ -37,7 +37,7 @@ MenuView::MenuView(MADSEngine *vm) : FullScreenDialog(vm) { } void MenuView::show() { - Scene &scene = _vm->_game->_scene; + Scene &scene = _vm->_game->_scene; EventsManager &events = *_vm->_events; _vm->_screenFade = SCREEN_FADE_FAST; @@ -195,7 +195,7 @@ void TextView::processCommand() { paramP = commandStr + 10; resetPalette(); int screenId = getParameter(¶mP); - + SceneInfo *sceneInfo = SceneInfo::init(_vm); sceneInfo->load(screenId, 0, "", 0, scene._depthSurface, scene._backgroundSurface); scene._spriteSlots.fullRefresh(); @@ -230,7 +230,7 @@ void TextView::processCommand() { int soundId = getParameter(¶mP); _vm->_sound->command(soundId); - } else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') || + } else if (!strncmp(commandStr, "COLOR", 5) && ((commandStr[5] == '0') || (commandStr[5] == '1'))) { // Set the text colors int index = commandStr[5] - '0'; @@ -254,7 +254,7 @@ void TextView::processCommand() { sceneInfo->_width = MADS_SCREEN_WIDTH; sceneInfo->_height = MADS_SCENE_HEIGHT; _spareScreens[spareIndex].setSize(MADS_SCREEN_WIDTH, MADS_SCENE_HEIGHT); - sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE, + sceneInfo->loadMadsV1Background(screenId, "", SCENEFLAG_TRANSLATE, _spareScreens[spareIndex]); delete sceneInfo; @@ -409,7 +409,7 @@ void TextView::doFrame() { Common::copy(srcP, srcP + MADS_SCREEN_WIDTH, destP); } - Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH, + Common::copy(linesTemp, linesTemp + _pan.y * MADS_SCREEN_WIDTH, (byte *)scene._backgroundSurface.getPixels()); delete[] linesTemp; } @@ -429,7 +429,7 @@ void TextView::doFrame() { if (tl._pos.y < 0) { _textLines.remove_at(i); } else { - tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y, + tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y, 0x605, -1, tl._line, _font); } } @@ -537,7 +537,7 @@ bool AnimationView::onEvent(Common::Event &event) { void AnimationView::doFrame() { Scene &scene = _vm->_game->_scene; - + if (_resourceIndex == -1 || _currentAnimation->freeFlag()) { if (++_resourceIndex == (int)_resources.size()) { scriptDone(); @@ -565,7 +565,7 @@ void AnimationView::loadNextResource() { if (resEntry._bgFlag) palette.resetGamePalette(1, 8); - palette._mainPalette[253 * 3] = palette._mainPalette[253 * 3 + 1] + palette._mainPalette[253 * 3] = palette._mainPalette[253 * 3 + 1] = palette._mainPalette[253 * 3 + 2] = 0xb4; palette.setPalette(&palette._mainPalette[253 * 3], 253, 1); @@ -587,7 +587,7 @@ void AnimationView::loadNextResource() { delete _currentAnimation; _currentAnimation = Animation::init(_vm, &scene); int flags = ANIMFLAG_ANIMVIEW | (resEntry._bgFlag ? ANIMFLAG_LOAD_BACKGROUND : 0); - _currentAnimation->load(scene._backgroundSurface, scene._depthSurface, + _currentAnimation->load(scene._backgroundSurface, scene._depthSurface, resEntry._resourceName, flags, &paletteCycles, _sceneInfo); // Signal for a screen refresh @@ -656,7 +656,7 @@ void AnimationView::processLines() { if (c != '\r' && c != '\0') _currentLine += c; } - + // Process the line while (!_currentLine.empty()) { if (_currentLine.hasPrefix("-")) { @@ -672,7 +672,7 @@ void AnimationView::processLines() { } // Add resource into list along with any set state information - _resources.push_back(ResourceEntry(resName, _sfx, _soundFlag, + _resources.push_back(ResourceEntry(resName, _sfx, _soundFlag, _bgLoadFlag, _showWhiteBars)); // Fx resets between resource entries @@ -753,7 +753,7 @@ int AnimationView::getParameter() { while (!_currentLine.empty()) { char c = _currentLine[0]; - + if (c >= '0' && c <= '9') { _currentLine.deleteChar(0); result = result * 10 + (c - '0'); diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index f51d046951..f5355517bd 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -908,7 +908,7 @@ void GameDialog::refreshText() { } if (!skipFlag) { - _lines[i]._textDisplayIndex = scene._textDisplay.add(_lines[i]._pos.x, _lines[i]._pos.y, + _lines[i]._textDisplayIndex = scene._textDisplay.add(_lines[i]._pos.x, _lines[i]._pos.y, fontColor, _lines[i]._widthAdjust, _lines[i]._msg, _lines[i]._font); } } diff --git a/engines/mads/nebular/dialogs_nebular.h b/engines/mads/nebular/dialogs_nebular.h index d00cd87ead..5dbe4da6f0 100644 --- a/engines/mads/nebular/dialogs_nebular.h +++ b/engines/mads/nebular/dialogs_nebular.h @@ -116,7 +116,7 @@ class GameDialog: public FullScreenDialog { Common::String _msg; Font *_font; int _widthAdjust; - + DialogLine(); DialogLine(const Common::String &s); }; @@ -130,7 +130,7 @@ protected: int _menuSpritesIndex; int _lineIndex; int _textLineCount; - + /** * Display the dialog */ diff --git a/engines/mads/nebular/game_nebular.cpp b/engines/mads/nebular/game_nebular.cpp index eae74d6da0..fd669bc5cf 100644 --- a/engines/mads/nebular/game_nebular.cpp +++ b/engines/mads/nebular/game_nebular.cpp @@ -625,7 +625,7 @@ void GameNebular::doObjectAction() { _objects.addToInventory(OBJ_DURAFAIL_CELLS); if (_difficulty == DIFFICULTY_HARD) { dialogs.showItem(OBJ_DURAFAIL_CELLS, 416); - } + } _globals[kHandsetCellStatus] = 0; break; case 3: diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index f2f90e2291..28de4e5650 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -48,7 +48,7 @@ MainMenu::MainMenu(MADSEngine *vm): MenuView(vm) { _highlightedIndex = -1; _selectedIndex = -1; _buttonDown = false; - + for (int i = 0; i < 7; ++i) _menuItems[i] = nullptr; } @@ -85,7 +85,7 @@ void MainMenu::display() { Common::Point pt(frame0->_offset.x - (frame0->w / 2), frame0->_offset.y - frame0->h); screenObjects.add( - Common::Rect(pt.x, pt.y + DIALOG_TOP, pt.x + frame0->w, + Common::Rect(pt.x, pt.y + DIALOG_TOP, pt.x + frame0->w, pt.y + frame0->h + DIALOG_TOP), LAYER_GUI, CAT_COMMAND, i); } @@ -126,7 +126,7 @@ void MainMenu::doFrame() { // If the user has chosen to skip the animation, show the full menu immediately if (_skipFlag && _menuItemIndex >= 0) { - // Quickly loop through all the menu items to display each's final frame + // Quickly loop through all the menu items to display each's final frame for (; _menuItemIndex < 6; ++_menuItemIndex) { if (_menuItemIndex == 4 && !shouldShowQuotes()) continue; @@ -161,7 +161,7 @@ void MainMenu::doFrame() { void MainMenu::addSpriteSlot() { Scene &scene = _vm->_game->_scene; SpriteSlots &spriteSlots = scene._spriteSlots; - + int seqIndex = (_menuItemIndex < 6) ? _menuItemIndex : _frameIndex; spriteSlots.deleteTimer(seqIndex); @@ -255,7 +255,7 @@ bool MainMenu::onEvent(Common::Event &event) { } return true; - case Common::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: if (_buttonDown) { int menuIndex = getHighlightedItem(event.mouse); if (menuIndex != _highlightedIndex) { @@ -287,7 +287,7 @@ bool MainMenu::onEvent(Common::Event &event) { default: break; } - + return false; } @@ -317,7 +317,7 @@ void MainMenu::handleAction(MADSGameAction action) { break; case RESUME_GAME: - // The original resumed the most recently saved game. Instead, + // The original resumed the most recently saved game. Instead, // just show the load game scren _vm->_dialogs->_pendingDialog = DIALOG_RESTORE; return; @@ -354,7 +354,7 @@ void AdvertView::show() { uint32 expiryTime = g_system->getMillis() + 10 * 1000; _vm->_palette->resetGamePalette(4, 8); - + // Load the advert background onto the screen SceneInfo *sceneInfo = SceneInfo::init(_vm); sceneInfo->load(screenId, 0, Common::String(), 0, _vm->_game->_scene._depthSurface, diff --git a/engines/mads/nebular/nebular_scenes6.cpp b/engines/mads/nebular/nebular_scenes6.cpp index 13ee1a3dc1..679039535f 100644 --- a/engines/mads/nebular/nebular_scenes6.cpp +++ b/engines/mads/nebular/nebular_scenes6.cpp @@ -3155,7 +3155,7 @@ bool Scene611::check2ChargedBatteries() { } bool Scene611::check4ChargedBatteries() { - if (_game._objects.isInInventory(OBJ_DURAFAIL_CELLS) && _game._objects.isInInventory(OBJ_PHONE_CELLS) + if (_game._objects.isInInventory(OBJ_DURAFAIL_CELLS) && _game._objects.isInInventory(OBJ_PHONE_CELLS) && _globals[kDurafailRecharged]) return true; diff --git a/engines/mads/nebular/nebular_scenes7.cpp b/engines/mads/nebular/nebular_scenes7.cpp index 930bb7c250..0f019c4b19 100644 --- a/engines/mads/nebular/nebular_scenes7.cpp +++ b/engines/mads/nebular/nebular_scenes7.cpp @@ -2616,7 +2616,7 @@ void Scene752::actions() { default: break; } - } else if (_action.isAction(VERB_TAKE, NOUN_BONES) && (_action._savedFields._mainObjectSource == CAT_HOTSPOT) && + } else if (_action.isAction(VERB_TAKE, NOUN_BONES) && (_action._savedFields._mainObjectSource == CAT_HOTSPOT) && (!_game._objects.isInInventory(OBJ_BONES) || _game._trigger)) { switch (_game._trigger) { case 0: diff --git a/engines/mads/nebular/nebular_scenes8.cpp b/engines/mads/nebular/nebular_scenes8.cpp index 14f36756de..62a1a262b0 100644 --- a/engines/mads/nebular/nebular_scenes8.cpp +++ b/engines/mads/nebular/nebular_scenes8.cpp @@ -1098,7 +1098,7 @@ void Scene804::actions() { _action.isAction(VERB_OPEN, NOUN_SERVICE_PANEL)) { _scene->_nextSceneId = 805; } else if ((_action.isAction(VERB_ACTIVATE, NOUN_REMOTE)) && _globals[kTopButtonPushed]) { - if (!_globals[kInSpace]) { + if (!_globals[kInSpace]) { // Top button pressed on panel in hanger control if (!_globals[kBeamIsUp]) { _globals[kFromCockpit] = true; diff --git a/engines/mads/palette.cpp b/engines/mads/palette.cpp index 1787b3c298..836d04f7c0 100644 --- a/engines/mads/palette.cpp +++ b/engines/mads/palette.cpp @@ -233,7 +233,7 @@ int PaletteUsage::process(Common::Array<RGB6> &palette, uint flags) { // CHECKME: When pressing on F1 in the first screen, newPalIndex is set to 0xFF at this point // which is a valid value for the index. Maybe a better check would be "< 256" ? //assert(newPalIndex != -1); - + int var52 = (noUsageFlag && palette[palIndex]._u2) ? 2 : 0; _vm->_palette->_palFlags[newPalIndex] |= var52 | rgbMask; @@ -342,7 +342,7 @@ int PaletteUsage::checkRGB(const byte *rgb, int palStart, bool flag, int *palInd if ((!(*flagsP & 1) || flag) && !(*flagsP & 2)) { if (!memcmp(palP, rgb, 3)) { *flagsP |= mask; - + if (palIndex) *palIndex = result; match = true; diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index b0a5aa35c6..b5e219ed04 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -264,7 +264,7 @@ void SceneInfo::load(int sceneId, int variant, const Common::String &resName, assert(asset && _depthStyle != 2); MSprite *spr = asset->getFrame(asset->getCount() - 1); - bgSurface.copyFrom(spr, si._position, si._depth, &depthSurface, + bgSurface.copyFrom(spr, si._position, si._depth, &depthSurface, si._scale, spr->getTransparencyIndex()); } diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index 07b1451718..05f00afb5a 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -473,7 +473,7 @@ int SequenceList::startReverseCycle(int srcSpriteIndex, bool flipped, int numTic int depth = _vm->_game->_scene._depthSurface.getDepth(Common::Point( frame->_offset.x + frame->w / 2, frame->_offset.y + frame->h / 2)); - return add(srcSpriteIndex, flipped, sprites->getCount(), triggerCountdown, timeoutTicks, + return add(srcSpriteIndex, flipped, sprites->getCount(), triggerCountdown, timeoutTicks, extraTicks, numTicks, 0, 0, true, 100, depth - 1, -1, ANIMTYPE_REVERSIBLE, 0, 0); } |