From 3d1358776f15c3bea3b759481c861b9afd840369 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Fri, 29 Apr 2011 23:10:22 -0500 Subject: SAGA: flag all WIP games with ADGF_UNSTABLE SAGA 2 Games --- engines/saga/detection_tables.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h index f63efd206b..ab73fcba6e 100644 --- a/engines/saga/detection_tables.h +++ b/engines/saga/detection_tables.h @@ -821,7 +821,7 @@ static const SAGAGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO_NONE }, GID_DINO, @@ -851,7 +851,7 @@ static const SAGAGameDescription gameDescriptions[] = { }, Common::EN_ANY, Common::kPlatformPC, - ADGF_NO_FLAGS, + ADGF_UNSTABLE, GUIO_NONE }, GID_FTA2, -- cgit v1.2.3 From 88913c0139ac6d1dfb356d3048702b7bc8ef4079 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 20 Jun 2011 00:59:48 +0200 Subject: ALL: Remove trailing whitespaces This tries to make our code a bit more compliant with our code formatting conventions. For future use, this is the command I used: git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//' --- engines/saga/actor.cpp | 2 +- engines/saga/actor.h | 4 ++-- engines/saga/animation.cpp | 4 ++-- engines/saga/events.cpp | 2 +- engines/saga/introproc_saga2.cpp | 2 +- engines/saga/isomap.cpp | 2 +- engines/saga/palanim.cpp | 4 ++-- engines/saga/saga.cpp | 2 +- engines/saga/scene.h | 2 +- engines/saga/sprite.cpp | 8 ++++---- 10 files changed, 16 insertions(+), 16 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 86606855e3..862a0b4d64 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -340,7 +340,7 @@ void Actor::loadActorSpriteList(ActorData *actor) { uint lastFrame = 0; uint curFrameIndex; int resourceId = actor->_spriteListResourceId; - + if (actor->_frames != NULL) { for (ActorFrameSequences::const_iterator i = actor->_frames->begin(); i != actor->_frames->end(); ++i) { for (int orient = 0; orient < ACTOR_DIRECTIONS_COUNT; orient++) { diff --git a/engines/saga/actor.h b/engines/saga/actor.h index 451497986d..a4f475660d 100644 --- a/engines/saga/actor.h +++ b/engines/saga/actor.h @@ -321,7 +321,7 @@ public: _screenDepth = in->readSint32LE(); _screenScale = in->readSint32LE(); } - + CommonObjectData() { _index = 0; _id = 0; @@ -463,7 +463,7 @@ public: void cmdActorWalkTo(int argc, const char **argv); bool validActorId(uint16 id) { - return (id == ID_PROTAG) || ((id >= objectIndexToId(kGameObjectActor, 0)) && (id < objectIndexToId(kGameObjectActor, _actors.size()))); + return (id == ID_PROTAG) || ((id >= objectIndexToId(kGameObjectActor, 0)) && (id < objectIndexToId(kGameObjectActor, _actors.size()))); } int actorIdToIndex(uint16 id) { return (id == ID_PROTAG) ? 0 : objectIdToIndex(id); } uint16 actorIndexToId(int index) { return (index == 0) ? ID_PROTAG : objectIndexToId(kGameObjectActor, index); } diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 7ec4a59398..8b2d1e9dad 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -169,7 +169,7 @@ int Anim::playCutaway(int cut, bool fade) { ByteArray resourceData; _vm->_resource->loadResource(context, _cutawayList[cut].animResourceId, resourceData); load(MAX_ANIMATIONS + cutawaySlot, resourceData); - + setCycles(MAX_ANIMATIONS + cutawaySlot, _cutawayList[cut].cycles); setFrameTime(MAX_ANIMATIONS + cutawaySlot, 1000 / _cutawayList[cut].frameRate); @@ -414,7 +414,7 @@ void Anim::load(uint16 animId, const ByteArray &resourceData) { } anim->resourceData.resize(resourceData.size() - dataOffset); - + memcpy(anim->resourceData.getBuffer(), resourceData.getBuffer() + dataOffset, anim->resourceData.size()); // Cache frame offsets diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp index 35f41e30ab..ec3ef2f6f9 100644 --- a/engines/saga/events.cpp +++ b/engines/saga/events.cpp @@ -557,7 +557,7 @@ int Events::handleInterval(Event *event) { } EventColumns *Events::chain(EventColumns *eventColumns, const Event &event) { - + if (eventColumns == NULL) { EventColumns tmp; diff --git a/engines/saga/introproc_saga2.cpp b/engines/saga/introproc_saga2.cpp index 80d53a2794..bdf8936a55 100644 --- a/engines/saga/introproc_saga2.cpp +++ b/engines/saga/introproc_saga2.cpp @@ -113,7 +113,7 @@ void Scene::playMovie(const char *filename) { _vm->_system->updateScreen(); } } - + Common::Event event; while (_vm->_system->getEventManager()->pollEvent(event)) { if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp index adea59ca9a..e886f0df82 100644 --- a/engines/saga/isomap.cpp +++ b/engines/saga/isomap.cpp @@ -836,7 +836,7 @@ void IsoMap::drawTile(uint16 tileIndex, const Point &point, const Location *loca count = colDiff; col += colDiff; } - + colDiff = _tileClip.right - col; if (colDiff > 0) { int countDiff = fgRunCount - count; diff --git a/engines/saga/palanim.cpp b/engines/saga/palanim.cpp index 1fefad93ab..021a4c9bac 100644 --- a/engines/saga/palanim.cpp +++ b/engines/saga/palanim.cpp @@ -53,7 +53,7 @@ void PalAnim::loadPalAnim(const ByteArray &resourceData) { debug(3, "PalAnim::loadPalAnim(): Loading %d PALANIM entries.", _entries.size()); for (Common::Array::iterator i = _entries.begin(); i != _entries.end(); ++i) { - + i->cycle = 0; i->colors.resize(readS.readUint16()); @@ -139,7 +139,7 @@ void PalAnim::cycleStep(int vectortime) { void PalAnim::clear() { debug(3, "PalAnim::clear()"); - + _entries.clear(); } diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 15bd2aff72..d168605e99 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -451,7 +451,7 @@ void SagaEngine::loadStrings(StringsTable &stringsTable, const ByteArray &string error("SagaEngine::loadStrings() Wrong offset"); } stringsTable.strings[ui] = &stringsTable.buffer[offset]; - + debug(9, "string[%i]=%s", ui, stringsTable.strings[ui]); } } diff --git a/engines/saga/scene.h b/engines/saga/scene.h index adac3b622a..6e2cb12380 100644 --- a/engines/saga/scene.h +++ b/engines/saga/scene.h @@ -126,7 +126,7 @@ struct SceneDescription { uint16 sceneScriptEntrypointNumber; uint16 startScriptEntrypointNumber; int16 musicResourceId; - + void reset() { flags = resourceListResourceId = endSlope = beginSlope = scriptModuleNumber = sceneScriptEntrypointNumber = startScriptEntrypointNumber = musicResourceId = 0; } diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index 81893c7480..2895c6800c 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -207,7 +207,7 @@ void Sprite::drawClip(const Point &spritePointer, int width, int height, const b const byte *srcPointer; int backBufferPitch = _vm->_gfx->getBackBufferPitch(); - + //find Rects intersection yDiff = clipRect.top - spritePointer.y; if (yDiff > 0) { @@ -247,10 +247,10 @@ void Sprite::drawClip(const Point &spritePointer, int width, int height, const b } bufRowPointer = _vm->_gfx->getBackBufferPixels() + backBufferPitch * yDstOffset + xDstOffset; srcRowPointer = spriteBuffer + width * ySrcOffset + xSrcOffset; - + // validate src, dst buffers assert(_vm->_gfx->getBackBufferPixels() <= bufRowPointer); - assert((_vm->_gfx->getBackBufferPixels() + (_vm->getDisplayInfo().width * _vm->getDisplayInfo().height)) >= + assert((_vm->_gfx->getBackBufferPixels() + (_vm->getDisplayInfo().width * _vm->getDisplayInfo().height)) >= (byte *)(bufRowPointer + backBufferPitch * (cHeight - 1) + cWidth)); assert((const byte *)spriteBuffer <= srcRowPointer); assert(((const byte *)spriteBuffer + (width * height)) >= (const byte *)(srcRowPointer + width * (cHeight - 1) + cWidth)); @@ -469,7 +469,7 @@ void Sprite::scaleBuffer(const byte *src, int width, int height, int scale, size _decodeBuf.resize(outLength); byte *dst = &_decodeBuf.front(); - + memset(dst, 0, _decodeBuf.size()); for (int i = 0; i < height; i++) { -- cgit v1.2.3 From 8e42ee4c983167f0e2589b1401ba90a5df99fcc6 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 23 Jun 2011 00:28:44 +0100 Subject: SAGA: Fix Bug #3323722 ("IHNM: Crash to desktop in Ellen's Adventure") Thanks to fuzzie for this fix. IHNM and ITE should be retested. --- engines/saga/actor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/saga') diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 862a0b4d64..06ce335518 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -385,6 +385,7 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource ByteArrayReadStreamEndian actorS(actorListData); + _actors.clear(); _actors.resize(actorCount); i = 0; for (ActorDataArray::iterator actor = _actors.begin(); actor != _actors.end(); ++actor, i++) { -- cgit v1.2.3 From 714976729d0badab3e7557f62036aac0b2e9cc4f Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 23 Jun 2011 18:35:27 +0100 Subject: SAGA: Fix for Bug #3324850 ("ITE (SAGA): crash in dog sewers") This read of 1 byte past the end of the buffer has existed since the dragonMove() function was implemented, but since the change in bfb0986c to use ByteArray, this now causes an assertion due to the stricter bounds checking. This commit corrects the original issue. Thanks to fuzzie for this fix. --- engines/saga/actor_walk.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/saga') diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp index 5607fcdd66..ea33a0950d 100644 --- a/engines/saga/actor_walk.cpp +++ b/engines/saga/actor_walk.cpp @@ -1165,7 +1165,15 @@ void Actor::moveDragon(ActorData *actor) { dir0 = actor->_actionDirection; dir1 = actor->_tileDirections[actor->_walkStepIndex++]; dir2 = actor->_tileDirections[actor->_walkStepIndex]; - dir3 = actor->_tileDirections[actor->_walkStepIndex + 1]; + // Fix for Bug #3324850 ("ITE (SAGA): crash in dog sewers") + // If there were more than two steps left, get the third (next) step. + // Otherwise, store the second step again so the anim looks right. + // (If you stop the move instead, Rif isn't automatically knocked into + // the Sewer.) + if (actor->_walkStepIndex + 1 < actor->_walkStepsCount) + dir3 = actor->_tileDirections[actor->_walkStepIndex + 1]; + else + dir3 = dir2; if (dir0 != dir1){ actor->_actionDirection = dir0 = dir1; -- cgit v1.2.3 From 0d3a2267c7a06b14302736c50dd4d5e4f9c6eafd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 9 Jul 2011 15:59:30 +0300 Subject: SAGA: Removed several game flags, which are now found more reliably on the fly - The logo screens of all ITE versions are shown correctly now - Wyrmkeep versions, demo versions with scene substitutes, demos with mono music and demo versions with LE VOX encoded voices are all found automatically now --- engines/saga/detection.cpp | 3 --- engines/saga/detection_tables.h | 14 +++++++------- engines/saga/introproc_ite.cpp | 33 +++++++++++++++------------------ engines/saga/music.cpp | 7 ++++++- engines/saga/resource.cpp | 6 ------ engines/saga/saga.cpp | 5 ++--- engines/saga/saga.h | 14 +++++--------- engines/saga/scene.cpp | 2 +- engines/saga/sndres.cpp | 9 +++++---- 9 files changed, 41 insertions(+), 52 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 7a98fe4164..2f1b61eed8 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -67,9 +67,6 @@ int SagaEngine::getGameId() const { return _gameDescription->gameId; } uint32 SagaEngine::getFeatures() const { uint32 result = _gameDescription->features; - if (_gf_wyrmkeep) - result |= GF_WYRMKEEP; - return result; } diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h index ab73fcba6e..a29d835a54 100644 --- a/engines/saga/detection_tables.h +++ b/engines/saga/detection_tables.h @@ -221,7 +221,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NOSPEECH }, GID_ITE, - GF_WYRMKEEP | GF_SCENE_SUBSTITUTES | GF_MONO_MUSIC | GF_LE_VOICES, + 0, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITEWINDEMO_GameFonts), @@ -247,7 +247,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NOSPEECH }, GID_ITE, - GF_WYRMKEEP | GF_LE_VOICES, + 0, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITEWINDEMO_GameFonts), @@ -273,7 +273,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NONE }, GID_ITE, - GF_WYRMKEEP | GF_SCENE_SUBSTITUTES, + 0, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITEWINDEMO_GameFonts), @@ -299,7 +299,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NONE }, GID_ITE, - GF_WYRMKEEP | GF_8BIT_UNSIGNED_PCM, + GF_8BIT_UNSIGNED_PCM, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITEWINDEMO_GameFonts), @@ -356,7 +356,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NONE }, GID_ITE, - GF_WYRMKEEP, + 0, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITEWINDEMO_GameFonts), @@ -388,7 +388,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NONE }, GID_ITE, - GF_WYRMKEEP, + 0, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITE_GameFonts), @@ -418,7 +418,7 @@ static const SAGAGameDescription gameDescriptions[] = { GUIO_NONE }, GID_ITE, - GF_WYRMKEEP, + 0, ITE_DEFAULT_SCENE, &ITE_Resources, ARRAYSIZE(ITE_GameFonts), diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp index 87fd48e2d2..9248f2b530 100644 --- a/engines/saga/introproc_ite.cpp +++ b/engines/saga/introproc_ite.cpp @@ -179,21 +179,22 @@ enum { EventColumns *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]) { int game; Common::Language lang; + bool hasWyrmkeepCredits = (Common::File::exists("credit3n.dlt") || // PC + Common::File::exists("credit3m.dlt")); // Mac // The assumption here is that all WyrmKeep versions have the same // credits, regardless of which operating system they're for. lang = _vm->getLanguage(); - if (_vm->getFeatures() & GF_WYRMKEEP) { + if (hasWyrmkeepCredits) game = kITEWyrmKeep; - } else if (_vm->getPlatform() == Common::kPlatformMacintosh) { + else if (_vm->getPlatform() == Common::kPlatformMacintosh) game = kITEMac; - } else if (_vm->getFeatures() & GF_EXTRA_ITE_CREDITS) { + else if (_vm->getFeatures() & GF_EXTRA_ITE_CREDITS) game = kITEPCCD; - } else { + else game = kITEPC; - } int line_spacing = 0; int paragraph_spacing; @@ -303,6 +304,11 @@ int Scene::SC_ITEIntroAnimProc(int param, void *refCon) { int Scene::ITEIntroAnimProc(int param) { Event event; EventColumns *eventColumns; + bool isMac = _vm->getPlatform() == Common::kPlatformMacintosh; + bool isMultiCD = _vm->getPlatform() == Common::kPlatformUnknown; + bool hasWyrmkeepCredits = (Common::File::exists("credit3n.dlt") || // PC + Common::File::exists("credit3m.dlt")); // Mac + bool isDemo = Common::File::exists("scriptsd.rsc"); switch (param) { case SCENE_BEGIN:{ @@ -324,19 +330,10 @@ int Scene::ITEIntroAnimProc(int param) { // playback int lastAnim; - if (_vm->getFeatures() & GF_WYRMKEEP) { - if (_vm->getPlatform() == Common::kPlatformMacintosh) { - lastAnim = 3; - } else { - lastAnim = 2; - } - } else { - if (_vm->getPlatform() == Common::kPlatformMacintosh) { - lastAnim = 4; - } else { - lastAnim = 5; - } - } + if (hasWyrmkeepCredits || isMultiCD || isDemo) + lastAnim = isMac ? 3 : 2; + else + lastAnim = isMac ? 4 : 5; for (int i = 0; i < lastAnim; i++) _vm->_anim->link(i, i+1); diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 21f3cc489e..85315ab8c4 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -287,7 +287,12 @@ void Music::play(uint32 resourceId, MusicFlags flags) { if (_vm->isBigEndian()) musicFlags &= ~Audio::FLAG_LITTLE_ENDIAN; - if (_vm->getFeatures() & GF_MONO_MUSIC) + // The newer ITE Mac demo version contains a music file, but it has mono music. + // This is the only music file that is about 7MB, whereas all the other ones + // are much larger. Thus, we use this simple heuristic to determine if we got + // mono music in the ITE demos or not. + if (!strcmp(_digitalMusicContext->fileName(), "musicd.rsc") && + _digitalMusicContext->fileSize() < 8000000) musicFlags &= ~Audio::FLAG_STEREO; audioStream = Audio::makeRawStream(musicStream, 11025, musicFlags, DisposeAfterUse::YES); diff --git a/engines/saga/resource.cpp b/engines/saga/resource.cpp index 72b021309c..1b0dfa2f22 100644 --- a/engines/saga/resource.cpp +++ b/engines/saga/resource.cpp @@ -162,12 +162,6 @@ bool Resource::createContexts() { uint16 voiceFileAddType; }; - - // If the Wyrmkeep credits file is found, set the Wyrmkeep version flag to true - if (Common::File::exists("credit3n.dlt")) { - _vm->_gf_wyrmkeep = true; - } - for (const ADGameFileDescription *gameFileDescription = _vm->getFilesDescriptions(); gameFileDescription->fileName; gameFileDescription++) { addContext(gameFileDescription->fileName, gameFileDescription->fileType); diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index d168605e99..6e272d37c0 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -72,9 +72,8 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc) _readingSpeed = 0; _copyProtection = false; - _gf_wyrmkeep = false; _musicWasPlaying = false; - + _hasITESceneSubstitutes = false; _sndRes = NULL; _sound = NULL; @@ -211,9 +210,9 @@ Common::Error SagaEngine::run() { _subtitlesEnabled = ConfMan.getBool("subtitles"); _readingSpeed = getTalkspeed(); _copyProtection = ConfMan.getBool("copy_protection"); - _gf_wyrmkeep = false; _musicWasPlaying = false; _isIHNMDemo = Common::File::exists("music.res"); + _hasITESceneSubstitutes = Common::File::exists("boarhall.bbm"); if (_readingSpeed > 3) _readingSpeed = 0; diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 23258e1277..336883680a 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -137,16 +137,12 @@ enum GameFileTypes { }; enum GameFeatures { - GF_WYRMKEEP = 1 << 0, - GF_ITE_FLOPPY = 1 << 1, - GF_SCENE_SUBSTITUTES = 1 << 2, + GF_ITE_FLOPPY = 1 << 0, #if 0 - GF_OLD_ITE_DOS = 1 << 3, // Currently unused + GF_OLD_ITE_DOS = 1 << 1, // Currently unused #endif - GF_MONO_MUSIC = 1 << 4, - GF_EXTRA_ITE_CREDITS = 1 << 5, - GF_LE_VOICES = 1 << 6, - GF_8BIT_UNSIGNED_PCM = 1 << 7 + GF_EXTRA_ITE_CREDITS = 1 << 2, + GF_8BIT_UNSIGNED_PCM = 1 << 3 }; enum VerbTypeIds { @@ -532,9 +528,9 @@ public: int _readingSpeed; bool _copyProtection; - bool _gf_wyrmkeep; bool _musicWasPlaying; bool _isIHNMDemo; + bool _hasITESceneSubstitutes; SndRes *_sndRes; Sound *_sound; diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 66ee8f4504..61e62d5626 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -451,7 +451,7 @@ void Scene::changeScene(int16 sceneNumber, int actorsEntrance, SceneTransitionTy // This is used for latter ITE demos where all places on world map except // Tent Faire are substituted with LBM picture and short description - if (_vm->getFeatures() & GF_SCENE_SUBSTITUTES) { + if (_vm->_hasITESceneSubstitutes) { for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) { if (sceneSubstitutes[i].sceneId == sceneNumber) { Surface bbmBuffer; diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 2433c93e93..add34e22a2 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -262,9 +262,12 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff buffer.flags |= Audio::FLAG_UNSIGNED; buffer.flags &= ~Audio::FLAG_16BITS; } else { - // Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded - if (!uncompressedSound && !scumm_stricmp(context->fileName(), "voicesd.rsc")) + // Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded. + // These are LE in all the Windows and Mac demos + if (!uncompressedSound && !scumm_stricmp(context->fileName(), "voicesd.rsc")) { resourceType = kSoundVOX; + buffer.flags |= Audio::FLAG_LITTLE_ENDIAN; + } } } buffer.buffer = NULL; @@ -272,8 +275,6 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff // Check for LE sounds if (!context->isBigEndian()) buffer.flags |= Audio::FLAG_LITTLE_ENDIAN; - if ((context->fileType() & GAME_VOICEFILE) && (_vm->getFeatures() & GF_LE_VOICES)) - buffer.flags |= Audio::FLAG_LITTLE_ENDIAN; // Older Mac versions of ITE were Macbinary packed int soundOffset = (context->fileType() & GAME_MACBINARY) ? 36 : 0; -- cgit v1.2.3 From 1b231ed7ff428b05d1fc6e5f8786325b7eee95a3 Mon Sep 17 00:00:00 2001 From: eriktorbjorn Date: Sun, 10 Jul 2011 07:39:38 +0200 Subject: SAGA: Mute the music while the game is paused It already paused the music, but any notes that were playing were just left hanging. At least with the ALSA MIDI driver. This was quite annoying when using the debug console. --- engines/saga/music.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/saga') diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 85315ab8c4..49d3f91d77 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -373,10 +373,12 @@ void Music::play(uint32 resourceId, MusicFlags flags) { void Music::pause() { _player->pause(); + _player->setVolume(0); } void Music::resume() { _player->resume(); + _player->setVolume(_vm->_musicVolume); } void Music::stop() { -- cgit v1.2.3 From ea53386f3e76301673610f3e1cdd9b60ac4704e0 Mon Sep 17 00:00:00 2001 From: eriktorbjorn Date: Sun, 10 Jul 2011 13:36:03 +0200 Subject: SAGA: Use #error instead of a deliberate syntax error. --- engines/saga/actor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/saga') diff --git a/engines/saga/actor.h b/engines/saga/actor.h index a4f475660d..d9d4b70168 100644 --- a/engines/saga/actor.h +++ b/engines/saga/actor.h @@ -650,7 +650,7 @@ private: public: #ifdef ACTOR_DEBUG #ifndef SAGA_DEBUG - you must also define SAGA_DEBUG + #error You must also define SAGA_DEBUG #endif //path debug - use with care struct DebugPoint { -- cgit v1.2.3