From ffb414d2655737a78fb192feb4a2828160dd99ad Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 31 Aug 2010 05:18:38 +0000 Subject: AGOS: Add Polish version of Swampy Adventures. svn-id: r52464 --- engines/agos/detection_tables.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'engines/agos') diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h index e3709f8409..963c08849c 100644 --- a/engines/agos/detection_tables.h +++ b/engines/agos/detection_tables.h @@ -2811,6 +2811,27 @@ static const AGOSGameDescription gameDescriptions[] = { GF_OLD_BUNDLE | GF_TALKIE }, + // Simon the Sorcerer's Puzzle Pack - Swampy Adventures - Polish + { + { + "swampy", + "CD", + + { + { "Gswampy", GAME_BASEFILE, "31bfb5169b47ccc19177e61bd31d4391", -1}, + { NULL, 0, NULL, 0} + }, + Common::PL_POL, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO_NOSUBTITLES + }, + + GType_PP, + GID_SWAMPY, + GF_OLD_BUNDLE | GF_TALKIE + }, + // Simon the Sorcerer's Puzzle Pack - Swampy Adventures - Spanish { { -- cgit v1.2.3 From 8f1143bfdc972d86cf5fbbf85a0084a9d0c71447 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 7 Sep 2010 09:02:46 +0000 Subject: COMMON: Remove Rational::operator int/double This prevents accidental implicit rounding and might also fix compilation on AmigaOS4 (bug #3060981). svn-id: r52616 --- engines/agos/animation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 1b3ac9fd65..af85c50114 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -372,10 +372,10 @@ bool MoviePlayerDXA::processFrame() { _vm->_system->unlockScreen(); Common::Rational soundTime(_mixer->getSoundElapsedTime(_bgSound), 1000); - if ((_bgSoundStream == NULL) || ((int)(soundTime * getFrameRate()) / 1000 < getCurFrame() + 1)) { + if ((_bgSoundStream == NULL) || ((soundTime * getFrameRate()).toInt() / 1000 < getCurFrame() + 1)) { if (_bgSoundStream && _mixer->isSoundHandleActive(_bgSound)) { - while (_mixer->isSoundHandleActive(_bgSound) && ((int) (soundTime * getFrameRate())) < getCurFrame()) { + while (_mixer->isSoundHandleActive(_bgSound) && (soundTime * getFrameRate()).toInt() < getCurFrame()) { _vm->_system->delayMillis(10); soundTime = Common::Rational(_mixer->getSoundElapsedTime(_bgSound), 1000); } -- cgit v1.2.3 From 6588398ce6fab85e287b10c2781d3797d7639cb9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 15 Sep 2010 22:00:20 +0000 Subject: MIDI: Send a reset MIDI device signal on startup. This is currently done in the engine code. I adapted AGI, AGOS, DRACI, GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset device on startup. The sound output still works fine (started up a game from every engine), so this should hopefully not introduce any regressions. As far as I can tell it seems that SCUMM does send a proper device reset, so I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am not sure about SCI though. This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI". svn-id: r52736 --- engines/agos/agos.cpp | 6 +++--- engines/agos/midi.cpp | 8 ++++---- engines/agos/midi.h | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 670c701198..bbfce5f1a9 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -562,11 +562,11 @@ Common::Error AGOSEngine::init() { _driver = MidiDriver::createMidi(dev); - if (_nativeMT32) { + if (_nativeMT32) _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); - } - _midi.mapMT32toGM (getGameType() != GType_SIMON2 && !_nativeMT32); + _midi.setNativeMT32(_nativeMT32); + _midi.mapMT32toGM(getGameType() != GType_SIMON2 && !_nativeMT32); _midi.setDriver(_driver); diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp index ab5bfc4c94..858307685c 100644 --- a/engines/agos/midi.cpp +++ b/engines/agos/midi.cpp @@ -77,10 +77,10 @@ int MidiPlayer::open() { return ret; _driver->setTimerCallback(this, &onTimer); - // General MIDI System On message - // Resets all GM devices to default settings - _driver->sysEx((const byte *)"\x7E\x7F\x09\x01", 4); - g_system->delayMillis(20); + if (_nativeMT32) + _driver->sendMT32Reset(); + else + _driver->sendGMReset(); return 0; } diff --git a/engines/agos/midi.h b/engines/agos/midi.h index d4c09118f6..d76997737a 100644 --- a/engines/agos/midi.h +++ b/engines/agos/midi.h @@ -61,6 +61,7 @@ protected: MidiDriver *_driver; bool _map_mt32_to_gm; bool _passThrough; + bool _nativeMT32; MusicInfo _music; MusicInfo _sfx; @@ -97,6 +98,7 @@ public: void loadS1D(Common::File *in, bool sfx = false); void mapMT32toGM(bool map); + void setNativeMT32(bool nativeMT32) { _nativeMT32 = nativeMT32; } void setLoop(bool loop); void startTrack(int track); void queueTrack(int track, bool loop); -- cgit v1.2.3 From 057056b8d335ab3fee8644e066e9db0a06451a90 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Wed, 15 Sep 2010 23:25:46 +0000 Subject: I18N: Add translation for load/save success or failure messages Also improve and update the french translation. svn-id: r52740 --- engines/agos/saveload.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index e9fbaf3525..c461d74a4e 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -26,6 +26,7 @@ #include "common/file.h" #include "common/savefile.h" #include "common/system.h" +#include "common/translation.h" #include "gui/about.h" #include "gui/message.h" @@ -153,7 +154,7 @@ void AGOSEngine::quickLoadOrSave() { Subroutine *sub; success = loadGame(genSaveName(_saveLoadSlot)); if (!success) { - sprintf(buf, "Failed to load game state to file:\n\n%s", filename); + sprintf(buf, _("Failed to load game state from file:\n\n%s"), filename); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { drawIconArray(2, me(), 0, 0); setBitFlag(97, true); @@ -188,7 +189,7 @@ void AGOSEngine::quickLoadOrSave() { } else { success = saveGame(_saveLoadSlot, _saveLoadName); if (!success) - sprintf(buf, "Failed to save game state to file:\n\n%s", filename); + sprintf(buf, _("Failed to save game state to file:\n\n%s"), filename); } if (!success) { @@ -196,7 +197,7 @@ void AGOSEngine::quickLoadOrSave() { dialog.runModal(); } else if (_saveLoadType == 1) { - sprintf(buf, "Successfully saved game state in file:\n\n%s", filename); + sprintf(buf, _("Successfully saved game state in file:\n\n%s"), filename); GUI::TimedMessageDialog dialog(buf, 1500); dialog.runModal(); -- cgit v1.2.3 From 44610eb037a1d087b83311047ec62e515ca0ca1d Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Thu, 16 Sep 2010 19:50:15 +0000 Subject: I18N: fix a buffer size issue with translated save/load strings in AGOS svn-id: r52751 --- engines/agos/saveload.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index c461d74a4e..a734c4bfae 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -147,14 +147,14 @@ void AGOSEngine::quickLoadOrSave() { } bool success; - char buf[60]; + char buf[80]; char *filename = genSaveName(_saveLoadSlot); if (_saveLoadType == 2) { Subroutine *sub; success = loadGame(genSaveName(_saveLoadSlot)); if (!success) { - sprintf(buf, _("Failed to load game state from file:\n\n%s"), filename); + snprintf(buf, sizeof(buf), _("Failed to load game state from file:\n\n%s"), filename); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { drawIconArray(2, me(), 0, 0); setBitFlag(97, true); @@ -189,7 +189,7 @@ void AGOSEngine::quickLoadOrSave() { } else { success = saveGame(_saveLoadSlot, _saveLoadName); if (!success) - sprintf(buf, _("Failed to save game state to file:\n\n%s"), filename); + snprintf(buf, sizeof(buf), _("Failed to save game state to file:\n\n%s"), filename); } if (!success) { @@ -197,7 +197,7 @@ void AGOSEngine::quickLoadOrSave() { dialog.runModal(); } else if (_saveLoadType == 1) { - sprintf(buf, _("Successfully saved game state in file:\n\n%s"), filename); + snprintf(buf, sizeof(buf), _("Successfully saved game state in file:\n\n%s"), filename); GUI::TimedMessageDialog dialog(buf, 1500); dialog.runModal(); -- cgit v1.2.3 From c6b85c2a876f898deb6c7c6fe1938e33d70cd844 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 17 Sep 2010 12:54:00 +0000 Subject: I18N: Use a String instead of a char buffer. This should improve r52751, since String does automatic memory handling, thus no more buffer overflows should by possible by having a too large translated string. svn-id: r52758 --- engines/agos/saveload.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index a734c4bfae..ffa95506c5 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -147,14 +147,14 @@ void AGOSEngine::quickLoadOrSave() { } bool success; - char buf[80]; + Common::String buf; char *filename = genSaveName(_saveLoadSlot); if (_saveLoadType == 2) { Subroutine *sub; success = loadGame(genSaveName(_saveLoadSlot)); if (!success) { - snprintf(buf, sizeof(buf), _("Failed to load game state from file:\n\n%s"), filename); + buf = Common::String::printf(_("Failed to load game state from file:\n\n%s"), filename); } else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) { drawIconArray(2, me(), 0, 0); setBitFlag(97, true); @@ -189,7 +189,7 @@ void AGOSEngine::quickLoadOrSave() { } else { success = saveGame(_saveLoadSlot, _saveLoadName); if (!success) - snprintf(buf, sizeof(buf), _("Failed to save game state to file:\n\n%s"), filename); + buf = Common::String::printf(_("Failed to save game state to file:\n\n%s"), filename); } if (!success) { @@ -197,7 +197,7 @@ void AGOSEngine::quickLoadOrSave() { dialog.runModal(); } else if (_saveLoadType == 1) { - snprintf(buf, sizeof(buf), _("Successfully saved game state in file:\n\n%s"), filename); + buf = Common::String::printf(_("Successfully saved game state in file:\n\n%s"), filename); GUI::TimedMessageDialog dialog(buf, 1500); dialog.runModal(); -- cgit v1.2.3 From 113e14224dce3fca92dc6a7592dd57e28dfcd24a Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 26 Sep 2010 12:07:50 +0000 Subject: AGOS: Fix Valgrind warnings on exit. svn-id: r52904 --- engines/agos/agos.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index bbfce5f1a9..10b6416c61 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -926,10 +926,10 @@ AGOSEngine::~AGOSEngine() { free(_textMem); free(_xtblList); - free(_backGroundBuf); - free(_backBuf); + delete _backGroundBuf; + delete _backBuf; free(_planarBuf); - free(_scaleBuf); + delete _scaleBuf; free(_zoneBuffers); free(_window4BackScn); -- cgit v1.2.3 From 184833924b851b8da29101b868269b785d17cd17 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 26 Sep 2010 12:22:46 +0000 Subject: AGOS: Fix bug #3011638 - WAXWORKS: Crash retrieving spear from the crocodile carcass. svn-id: r52906 --- engines/agos/items.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/agos') diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 874bf1a802..6c6b127a51 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -429,6 +429,9 @@ Item *AGOSEngine::findMaster(int16 a, int16 n) { for (j = 1; j < _itemArraySize; j++) { Item *item = derefItem(j); + if (item == NULL) + continue; + if (wordMatch(item, a, n)) return item; } @@ -442,6 +445,9 @@ Item *AGOSEngine::nextMaster(Item *i, int16 a, int16 n) { for (j = first; j < _itemArraySize; j++) { Item *item = derefItem(j); + if (item == NULL) + continue; + if (wordMatch(item, a, n)) return item; } -- cgit v1.2.3 From ad0200988832697ae2531a45a7ca53870afea6d0 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 26 Sep 2010 12:28:26 +0000 Subject: AGOS: Hopefully fix bug #3000876 ("FF: Crackling/static popping") We want the WAV stream in playSounData() to contain the entire WAV data, but the size we read does not include the eight first bytes. svn-id: r52908 --- engines/agos/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agos') diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index bd4c89a404..6ec72814fa 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -776,7 +776,7 @@ void Sound::playVoiceData(byte *soundData, uint sound) { } void Sound::playSoundData(Audio::SoundHandle *handle, byte *soundData, uint sound, int pan, int vol, bool loop) { - int size = READ_LE_UINT32(soundData + 4); + int size = READ_LE_UINT32(soundData + 4) + 8; Common::MemoryReadStream *stream = new Common::MemoryReadStream(soundData, size); Audio::RewindableAudioStream *sndStream = Audio::makeWAVStream(stream, DisposeAfterUse::YES); -- cgit v1.2.3