diff options
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/detection.cpp | 12 | ||||
-rw-r--r-- | engines/saga/interface.cpp | 8 | ||||
-rw-r--r-- | engines/saga/introproc_fta2.cpp | 6 | ||||
-rw-r--r-- | engines/saga/itedata.cpp | 2 | ||||
-rw-r--r-- | engines/saga/music.cpp | 4 | ||||
-rw-r--r-- | engines/saga/render.cpp | 2 | ||||
-rw-r--r-- | engines/saga/resource_hrs.cpp | 2 | ||||
-rw-r--r-- | engines/saga/saga.cpp | 2 | ||||
-rw-r--r-- | engines/saga/script.cpp | 2 | ||||
-rw-r--r-- | engines/saga/sfuncs.cpp | 2 | ||||
-rw-r--r-- | engines/saga/sndres.cpp | 6 | ||||
-rw-r--r-- | engines/saga/sound.cpp | 14 | ||||
-rw-r--r-- | engines/saga/sound.h | 2 | ||||
-rw-r--r-- | engines/saga/sprite.cpp | 2 |
14 files changed, 33 insertions, 33 deletions
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 2d42ba336f..53540186d6 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -198,7 +198,7 @@ SaveStateList SagaMetaEngine::listSaves(const char *target) const { for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { // Obtain the last 2 digits of the filename, since they correspond to the save slot slotNum = atoi(file->c_str() + file->size() - 2); - + if (slotNum >= 0 && slotNum <= 99) { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { @@ -285,7 +285,7 @@ SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int s int year = saveDate & 0xFFFF; desc.setSaveDate(year, month, day); - + int hour = (saveTime >> 8) & 0xFF; int minutes = saveTime & 0xFF; @@ -298,7 +298,7 @@ SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int s return desc; } - + return SaveStateDescriptor(); } @@ -358,12 +358,12 @@ Common::Error SagaEngine::saveGameState(int slot, const char *desc) { return Common::kNoError; // TODO: return success/failure } -bool SagaEngine::canLoadGameStateCurrently() { +bool SagaEngine::canLoadGameStateCurrently() { return !_scene->isInIntro(); } -bool SagaEngine::canSaveGameStateCurrently() { - return !_scene->isInIntro() && +bool SagaEngine::canSaveGameStateCurrently() { + return !_scene->isInIntro() && (_interface->getMode() == kPanelMain || _interface->getMode() == kPanelChapterSelection); } diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index 072a755f5d..166eb97d55 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -912,7 +912,7 @@ void Interface::drawPanelText(InterfacePanel *panel, PanelButton *panelButton) { textPoint.x = rect.left; textPoint.y = rect.top + 1; - _vm->_font->textDraw(textFont, text, textPoint, + _vm->_font->textDraw(textFont, text, textPoint, _vm->KnownColor2ColorId(kKnownColorVerbText), _vm->KnownColor2ColorId(textShadowKnownColor), kFontShadow); } @@ -1642,7 +1642,7 @@ void Interface::setOption(PanelButton *panelButton) { _vm->_subtitlesEnabled = true; // Set it to "Text" _vm->_voicesEnabled = false; } - + _vm->_speechVolume = _vm->_speechVolume + 25; if (_vm->_speechVolume > 255) _vm->_speechVolume = 0; ConfMan.setInt("speech_volume", _vm->_speechVolume); @@ -2378,8 +2378,8 @@ void Interface::drawVerbPanelText(PanelButton *panelButton, KnownColor textKnown point.y = _mainPanel.y + panelButton->yOffset + 12; } - _vm->_font->textDraw(kKnownFontVerb, text, point, - _vm->KnownColor2ColorId(textKnownColor), _vm->KnownColor2ColorId(textShadowKnownColor), + _vm->_font->textDraw(kKnownFontVerb, text, point, + _vm->KnownColor2ColorId(textKnownColor), _vm->KnownColor2ColorId(textShadowKnownColor), (textShadowKnownColor != kKnownColorTransparent) ? kFontShadow : kFontNormal); } diff --git a/engines/saga/introproc_fta2.cpp b/engines/saga/introproc_fta2.cpp index 0629ebe8e2..4e9541d0b9 100644 --- a/engines/saga/introproc_fta2.cpp +++ b/engines/saga/introproc_fta2.cpp @@ -48,7 +48,7 @@ public: } ~MoviePlayerSMK(void) { closeFile(); } - bool load(const char *filename) { + bool load(const char *filename) { _skipVideo = false; return loadFile(filename); } @@ -100,8 +100,8 @@ void MoviePlayerSMK::playVideo() { bool MoviePlayerSMK::processFrame() { Graphics::Surface *screen = _vm->_system->lockScreen(); - copyFrameToBuffer((byte *)screen->pixels, - (_vm->getDisplayInfo().width - getWidth()) / 2, + copyFrameToBuffer((byte *)screen->pixels, + (_vm->getDisplayInfo().width - getWidth()) / 2, (_vm->getDisplayInfo().height - getHeight()) / 2, _vm->getDisplayInfo().width); _vm->_system->unlockScreen(); diff --git a/engines/saga/itedata.cpp b/engines/saga/itedata.cpp index b8b14427b1..7f323b5587 100644 --- a/engines/saga/itedata.cpp +++ b/engines/saga/itedata.cpp @@ -257,7 +257,7 @@ ObjectTableData ITE_ObjectTable[ITE_OBJECTCOUNT] = { { 40, 269, 644, 416, 0, 41, 39, kObjNotFlat }, // Electrical Cable { 41, 12, 280, 516, 0, 43, 17, kObjUseWith }, // Piece of flint { 42, 5, 876, 332, 32, 65, 18, 0 }, // Rat Cloak - { 43, 52, 556, 1612, 0, 49, 28, kObjUseWith | + { 43, 52, 556, 1612, 0, 49, 28, kObjUseWith | kObjNotFlat }, // Bucket { 48, 52, 732, 948, 0, 50, 27, kObjUseWith }, // Cup { 49, 52, 520, 1872, 0, 53, 29, 0 }, // Fertilizer diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 167861e7f2..8ed978791f 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -442,7 +442,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { uint32 loopStart; debug(2, "Music::play %d, %d", resourceId, flags); - + if (isPlaying() && _trackNumber == resourceId) { return; } @@ -450,7 +450,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { _trackNumber = resourceId; _player->stopMusic(); _mixer->stopHandle(_musicHandle); - + int realTrackNumber; if (_vm->getGameId() == GID_ITE) { diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp index 688eed226e..599fde20e5 100644 --- a/engines/saga/render.cpp +++ b/engines/saga/render.cpp @@ -180,7 +180,7 @@ void Render::drawScene() { textPoint.x = (_vm->_gfx->getBackBufferWidth() - _vm->_font->getStringWidth(kKnownFontPause, pauseString, 0, kFontOutline)) / 2; textPoint.y = 90; - _vm->_font->textDraw(kKnownFontPause, pauseString, textPoint, + _vm->_font->textDraw(kKnownFontPause, pauseString, textPoint, _vm->KnownColor2ColorId(kKnownColorBrightWhite), _vm->KnownColor2ColorId(kKnownColorBlack), kFontOutline); } diff --git a/engines/saga/resource_hrs.cpp b/engines/saga/resource_hrs.cpp index 72f83981a6..cc59f7ccc9 100644 --- a/engines/saga/resource_hrs.cpp +++ b/engines/saga/resource_hrs.cpp @@ -56,7 +56,7 @@ bool Resource_HRS::loadResContext_v2(ResourceContext *context, uint32 contextSiz debug(3, "Context %s =====", context->fileName); context->file->seek(0, SEEK_SET); - + readElement(context->file, origin); // Check if the file is valid diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index f6249a7d0f..7f9fd6870c 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -233,7 +233,7 @@ Common::Error SagaEngine::init() { // Initialize system specific sound _sound = new Sound(this, _mixer); - + if (!isSaga2()) { _interface->converseInit(); _script->setVerb(_script->getVerbType(kVerbWalkTo)); diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp index a81635d587..1384f1bf47 100644 --- a/engines/saga/script.cpp +++ b/engines/saga/script.cpp @@ -86,7 +86,7 @@ Script::Script(SagaEngine *vm) : _vm(vm) { } uint32 scriptResourceId = 0; - + if (!_vm->isSaga2()) { scriptResourceId = _vm->getResourceDescription()->moduleLUTResourceId; debug(3, "Loading module LUT from resource %i", scriptResourceId); diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 01fe8c6c69..26933a36ea 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -279,7 +279,7 @@ void Script::sfTakeObject(SCRIPTFUNC_PARAMS) { // Normally, when objects are picked up, they should always have the same // _spriteListResourceId as their _index value. Some don't in IHNM, so // we fix their sprite here - // Fixes bugs #2057200 - "IHNM: Invisible inventory objects", + // Fixes bugs #2057200 - "IHNM: Invisible inventory objects", // #1861126 - "IHNM: Crash when Gorrister cuts sheet in the mooring ring" // and some incorrect objects in the IHNM demo if (_vm->getGameId() == GID_IHNM) diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 4a32e4f929..38dacf0667 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -193,7 +193,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) { char soundFileName[40]; int dirIndex = resourceId / 64; - + if ((context->fileType & GAME_VOICEFILE) != 0) { if (_voiceSerial == 0) { sprintf(soundFileName, "Voices/VoicesS/Voices%d/VoicesS%03x", dirIndex, resourceId); @@ -203,7 +203,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff } else { sprintf(soundFileName, "SFX/SFX%d/SFX%03x", dirIndex, resourceId); } - + file = new Common::File(); file->open(soundFileName); @@ -212,7 +212,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff ResourceData* resourceData = context->getResourceData(resourceId); file = context->getFile(resourceData); - + file->seek(resourceData->offset); soundResourceLength = resourceData->size; diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp index e693e16629..50d4a2a766 100644 --- a/engines/saga/sound.cpp +++ b/engines/saga/sound.cpp @@ -63,7 +63,7 @@ SndHandle *Sound::getHandle() { return NULL; } -void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume, +void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume, sndHandleType handleType, bool loop) { byte flags; @@ -85,10 +85,10 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int if (!(_vm->getFeatures() & GF_COMPRESSED_SOUNDS)) { if (handleType == kVoiceHandle) - _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer, + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer, buffer.size, buffer.frequency, flags, -1, volume); else - _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer, + _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer, buffer.size, buffer.frequency, flags, -1, volume); } else { Audio::AudioStream *stream = NULL; @@ -127,20 +127,20 @@ void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int default: // No compression, play it as raw sound if (handleType == kVoiceHandle) - _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer, + _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer, buffer.size, buffer.frequency, flags, -1, volume); else - _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer, + _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer, buffer.size, buffer.frequency, flags, -1, volume); break; } if (stream != NULL) { if (handleType == kVoiceHandle) - _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, handle, stream, -1, + _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, handle, stream, -1, volume, 0, true, false); else - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream, -1, + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream, -1, volume, 0, true, false); } } diff --git a/engines/saga/sound.h b/engines/saga/sound.h index 6d9e42a49d..cf6ca4a1a0 100644 --- a/engines/saga/sound.h +++ b/engines/saga/sound.h @@ -90,7 +90,7 @@ public: private: - void playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume, + void playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume, sndHandleType handleType, bool loop); SndHandle *getHandle(); diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index fc82490223..c246a8fafb 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -404,7 +404,7 @@ void Sprite::drawOccluded(SpriteList &spriteList, int spriteNumber, const Point sourceRowPointer += width; } - _vm->_render->addDirtyRect(Common::Rect(clipData.drawSource.x, clipData.drawSource.y, + _vm->_render->addDirtyRect(Common::Rect(clipData.drawSource.x, clipData.drawSource.y, clipData.drawSource.x + width, clipData.drawSource.y + height)); } |