diff options
-rw-r--r-- | engines/mads/events.cpp | 2 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes4.cpp | 4 | ||||
-rw-r--r-- | engines/mads/nebular/nebular_scenes5.cpp | 52 | ||||
-rw-r--r-- | engines/mads/nebular/sound_nebular.cpp | 12 | ||||
-rw-r--r-- | engines/mads/screen.cpp | 6 | ||||
-rw-r--r-- | engines/mads/sprites.cpp | 2 | ||||
-rw-r--r-- | engines/mads/user_interface.cpp | 4 |
7 files changed, 41 insertions, 41 deletions
diff --git a/engines/mads/events.cpp b/engines/mads/events.cpp index e1240da030..c3e6d5c122 100644 --- a/engines/mads/events.cpp +++ b/engines/mads/events.cpp @@ -120,7 +120,7 @@ void EventsManager::changeCursor() { } // Set the raw cursor data to use - CursorMan.replaceCursor(destCursor, cursor->w - 1, cursor->h - 1, + CursorMan.replaceCursor(destCursor, cursor->w - 1, cursor->h - 1, hotspotX, hotspotY, transIndex); showCursor(); delete[] destCursor; diff --git a/engines/mads/nebular/nebular_scenes4.cpp b/engines/mads/nebular/nebular_scenes4.cpp index d369947bf2..d114232255 100644 --- a/engines/mads/nebular/nebular_scenes4.cpp +++ b/engines/mads/nebular/nebular_scenes4.cpp @@ -3782,8 +3782,8 @@ void Scene411::actions() { return; } - if ((_globals[kNextIngredient] >= 4) && (_action.isAction(VERB_TAKE, NOUN_EXPLOSIVES) || _action.isAction(VERB_PUT, NOUN_CHARGE_CASES, NOUN_EXPLOSIVES)) - && !_game._objects[OBJ_CHARGE_CASES].getQuality(3) + if ((_globals[kNextIngredient] >= 4) && (_action.isAction(VERB_TAKE, NOUN_EXPLOSIVES) || _action.isAction(VERB_PUT, NOUN_CHARGE_CASES, NOUN_EXPLOSIVES)) + && !_game._objects[OBJ_CHARGE_CASES].getQuality(3) && _game._objects.isInInventory(OBJ_CHARGE_CASES)) { switch (_game._trigger) { case 0: diff --git a/engines/mads/nebular/nebular_scenes5.cpp b/engines/mads/nebular/nebular_scenes5.cpp index 832c99a5f5..fd5e244872 100644 --- a/engines/mads/nebular/nebular_scenes5.cpp +++ b/engines/mads/nebular/nebular_scenes5.cpp @@ -2352,7 +2352,7 @@ void Scene512::actions() { _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[2]); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 1); break; - + case 1: _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[2]); _game._player._visible = true; @@ -2369,12 +2369,12 @@ void Scene512::actions() { _scene->_sequences.addSubEntry(_globals._sequenceIndexes[4], SEQUENCE_TRIGGER_EXPIRE, 0, 2); } break; - + case 2: _globals[kRegisterOpen] = false; _game._player._stepEnabled = true; break; - + default: break; } @@ -2397,7 +2397,7 @@ void Scene512::actions() { _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_SPRITE, endVal, 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 2); break; - + case 1: if (_game._player._playerPos == Common::Point(218, 152)) { _scene->_sequences.remove(_globals._sequenceIndexes[6]); @@ -2412,13 +2412,13 @@ void Scene512::actions() { _game._objects.addToInventory(OBJ_PADLOCK_KEY); _vm->_dialogs->showItem(OBJ_PADLOCK_KEY, 51226); break; - + case 2: _scene->_sequences.updateTimeout(-1, _globals._sequenceIndexes[2]); _game._player._visible = true; _game._player._stepEnabled = true; break; - + default: break; } @@ -2494,19 +2494,19 @@ void Scene513::enter() { _globals._spriteIndexes[3] = _scene->_sprites.addSprites("*RXCD_9"); _globals._spriteIndexes[4] = _scene->_sprites.addSprites("*RXMRC_9"); - _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); + _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); - _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, -2); + _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); if ((_scene->_priorSceneId == 751) || (_scene->_priorSceneId == 701)) { _game._player._playerPos = Common::Point(296, 147); - _game._player._facing = FACING_WEST; + _game._player._facing = FACING_WEST; _game._player._stepEnabled = false; _scene->_sequences.addTimer(15, 80); } else if (_scene->_priorSceneId != -2) { - _game._player._playerPos = Common::Point(63, 149); + _game._player._playerPos = Common::Point(63, 149); _game._player._facing = FACING_NORTHEAST; _game._player._visible = false; _game._player._stepEnabled = false; @@ -2514,7 +2514,7 @@ void Scene513::enter() { _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, -1); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); _scene->loadAnimation(formAnimName('R', 1), 70); - } + } sceneEntrySound(); @@ -2533,7 +2533,7 @@ void Scene513::step() { _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); _vm->_sound->command(24); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 81); - break; + break; case 81: _game._player.walk(Common::Point(265, 152), FACING_WEST); @@ -2545,10 +2545,10 @@ void Scene513::step() { _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); _vm->_sound->command(25); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[2], SEQUENCE_TRIGGER_EXPIRE, 0, 83); - break; + break; case 83: - _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); + _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); _game._player._stepEnabled = true; break; @@ -2569,13 +2569,13 @@ void Scene513::step() { _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 72); - break; + break; case 72: - _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, -2); + _globals._sequenceIndexes[1] = _scene->_sequences.startCycle(_globals._spriteIndexes[1], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); _game._player._stepEnabled = true; - break; + break; default: break; @@ -2587,7 +2587,7 @@ void Scene513::actions() { switch (_game._trigger) { case 0: _game._player._stepEnabled = false; - _scene->_sequences.remove(_globals._sequenceIndexes[1]); + _scene->_sequences.remove(_globals._sequenceIndexes[1]); _globals._sequenceIndexes[1] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _scene->_sequences.setDepth(_globals._sequenceIndexes[1], 1); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 1); @@ -2613,7 +2613,7 @@ void Scene513::actions() { int syncIdx = _globals._sequenceIndexes[3]; _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, -2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[3]); - _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], syncIdx); + _scene->_sequences.updateTimeout(_globals._sequenceIndexes[3], syncIdx); _scene->_nextSceneId = 504; } break; @@ -2625,7 +2625,7 @@ void Scene513::actions() { switch (_game._trigger) { case 0: _game._player._stepEnabled = false; - _game._player._visible = false; + _game._player._visible = false; _globals._sequenceIndexes[4] = _scene->_sequences.startReverseCycle(_globals._spriteIndexes[4], false, 7, 1, 0, 0); _scene->_sequences.setAnimRange(_globals._sequenceIndexes[4], 1, 2); _scene->_sequences.setMsgLayout(_globals._sequenceIndexes[4]); @@ -2645,7 +2645,7 @@ void Scene513::actions() { break; case 2: - _game._player.walk(Common::Point(296, 147), FACING_WEST); + _game._player.walk(Common::Point(296, 147), FACING_WEST); _scene->_sequences.addTimer(120, 3); break; @@ -2657,7 +2657,7 @@ void Scene513::actions() { break; case 4: - _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); + _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 2); _game._player._stepEnabled = true; if (_globals[kCityFlooded]) @@ -2809,10 +2809,10 @@ void Scene551::step() { case 90: if (_globals[kSexOfRex] == REX_MALE) { _globals._sequenceIndexes[2] = _scene->_sequences.startCycle(_globals._spriteIndexes[2], false, -2); - _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 8); - } else { + _scene->_sequences.setDepth(_globals._sequenceIndexes[2], 8); + } else { _globals._sequenceIndexes[3] = _scene->_sequences.startCycle(_globals._spriteIndexes[3], false, -2); - _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 8); + _scene->_sequences.setDepth(_globals._sequenceIndexes[3], 8); } _vm->_sound->command(28); _scene->_sequences.addTimer(60, 91); @@ -2820,7 +2820,7 @@ void Scene551::step() { case 91: _scene->_reloadSceneFlag = true; - break; + break; default: break; diff --git a/engines/mads/nebular/sound_nebular.cpp b/engines/mads/nebular/sound_nebular.cpp index 90f7cf0212..fc2755db2f 100644 --- a/engines/mads/nebular/sound_nebular.cpp +++ b/engines/mads/nebular/sound_nebular.cpp @@ -1270,7 +1270,7 @@ int ASound2::command9() { command1(); _channels[0].load(pData1); _channels[2].load(loadData(0x123E, 130)); - + command9Randomize(); _channels[1].load(loadData(0x120C, 50)); } @@ -1432,7 +1432,7 @@ int ASound2::command21() { playSound(0x49DE, 16); playSound(0x49EE, 16); playSound(0x49FF, 16); - + return 0; } @@ -1633,7 +1633,7 @@ int ASound3::command(int commandId, int param) { int ASound3::command9() { AdlibChannel::_channelsEnabled = _commandParam != 0; - + return 0; } @@ -2069,7 +2069,7 @@ int ASound4::command12() { int ASound4::command19() { playSound(0x28EC, 8); - + return 0; } @@ -2664,7 +2664,7 @@ const ASound7::CommandPtr ASound7::_commandList[38] = { &ASound7::nullCommand, &ASound7::nullCommand, &ASound7::nullCommand, &ASound7::command15, &ASound7::command16, &ASound7::command16, &ASound7::command18, &ASound7::command19, &ASound7::command20, &ASound7::command21, &ASound7::command22, &ASound7::command23, - &ASound7::command24, &ASound7::command25, &ASound7::command26, &ASound7::command27, + &ASound7::command24, &ASound7::command25, &ASound7::command26, &ASound7::command27, &ASound7::command28, &ASound7::nullCommand, &ASound7::command30, &ASound7::nullCommand, &ASound7::command32, &ASound7::command33, &ASound7::command34, &ASound7::command35, &ASound7::command36, &ASound7::command37 @@ -3024,7 +3024,7 @@ int ASound8::command28() { command1(); _channels[0].load(pData1); _channels[2].load(loadData(0x12F8, 130)); - + byte *pData = loadData(0x12C6, 50); method1(pData); _channels[1].load(pData); diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index bcc41a167d..91aa3abdb0 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -226,7 +226,7 @@ void DirtyAreas::copyToScreen(const Common::Point &posAdjust) { // Check if this is a sane rectangle before attempting to create it if (srcBounds.left >= srcBounds.right || srcBounds.top >= srcBounds.bottom) continue; - + Common::Rect bounds(srcBounds.left + posAdjust.x, srcBounds.top + posAdjust.y, srcBounds.right + posAdjust.x, srcBounds.bottom + posAdjust.y); @@ -575,14 +575,14 @@ void ScreenSurface::updateScreen() { offset = 0; // Copy the screen with the left hand hide side of the screen of a given - // offset width shown at the very right. The offset changes to give + // offset width shown at the very right. The offset changes to give // an effect of shaking the screen offset *= 4; const byte *buf = getBasePtr(offset, 0); g_system->copyRectToScreen(buf, this->pitch, 0, 0, this->pitch - offset, this->h); if (offset > 0) - g_system->copyRectToScreen(this->pixels, this->pitch, + g_system->copyRectToScreen(this->pixels, this->pitch, this->pitch - offset, 0, offset, this->h); } diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp index 0dc83d1abc..a229fccb89 100644 --- a/engines/mads/sprites.cpp +++ b/engines/mads/sprites.cpp @@ -60,7 +60,7 @@ MSprite::MSprite() MSprite::MSprite(Common::SeekableReadStream *source, const Common::Array<RGB6> &palette, const Common::Rect &bounds) - : MSurface(bounds.width(), bounds.height()), + : MSurface(bounds.width(), bounds.height()), _offset(Common::Point(bounds.left, bounds.top)) { // Load the sprite data loadSprite(source, palette); diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 0b4ec69f8f..e410d173d7 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -453,7 +453,7 @@ void UserInterface::mergeFrom(MSurface *src, const Common::Rect &srcBounds, for (int rowCtr = 0; rowCtr < copyRect.height(); ++rowCtr) { // Process each line of the area for (int xCtr = 0; xCtr < copyRect.width(); ++xCtr) { - // Check for the range used for the user interface background, + // Check for the range used for the user interface background, // which are the only pixels that can be replaced if ((destPtr[xCtr] >= 8 && destPtr[xCtr] <= 15) && (int)srcPtr[xCtr] != transparencyIndex) destPtr[xCtr] = srcPtr[xCtr]; @@ -502,7 +502,7 @@ void UserInterface::updateInventoryScroller() { _scrollbarActive = SCROLLBAR_NONE; - if ((screenObjects._category == CAT_INV_SCROLLER) || (screenObjects._category != CAT_INV_SCROLLER + if ((screenObjects._category == CAT_INV_SCROLLER) || (screenObjects._category != CAT_INV_SCROLLER && _scrollbarOldActive == SCROLLBAR_ELEVATOR && _vm->_events->_mouseStatusCopy)) { if (_vm->_events->_mouseStatusCopy || _vm->_easyMouse) { if ((_vm->_events->_mouseClicked || (_vm->_easyMouse && !_vm->_events->_mouseStatusCopy)) |