diff options
34 files changed, 332 insertions, 71 deletions
diff --git a/devtools/scumm-md5.txt b/devtools/scumm-md5.txt index 7d2ea94f10..99e23f7aca 100644 --- a/devtools/scumm-md5.txt +++ b/devtools/scumm-md5.txt @@ -841,6 +841,7 @@ spyfox SPY Fox 1: Dry Cereal 3de99ef0523f8ca7958faa3afccd035a -1 us All HE 100 Updated - Kirben 23394c8d29cc63c61313959431a12476 -1 en Windows HE 100 Updated - Jonathan 50b831f11b8c4b83784cf81f4dcc69ea -1 en Wii HE 100 - - sanguinehearts + 15878e3bee2e1e759184abee98589eaa -1 en iOS HE 100 - - clone2727 53e94115b55dd51d4b8ff0871aa1df1e 20103 en All - Demo - khalek, sev fbdd947d21e8f5bac6d6f7a316af1c5a 15693 en All - Demo - sev diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 29d1b36e19..10c01741ae 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -333,7 +333,7 @@ void MoviePlayerDXA::startSound() { if (_bgSoundStream != NULL) { _vm->_mixer->stopHandle(_bgSound); - _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream); + _vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_bgSound, _bgSoundStream, -1, getVolume(), getBalance()); } } @@ -399,6 +399,16 @@ bool MoviePlayerDXA::processFrame() { return false; } +void MoviePlayerDXA::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_bgSound)) + g_system->getMixer()->setChannelVolume(_bgSound, getVolume()); +} + +void MoviePlayerDXA::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_bgSound)) + g_system->getMixer()->setChannelBalance(_bgSound, getBalance()); +} + /////////////////////////////////////////////////////////////////////////////// // Movie player for Smacker movies /////////////////////////////////////////////////////////////////////////////// diff --git a/engines/agos/animation.h b/engines/agos/animation.h index 11936aa338..d1ff074b03 100644 --- a/engines/agos/animation.h +++ b/engines/agos/animation.h @@ -83,6 +83,11 @@ public: void nextFrame(); virtual void stopVideo(); +protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + private: void handleNextFrame(); bool processFrame(); diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 83fca9ac35..c10b986c60 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -315,7 +315,7 @@ VideoHandle VideoManager::playMovieRiven(uint16 id) { for (uint16 i = 0; i < _mlstRecords.size(); i++) if (_mlstRecords[i].code == id) { debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping"); - return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0); + return createVideoHandle(_mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0, _mlstRecords[i].volume); } return NULL_VID_HANDLE; @@ -371,7 +371,7 @@ void VideoManager::disableAllMovies() { _videoStreams[i].enabled = false; } -VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop) { +VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume) { // First, check to see if that video is already playing for (uint32 i = 0; i < _videoStreams.size(); i++) if (_videoStreams[i].id == id) @@ -381,6 +381,7 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool Video::QuickTimeDecoder *decoder = new Video::QuickTimeDecoder(); decoder->setChunkBeginOffset(_vm->getResourceOffset(ID_TMOV, id)); decoder->loadStream(_vm->getResource(ID_TMOV, id)); + decoder->setVolume(volume); VideoEntry entry; entry.clear(); @@ -403,7 +404,7 @@ VideoHandle VideoManager::createVideoHandle(uint16 id, uint16 x, uint16 y, bool return _videoStreams.size() - 1; } -VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop) { +VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop, byte volume) { // First, check to see if that video is already playing for (uint32 i = 0; i < _videoStreams.size(); i++) if (_videoStreams[i].filename == filename) @@ -426,6 +427,7 @@ VideoHandle VideoManager::createVideoHandle(const Common::String &filename, uint } entry->loadStream(file); + entry->setVolume(volume); // Search for any deleted videos so we can take a formerly used slot for (uint32 i = 0; i < _videoStreams.size(); i++) diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 8736782d7a..98bcadfb53 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -120,8 +120,8 @@ private: // Keep tabs on any videos playing Common::Array<VideoEntry> _videoStreams; - VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop); - VideoHandle createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop); + VideoHandle createVideoHandle(uint16 id, uint16 x, uint16 y, bool loop, byte volume = 0xff); + VideoHandle createVideoHandle(const Common::String &filename, uint16 x, uint16 y, bool loop, byte volume = 0xff); }; } // End of namespace Mohawk diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index ff78d4f18b..506f79b4d8 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -445,7 +445,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "a4b73d5d2b55bdb6e44345e99c8fbdd0", 4804}, {"resource.000", 0, "d908dbef56816ac6c60dd145fdeafb2b", 3536046}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO1(GUIO_MIDIGM) }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO4(GUIO_MIDIGM, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // Eco Quest - English DOS Floppy // SCI interpreter version 1.000.510 @@ -1007,7 +1007,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.map", 0, "459f5b04467bc2107aec02f5c4b71b37", 4878}, {"resource.001", 0, "3876da2ce16fb7dea2f5d943d946fa84", 1652150}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO2(GUIO_MIDIGM, GAMEOPTION_JONES_CDAUDIO) }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO4(GUIO_MIDIGM, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_FB01_MIDI, GAMEOPTION_JONES_CDAUDIO) }, // King's Quest 1 SCI Remake - English Amiga (from www.back2roots.org) // Executable scanning reports "1.003.007" @@ -1221,7 +1221,7 @@ static const struct ADGameDescription SciGameDescriptions[] = { {"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368}, {"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210}, AD_LISTEND}, - Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO1(GUIO_MIDIGM) }, + Common::EN_ANY, Common::kPlatformWindows, ADGF_CD, GUIO4(GUIO_MIDIGM, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI) }, // King's Quest 5 - English DOS Floppy // SCI interpreter version 1.000.060 diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 42651ec4a5..664c97f7b5 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -475,6 +475,7 @@ reg_t kMoveToEnd(EngineState *s, int argc, reg_t *argv); reg_t kGetWindowsOption(EngineState *s, int argc, reg_t *argv); reg_t kWinHelp(EngineState *s, int argc, reg_t *argv); reg_t kGetConfig(EngineState *s, int argc, reg_t *argv); +reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv); reg_t kCelInfo(EngineState *s, int argc, reg_t *argv); reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv); reg_t kScrollWindow(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 1fa12b01fd..4ddf0534ea 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -239,6 +239,7 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { { SIG_SCI32, 15, MAP_CALL(FileIOReadWord), "i", NULL }, { SIG_SCI32, 16, MAP_CALL(FileIOWriteWord), "ii", NULL }, { SIG_SCI32, 17, MAP_CALL(FileIOCreateSaveSlot), "ir", NULL }, + { SIG_SCI32, 18, MAP_EMPTY(FileIOChangeDirectory), "r", NULL }, // for SQ6, when changing the savegame directory in the save/load dialog { SIG_SCI32, 19, MAP_CALL(Stub), "r", NULL }, // for Torin / Torin demo #endif SCI_SUBOPENTRY_TERMINATOR @@ -560,6 +561,7 @@ static SciKernelMapEntry s_kernelMap[] = { { MAP_CALL(GetWindowsOption), SIG_EVERYWHERE, "i", NULL, NULL }, { MAP_CALL(WinHelp), SIG_EVERYWHERE, "(.*)", NULL, NULL }, { MAP_CALL(GetConfig), SIG_EVERYWHERE, "ro", NULL, NULL }, + { MAP_CALL(GetSierraProfileInt), SIG_EVERYWHERE, "rri", NULL, NULL }, { MAP_CALL(CelInfo), SIG_EVERYWHERE, "iiiiii", NULL, NULL }, { MAP_CALL(SetLanguage), SIG_EVERYWHERE, "r", NULL, NULL }, { MAP_CALL(ScrollWindow), SIG_EVERYWHERE, "(.*)", NULL, NULL }, @@ -579,11 +581,6 @@ static SciKernelMapEntry s_kernelMap[] = { // the game window in Phantasmagoria 2. We ignore these settings completely. { MAP_EMPTY(SetWindowsOption), SIG_EVERYWHERE, "ii", NULL, NULL }, - // Used by the Windows version of Phantasmagoria 1 to get the video speed setting. This is called after - // kGetConfig and overrides the setting obtained by it. It is a dummy function in the DOS Version. We can - // just use GetConfig and mark this one as empty, like the DOS version does. - { MAP_EMPTY(GetSierraProfileInt), SIG_EVERYWHERE, "(.*)", NULL, NULL }, - // Debug function called whenever the current room changes { MAP_EMPTY(NewRoom), SIG_EVERYWHERE, "(.*)", NULL, NULL }, diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index af438bdaff..8d1b078697 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -812,7 +812,11 @@ reg_t kFileIOReadRaw(EngineState *s, int argc, reg_t *argv) { FileHandle *f = getFileFromHandle(s, handle); if (f) { bytesRead = f->_in->read(buf, size); - s->_segMan->memcpy(argv[1], (const byte*)buf, size); + // TODO: What happens if less bytes are read than what has + // been requested? (i.e. if bytesRead is non-zero, but still + // less than size) + if (bytesRead > 0) + s->_segMan->memcpy(argv[1], (const byte*)buf, size); } delete[] buf; diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index a32480c168..2be9432521 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -356,10 +356,52 @@ reg_t kGetConfig(EngineState *s, int argc, reg_t *argv) { Common::String setting = s->_segMan->getString(argv[0]); reg_t data = readSelector(s->_segMan, argv[1], SELECTOR(data)); - warning("Get config setting %s", setting.c_str()); - s->_segMan->strcpy(data, ""); + // This function is used to get the benchmarked results stored in the + // resource.cfg configuration file in Phantasmagoria 1. Normally, + // the configuration file contains values stored by the installer + // regarding audio and video settings, which are then used by the + // executable. In Phantasmagoria, two extra executable files are used + // to perform system benchmarks: + // - CPUID for the CPU benchmarks, sets the cpu and cpuspeed settings + // - HDDTEC for the graphics and CD-ROM benchmarks, sets the videospeed setting + // + // These settings are then used by the game scripts directly to modify + // the game speed and graphics output. The result of this call is stored + // in global 178. The scripts check these values against the value 425. + // Anything below that makes Phantasmagoria awfully sluggish, so we're + // setting everything to 500, which makes the game playable. + + if (setting == "videospeed") { + s->_segMan->strcpy(data, "500"); + } else if (setting == "cpu") { + // We always return the fastest CPU setting that CPUID can detect + // (i.e. 586). + s->_segMan->strcpy(data, "586"); + } else if (setting == "cpuspeed") { + s->_segMan->strcpy(data, "500"); + } else { + error("GetConfig: Unknown configuration setting %s", setting.c_str()); + } + return argv[1]; } + +reg_t kGetSierraProfileInt(EngineState *s, int argc, reg_t *argv) { + Common::String category = s->_segMan->getString(argv[0]); // always "config" + if (category != "config") + error("GetSierraProfileInt: category isn't 'config', it's '%s'", category.c_str()); + + Common::String setting = s->_segMan->getString(argv[1]); + if (setting != "videospeed") + error("GetSierraProfileInt: setting isn't 'videospeed', it's '%s'", setting.c_str()); + + // The game scripts pass 425 as the third parameter for some unknown reason, + // as after the call they compare the result to 425 anyway... + + // We return the same fake value for videospeed as with kGetConfig + return make_reg(0, 500); +} + #endif // kIconBar is really a subop of kMacPlatform for SCI1.1 Mac diff --git a/engines/sci/video/robot_decoder.cpp b/engines/sci/video/robot_decoder.cpp index 77f45e0788..95b3c2abc1 100644 --- a/engines/sci/video/robot_decoder.cpp +++ b/engines/sci/video/robot_decoder.cpp @@ -116,7 +116,7 @@ bool RobotDecoder::loadStream(Common::SeekableReadStream *stream) { if (_header.hasSound) { _audioStream = Audio::makeQueuingAudioStream(11025, false); - _mixer->playStream(Audio::Mixer::kMusicSoundType, &_audioHandle, _audioStream); + _mixer->playStream(Audio::Mixer::kMusicSoundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); } readPaletteChunk(_header.paletteDataSize); @@ -361,6 +361,16 @@ void RobotDecoder::close() { reset(); } +void RobotDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +} + +void RobotDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +} + #endif } // End of namespace Sci diff --git a/engines/sci/video/robot_decoder.h b/engines/sci/video/robot_decoder.h index 3f93582418..e9cefe7d91 100644 --- a/engines/sci/video/robot_decoder.h +++ b/engines/sci/video/robot_decoder.h @@ -71,6 +71,11 @@ public: Common::Point getPos() const { return _pos; } protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + + // FixedRateVideoDecoder API Common::Rational getFrameRate() const { return Common::Rational(60, 10); } private: diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 2da0abb5df..cd878b49ae 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -156,6 +156,7 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const { case kGenHEMac: case kGenHEMacNoParens: case kGenHEPC: + case kGenHEIOS: if (_game.heversion >= 98 && room >= 0) { int disk = 0; if (_heV7DiskOffsets) @@ -168,7 +169,11 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const { break; case 1: id = 'a'; - result = Common::String::format("%s.(a)", _filenamePattern.pattern); + // Some of the newer HE games for iOS use the ".hea" suffix instead + if (_filenamePattern.genMethod == kGenHEIOS) + result = Common::String::format("%s.hea", _filenamePattern.pattern); + else + result = Common::String::format("%s.(a)", _filenamePattern.pattern); break; default: id = '0'; @@ -180,7 +185,7 @@ Common::String ScummEngine_v70he::generateFilename(const int room) const { id = (room == 0) ? '0' : '1'; } - if (_filenamePattern.genMethod == kGenHEPC) { + if (_filenamePattern.genMethod == kGenHEPC || _filenamePattern.genMethod == kGenHEIOS) { // For HE >= 98, we already called snprintf above. if (_game.heversion < 98 || room < 0) result = Common::String::format("%s.he%c", _filenamePattern.pattern, id); @@ -217,6 +222,7 @@ static Common::String generateFilenameForDetection(const char *pattern, Filename break; case kGenHEPC: + case kGenHEIOS: result = Common::String::format("%s.he0", pattern); break; diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h index b6dfa757bb..5ed6b5aab0 100644 --- a/engines/scumm/detection.h +++ b/engines/scumm/detection.h @@ -99,6 +99,7 @@ enum FilenameGenMethod { kGenHEMac, kGenHEMacNoParens, kGenHEPC, + kGenHEIOS, kGenUnchanged }; diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index e1989d5274..f48b40dd48 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -885,6 +885,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "spyfox", "Spy Fox", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, { "spyfox", "Spy Fox Demo", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, { "spyfox", "JR-Demo", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, + { "spyfox", "game", kGenHEIOS, Common::EN_ANY, Common::kPlatformIOS, 0 }, { "spyfox2", "spyfox2", kGenHEPC, UNK_LANG, UNK, 0 }, { "spyfox2", "sf2-demo", kGenHEPC, UNK_LANG, UNK, 0 }, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 3957c7c42d..f719f7df19 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Tue Apr 24 03:50:58 2012 + This file was generated by the md5table tool on Mon May 28 18:17:29 2012 DO NOT EDIT MANUALLY! */ @@ -73,6 +73,7 @@ static const MD5Table md5table[] = { { "151071053a1d0021198216713939521d", "freddi2", "HE 80", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "15240c59d3681ed53f714f8d925cb2d6", "maniac", "V2", "V2", -1, Common::ES_ESP, Common::kPlatformAtariST }, { "157367c3c21e0d03a0cba44361b4cf65", "indy3", "No AdLib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST }, + { "15878e3bee2e1e759184abee98589eaa", "spyfox", "HE 100", "", -1, Common::EN_ANY, Common::kPlatformIOS }, { "15e03ffbfeddb9c2aebc13dcb2a4a8f4", "monkey", "VGA", "VGA", 8357, Common::EN_ANY, Common::kPlatformPC }, { "15f588e887e857e8c56fe6ade4956168", "atlantis", "Floppy", "Floppy", -1, Common::ES_ESP, Common::kPlatformAmiga }, { "16542a7342a918bfe4ba512007d36c47", "FreddisFunShop", "HE 99L", "", -1, Common::EN_USA, Common::kPlatformUnknown }, diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp index 082c569fda..d38f5a26cf 100644 --- a/engines/sword25/fmv/theora_decoder.cpp +++ b/engines/sword25/fmv/theora_decoder.cpp @@ -289,7 +289,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { } if (_audStream) - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream, -1, getVolume(), getBalance()); } else { // tear down the partial vorbis setup vorbis_info_clear(&_vorbisInfo); @@ -550,6 +550,16 @@ void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) { Graphics::convertYUV420ToRGB(&_surface, YUVBuffer[kBufferY].data, YUVBuffer[kBufferU].data, YUVBuffer[kBufferV].data, YUVBuffer[kBufferY].width, YUVBuffer[kBufferY].height, YUVBuffer[kBufferY].stride, YUVBuffer[kBufferU].stride); } +void TheoraDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) + g_system->getMixer()->setChannelVolume(*_audHandle, getVolume()); +} + +void TheoraDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) + g_system->getMixer()->setChannelBalance(*_audHandle, getBalance()); +} + } // End of namespace Sword25 #endif diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h index 4fd7cc0f03..739040024f 100644 --- a/engines/sword25/fmv/theora_decoder.h +++ b/engines/sword25/fmv/theora_decoder.h @@ -87,6 +87,9 @@ public: bool endOfVideo() const; protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); void pauseVideoIntern(bool pause); private: diff --git a/gui/themes/translations.dat b/gui/themes/translations.dat Binary files differindex a9645f226a..1463b70212 100644 --- a/gui/themes/translations.dat +++ b/gui/themes/translations.dat diff --git a/po/cs_CZ.po b/po/cs_CZ.po index f6005d02f1..dd13e78f1b 100644 --- a/po/cs_CZ.po +++ b/po/cs_CZ.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: ScummVM 1.4.0git\n" "Report-Msgid-Bugs-To: scummvm-devel@lists.sf.net\n" "POT-Creation-Date: 2012-05-20 22:39+0100\n" -"PO-Revision-Date: 2012-03-17 19:07+0100\n" +"PO-Revision-Date: 2012-05-22 21:02+0100\n" "Last-Translator: Zbyněk Schwarz <zbynek.schwarz@gmail.com>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -194,9 +194,8 @@ msgid "Platform:" msgstr "Platforma:" #: gui/launcher.cpp:231 -#, fuzzy msgid "Engine" -msgstr "Prohlédnout" +msgstr "Jádro" #: gui/launcher.cpp:239 gui/options.cpp:1062 gui/options.cpp:1079 msgid "Graphics" @@ -1250,12 +1249,12 @@ msgstr "Přesto spustit" #: engines/agi/detection.cpp:145 engines/dreamweb/detection.cpp:47 #: engines/sci/detection.cpp:390 msgid "Use original save/load screens" -msgstr "" +msgstr "Použít původní obrazovky načtení/uložení" #: engines/agi/detection.cpp:146 engines/dreamweb/detection.cpp:48 #: engines/sci/detection.cpp:391 msgid "Use the original save/load screens, instead of the ScummVM ones" -msgstr "" +msgstr "Použít původní obrazovky načtení/uložení místo ze ScummVM" #: engines/agi/saveload.cpp:827 engines/sci/engine/kfile.cpp:674 msgid "Restore game:" @@ -1266,78 +1265,76 @@ msgid "Restore" msgstr "Obnovit" #: engines/dreamweb/detection.cpp:57 -#, fuzzy msgid "Use bright palette mode" -msgstr "Položka vpravo nahoře" +msgstr "Použít režim jasné palety" #: engines/dreamweb/detection.cpp:58 msgid "Display graphics using the game's bright palette" -msgstr "" +msgstr "Zobrazit grafiku pomocí jasné palety hry" #: engines/sci/detection.cpp:370 msgid "EGA undithering" msgstr "Nerozkládání EGA" #: engines/sci/detection.cpp:371 -#, fuzzy msgid "Enable undithering in EGA games" -msgstr "Povolit nerozkládání v EGA hrách, které to podporují" +msgstr "Povolit nerozkládání v EGA hrách" #: engines/sci/detection.cpp:380 -#, fuzzy msgid "Prefer digital sound effects" -msgstr "Hlasitost speciálních zvukových efektů" +msgstr "Upřednostňovat digitální zvukové efekty" #: engines/sci/detection.cpp:381 msgid "Prefer digital sound effects instead of synthesized ones" -msgstr "" +msgstr "Upřednostňovat digitální zvukové efekty před syntetizovanými" #: engines/sci/detection.cpp:400 msgid "Use IMF/Yahama FB-01 for MIDI output" -msgstr "" +msgstr "Použít IMF/Yahama FB-01 pro výstup MIDI" #: engines/sci/detection.cpp:401 msgid "" "Use an IBM Music Feature card or a Yahama FB-01 FM synth module for MIDI " "output" msgstr "" +"Použít kartu IBM Music Feature nebo modul syntetizátoru Yahama FB-01 FM pro " +"výstup MIDI" #: engines/sci/detection.cpp:411 msgid "Use CD audio" -msgstr "" +msgstr "Použít zvuky na CD" #: engines/sci/detection.cpp:412 msgid "Use CD audio instead of in-game audio, if available" -msgstr "" +msgstr "Použít zvuky na CD místo ve hře, pokud je dostupné" #: engines/sci/detection.cpp:422 msgid "Use Windows cursors" -msgstr "" +msgstr "Použít kurzory Windows" #: engines/sci/detection.cpp:423 msgid "" "Use the Windows cursors (smaller and monochrome) instead of the DOS ones" -msgstr "" +msgstr "Použít kurzory Windows (menší a černobílé) místo kurzorů z DOS" #: engines/sci/detection.cpp:433 -#, fuzzy msgid "Use silver cursors" -msgstr "Obyčejný kurzor" +msgstr "Použít stříbrné kurzory" #: engines/sci/detection.cpp:434 msgid "" "Use the alternate set of silver cursors, instead of the normal golden ones" -msgstr "" +msgstr "Použít alternativní sadu stříbrných kurzorů místo standardních zlatých" #: engines/scumm/dialogs.cpp:175 #, c-format msgid "Insert Disk %c and Press Button to Continue." -msgstr "Vložte Disk %c a Stiskněte Tlačítko Pro Poračování." +msgstr "Vložte Disk %c a Stiskněte Tlačítko Pro Pokračování." #: engines/scumm/dialogs.cpp:176 #, c-format msgid "Unable to Find %s, (%c%d) Press Button." -msgstr "Nelze Najít %s, (%c%d) Stsikěte Tlačítko." +msgstr "Nelze Najít %s, (%c%d) Stiskněte Tlačítko." #: engines/scumm/dialogs.cpp:177 #, c-format @@ -2080,61 +2077,59 @@ msgstr "Nelze uložit hru." #. Malcolm makes a joke. #: engines/kyra/detection.cpp:62 msgid "Studio audience" -msgstr "" +msgstr "Publikum ve studiu" #: engines/kyra/detection.cpp:63 msgid "Enable studio audience" -msgstr "" +msgstr "Povolit publikum ve studiu" #. I18N: This option allows the user to skip text and cutscenes. #: engines/kyra/detection.cpp:73 msgid "Skip support" -msgstr "" +msgstr "Podpora přeskočení" #: engines/kyra/detection.cpp:74 msgid "Allow text and cutscenes to be skipped" -msgstr "" +msgstr "Umožnit, aby text a videa mohly být přeskočeny" #. I18N: Helium mode makes people sound like they've inhaled Helium. #: engines/kyra/detection.cpp:84 msgid "Helium mode" -msgstr "" +msgstr "Héliový režim" #: engines/kyra/detection.cpp:85 -#, fuzzy msgid "Enable helium mode" -msgstr "Zapnout režim Roland GS" +msgstr "Zapnout héliový režim" #. I18N: When enabled, this option makes scrolling smoother when #. changing from one screen to another. #: engines/kyra/detection.cpp:99 msgid "Smooth scrolling" -msgstr "" +msgstr "Plynulé posunování" #: engines/kyra/detection.cpp:100 msgid "Enable smooth scrolling when walking" -msgstr "" +msgstr "Povolit plynulé posunování při chůzi" #. I18N: When enabled, this option changes the cursor when it floats to the #. edge of the screen to a directional arrow. The player can then click to #. walk towards that direction. #: engines/kyra/detection.cpp:112 -#, fuzzy msgid "Floating cursors" -msgstr "Obyčejný kurzor" +msgstr "Plovoucí kurzory" #: engines/kyra/detection.cpp:113 msgid "Enable floating cursors" -msgstr "" +msgstr "Povolit plovoucí kurzory" #. I18N: HP stands for Hit Points #: engines/kyra/detection.cpp:127 msgid "HP bar graphs" -msgstr "" +msgstr "Sloupcový indikátor zdraví" #: engines/kyra/detection.cpp:128 msgid "Enable hit point bar graphs" -msgstr "" +msgstr "Povolit sloupcový indikátor zdraví" #: engines/kyra/lol.cpp:478 msgid "Attack 1" @@ -2200,11 +2195,11 @@ msgstr "" #: engines/queen/queen.cpp:59 engines/sky/detection.cpp:44 msgid "Floppy intro" -msgstr "" +msgstr "Úvod z diskety" #: engines/queen/queen.cpp:60 engines/sky/detection.cpp:45 msgid "Use the floppy version's intro (CD version only)" -msgstr "" +msgstr "Použít verzi úvodu z diskety (Pouze verze CD)" #: engines/sky/compact.cpp:130 msgid "" @@ -2286,11 +2281,11 @@ msgstr "Videa PSX nalezena, ale ScummVM byl sestaven bez podpory barev RGB" #: engines/sword2/sword2.cpp:79 msgid "Show object labels" -msgstr "" +msgstr "Zobrazit jmenovky objektů" #: engines/sword2/sword2.cpp:80 msgid "Show labels for objects on mouse hover" -msgstr "" +msgstr "Zobrazit jmenovky objektů při najetí myši" #: engines/parallaction/saveload.cpp:133 #, c-format diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 28fa712d4f..2ea7e8d90e 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -262,7 +262,7 @@ bool AviDecoder::loadStream(Common::SeekableReadStream *stream) { // Initialize the video stuff too _audStream = createAudioStream(); if (_audStream) - _mixer->playStream(_soundType, _audHandle, _audStream); + _mixer->playStream(_soundType, _audHandle, _audStream, -1, getVolume(), getBalance()); debug (0, "Frames = %d, Dimensions = %d x %d", _header.totalFrames, _header.width, _header.height); debug (0, "Frame Rate = %d", _vidsHeader.rate / _vidsHeader.scale); @@ -451,4 +451,14 @@ void AviDecoder::queueAudioBuffer(uint32 chunkSize) { } } +void AviDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) + g_system->getMixer()->setChannelVolume(*_audHandle, getVolume()); +} + +void AviDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(*_audHandle)) + g_system->getMixer()->setChannelBalance(*_audHandle, getBalance()); +} + } // End of namespace Video diff --git a/video/avi_decoder.h b/video/avi_decoder.h index edd08c42a0..fb4dae6711 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -202,6 +202,11 @@ public: bool hasDirtyPalette() const { return _dirtyPalette; } protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + + // FixedRateVideoDecoder API Common::Rational getFrameRate() const { return Common::Rational(_vidsHeader.rate, _vidsHeader.scale); } private: diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp index 4738c3c8c0..538487f067 100644 --- a/video/bink_decoder.cpp +++ b/video/bink_decoder.cpp @@ -120,7 +120,7 @@ void BinkDecoder::startAudio() { const AudioTrack &audio = _audioTracks[_audioTrack]; _audioStream = Audio::makeQueuingAudioStream(audio.outSampleRate, audio.outChannels == 2); - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandle, _audioStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); } // else no audio } @@ -1647,4 +1647,14 @@ void BinkDecoder::IDCTPut(DecodeContext &ctx, int16 *block) { } } +void BinkDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +} + +void BinkDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +} + } // End of namespace Video diff --git a/video/bink_decoder.h b/video/bink_decoder.h index f1eadc6f17..a5e1b10270 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -78,7 +78,12 @@ public: // Bink specific bool loadStream(Common::SeekableReadStream *stream, const Graphics::PixelFormat &format); + protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + static const int kAudioChannelsMax = 2; static const int kAudioBlockSizeMax = (kAudioChannelsMax << 11); diff --git a/video/coktel_decoder.cpp b/video/coktel_decoder.cpp index ae0c35cd76..be36874db4 100644 --- a/video/coktel_decoder.cpp +++ b/video/coktel_decoder.cpp @@ -1292,7 +1292,7 @@ void IMDDecoder::processFrame() { // Start the audio stream if necessary if (startSound && _soundEnabled) { _mixer->playStream(_soundType, &_audioHandle, _audioStream, - -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + -1, getVolume(), getBalance(), DisposeAfterUse::NO); _soundStage = kSoundPlaying; } @@ -1474,6 +1474,16 @@ Graphics::PixelFormat IMDDecoder::getPixelFormat() const { return Graphics::PixelFormat::createFormatCLUT8(); } +void IMDDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +} + +void IMDDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +} + VMDDecoder::File::File() { offset = 0; @@ -2161,7 +2171,7 @@ void VMDDecoder::processFrame() { if (startSound && _soundEnabled) { if (_hasSound && _audioStream) { _mixer->playStream(_soundType, &_audioHandle, _audioStream, - -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + -1, getVolume(), getBalance(), DisposeAfterUse::NO); _soundStage = kSoundPlaying; } else _soundStage = kSoundNone; @@ -2687,6 +2697,16 @@ bool VMDDecoder::isPaletted() const { return _isPaletted; } +void VMDDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +} + +void VMDDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +} + } // End of namespace Video #endif // VIDEO_COKTELDECODER_H diff --git a/video/coktel_decoder.h b/video/coktel_decoder.h index b99a44f332..68696d5ff3 100644 --- a/video/coktel_decoder.h +++ b/video/coktel_decoder.h @@ -284,6 +284,11 @@ public: Graphics::PixelFormat getPixelFormat() const; +protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + private: enum Command { kCommandNextSound = 0xFF00, @@ -388,6 +393,11 @@ public: Graphics::PixelFormat getPixelFormat() const; +protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + private: enum PartType { kPartTypeSeparator = 0, diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp index 74f740f614..df91a2badd 100644 --- a/video/psx_decoder.cpp +++ b/video/psx_decoder.cpp @@ -385,7 +385,7 @@ void PSXStreamDecoder::queueAudioFromSector(Common::SeekableReadStream *sector) uint rate = (format & (1 << 2)) ? 18900 : 37800; _audStream = Audio::makeQueuingAudioStream(rate, stereo); - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream, -1, getVolume(), getBalance()); } sector->seek(24); @@ -694,4 +694,14 @@ void PSXStreamDecoder::decodeBlock(Common::BitStream *bits, byte *block, int pit } } +void PSXStreamDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audHandle)) + g_system->getMixer()->setChannelVolume(_audHandle, getVolume()); +} + +void PSXStreamDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audHandle)) + g_system->getMixer()->setChannelBalance(_audHandle, getBalance()); +} + } // End of namespace Video diff --git a/video/psx_decoder.h b/video/psx_decoder.h index 3695cb0f42..4364ec4bbb 100644 --- a/video/psx_decoder.h +++ b/video/psx_decoder.h @@ -81,6 +81,11 @@ public: Graphics::PixelFormat getPixelFormat() const { return _surface->format; } bool endOfVideo() const { return _stream->pos() >= _stream->size(); } +protected: + // VideoDecoder API + void updateVolume(); + void updateBalance(); + private: void initCommon(); Common::SeekableReadStream *_stream; diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 585f5927a1..aba545abc0 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -97,7 +97,7 @@ void QuickTimeDecoder::startAudio() { updateAudioBuffer(); for (uint32 i = 0; i < _audioTracks.size(); i++) { - g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandles[i], _audioTracks[i], -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO); + g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandles[i], _audioTracks[i], -1, getVolume(), getBalance(), DisposeAfterUse::NO); // Pause the audio again if we're still paused if (isPaused()) @@ -236,6 +236,18 @@ bool QuickTimeDecoder::loadStream(Common::SeekableReadStream *stream) { return true; } +void QuickTimeDecoder::updateVolume() { + for (uint32 i = 0; i < _audioHandles.size(); i++) + if (g_system->getMixer()->isSoundHandleActive(_audioHandles[i])) + g_system->getMixer()->setChannelVolume(_audioHandles[i], getVolume()); +} + +void QuickTimeDecoder::updateBalance() { + for (uint32 i = 0; i < _audioHandles.size(); i++) + if (g_system->getMixer()->isSoundHandleActive(_audioHandles[i])) + g_system->getMixer()->setChannelBalance(_audioHandles[i], getBalance()); +} + void QuickTimeDecoder::init() { Audio::QuickTimeAudioDecoder::init(); diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 1f614df18b..ce32562d64 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -133,6 +133,10 @@ protected: Common::QuickTimeParser::SampleDesc *readSampleDesc(Track *track, uint32 format); + // VideoDecoder API + void updateVolume(); + void updateBalance(); + private: void init(); diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp index 439fe9027d..359f4cb9bd 100644 --- a/video/smk_decoder.cpp +++ b/video/smk_decoder.cpp @@ -667,7 +667,7 @@ void SmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, uint32 unpac } if (!_audioStarted) { - _mixer->playStream(_soundType, &_audioHandle, _audioStream, -1, 255); + _mixer->playStream(_soundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance()); _audioStarted = true; } } else { @@ -819,4 +819,14 @@ void SmackerDecoder::unpackPalette() { free(chunk); } +void SmackerDecoder::updateVolume() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelVolume(_audioHandle, getVolume()); +} + +void SmackerDecoder::updateBalance() { + if (g_system->getMixer()->isSoundHandleActive(_audioHandle)) + g_system->getMixer()->setChannelBalance(_audioHandle, getBalance()); +} + } // End of namespace Video diff --git a/video/smk_decoder.h b/video/smk_decoder.h index fd5d658bdd..516882e7c8 100644 --- a/video/smk_decoder.h +++ b/video/smk_decoder.h @@ -77,9 +77,15 @@ public: virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize); protected: - Common::Rational getFrameRate() const { return _frameRate; } Common::SeekableReadStream *_fileStream; + // VideoDecoder API + void updateVolume(); + void updateBalance(); + + // FixedRateVideoDecoder API + Common::Rational getFrameRate() const { return _frameRate; } + protected: void unpackPalette(); // Possible runs of blocks diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index ae82a3374c..44d7917652 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -22,6 +22,8 @@ #include "video/video_decoder.h" +#include "audio/mixer.h" // for kMaxChannelVolume + #include "common/rational.h" #include "common/file.h" #include "common/system.h" @@ -61,6 +63,8 @@ void VideoDecoder::reset() { _curFrame = -1; _startTime = 0; _pauseLevel = 0; + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; } bool VideoDecoder::endOfVideo() const { @@ -94,6 +98,16 @@ void VideoDecoder::resetPauseStartTime() { _pauseStartTime = g_system->getMillis(); } +void VideoDecoder::setVolume(byte volume) { + _audioVolume = volume; + updateVolume(); +} + +void VideoDecoder::setBalance(int8 balance) { + _audioBalance = balance; + updateBalance(); +} + uint32 FixedRateVideoDecoder::getTimeToNextFrame() const { if (endOfVideo() || _curFrame < 0) return 0; diff --git a/video/video_decoder.h b/video/video_decoder.h index 2b99a2b1bf..3bb75ade09 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -185,6 +185,40 @@ public: */ bool isPaused() const { return _pauseLevel != 0; } + /** + * Get the current volume at which the audio in the video is being played + * @return the current volume at which the audio in the video is being played + */ + virtual byte getVolume() const { return _audioVolume; } + + /** + * Set the volume at which the audio in the video should be played. + * This setting remains until reset() is called (which may be called + * from loadStream() or close()). The default volume is the maximum. + * + * @note This function calls updateVolume() by default. + * + * @param volume The volume at which to play the audio in the video + */ + virtual void setVolume(byte volume); + + /** + * Get the current balance at which the audio in the video is being played + * @return the current balance at which the audio in the video is being played + */ + virtual int8 getBalance() const { return _audioBalance; } + + /** + * Set the balance at which the audio in the video should be played. + * This setting remains until reset() is called (which may be called + * from loadStream() or close()). The default balance is 0. + * + * @note This function calls updateBalance() by default. + * + * @param balance The balance at which to play the audio in the video + */ + virtual void setBalance(int8 balance); + protected: /** * Resets _curFrame and _startTime. Should be called from every close() function. @@ -207,12 +241,24 @@ protected: */ void resetPauseStartTime(); + /** + * Update currently playing audio tracks with the new volume setting + */ + virtual void updateVolume() {} + + /** + * Update currently playing audio tracks with the new balance setting + */ + virtual void updateBalance() {} + int32 _curFrame; int32 _startTime; private: uint32 _pauseLevel; uint32 _pauseStartTime; + byte _audioVolume; + int8 _audioBalance; }; /** |